mmcci.an.run_gsea
- mmcci.an.run_gsea(sample: CCIData | None = None, assay: str = 'raw', lrs=None, organism='human', gene_sets=['KEGG_2021_Human', 'MSigDB_Hallmark_2020'], show_dotplot=False, show_barplot=True, top_term=5, figsize=(3, 5), use_background=True, background_list=None, return_results=True)[source]
Runs GSEA analysis on a sample.
- Parameters:
sample (CCIData) (optional) – The sample to run GSEA on. If not given, lrs are used. Defaults to None.
assay (str) (optional) – The assay to use for the GSEA analysis. Defaults to ‘raw’.
lrs (list) (optional) – A list of LR pairs to use for GSEA analysis instead of sample. Defaults to None.
organism (str) (optional) – The organism to use. Defaults to ‘human’.
gene_sets (list) (optional) – The gene sets to use for gseapy analysis. Defaults to [‘KEGG_2021_Human’, ‘MSigDB_Hallmark_2020’].
show_dotplot (bool) (optional) – Whether to show the dotplot. Defaults to False.
show_barplot (bool) (optional) – Whether to show the barplot. Defaults to True.
top_term (int) (optional) – The number of top terms to show. Defaults to 5.
figsize (tuple) (optional) – The size of the figure. Defaults to (3,5).
use_background (bool) (optional) – Whether to use a background list. Defaults to True.
background_list (list) (optional) – A list of genes to use as background. If none given, then ConnectomeDB2020_lit genes are used. Defaults to None.
return_results (bool) (optional) – Whether to return the results DataFrame. Defaults to True.
- Returns:
A DataFrame with the GSEA results if return_results=True, otherwise None.
- Return type:
pd.DataFrame or None