cellink.pl.volcano#
- cellink.pl.volcano(df, logfc_col='logFC', pval_col='pval', label_col=None, pval_thresh=0.05, logfc_thresh=1.0, highlight_color='red', non_sig_color='grey', figsize=None, labelsize=None, titlesize=None, title=None, show=None, save=None, dpi=300, ax=None)#
Generate a volcano plot showing -log10(p-value) vs. log fold change.
- Parameters:
df (pandas.DataFrame) – DataFrame containing log fold changes and p-values.
logfc_col (str, default 'logFC') – Column name for log fold changes.
pval_col (str, default 'pval') – Column name for p-values.
label_col (str) – Column name for gene/feature labels. Used for annotation.
pval_thresh (float, default 0.05) – Significance threshold for p-values.
logfc_thresh (float, default 1.0) – Threshold for absolute log fold change.
highlight_color (str, default 'red') – Color for significant points.
non_sig_color (str, default 'grey') – Color for non-significant points.
figsize (tuple) – Figure size.
labelsize (int) – Axis label font size.
titlesize (int) – Title font size.
title (str) – Plot title.
show (bool or None) – Whether to display the plot.
save (str or None) – Path to save the figure. If provided, the figure is saved instead of shown.
dpi (int, default 300) – Figure resolution.
ax (matplotlib.axes.Axes) – Axis to plot on. If None, a new figure is created.
- Return type:
- Returns:
matplotlib.figure.Figure The resulting volcano plot figure.
- Raises:
ValueError – If required columns are missing from the DataFrame.