Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shiny-timecourse-inspector
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pertz-lab
shiny-timecourse-inspector
Commits
c61fd0c1
Commit
c61fd0c1
authored
Oct 11, 2019
by
dmattek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed alert from long2wide
parent
040aa4bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
35 deletions
+32
-35
server.R
server.R
+32
-35
No files found.
server.R
View file @
c61fd0c1
...
...
@@ -736,35 +736,14 @@ shinyServer(function(input, output, session) {
# or the frame number metadata can be missing, as is the case for tCourseSelected files that already have realtime column.
# Therefore, we cannot rely on that info to get time frequency; user must provide this number!
# Check for explicit NA's in the measurement columns
# Has to be here (and not in dataMod()) because we need to know the name of the measurement column (COLY)
if
(
sum
(
is.na
(
loc.out
[[
COLY
]])))
createAlert
(
session
,
"alertAnchorSidePanelNAsPresent"
,
"alertNAsPresent"
,
title
=
"Warning"
,
content
=
helpText.server
[[
"alertNAsPresent"
]],
append
=
FALSE
,
style
=
"warning"
)
else
closeAlert
(
session
,
"alertNAsPresent"
)
# check if time between 2 time points provided
if
(
input
$
chBtrajInter
)
{
if
(
input
$
inSelTimeFreq
==
0
)
createAlert
(
session
=
session
,
anchorId
=
"alertAnchorSidePanelNAsPresent"
,
alertId
=
"alertTimeFreq0"
,
title
=
"Error"
,
content
=
helpText.server
[[
"alertTimeFreq0"
]],
append
=
FALSE
,
style
=
"danger"
)
else
closeAlert
(
session
,
"alertTimeFreq0"
)
}
# required for subsetting downstream
setkeyv
(
loc.out
,
c
(
COLGR
,
COLID
,
COLRT
))
if
(
input
$
chBtrajInter
)
if
(
input
$
chBtrajInter
)
{
# check if time between 2 time points provided and greater than 0
if
(
input
$
inSelTimeFreq
>
0
)
{
closeAlert
(
session
,
"alertTimeFreq0"
)
# NA's may be already present in the dataset'.
# Interpolate (linear) them with na.interpolate as well
if
(
locPos
)
...
...
@@ -784,8 +763,32 @@ shinyServer(function(input, output, session) {
# Keep it? Expand it?
# Create a UI filed for selecting the column with mid.in data.
# What to do with that column during interpolation (see above)
}
else
{
closeAlert
(
session
,
"alertNAsPresent"
)
createAlert
(
session
=
session
,
anchorId
=
"alertAnchorSidePanelNAsPresent"
,
alertId
=
"alertTimeFreq0"
,
title
=
"Error"
,
content
=
helpText.server
[[
"alertTimeFreq0"
]],
append
=
T
,
style
=
"danger"
)
}
}
else
closeAlert
(
session
,
"alertTimeFreq0"
)
# Check for explicit NA's in the measurement columns
# Has to be here (and not in dataMod()) because we need to know the name of the measurement column (COLY)
if
(
sum
(
is.na
(
loc.out
[[
COLY
]])))
createAlert
(
session
,
"alertAnchorSidePanelNAsPresent"
,
"alertNAsPresent"
,
title
=
"Warning"
,
content
=
helpText.server
[[
"alertNAsPresent"
]],
append
=
T
,
style
=
"warning"
)
else
closeAlert
(
session
,
"alertNAsPresent"
)
## Trim x-axis (time)
if
(
input
$
chBtimeTrim
)
{
...
...
@@ -846,15 +849,9 @@ shinyServer(function(input, output, session) {
# Check for missing time points
# Missing rows in the long format give rise to NAs during dcast
# Here, we are not checking for explicit NAs in COLY column
if
((
sum
(
is.na
(
loc.dt
[[
COLY
]]))
==
0
)
&
(
sum
(
is.na
(
loc.dt.wide
))
>
0
))
{
createAlert
(
session
,
"alertAnchorSidePanelNAsPresent"
,
"alertNAsPresentLong2WideConv"
,
title
=
"Warning"
,
content
=
helpText.server
[[
"alertNAsPresentLong2WideConv"
]],
append
=
FALSE
,
style
=
"warning"
)
}
else
{
closeAlert
(
session
,
"alertNAsPresentLong2WideConv"
)
}
if
((
sum
(
is.na
(
loc.dt
[[
COLY
]]))
==
0
)
&
(
sum
(
is.na
(
loc.dt.wide
))
>
0
))
cat
(
stderr
(),
helpText.server
[[
"alertNAsPresentLong2WideConv"
]])
return
(
loc.m.out
)
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment