plot_gsea_volcano: Volcano Plot for GSEA Results with Improved Labeling

View source: R/genes.R

plot_gsea_volcanoR Documentation

Volcano Plot for GSEA Results with Improved Labeling

Description

Creates a volcano plot for fgsea results, ensuring all significant pathways are labeled with minimal overlap.

Usage

plot_gsea_volcano(
  gsea_results,
  top_n = 20,
  pval_cutoff = 0.05,
  nes_cutoff = 1,
  repel = TRUE,
  title = "GSEA Enrichment Volcano Plot"
)

Arguments

gsea_results

Data frame output from fgsea.

top_n

Number of top enriched pathways to label.

pval_cutoff

Adjusted p-value threshold for significance (default: 0.05).

nes_cutoff

NES threshold for strong enrichment (default: 1.5).

repel

Logical. Use 'ggrepel' for labels (default: TRUE).

title

Plot title (optional).

ranked_genes

Named vector of ranked log2 fold changes.

Value

A ggplot object.

Examples

gsea_plot <- plot_gsea_volcano(gsea_results, ranked_genes)
print(gsea_plot)

eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.