updateClusterLabels: Update Cluster Labels Based on Frequency

View source: R/Seurat_based.R

updateClusterLabelsR Documentation

Update Cluster Labels Based on Frequency

Description

This function updates the labels of a specified column in a Seurat object's metadata based on the decreasing frequency of occurrence. Optionally, it can store the updated labels in a new column if a sorted column name is provided; otherwise, it overwrites the original column.

Usage

updateClusterLabels(SerObj, columnName, sortedColumnName = NULL)

Arguments

SerObj

A Seurat object containing the data and metadata.

columnName

The name of the column in the Seurat object's metadata to analyze and sort by frequency.

sortedColumnName

Optional. The name of the column where the sorted labels should be stored. If NULL, the function will overwrite the original column.

Value

The Seurat object with updated cluster labels in its metadata. If 'sortedColumnName' is provided, the updated labels are stored in this new column; otherwise, the original column is overwritten with the updated labels.


eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.