scatrans.pl.gseaplot

Contents

scatrans.pl.gseaplot#

scatrans.pl.gseaplot(ranked_genes, gsea_result=None, term=None, title=None, figsize=(6.5, 5.5), dpi=300, color='#88C544', cmap='seismic', ax=None, show=True, use_style=False, save_path=None, pheno_pos='Pos', pheno_neg='Neg', **kwargs)[source]#

Classic GSEA plot: running enrichment score (RES) curve + hits + ranked list.

Designed to work seamlessly with results from scat.run_gsea.

Parameters:
  • ranked_genes (pd.Series or list-like) – Gene scores (index=genes, values=scores). Same as passed to run_gsea.

  • gsea_result (pd.DataFrame, optional) – Result from run_gsea(). If provided with term, will try to use pre-computed RES curve and hits stored in .attrs[‘gsea_details’] for pixel-perfect match.

  • term (str, optional) – Term name to plot (must match a row in gsea_result[“Term”]).

  • title (standard scATrans plot args.)

  • figsize (standard scATrans plot args.)

  • dpi (standard scATrans plot args.)

  • save_path (standard scATrans plot args.)

  • show (standard scATrans plot args.)

  • use_style (standard scATrans plot args.)

  • ax (standard scATrans plot args.)

  • color (color for the RES curve and hit ticks.)

  • cmap (colormap for the ranked list bar at bottom.)

  • pheno_pos (labels for phenotype (shown in plot).)

  • pheno_neg (labels for phenotype (shown in plot).)

  • kwargs (Any)

Return type:

tuple[Any | None, Any | None]