Skip to content

msmu.pl.plot_volcano

Plot differential-expression results using raw p-values.

Parameters:

Name Type Description Default
results DataFrame

DataFrame with features, log2fc, and p_value columns. See run_de for differential-expression analysis.

required
ctrl str | None

Control label shown in the title and downregulated annotation; does not select/filter rows.

required
expr str | None

Experimental label shown in the title and upregulated annotation; does not select/filter rows.

None
log2fc_threshold float

Absolute log2 fold-change cutoff. UP/DOWN require strictly greater/smaller fold changes.

required
pval_threshold float

Raw p-value cutoff (strictly less than); q_value is not used.

0.05
label_top int | None

Maximum number of feature labels in each significant direction, ranked by fold change; None disables labels.

None

Returns:

Type Description
Figure

plotly Figure; the input DataFrame is copied and remains unchanged.

Notes

Supply finite log2 fold changes and positive p-values for finite plotted coordinates. The function does not perform multiple-testing correction.

Examples:

import msmu as mm
import pandas as pd
results = pd.DataFrame({"features": ["P1", "P2"], "log2fc": [2., -2.], "p_value": [.001, .01]})
fig = mm.pl.plot_volcano(results, ctrl="control", expr="treated", log2fc_threshold=1.)
fig.show()