plotGatingHierarchy: plotGatingHierarchy

Description Usage Arguments Value Examples

View source: R/plotGatingHierarchy_module.R

Description

A shiny Module to plot a gating hierarchy

Usage

1
2
3
4
5
6
7
plotGatingHierarchy(
  input,
  output,
  session,
  rval,
  plot_params = reactiveValues()
)

Arguments

input

shiny input

output

shiny output

session

shiny session

rval

a reactivevalues object with the following elements :

gating_set

: a GatingSet object

apply_trans

: logical; apply transformations defined in rval$gating_set

apply_comp

: logical; apply compensation defined in rval$gating_set

plot_params

A reactiveValues object with plot parameters

Value

A list of plots

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## Not run: 
library(shiny)
library(shinydashboard)
library(flowWorkspace)
library(flowCore)

if (interactive()){

  ui <- dashboardPage(
    dashboardHeader(title = "plotGatingHierarchy"),
    sidebar = dashboardSidebar(disable = TRUE),
    body = dashboardBody(
      fluidRow(
        column(12, box(width = NULL, simpleDisplayUI("simple_display_module")))
      )
    )
  )

  server <- function(input, output, session) {

    rval <- reactiveValues()
    plot_params <- reactiveValues()
    display_params <- reactiveValues()
    
    observe({
      gs <- load_gs("./inst/ext/gs")
      rval$gating_set <- gs
      plot_params$sample <- pData(gs)$name
      plot_params$plot_type <- "hexagonal"
      display_params$top <- paste(plot_params$sample, collapse = " + ") 
    })

    plot_all_gates <- callModule(plotGatingHierarchy, "module",
                      rval = rval,
                      plot_params = plot_params)

    callModule(simpleDisplay, "simple_display_module", 
               plot_list = plot_all_gates, params = display_params)

  }

  shinyApp(ui, server)

}

## End(Not run)

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