Fetch reduction coordinates from single-cell objects
fetch_reduction.Rd
Returns the reduction coordinates matching the name and dimensions supplied.
Usage
fetch_reduction(object, reduction, cells = NULL, dims = c(1, 2))
# S3 method for class 'Seurat'
fetch_reduction(object, reduction, cells = NULL, dims = c(1, 2))
# S3 method for class 'SingleCellExperiment'
fetch_reduction(object, reduction, cells = NULL, dims = c(1, 2))
# S3 method for class 'AnnDataR6'
fetch_reduction(object, reduction, cells = NULL, dims = c(1, 2))
Arguments
- object
A single cell object. Currently, Seurat, SingleCellExpleriment, and anndata objects are supported.
- reduction
the name of the reduction to pull coordinates from.
- cells
cell IDs for which to pull reduction data. If
NULL
, coordinates will be returned from all cells in the object. Cell IDs can be generated withfetch_cells()
.- dims
a numeric vector indicating the dimensions to pull. Currently, only two dimensions are supported, but
fetch_data()
supports more than two dimensions. For instructions on pulling more than two dimensions at once, see the examples offetch_data()
.