Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/SingleCellExperiment.R
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
.
1 2 3 4 5 6 7 | SingleCellExperiment(
...,
reducedDims = list(),
altExps = list(),
rowPairs = list(),
colPairs = 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. |
rowPairs |
A list of any number of SelfHits objects describing relationships between pairs of rows. Each entry should have number of nodes equal to the number of rows of the output SingleCellExperiment object. Alternatively, entries may be square sparse matrices of order equal to the number of rows of the output object. |
colPairs |
A list of any number of SelfHits objects describing relationships between pairs of columns. Each entry should have number of nodes equal to the number of columns of the output SingleCellExperiment object. Alternatively, entries may be square sparse matrices of order equal to the number of columns of the output 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 extra arguments in the constructor (e.g., reducedDims
altExps
)
represent the main extensions implemented in the SingleCellExperiment class.
This enables a consistent, 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.
colPairs
and rowPairs
, to hold pairing information for rows and columns.
sizeFactors
, to store size factors for normalization.
colLabels
, to store cell-level labels.
rowSubset
, to store a subset of rows.
?"SCE-combine"
, to combine or subset a SingleCellExperiment object.
?"SCE-internals"
, for developer use.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.