mgGeneSetSummaryByGene.Rd
This provides a shiny module over the [sparrow::geneSetSummaryByGenes()] functionality. It accepts a SparrowResult and a feature query and will enumerate the other genesets in the SparrowResult that include those genes.
mgGeneSetSummaryByGene(input, output, session, src, features, method, fdr)
mgGeneSetSummaryByGeneUI(id)
shiny bits
A [SparrowResultContainer()]
a character vector of feature id's to query
the GSEA method and FDR threshold used to filter the returned gene sets against. Gene sets with features found in `features` who don't make the `fdr` cutoff under the specific GSEA `method` will not be returned
the namespace for the UI element
a reactive list that contains the following reactives
the result from [sparrow::geneSetSummaryByGenes()] given the query params
the key of the user-selected geneset from the table
This is useful when you are exploring GSEA hits and find esoteric results there. You can select some of the "more extreme" genes in that geneset, for instance to see if they belong to another one that makes more sense to you given the biological context of your experiment.
When the `genesets_sigonly` checkbox is selected, gene sets with an FDR below the indicated `fdr` are returned, otherwise all gene sets that include any of the feautures in the query are returned.
mgGeneSetSummaryByGeneUI
: the UI for the module
# Retrieve some genes to query the result so we can identify other gene sets
# they belong to.
sres <- sparrow::exampleSparrowResult()
set.seed(0xBEEF)
query <- sample(sparrow::featureIds(sparrow::geneSetDb(sres)), 10)
app <- shiny::shinyApp(
ui = shiny::shinyUI(shiny::fluidPage(
exampleUISetup(),
title = "Gene Set Summary by Gene",
mgGeneSetSummaryByGeneUI("mod"))),
server = function(input, output, session) {
src <- shiny::reactive(SparrowResultContainer(sres))
ftrs <- shiny::reactive(query)
method <- reactive("camera")
fdr <- reactive(0.10)
shiny::callModule(mgGeneSetSummaryByGene, "mod", src, ftrs, method, fdr)
})
if (interactive()) {
shiny::runApp(app)
}