Find the default reduction name in a Seurat object.
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.
Examples
data("pancreas_sub")
names(pancreas_sub@reductions)
#> [1] "PCA" "UMAP"
DefaultReduction(pancreas_sub)
#> [1] "UMAP"
# Searches for matches to "pca"
DefaultReduction(pancreas_sub, pattern = "pca")
#> [1] "PCA"
# Searches for approximate matches to "pc"
DefaultReduction(pancreas_sub, pattern = "pc")
#> [1] "PCA"