Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
🚀
This server has been upgraded to GitLab release
15.7
.
🚀
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
Hide whitespace changes
Inline
Side-by-side
modules/selOutliers.R
View file @
aab0de85
...
...
@@ -10,39 +10,8 @@ modSelOutliersUI = function(id, label = "Outlier Selection") {
ns
<-
NS
(
id
)
tagList
(
h4
(
"Remove outliers"
),
fluidRow
(
column
(
2
,
numericInput
(
ns
(
'numOutliersPerc'
),
label
=
'% of data'
,
min
=
0
,
max
=
100
,
value
=
0
,
step
=
0.05
,
width
=
'100px'
),
checkboxInput
(
ns
(
'chBtrajInter'
),
'Interpolate gaps'
,
value
=
F
)
),
column
(
2
,
radioButtons
(
ns
(
'rbOutliersType'
),
label
=
'From'
,
choices
=
c
(
'top'
=
'top'
,
'top & bottom'
=
'mid'
,
'bottom'
=
'bot'
))
),
column
(
3
,
sliderInput
(
ns
(
'slOutliersGapLen'
),
label
=
'Remove tracks with gaps equal to or longer than'
,
min
=
1
,
max
=
10
,
value
=
1
,
step
=
1
)
),
column
(
3
,
downloadButton
(
ns
(
'downOutlierCSV'
),
label
=
'CSV with outlier IDs'
),
htmlOutput
(
ns
(
"txtOutliersPerc"
))
)
),
checkboxInput
(
ns
(
'chBplotDist'
),
'Plot data distribution'
,
value
=
F
),
uiOutput
(
ns
(
'uiDistPlot'
))
checkboxInput
(
ns
(
'chbRemoveOut'
),
'Remove otliers'
,
value
=
F
),
uiOutput
(
ns
(
'uiSelOutliers'
))
)
}
...
...
@@ -61,6 +30,46 @@ modSelOutliers = function(input, output, session, in.data) {
id
=
NULL
)
# UI for the entire module
output
$
uiSelOutliers
=
renderUI
({
cat
(
file
=
stderr
(),
'modSelOutliers:uiSelOutliers\n'
)
ns
<-
session
$
ns
if
(
input
$
chbRemoveOut
)
{
tagList
(
fluidRow
(
column
(
2
,
numericInput
(
ns
(
'numOutliersPerc'
),
label
=
'% of data'
,
min
=
0
,
max
=
100
,
value
=
0
,
step
=
0.05
,
width
=
'100px'
),
checkboxInput
(
ns
(
'chBtrajInter'
),
'Interpolate gaps'
,
value
=
F
)
),
column
(
2
,
radioButtons
(
ns
(
'rbOutliersType'
),
label
=
'From'
,
choices
=
c
(
'top'
=
'top'
,
'top & bottom'
=
'mid'
,
'bottom'
=
'bot'
))
),
column
(
3
,
sliderInput
(
ns
(
'slOutliersGapLen'
),
label
=
'Remove tracks with gaps equal to or longer than'
,
min
=
1
,
max
=
10
,
value
=
1
,
step
=
1
)
),
column
(
3
,
downloadButton
(
ns
(
'downOutlierCSV'
),
label
=
'CSV with outlier IDs'
),
htmlOutput
(
ns
(
"txtOutliersPerc"
))
)
),
checkboxInput
(
ns
(
'chBplotDist'
),
'Plot data distribution'
,
value
=
F
),
uiOutput
(
ns
(
'uiDistPlot'
))
)
}
})
# Display number of tracks and outliers
...
...
@@ -207,6 +216,10 @@ modSelOutliers = function(input, output, session, in.data) {
return
(
NULL
)
}
if
(
!
input
$
chbRemoveOut
)
{
return
(
loc.out
)
}
# store the number of trajectories before prunning
nCellsCounter
[[
'nCellsOrig'
]]
=
length
(
unique
(
loc.out
[[
'id'
]]))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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