sc_reconstruction.metrics.metric_coexpression#

sc_reconstruction.metrics.metric_coexpression(adata_true, adata_pred, *, geneset_dict=None, correlation_measure='spearman', overlap_threshold=5, min_cells=20)[source]#

Mean co-expression similarity over MSigDB Hallmark gene sets.

Uses the MSigDB Hallmark collection of [Subramanian et al., 2005], fetched via OmniPath [Türei et al., 2021]. Wraps CoexpressionCalculator.gene_set_coexpression().

Parameters:
  • geneset_dict (Mapping[str, Sequence[str]] | None) – Mapping from gene-set name to list of gene symbols. If None, the Hallmark collection [Subramanian et al., 2005] is fetched from MSigDB via omnipath [Türei et al., 2021] (requires the omnipath package + internet on first call).

  • correlation_measure (str) – One of "pearson" or "spearman".

  • adata_true (anndata.AnnData)

  • adata_pred (anndata.AnnData)

  • overlap_threshold (int)

  • min_cells (int)

Return type:

float