supercell_purity: Compute purity of super-cells

View source: R/supercell_purity.R

supercell_purityR Documentation

Compute purity of super-cells

Description

Compute purity of super-cells

Usage

supercell_purity(
  clusters,
  supercell_membership,
  method = c("max_proportion", "entropy")[1]
)

Arguments

clusters

vector of clustering assignment (reference assignment)

supercell_membership

vector of assignment of single-cell data to super-cells (membership field of SCimplify function output)

method

method to compute super-cell purity. "max_proportion" if the purity is defined as a proportion of the most abundant cluster (cell type) within super-cell or "entropy" if the purity is defined as the Shanon entropy of the cell types super-cell consists of.

Value

a vector of super-cell purity, which is defined as: - proportion of the most abundant cluster within super-cell for method = "max_proportion" or - Shanon entropy for method = "entropy". With 1 meaning that super-cell consists of single cells from one cluster (reference assignment)


SuperCell documentation built on Oct. 25, 2024, 5:07 p.m.