% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generics.R, R/utils.R
\name{DefaultDimReduc<-}
\alias{DefaultDimReduc<-}
\alias{DefaultDimReduc}
\alias{DefaultDimReduc<-.Seurat}
\title{Set Default Dimensionality Reduction
Set the default dimensionality reduction for a specific assay in a Seurat object.}
\usage{
DefaultDimReduc(object, ...) <- value

DefaultDimReduc(object, assay = NULL)

\method{DefaultDimReduc}{Seurat}(object, ...) <- value
}
\arguments{
\item{object}{A \code{\link{Seurat}} object}

\item{...}{Arguments passed to other methods}

\item{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.}

\item{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 \code{\link{DimReduc}}, if possible
}
\description{
Searches for \code{\link{DimReduc}s} matching \dQuote{umap}, \dQuote{tsne},
or \dQuote{pca}, case-insensitive, and in that order. Priority given to
\code{\link{DimReduc}s} matching the \code{DefaultAssay} or assay specified
(eg. \dQuote{pca} for the default assay weights higher than \dQuote{umap}
for a non-default assay)
}
\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)

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

# Clear the set default
DefaultDimReduc(seurat_obj) <- NULL
}
}
\concept{utils}
