SingleCellExperiment-class {SingleCellExperiment} | R Documentation |
The SingleCellExperiment class is designed to represent single-cell sequencing data.
It inherits from the RangedSummarizedExperiment class and is used in the same manner.
In addition, the class supports storage of dimensionality reduction results (e.g., PCA, t-SNE) via reducedDims
,
and storage of alternative feature types (e.g., spike-ins) via altExps
.
SingleCellExperiment(..., reducedDims = list(), altExps = list())
... |
Arguments passed to the |
reducedDims |
A list of any number of matrix-like objects containing dimensionality reduction results, each of which should have the same number of rows as the output SingleCellExperiment object. |
altExps |
A list of any number of SummarizedExperiment objects containing alternative Experiments, each of which should have the same number of columns as the output SingleCellExperiment object. |
In this class, rows should represent genomic features (e.g., genes) while columns represent samples generated from single cells.
As with any SummarizedExperiment derivative,
different quantifications (e.g., counts, CPMs, log-expression) can be stored simultaneously in the assays
slot,
and row and column metadata can be attached using rowData
and colData
, respectively.
The reducedDims
and altExps
concepts are the main extensions of the SingleCellExperiment class.
This enables formalized representation of data structures that are commonly encountered during single-cell data analysis.
Readers are referred to the specific documentation pages for more details.
A SingleCellExperiment can also be created by coercing from a SummarizedExperiment or RangedSummarizedExperiment instance.
A SingleCellExperiment object.
Aaron Lun and Davide Risso
reducedDims
, for representation of dimensionality reduction results.
altExps
, for representation of data for alternative feature sets.
sizeFactors
, to store size factors for normalization.
?"SCE-combine"
, to combine or subset a SingleCellExperiment object.
?"SCE-internals"
, for developer use.
ncells <- 100 u <- matrix(rpois(20000, 5), ncol=ncells) v <- log2(u + 1) pca <- matrix(runif(ncells*5), ncells) tsne <- matrix(rnorm(ncells*2), ncells) sce <- SingleCellExperiment(assays=list(counts=u, logcounts=v), reducedDims=SimpleList(PCA=pca, tSNE=tsne)) sce ## coercion from SummarizedExperiment se <- SummarizedExperiment(assays=list(counts=u, logcounts=v)) as(se, "SingleCellExperiment")