Description Usage Arguments Value Examples
View source: R/plotGatingSet_module.R
Build plots from a GatingSet
plotGatingSet module server function
1 2 3 4 5 6 7 8 9 10 11 12 13 | plotGatingSetInput(id)
plotGatingSet(
input,
output,
session,
rval,
plot_params = reactiveValues(),
simple_plot = TRUE,
auto_update = TRUE,
show_gates = FALSE,
polygon_gate = NULL
)
|
id |
shiny id |
input |
shiny input |
output |
shiny output |
session |
shiny session |
rval |
a reactivevalues object with the following elements :
|
plot_params |
reactivevalues object used to initialize plot parameters. Amongst others it can contain the following elements (not mandatory):
|
simple_plot |
logical, disable a number of plot options (such as faceting, multiple plots with different x, y or color variables) |
auto_update |
Should plot update be automatic? If FALSE, plot update is controlled by an action button. |
show_gates |
Should gates with coordinates matching plot coordinates be displayed |
polygon_gate |
a reactiveValues object with polygon coordinates to be plotted as an additionnal layer. Must contain elements :
|
A reactivevalues object with the following elements :
a plot or a list of plots
plot parameters
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 47 48 | ## Not run:
library(shiny)
library(shinydashboard)
library(flowWorkspace)
library(flowCore)
library(viridis)
library(scales)
library(ggplot2)
library(ggrepel)
library(plotly)
library(ggridges)
if (interactive()){
ui <- dashboardPage(
dashboardHeader(title = "plotGatingSet"),
sidebar = dashboardSidebar(disable = TRUE),
body = dashboardBody(
fluidRow(
column(4, box(width = NULL, plotGatingSetInput("module"))),
column(8, box(width = NULL, simpleDisplayUI("simple_display_module")))
)
)
)
server <- function(input, output, session) {
rval <- reactiveValues()
plot_params <- reactiveValues()
observe({
utils::data("GvHD", package = "flowCore")
rval$gating_set <- GatingSet(GvHD)
plot_params$plot_type <- "histogram"
})
res <- callModule(plotGatingSet, "module",
rval = rval,
plot_params = plot_params)
callModule(simpleDisplay, "simple_display_module", res$plot)
}
shinyApp(ui, server)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.