ComputeARI_Ser: Compute Adjusted Rand Index (ARI) for a Seurat Object

View source: R/Seurat_based.R

ComputeARI_SerR Documentation

Compute Adjusted Rand Index (ARI) for a Seurat Object

Description

This function calculates the Adjusted Rand Index (ARI) between the true biological labels (e.g., cell types) and the predicted cluster assignments in a Seurat object. ARI is used to evaluate the similarity between two clustering results.

Usage

ComputeARI_Ser(
  SerObj,
  true.label = "cell_type",
  predicted.label = "seurat_clusters"
)

Arguments

SerObj

A Seurat object containing the single-cell RNA-seq data.

true.label

Character. The metadata label representing the true biological labels (e.g., "cell_type") in 'SerObj@meta.data'. Default is '"cell_type"'.

predicted.label

Character. The metadata label representing the predicted cluster assignments (e.g., "seurat_clusters") in 'SerObj@meta.data'. Default is '"seurat_clusters"'.

Value

The Adjusted Rand Index (ARI) score. A higher ARI indicates better alignment between the true labels and the predicted clusters.

Examples

# Compute ARI between true cell types and predicted Seurat clusters
ari_score <- ComputeARI_Ser(SerObj, true.label = "cell_type", predicted.label = "seurat_clusters")

# Compute ARI for a different set of predicted clusters
ari_score <- ComputeARI_Ser(SerObj, true.label = "cell_type", predicted.label = "cluster_method_X")


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