Garfield.plot.niches_enrichment_dotplot
- Garfield.plot.niches_enrichment_dotplot(enrichments, niche, type='gsea', figsize=(10, 5), n_enrichments=10, title='auto', cmap=None, qval_cutoff=0.05)[source]
Create a dotplot for the enrichment results (either from Enrichr or GSEA).
- Parameters:
enrichments (dict) – Dictionary of enrichment results where the key is the niche name and the value is a dataframe of enrichment results.
niche (str) – The niche (cluster) to visualize enrichment for.
type (str, optional) – The type of enrichment analysis (‘enrichr’ or ‘gsea’). Default is ‘gsea’.
figsize (tuple, optional) – Figure size for the plot.
n_enrichments (int, optional) – Number of top enrichment terms to display (default is 10).
title (str, optional) – Title of the plot (default is ‘auto’, which uses the first gene set’s name).
cmap (matplotlib.colors.Colormap, optional) – Colormap for the plot.
qval_cutoff (float, optional) – Adjusted p-value or FDR cutoff to filter enrichment terms (default is 0.05).
- Returns:
ax – The matplotlib axis containing the plot.
- Return type:
matplotlib.axes.Axes