View source: R/userDefinedGeneSetDb-module.R
userDefinedGeneSetDb | R Documentation |
This module provides an upload button that allows a user to upload a table of gene set definitions in [sparrow::GeneSetDb()] format as a CSV file or excel file (if the readxl package is installed). Minimal validation checks are implemented.
userDefinedGeneSetDb(input, output, session, ...)
userDefinedGeneSetDbUI(id, ...)
input, output, session |
shiny module bits |
... |
pass through arguments |
id |
the module namespace |
A list of reactive components. '$gdb()' will be a GeneSetDb when the user uploades a valid gene set definition file. Otherwise it will be 'NULL'.
userDefinedGeneSetDbUI
: ui for the module
# You can upload the file available here:
(ex.fn <- system.file("testdata", "user-defined-genesets-example.xlsx",
package = "sparrow.shiny"))
app <- shiny::shinyApp(
ui = shiny::shinyUI(shiny::fluidPage(
exampleUISetup(),
title = "Costum Gene Set Collection Upload",
userDefinedGeneSetDbUI("mod"))),
server = function(input, output, session) {
shiny::callModule(userDefinedGeneSetDb, "mod", gdb)
})
if (interactive()) {
shiny::runApp(app)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.