fixZeroIndexing.seurat: Fix Zero Indexing in Seurat Clustering

View source: R/Seurat.Utils.R

fixZeroIndexing.seuratR Documentation

Fix Zero Indexing in Seurat Clustering

Description

Adjusts Seurat object metadata to fix zero-based cluster indexing, converting it to one-based indexing. This function modifies a specified metadata column in the Seurat object to replace zero-indexed cluster names with one-based indexing.

Usage

fixZeroIndexing.seurat(ColName.metadata = "res.0.6", obj = org)

Arguments

ColName.metadata

The name of the metadata column containing zero-based cluster indices. Default: 'res.0.6'.

obj

The Seurat object to be modified. Default: org.

Value

The Seurat object with the specified metadata column's cluster indices adjusted to one-based indexing.

Examples

## Not run: 
if (interactive()) {
  # Assuming `org` is a Seurat object with zero-based cluster indexing
  org <- fixZeroIndexing.seurat(ColName.metadata = "res.0.6", obj = org)
  # Now, `org` has its cluster indices in the 'res.0.6' metadata column adjusted to one-based indexing
}

## End(Not run)


vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.