View source: R/makeMetaCategorical.R
makeMetaCategorical | R Documentation |
Updates shinycell config to recognize a metadata as a discrete one. This function is useful when a discrete metadata only contains integers, e.g. unspervised cluster labels starting from 0 to (n-1) clusters. If these metadata are not factored, then ShinyCell is unable to recognise these as discrete metadata automatically. This is especially important when working with loom files as they do not support factors/levels by default.
makeMetaCategorical(scConf, meta.to.input, obj, maxLevels = 50)
scConf |
shinycell config data.table |
meta.to.input |
metadata from the single-cell metadata to be made discrete. Must match one of the following:
|
obj |
input single-cell object for Seurat (v3+) / SingleCellExperiment data or input file path for h5ad / loom files |
maxLevels |
maximum number of levels allowed for categorical metadata. Metadata with nlevels > maxLevels will throw up an error message |
updated shinycell config data.table
John F. Ouyang
scConf = makeMetaCategorical(scConf, "clusterID", loom_obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.