Garfield.analysis.get_niche_enrichr

Garfield.analysis.get_niche_enrichr(mks, geneset, niche_column='cluster', niches='all', organism='human', topn_genes=200)[source]

Perform Enrichr analysis on top genes for each niche derived from aggregated marker statistics (non-parallel version).

Parameters:
  • mks (DataFrame) – DataFrame containing marker statistics (from aggregate_top_markers).

  • geneset (list) – List of gene sets to use for enrichment analysis.

  • niche_column (str, optional) – The column in mks that represents the niche/cluster (default is ‘cluster’).

  • niches (str or list, optional) – The niches to perform enrichment analysis on. Default is “all” which considers all unique values in the niche_column of mks.

  • organism (str, optional) – Organism for Enrichr analysis (default is “human”).

  • topn_genes (int, optional) – Number of top genes to use for enrichment analysis for each niche (default is 20).

Returns:

A dictionary with niches as keys and corresponding Enrichr results as values.

Return type:

dict