Skip to contents

Find the default reduction name in a Seurat object

Usage

DefaultReduction(
  srt,
  pattern = NULL,
  min_dim = 2,
  max_distance = 0.1,
  verbose = TRUE
)

Arguments

srt

A Seurat object.

pattern

Character string containing a regular expression to search for.

min_dim

Minimum dimension threshold.

max_distance

Maximum distance allowed for a match.

verbose

Whether to print the message. Default is TRUE.

Value

Default reduction name.

Examples

data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
#>  [2026-07-02 08:52:35] Start standard processing workflow...
#>  [2026-07-02 08:52:35] Checking a list of <Seurat>...
#> ! [2026-07-02 08:52:35] Data 1/1 of the `srt_list` is "unknown"
#>  [2026-07-02 08:52:35] Perform `NormalizeData()` with `normalization.method = 'LogNormalize'` on 1/1 of `srt_list`...
#>  [2026-07-02 08:52:35] Perform `FindVariableFeatures()` on 1/1 of `srt_list`...
#>  [2026-07-02 08:52:35] Use the separate HVF from `srt_list`
#>  [2026-07-02 08:52:36] Number of available HVF: 2000
#>  [2026-07-02 08:52:36] Finished check
#>  [2026-07-02 08:52:36] Perform `ScaleData()`
#>  [2026-07-02 08:52:36] Perform pca linear dimension reduction
#>  [2026-07-02 08:52:36] Use stored estimated dimensions 1:23 for Standardpca
#>  [2026-07-02 08:52:37] Perform `Seurat::FindClusters()` with `cluster_algorithm = 'louvain'` and `cluster_resolution = 0.6`
#>  [2026-07-02 08:52:37] Reorder clusters...
#>  [2026-07-02 08:52:37] Skip `log1p()` because `layer = data` is not "counts"
#>  [2026-07-02 08:52:37] Perform umap nonlinear dimension reduction
#>  [2026-07-02 08:52:42] Standard processing workflow completed
names(pancreas_sub@reductions)
#> [1] "Standardpca"       "StandardpcaUMAP2D" "StandardUMAP2D"   

DefaultReduction(pancreas_sub)
#> [1] "StandardUMAP2D"

DefaultReduction(pancreas_sub, pattern = "pca")
#> [1] "Standardpca"

DefaultReduction(pancreas_sub, pattern = "umap")
#> [1] "StandardUMAP2D"