View source: R/reactiveGeneSetDb-module.R
reactiveGeneSetDb | R Documentation |
This can be instantiated from a "static" or "reactive" GeneSetDb object. It allows users to customize which genesets are active by:
reactiveGeneSetDb(
input,
output,
session,
gdb,
min.gs.size = 2L,
max.gs.size = Inf,
default_collections = NULL,
...
)
reactiveGeneSetDbUI(id, min = 2, max = 100L, ...)
input, output, session |
shiny module bits |
gdb |
A static or reactive GeneSetDb object |
min.gs.size, max.gs.size |
the default minimum and maximum geneset size set in the UI when 'gdb' is first loaded or changes (when reactive) |
default_collections |
a character vector of collections that are by default selected for use |
... |
pass through args |
id |
shiny module namespace |
min, max |
ranges for the min/max geneset slider |
1. Filtering out entire collections; and 2. Filtering genesets based on min and max (gene) size.
A list of reactive elements wired to the input 'gdb':
a 'reactive(gdb)'
a 'reacvtive(geneSets(gdb))'
reactives that indicate current selection of minimum and maximum gene set sizes to be used in 'sparrow::conform(gdb, ...)'
a 'shiny::reactiveList' that contains the state of this module
the shiny namespace for this module
reactiveGeneSetDbUI
: the UI for the module
sres <- sparrow::exampleSparrowResult()
gdb <- sparrow::geneSetDb(sres)
app <- shiny::shinyApp(
ui = shiny::shinyUI(shiny::fluidPage(
exampleUISetup(),
title = "Configure GeneSetDb",
reactiveGeneSetDbUI("mod"))),
server = function(input, output, session) {
shiny::callModule(reactiveGeneSetDb, "mod", gdb)
})
if (interactive()) {
shiny::runApp(app)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.