Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pertz-lab
shiny-timecourse-inspector
Commits
aab0de85
Commit
aab0de85
authored
Sep 24, 2019
by
dmattek
Browse files
UI displays upon checkbox activation.
parent
780770b7
Changes
1
Show whitespace changes
Inline
Side-by-side
modules/selOutliers.R
View file @
aab0de85
...
@@ -10,9 +10,33 @@ modSelOutliersUI = function(id, label = "Outlier Selection") {
...
@@ -10,9 +10,33 @@ modSelOutliersUI = function(id, label = "Outlier Selection") {
ns
<-
NS
(
id
)
ns
<-
NS
(
id
)
tagList
(
tagList
(
h4
(
checkboxInput
(
ns
(
'chbRemoveOut'
),
'Remove otliers'
,
value
=
F
),
"Remove outliers"
uiOutput
(
ns
(
'uiSelOutliers'
))
),
)
}
# Server-remove-outliers ----
modSelOutliers
=
function
(
input
,
output
,
session
,
in.data
)
{
# reactive counter to hold number of tracks before and after outlier removal
nCellsCounter
<-
reactiveValues
(
nCellsOrig
=
0
,
nCellsAfter
=
0
,
nOutlierTpts
=
0
)
# reactive vector with cell ids
vOut
=
reactiveValues
(
id
=
NULL
)
# UI for the entire module
output
$
uiSelOutliers
=
renderUI
({
cat
(
file
=
stderr
(),
'modSelOutliers:uiSelOutliers\n'
)
ns
<-
session
$
ns
if
(
input
$
chbRemoveOut
)
{
tagList
(
fluidRow
(
fluidRow
(
column
(
2
,
column
(
2
,
numericInput
(
ns
(
'numOutliersPerc'
),
numericInput
(
ns
(
'numOutliersPerc'
),
...
@@ -44,23 +68,8 @@ modSelOutliersUI = function(id, label = "Outlier Selection") {
...
@@ -44,23 +68,8 @@ modSelOutliersUI = function(id, label = "Outlier Selection") {
checkboxInput
(
ns
(
'chBplotDist'
),
'Plot data distribution'
,
value
=
F
),
checkboxInput
(
ns
(
'chBplotDist'
),
'Plot data distribution'
,
value
=
F
),
uiOutput
(
ns
(
'uiDistPlot'
))
uiOutput
(
ns
(
'uiDistPlot'
))
)
)
}
}
})
# Server-remove-outliers ----
modSelOutliers
=
function
(
input
,
output
,
session
,
in.data
)
{
# reactive counter to hold number of tracks before and after outlier removal
nCellsCounter
<-
reactiveValues
(
nCellsOrig
=
0
,
nCellsAfter
=
0
,
nOutlierTpts
=
0
)
# reactive vector with cell ids
vOut
=
reactiveValues
(
id
=
NULL
)
# Display number of tracks and outliers
# Display number of tracks and outliers
...
@@ -207,6 +216,10 @@ modSelOutliers = function(input, output, session, in.data) {
...
@@ -207,6 +216,10 @@ modSelOutliers = function(input, output, session, in.data) {
return
(
NULL
)
return
(
NULL
)
}
}
if
(
!
input
$
chbRemoveOut
)
{
return
(
loc.out
)
}
# store the number of trajectories before prunning
# store the number of trajectories before prunning
nCellsCounter
[[
'nCellsOrig'
]]
=
length
(
unique
(
loc.out
[[
'id'
]]))
nCellsCounter
[[
'nCellsOrig'
]]
=
length
(
unique
(
loc.out
[[
'id'
]]))
...
...
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