Commit aab0de85 authored by dmattek's avatar dmattek
Browse files

UI displays upon checkbox activation.

parent 780770b7
......@@ -10,9 +10,33 @@ modSelOutliersUI = function(id, label = "Outlier Selection") {
ns <- NS(id)
tagList(
h4(
"Remove outliers"
),
checkboxInput(ns('chbRemoveOut'), 'Remove otliers', value = F),
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(
column(2,
numericInput(ns('numOutliersPerc'),
......@@ -44,23 +68,8 @@ modSelOutliersUI = function(id, label = "Outlier Selection") {
checkboxInput(ns('chBplotDist'), 'Plot data distribution', value = F),
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
......@@ -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']]))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment