userDefinedGeneSetDb: Creates a GeneSetDb from a user-specfied gene set definition...

View source: R/userDefinedGeneSetDb-module.R

userDefinedGeneSetDbR Documentation

Creates a GeneSetDb from a user-specfied gene set definition table.

Description

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.

Usage

userDefinedGeneSetDb(input, output, session, ...)

userDefinedGeneSetDbUI(id, ...)

Arguments

input, output, session

shiny module bits

...

pass through arguments

id

the module namespace

Value

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'.

Functions

  • userDefinedGeneSetDbUI: ui for the module

Examples

# 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)
}

lianos/sparrow.shiny documentation built on Oct. 12, 2023, 2:43 a.m.