Reduced dimensions {SingleCellExperiment}R Documentation

Reduced dimensions methods

Description

Methods to get or set the dimensionality reduction results.

Usage

## S4 method for signature 'SingleCellExperiment'
reducedDim(x, type)

## S4 replacement method for signature 'SingleCellExperiment'
reducedDim(x, type) <- value

## S4 method for signature 'SingleCellExperiment'
reducedDims(x)

## S4 replacement method for signature 'SingleCellExperiment'
reducedDims(x) <- value

Arguments

x

A SingleCellExperiment object.

type

A string containing the name for the dimensionality reduction results or a numeric index containing the position of the desired dimenionality reduction result.

value

For reducedDim<-, a matrix (usually double-precision) of coordinates, for each cell (row) and dimension (column). For reducedDims<-, a named SimpleList object containing such matrices.

Details

Dimensionality reduction is often used to interpreting the results of single-cell data analysis. These methods allow the results of dimensionality reduction methods to be stored in a SingleCellExperiment object. Multiple results can be stored in a single object by assigning to different type in reducedDim<-.

If type is NULL or missing for reducedDim, the first set of dimensionality reduction results is returned (or NULL, if no results are present). If value is NULL for reducedDim<-, the set of results corresponding to type is removed from the object.

Value

For reducedDim, a numeric matrix is returned containing coordinates for cells (rows) and dimensions (columns).

For reducedDims, a named SimpleList of matrices is returned, with one matrix for each type of dimensionality reduction method.

For reducedDim<- and reducedDims<-, a SingleCellExperiment object is returned with updated results in the reducedDims slot.

For reducedDimNames, a character vector containing the names of the elements in reducedDims.

Author(s)

Aaron Lun

See Also

SingleCellExperiment-class

Examples

example(SingleCellExperiment, echo=FALSE)
reducedDim(sce, "PCA")
reducedDim(sce, "tSNE")
reducedDims(sce)

reducedDim(sce, "PCA") <- NULL
reducedDims(sce)

reducedDims(sce) <- SimpleList()
reducedDims(sce)

[Package SingleCellExperiment version 1.2.0 Index]