xomics.plot_volcano

xomics.plot_volcano(ax=None, figsize=(6, 6), df=None, col_fc=None, col_pval=None, col_names=None, col_cbar=None, th_fc=0.5, th_pval=0.05, names_to_annotate=None, colors=None, colors_pos_neg_non=None, size=50, sizes_pos_neg_non=None, alpha=1.0, edge_color='white', edge_width=0.5, cmap='viridis', label_fontdict=None, label_adjust_text_dict=None, loc_legend=2, legend=True, minor_ticks=False)[source]

Generate and display a volcano plot based on fold-change and p-value data.

Parameters:
  • ax (Optional[Axes]) – Axes object for the plot. If not provided, a new Axes object is created.

  • figsize (Tuple[int, int]) – Size of the figure.

  • df (Optional[DataFrame]) – DataFrame containing fold-change and p-values.

  • col_fc (Optional[str]) – Name of column from df containing fold change values for each protein (log2 fold recommended).

  • col_pval (Optional[str]) – Name of column from df containing p-values for each protein (-log10 fold recommended).

  • col_names (Optional[str]) – Columns with protein/gene names.

  • th_fc (float) – Threshold for fold-change, applied for negative and positive values.

  • th_pval (float) – Threshold for p-value, -log10 transformed before applied.

  • names_to_annotate (Optional[list]) – List of specific protein/gene names to label on the plot.

  • colors (Union[str, List[str], None]) – Colors to use for the plot. Either a single color or a list of colors.

  • colors_pos_neg_non (Optional[Tuple[str, str, str]]) – Tuple containing colors for significant positive, significant negative, and non-significant points.

  • size (int) – Size of the points.

  • sizes_pos_neg_non (Optional[Tuple[int, int, int]]) – Tuple containing sizes for significant positive, significant negative, and non-significant points.

  • alpha (float) – Alpha transparency level for points.

  • edge_color (str) – Color of the edge of the points.

  • edge_width (float) – Width of the edge of the points.

  • label_fontdict (Optional[dict]) – Dictionary of font properties for labels.

  • label_adjust_text_dict (Optional[dict]) – Dictionary of properties for adjust_text function to adjust overlapping labels.

  • label_arrow – If True, black arrows are used for annotations (can be adjusted using label_adjust_text_dict)

  • loc_legend (int) – Location index for the plot legend.

  • legend (bool) – If True, display the legend. If False, hide the legend.

  • minor_ticks (bool) – If True, shows minor ticks in plot.

Returns:

The Axes object representing the plot.

Return type:

ax

See also

-

Parameters: