peach.pl.pattern_summary_barplot

peach.pl.pattern_summary_barplot#

peach.pl.pattern_summary_barplot(pattern_results, figsize=(14, 6), save_path=None)[source]#

Create summary barplot showing pattern counts across different analyses.

Parameters:
  • pattern_results (dict) – Dictionary with pattern DataFrames from different analyses e.g., {‘exclusive’: exclusive_df, ‘specialization’: spec_df, ‘tradeoff’: trade_df}

  • figsize (tuple, default: (14, 6)) – Figure size

  • save_path (str, optional) – Path to save the figure

Returns:

The summary barplot figure

Return type:

plt.Figure

Examples

>>> results = {
...     "exclusive": pc.tl.archetype_exclusive_patterns(adata),
...     "specialization": pc.tl.specialization_patterns(adata),
...     "tradeoff_pairs": pc.tl.tradeoff_patterns(adata, tradeoffs="pairs"),
... }
>>> fig = pc.pl.pattern_summary_barplot(results)