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, ...)

Arguments

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

Value

A list of reactive elements wired to the input `gdb`:

gdb

a `reactive(gdb)`

geneSets

a `reacvtive(geneSets(gdb))`

min.gs.size,max.gs.size

reactives that indicate current selection of minimum and maximum gene set sizes to be used in `sparrow::conform(gdb, ...)`

.state

a `shiny::reactiveList` that contains the state of this module

.ns

the shiny namespace for this module

Details

1. Filtering out entire collections; and 2. Filtering genesets based on min and max (gene) size.

Functions

  • reactiveGeneSetDbUI: the UI for the module

Examples

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)
}