calc_sc3_stability_cluster: Calculate single SC3 stability

View source: R/stability.R

calc_sc3_stability_clusterR Documentation

Calculate single SC3 stability

Description

Calculate the SC3 stability index for a single cluster in a set of clusterings. The index varies from 0 to 1, where 1 suggests that a cluster is more stable across resolutions.

Usage

calc_sc3_stability_cluster(clusterings, res, cluster)

Arguments

clusterings

numeric matrix containing clustering information, each column contains clustering at a separate resolution

res

resolution of the cluster to calculate stability for

cluster

index of the cluster to calculate stability for

Details

This index was originally introduced in the SC3 package for clustering single-cell RNA-seq data. Clusters are awarded increased stability if they share the same samples as a cluster at another resolution and penalised at higher resolutions. We use a slightly different notation to describe the score but the results are the same:

s(c_{k, i}) = \frac{1}{size(L) + 1} \sum_{l \in L} \sum_{j \in N_l} \frac{size(c_{k, i} \cap c_{l, j})}{size(c_{l, j}) * size(N_l) ^ 2}

Where:

  • ⁠c_{x, y}⁠ is cluster y at resolution x

  • k is the resolution of the cluster we want to score

  • i is the index of the cluster we want to score

  • L is the set of all resolutions except k

  • l is a resolution in L

  • N_l is the set of clusters at resolution l that share samples with ⁠c_{k, i}⁠

  • j is a cluster in N_l

Value

SC3 stability index

See Also

The documentation for the calculate_stability function in the SC3 package


clustree documentation built on Nov. 6, 2023, 1:07 a.m.