userDefinedGeneSetDb.Rd
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, ...)
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"))
#> [1] "/__w/_temp/Library/sparrow.shiny/testdata/user-defined-genesets-example.xlsx"
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)
}