pegasus.pseudo.volcano
- pegasus.pseudo.volcano(pseudobulk, de_key='deseq2', qval_threshold=0.05, log2fc_threshold=1.0, rank_by='log2fc', top_n=20, panel_size=(6, 4), return_fig=False, dpi=300.0)[source]
Generate Volcano plots (-log10 p value vs. log2 fold change) for visualizing DE results.
- Parameters
pseudobulk (
MultimodalDataobject.) – Pseudobulk data matrix.de_key (
str, optional, default:deseq2) – The varm keyword for DE results. data.varm[de_key] should store the full DE result table.qval_threshold (
float, optional, default: 0.05.) – Selected FDR rate. A horizontal line indicating this rate will be shown in the figure.log2fc_threshold (
float, optional, default: 1.0) – Log2 fold change threshold to highlight biologically interesting genes. Two vertical lines representing negative and positive log2 fold change will be shown.rank_by (
str, optional, default:log2fc) – Rank genes byrank_bymetric in the DE results. By default, rank by log2 Fold Change ("log2fc"); change to"neglog10p"if you want to rank genes by p-values.top_n (
int, optional, default:20) – Number of top DE genes to show names. Genes are ranked by Log2 fold change.panel_size (
Tuple[float, float], optional, default:(6, 4)) – The size (width, height) in inches of figure.return_fig (
bool, optional, default:False) – Return aFigureobject ifTrue; returnNoneotherwise.dpi (
float, optional, default:300.0) – The resolution in dots per inch.
- Return type
Optional[Figure]- Returns
Figureobject – Amatplotlib.figure.Figureobject containing the dot plot ifreturn_fig == True
Examples
>>> pg.pseudo.volcano(pseudobulk, dpi=200)