infercnvpy.tl.ithcna

Contents

infercnvpy.tl.ithcna#

infercnvpy.tl.ithcna(adata, groupby, *, use_rep='X_cnv', key_added='ithcna', inplace=True)#

Compute the ITHCNA diversity score based on copy number variation [WFH+21].

A high score indicates a high diversity of CNV profiles of cells within a group.

The score is defined as follows:

Intratumoral heterogeneity scores based on CNAs and gene expressions The calculations of intratumoral heterogeneity scores were inspired by a previous study and modified as follows. First, to calculate ITHCNA, we used the relative expression value matrix generated by inferCNV and calculated the pairwise cell–cell distances using Pearson’s correlation coefficients for each patient. ITHCNA was defined as interquartile range (IQR) of the distribution for all malignant cell pairs’ Pearson’s correlation coefficients.

(from [WFH+21])

Parameters:
  • adata (AnnData) – annotated data matrix

  • groupby (str) – calculate diversity for each group defined in this category.

  • use_rep (str (default: 'X_cnv')) – Key under which the result of infercnvpy.tl.infercnv() is stored in adata.

  • key_added (str (default: 'ithcna')) – Key under which the score will be stored in adata.obs.

  • inplace (bool (default: True)) – If True, store the result in adata, otherwise return it.

Return type:

Optional[Mapping[str, float]]

Returns:

Depending of the value of inplace either returns a dictionary with one value per group or None.