multiVCtrlServer: Shiny module server for controlling multi-dataset views

View source: R/multiVCtrl.R

multiVCtrlServerR Documentation

Shiny module server for controlling multi-dataset views

Description

Implement control hub logic that provides data and parameters for xVServer, geneVServer and selectVServer

Usage

multiVCtrlServer(
  id,
  hdlist,
  choices = DIVE::hdlistchoicesMake(hdlist),
  cdata,
  key = "ID",
  preselect = NULL,
  checkFun = NULL,
  informd = system.file("info/ht_upload.Rmd", package = "DIVE")
)

Arguments

id

Character ID for specifying namespace, see shiny::NS.

hdlist

A list of matrices representing high dimensional datasets; the names are used for choices.

choices

Selection choices are by default created from automatic parsing of 'hdlist'. However, a manual list can be given, which should be appropriate for passing to shiny::selectizeInput.

cdata

A data.table of characteristics data, commonly phenotype or clinical data.

key

Name of column that contains IDs in cdata matching sample IDs in hdlist datasets. Defaults to "ID". Note that column should already be of class character.

preselect

Optional, pre-selected phenotype or clinical variables from cdata. If is NULL (not recommended for most cases), the user can dynamically render as many datasets views as they can source.

checkFun

Optional, a custom check function for an additional layer of checking/modifying uploaded data. It should return a list containing message and result (result should be NULL when data fails checks).

informd

Relative path to the Rmarkdown file, whose contents will be displayed in the modal.

Details

The server logic handles sourcing of large expression datasets with three different methods:

  1. Selecting from available pre-processed datasets.

  2. User-uploaded data.

  3. A beta (least-supported) method of retrieving datasets from GEO.

The data in cdata is supposed to be a phenotype or clinical feature that one usually tries to correlate with expression data and can be numeric or categorical. The module handles upload of phenotype/clinical data, using a mutable version of cdata that appends user uploaded data.

Value

A reactive values list containing the data matrix for the parameter

hdata

of the multiVServer module, as well as parameters for geneVServer and selectVServer.


avucoh/DIVE documentation built on Aug. 29, 2023, 6:02 p.m.