Get default reduction from object
default_reduction.Rd
Returns the default reduction for the single-cell object passed. default_reduction
will check for reductions in the order below. If a reduction exists, it will be returned. If not, the function will check for the next reduction on the list. If none of the reductions in the list exist, the function will return an error.
UMAP
t-SNE
PCA
Usage
default_reduction(object)
# S3 method for class 'Seurat'
default_reduction(object)
# S3 method for class 'SingleCellExperiment'
default_reduction(object)
# S3 method for class 'AnnDataR6'
default_reduction(object)
Details
This is a utility function that is most useful for defining defaults in plotting functions, to reduce the number of required parameters end users need to supply. see our website for an example of usage in a function.
Methods (by class)
default_reduction(Seurat)
: Seurat objectsIn Seurat objects,
default_reduction
is a wrapper forSeuratObject::DefaultDimReduc()
.default_reduction(SingleCellExperiment)
: SingleCellExperiment objectsThe search order for SingleCellExperiment objects is below.
fetch_reduction
will search in the order described for a reduction named exactly as described.UMAP
TSNE
PCA
default_reduction(AnnDataR6)
: AnnDataR6 objectsThe search order for anndata objects is below.
fetch_reduction
will search in the order described for a reduction named exactly as described.X_umap
X_tsne
X_pca