pycdr.perm.calculate_enrichment

pycdr.perm.calculate_enrichment(adata, cols, factor_list, nperm, genecol, thresh, seed=42)

Peforms enrichment test on factor loadings

For each factor loadings, this function performs ssGSEA (single sample gsea) on each assesses statistical significance using a test of proportions

Parameters
  • adata (AnnData) – anndata object in question

  • cols (str) – phenotype for testing

  • factor_list (list) – list of factors in the uns for testing

  • nperm (int) – number of permutations for ssGSEA

  • genecol (str) – name of column for genes

  • thresh (float) – threshold for “active” gene set

  • seed (int, optional) – for reproducibility. Defaults to 42.

Returns

in place modification of uns dict

Return type

AnnData