selectionInput: Select samples and subsets from a GatingSet

Description Usage Arguments Value Examples

View source: R/selection_module.R

Description

Select samples and subsets from a GatingSet

selection module server function

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
selectionInput(id)

selection(
  input,
  output,
  session,
  rval,
  params = reactiveValues(),
  multiple_subset = TRUE
)

Arguments

id

shiny id

input

shiny input

output

shiny output

session

shiny session

rval

reactivevalues object with the following elements :

gating_set

: a GatingSet object

gate

: a filter object (as build using polygonGate() for instance)

parent

: the name of the parent gate

params

reactivevalues object used to initialize selected samples and subsets with elements (not mandatory) :

sample

: initially selected samples

subset

: initially selected subsets

multiple_subset

logical; allow selection of multiple subsets

Value

a reactivevalues object with input values amongst which:

sample

: selected samples

subset

: selected subsets

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 
library(shiny)
if (interactive()){
  
  ui <- fluidPage(
    selectionInput("selection_module")
  )
  
  server <- function(input, output, session) {
    
    rval <- reactiveValues()
    params <- reactiveValues()
    
    observe({
      gs <- load_gs("./inst/ext/gs")
      rval$gating_set <- gs
      params$sample <- pData(gs)$name[2]
    })
    
    callModule(selection, "selection_module", rval, params = params)
  }
  
  shinyApp(ui, server)
  
}

## End(Not run)

VoisinneG/flowR documentation built on June 1, 2021, 6:42 p.m.