GetGruffiClusteringName: Retrieve First Clustering Run or First Matching Pattern Run

View source: R/gruffi.R

GetGruffiClusteringNameR Documentation

Retrieve First Clustering Run or First Matching Pattern Run

Description

Fetches the first clustering run from a Seurat object, optionally filtered by a specific pattern (e.g., ".reassigned").

Usage

GetGruffiClusteringName(
  obj,
  pattern = ".reassigned$",
  granule.res.slot = "optimal.granule.res"
)

Arguments

obj

A Seurat object with clustering results in meta.data.

pattern

A character string pattern to filter clustering runs. Default is ".reassigned".

Value

The name of the first clustering run that matches the pattern if any; otherwise, the name of the first available clustering run.

Examples

# Assume `seuratObj` is your Seurat object
GetGruffiClusteringName(seuratObj)
GetGruffiClusteringName(seuratObj, pattern = "someOtherPattern")


jn-goe/gruffi documentation built on Nov. 7, 2024, 10:38 p.m.