Searches for DimReducs matching “umap”, “tsne”, or “pca”, case-insensitive, and in that order. Priority given to DimReducs matching the DefaultAssay or assay specified (eg. “pca” for the default assay weights higher than “umap” for a non-default assay)

DefaultDimReduc(object, ...) <- value

DefaultDimReduc(object, assay = NULL)

# S3 method for class 'Seurat'
DefaultDimReduc(object, ...) <- value

Arguments

object

A Seurat object

...

Arguments passed to other methods

value

Character string specifying the name of the dimensionality reduction to set as default. Set to NULL to clear the default for the current assay.

assay

Name of assay to use; defaults to the default assay of the object

Value

A Seurat object with the default dimensionality reduction updated.

The default DimReduc, if possible

Details

This function stores the default dimensionality reduction on a per-assay basis. This function only needs to be run if users want to override the default DimReduc selection logic that Seurat employs. When `DefaultDimReduc()` is called, it will return the assay-specific default if one has been set. If none was explicitly set then default Seurat logic will be used to select default.

Examples

DefaultDimReduc(pbmc_small)
#> [1] "tsne"

if (FALSE) { # \dontrun{
# Set UMAP as default for RNA assay
DefaultDimReduc(seurat_obj) <- "umap"

# Clear the set default
DefaultDimReduc(seurat_obj) <- NULL
} # }