Garfield.analysis.get_fast_niche_enrichr
- Garfield.analysis.get_fast_niche_enrichr(mks, geneset, niche_column='cluster', niches='all', organism='human', topn_genes=20, n_jobs=4)[source]
Perform Enrichr analysis on top genes for each niche derived from aggregated marker statistics.
- 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).
n_jobs (int, optional) – Number of parallel jobs to run (default is 1, no parallelism).
- Returns:
A dictionary with niches as keys and corresponding Enrichr results as values.
- Return type:
dict