createConfig: Create a shinycell config data.table

View source: R/createConfig.R

createConfigR Documentation

Create a shinycell config data.table

Description

Create a shinycell config data.table containing (i) the single-cell metadata to display on the Shiny app, (ii) ordering of factors / categories of categorical metadata and (iii) colour palettes associated with each metadata.

Usage

createConfig(obj, meta.to.include = NA, legendCols = 4, maxLevels = 50)

Arguments

obj

input single-cell object for Seurat (v3+) / SingleCellExperiment data or input file path for h5ad / loom files

meta.to.include

columns to include from the single-cell metadata. Default is NA, which is to use all columns. Users can specify the columns to include, which must match one of the following:

  • Seurat objects: column names in seu@meta.data i.e. colnames(seu@meta.data)

  • SCE objects: column names in sce@colData i.e. colnames(sce@colData)

  • h5ad files: column names in h5ad.obs i.e. h5ad.obs.columns.values

  • loom files: column names in loom/col_attrs i.e. loom/col_attrs.names

legendCols

maximum number of columns allowed when displaying the legends of categorical metadata

maxLevels

maximum number of levels allowed for categorical metadata. Metadata with nlevels > maxLevels will be discarded automatically

Value

shinycell config data.table

Author(s)

John F. Ouyang

Examples

scConf = createConfig(obj)


SGDDNB/ShinyCell documentation built on Jan. 25, 2024, 3:19 p.m.