itpseq.Sample.volcano#
- Sample.volcano(pos=None, query='auto', motif=None, ax=None, x='log2FoldChange', y='log10pvalue', query_color='#BC0909', motif_color='#EDEA20', color='k', params={'figsize': (6, 4.5), 's': 2}, annotate=True, text_stroke=False, outfile=None, density_thresh=0, **kwargs)[source]#
Draws a volcano plot from the Differential Expression data.
- Parameters:
pos (str, optional) – Positions used to compute the
DE.query (str, optional) – Query used to select points to highlight and annotate by data.
motif (str, optional) – Query used to select points to highlight by motif.
ax (matplotlib.axes.Axes, optional) – ax to use for plotting, otherwise create a new figure.
x (str, optional) – Column from the
DEoutput to use as the x-axis.y (str, optional) – Column from the
DEoutput to use as the y-axis.query_color (str, optional) – Color of the points in the query.
motif_color (str, optional) – Color of the points in the motif.
color (str, optional) – Color of the background points.
params (dict, optional) – Optional parameters passed to scatter.
annotate (bool, optional) – If True, annotate the points from the query.
text_stroke (bool, optional)
outfile (str, optional) – If specified, save the figure to a file.
density_thresh (int, optional)
kwargs (optional) – Optional parameters passed to
DE.
- Return type:
matplotlib.axes.Axes
Examples
Create a volcano plot for positions E-A:
>>> sample.volcano('E:A')
Create a volcano plot for positions -2/E/P/A. Highlight and annotate the points above a threshold abs(L2FC) and log10(p-value):
>>> sample.volcano('-2:A', query='(abs(log2FoldChange) > 2) & (log10pvalue > 10)')
Create a volcano plot for positions -2/E/P/A. Highlight the points for motifs containing a central QK motif.
>>> sample.volcano('-2:A', motif='.QK.', motif_color='#FFAC1E', query='', annotate=False)