decoupler.plot_volcano

decoupler.plot_volcano(logFCs, pvals, contrast, name=None, net=None, top=5, source='source', target='target', weight='weight', sign_thr=0.05, lFCs_thr=0.5, sign_limit=None, lFCs_limit=None, color_pos='#D62728', color_neg='#1F77B4', color_null='gray', figsize=(7, 5), dpi=100, ax=None, return_fig=False, save=None)

Plot logFC and p-values. If name and net are provided, it does the same for the targets of a selected source.

Parameters:
logFCsDataFrame

Data-frame of logFCs (contrasts x features).

pvalsDataFrame

Data-frame of p-values (contrasts x features).

contraststr

Name of the contrast (row) to plot.

namestr, None

Name of the source to plot. If None, plot classic volcano (without subsetting targets).

netDataFrame, None

Network dataframe. If None, plot classic volcano (without subsetting targets).

topint

Number of top differentially expressed features.

sourcestr

Column name in net with source nodes.

targetstr

Column name in net with target nodes.

weightstr, None

Column name in net with weights. If none, set to None.

sign_thrfloat

Significance threshold for p-values.

lFCs_thrfloat

Significance threshold for logFCs.

sign_limitfloat

Limit of p-values to plot in -log10.

lFCs_limitfloat

Limit of logFCs to plot in absolute value.

color_pos: str

Color to plot significant positive genes.

color_neg: str

Color to plot significant negative genes.

color_null: str

Color to plot rest of the genes.

figsizetuple

Figure size.

dpiint

DPI resolution of figure.

axAxes, None

A matplotlib axes object. If None returns new figure.

return_figbool

Whether to return a Figure object or not.

savestr, None

Path to where to save the plot. Infer the filetype if ending on {.pdf, .png, .svg}.

Returns:
figFigure, None

If return_fig, returns Figure object.