mgTableBrowser.Rd
This module lists all of the genesets from an analysis that are significant given an `fdr` and `method` of analysis. Row selections trigger a shiny event that broadcasts the key of the geneset that was selected. You would then want to `observeEvent(this$selected)` in your `server.R` (or similar) so you can react to the gene set selection the user triggers.
mgTableBrowser(input, output, session, src, method, fdr, server = TRUE)
mgTableBrowserUI(id)
shiny module bits
the SparrowResultContainer
object
a reactive that determines which method to explore from this result
a reactive that gives the fdr threshold to filter results in the table by.
boolean passed to [DT::renderDataTable()] (default: `TRUE`).
the shiny id of the UI module
a list with reactives:
The table of gene sets and their statistics that pass the prescribed
fdr
thershold
The geneset that is currently "active"/selected by the user. This
is defined as <collection>_::_<name>
mgTableBrowserUI
: The UI for the module.
sres <- sparrow::exampleSparrowResult()
app <- shiny::shinyApp(
ui = shiny::shinyUI(shiny::fluidPage(
exampleUISetup(),
title = "GSEA Stats Table Browser Module",
mgTableBrowserUI("mod"))),
server = function(input, output, session) {
src <- shiny::reactive(SparrowResultContainer(sres))
method <- shiny::reactive("camera")
fdr <- shiny::reactive(0.2)
shiny::callModule(mgTableBrowser, "mod", src, method, fdr)
})
if (interactive()) {
shiny::runApp(app)
}