Learn R Programming

scStability (version 1.0.2)

compareEmb: Compare dimensional reduction embeddings and calculate stability statistics

Description

Evaluates the stability of a set of dimension reduction embeddings by performing pairwise Procrustes alignment and calculating Kendall's Tau correlation between each pair. This function quantifies the consistency of embeddings generated with the same algorithm but different random initializations.

Usage

compareEmb(emb_list, n_cores = 1, verbose = TRUE, print_plot = TRUE)

Value

A list containing the following components:

mean

Numeric value representing the overall mean correlation across all pairwise comparisons

mean_per_embedding

Numeric vector of mean correlation values for each embedding

all_pairwise_correlations

Numeric vector containing all pairwise correlation values

range

Numeric vector with minimum and maximum of mean correlation per embedding

ci

Numeric vector containing the lower and upper bounds of the 95% confidence interval

Arguments

emb_list

A list of 2D embeddings (each typically containing coordinates for UMAP or t-SNE) created by the createEmb function

n_cores

Integer specifying the number of CPU cores to use for parallelization (default: 1)

verbose

Whether the function should print summary statistics as it calculates them

print_plot

Whether the final violin plot should be automatically printed