grassp.pl.bait_volcano_plots

grassp.pl.bait_volcano_plots#

bait_volcano_plots(data, baits=None, sig_cutoff=0.05, lfc_cutoff=2, n_cols=3, base_figsize=5, annotate_top_n=10, color_by=None, highlight=None, title=None, show=False)[source]#

Create volcano plots for bait enrichment analysis.

Parameters:
data AnnData

Annotated data matrix with proteins as observations (rows) and baits as variables (columns). Must contain a ‘pvals’ layer with p-values.

baits Optional[List[str]] (default: None)

List of bait names to plot. If None, plot all baits in data.var_names.

sig_cutoff float (default: 0.05)

P-value significance cutoff for highlighting enriched proteins.

lfc_cutoff float (default: 2)

Log fold change cutoff for highlighting enriched proteins.

n_cols int (default: 3)

Number of columns in the plot grid.

base_figsize float (default: 5)

Base figure size for each subplot.

annotate_top_n int (default: 10)

Number of top proteins to annotate with text labels.

color_by Optional[str] (default: None)

Column in data.obs to color points by.

highlight Optional[List[str]] (default: None)

List of protein names to highlight in blue.

title Optional[str] (default: None)

Title for the overall figure.

show bool (default: False)

Whether to display the plot.

Return type:

None | Axes

Returns:

None or matplotlib.axes.Axes If show=True, returns None. Otherwise returns the matplotlib axes.