UI & module to generate enrichment map plots.
Examples
library(shiny)
# get DESeqResults object
data(res_dex, package='carnation')
# get enrichResult object
data(eres_dex, package='carnation')
# convert to GeneTonic object
gt <- GeneTonic::shake_enrichResult(eres_dex)
#> Found 2483 gene sets in `enrichResult` object, of which 2483 are significant.
#> Converting for usage in GeneTonic...
obj <- reactive({
list(l_gs = gt$l_gs,
anno_df = gt$anno_df,
label = 'comp1')
})
res_obj <- reactive({ res })
config <- reactiveVal(get_config())
# run simple shiny app with plot
if(interactive()){
shinyApp(
ui = fluidPage(
sidebarPanel(enrichmapUI('p', 'sidebar')),
mainPanel(enrichmapUI('p', 'main'))
),
server = function(input, output, session){
enrichmapServer('p', obj, res_obj, config)
}
)
}