DefaultReduction: Find the default reduction name in a Seurat object.

View source: R/SCP-workflow.R

DefaultReductionR Documentation

Find the default reduction name in a Seurat object.

Description

Find the default reduction name in a Seurat object.

Usage

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

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.

Value

Default reduction name.

Examples

data("pancreas_sub")
names(pancreas_sub@reductions)
DefaultReduction(pancreas_sub)

# Searches for matches to "pca"
DefaultReduction(pancreas_sub, pattern = "pca")

# Searches for approximate matches to "pc"
DefaultReduction(pancreas_sub, pattern = "pc")


zh542370159/SCP documentation built on Nov. 22, 2023, 2:34 a.m.