Garfield.analysis.get_niche_gsea
- Garfield.analysis.get_niche_gsea(mks, geneset, niche_column='cluster', niches='all', geneset_size=[5, 500], permutations=1000, n_jobs=20)[source]
Perform GSEA analysis for each niche based on the full ranked gene list from marker statistics.
- Parameters:
mks (DataFrame) – DataFrame containing marker statistics (from aggregate_top_markers).
geneset (list) – List of gene sets to use for GSEA 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 GSEA analysis on. Default is “all” which considers all unique values in the niche_column of mks.
geneset_size (list of int, optional) – Minimum and maximum size of genesets to use in GSEA analysis (default is [5, 500]).
permutations (int, optional) – Number of permutations to use in GSEA analysis (default is 1000).
n_jobs (int, optional) – Number of parallel jobs to run (default is 20).
- Returns:
A dictionary with niches as keys and corresponding GSEA results as values.
- Return type:
dict