opendvp.plotting.volcano#
- volcano(adata, x='mean_diff', y='-log10_p_corr', significant=False, FDR=None, significant_metric='p_corr', tag_top=None, group1=None, group2=None, return_fig=False, ax=None, highlight_genes=None, show_highlighted_genes_names=True, **kwargs)#
- Plot a volcano plot from an AnnData object. - Parameters#- adataAnnData
- An AnnData object with statistical test results stored in - adata.var.
- xstr
- Column name in - adata.varfor the x-axis (e.g., log2 fold change).
- ystr
- Column name in - adata.varfor the y-axis (e.g., -log10 p-value).
- significantbool
- Whether to highlight significant points based on FDR threshold. 
- FDRfloat or None
- Threshold for corrected p-value (e.g., 0.05). Required if - significant=True.
- tag_topint or None
- Number of top hits (by - y) to label with text, regardless of significance.
- group1str or None
- Name of the first group (used for x-axis label annotation). 
- group2str or None
- Name of the second group (used for x-axis label annotation). 
- return_figbool
- If True, returns the matplotlib - figobject for further modification.
- highlight_geneslist or None
- List of gene names/IDs to highlight and label on the plot, if present in adata.var.index. 
- show_highlighted_genes_namesbool
- If True, shows names of highlighted genes on the plot. 
- axmatplotlib.axes.Axes, optional
- Axes object to plot on. If None, a new figure and axes are created. 
- **kwargs
- Additional keyword arguments passed to matplotlib scatter. 
 - Returns:#- figmatplotlib.figure.Figure or None
- The - figobject if- return_fig=True, otherwise None.