partipy.barplot_functional_enrichment

partipy.barplot_functional_enrichment#

partipy.barplot_functional_enrichment(top_features, show=True)#

Generate bar plots showing functional enrichment scores for each archetype.

Each plot displays the top enriched features (e.g., biological processes) for one archetype.

Parameters:
  • top_features (dict) – A dictionary where keys are archetype indices (0, 1,…) and values are pd.DataFrames containing the data to plot. Each DataFrame should have a column for the feature (‘Process’) and a column for the archetype (0, 1, …)

  • show (bool, default True) – Whether to show the plots immediately. If False, the plots are created but not displayed.

Returns:

list A list of plotnine.ggplot objects, one for each archetype.