domains / families / science / gsea

gsea

combined

Tests a ranked gene vector for coordinated expression shifts in GO, KEGG, Reactome, or MSigDB gene sets with clusterProfiler's gseGO, gseKEGG, gsePathway, and GSEA (fgseaMultilevel engine), and scores per-sample pathway activity with ssGSEA and GSVA. Covers why a GSEA result is a deterministic function of three implicit choices (the ranking STATISTIC, the weight exponent p, and which LABELS are permuted), why the input must be a NAMED vector sorted DECREASING by a signed variance-calibrated metric (DESeq2 stat, limma t) not a raw p-value that erases direction, why preranked gene-permutation is anti-conservative for correlated sets (CAMERA is the fix), why nPerm is gone (eps governs tiny p), and why set.seed is required. Use when every gene carries a DE statistic, when a hard cutoff is arbitrary, or when ORA finds nothing. For gene-list ORA see go-enrichment; the ranking statistic comes from differential-expression/de-results. Run GSEA on a ranked gene list and produce the enrichment table, running-score table, and enrichment plots.

When to use

When not to use

Skill page

Conflict

The two skills describe different GSEA workflows. The first is a specific CLI wrapper (scripts/main.R) with a fixed set of arguments and modes. The second is a conceptual guide for using R packages (clusterProfiler, fgsea) directly, emphasizing statistical validity, permutation types, and version compatibility. They do not reproduce each other; the first is a tool-specific procedure, while the second is a methodological framework. Combining them provides both the specific tool usage and the critical statistical context.