pegasus.pseudo.volcano

pegasus.pseudo.volcano(pseudobulk, de_key='deseq2', qval_threshold=0.05, log2fc_threshold=1.0, 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 (UnimodalData object.) – 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.

  • 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 a Figure object if True; return None otherwise.

  • dpi (float, optional, default: 300.0) – The resolution in dots per inch.

Returns

A matplotlib.figure.Figure object containing the dot plot if return_fig == True

Return type

Figure object

Examples

>>> pg.pseudo.volcano(pseudobulk, dpi=200)