geneSetContrastView.Rd
The module is meant to be displayed in "a box" so that the user can examine the coherent (or not) behavior of the geneset across a contrast with respect to the background distribution of all genes in the contrast.
geneSetContrastView(
input,
output,
session,
src,
server = TRUE,
maxOptions = Inf,
sep = "_::_",
feature.link.fn = ncbi.entrez.link,
feature_table_filter = "none",
itools = c("wheel_zoom", "box_select", "reset", "save")
)
geneSetContrastViewUI(id, height = "590px", width = "400px")
updateActiveGeneSetInContrastView(session, viewer, geneset, src)
the shiny-required bits for the module
the shiny-required bits for the module
the shiny session
a `SparrowResultContainer`
logical indicating wether the options should be generated in the server module, default: `TRUE`
a paremeter used to customize the `GeneSetSelect::selectizeInput` UI element to configure the maximum number of elements to include in the select dropdown, the remainder of the genesets will be loaded from the server side. Default: `Inf` for all.
the string used to concatenate geneset `collection` and `name` to generate a uniqe string for a geneset
a function that takes a name of a column and returns a url linked version of the element that will provide more info for the particular feature
filter param for [renderFeatureStatsDataTable()]
the plotly tools to show in the geneset contrast visual
the shiny id of the module
the height and width of the module
a `geneSetContrastViewModule`
the key of a geneset to select
returns a list of reactive elements:
the [geneSetSelect()] module
a character vector of feature_ids currently brushed in the contrast view
A `tagList` of html stuff to dump into the UI.
Embedded within this module is the [geneSetSelect()] module, which provides the list of genesets the user can examine, as well as the title of the current geneset under scrutiny.
Below the geneSet picker, we embed an [iplot()] view of the result so the user can observe the behavior of the geneset across the contrast. The user can pick the type of plot to show (density or boxplot) as well as which statistics to use for plotting (logFC or t-statistics).
An `updateActiveGeneSetInContrastView` function is provided to enable interactions external to this module the ability to update the geneset selected in the [geneSetSelect()] module.
geneSetContrastViewUI
: the UI for the module
updateActiveGeneSetInContrastView
: allows you to update the active
geneset in a contrast view module externally.
sres <- sparrow::exampleSparrowResult()
app <- shiny::shinyApp(
ui = shiny::shinyUI(shiny::fluidPage(
exampleUISetup(),
title = "Gene Set Contrast View",
geneSetContrastViewUI("mod"))),
server = function(input, output, session) {
src <- shiny::reactive(SparrowResultContainer(sres))
shiny::callModule(geneSetContrastView, "mod", src)
})
if (interactive()) {
shiny::runApp(app)
}