bio-pathway-gsea

Runs preranked GSEA on ranked gene vectors against GO, KEGG, Reactome, and MSigDB gene sets.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/mrsonord2240/openscience-specialists --skill bio-pathway-gsea-mrsonord2240
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bio-pathway-gsea
Source: https://github.com/mrsonord2240/openscience-specialists/tree/main/specialists/crispr-screen-analyst/versions/1.0.0/package/skills/bio-pathway-gsea
Command: npx skills add https://github.com/mrsonord2240/openscience-specialists --skill bio-pathway-gsea-mrsonord2240

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires clusterProfiler, org.Hs.eg.db, fgsea, msigdbr, ReactomePA, GSVA.

What problem does it solve? Choosing an arbitrary significance cutoff discards most of a differential expression result, and subtle coordinated pathway shifts get missed. This Skill performs threshold-free Gene Set Enrichment Analysis on a full ranked gene vector, while enforcing the three choices that determine a valid result: the ranking statistic, the weight exponent, and the permutation type. ## Core Features & Use Cases - Preranked GSEA: Runs clusterProfiler's gseGO, gseKEGG, gsePathway, and generic GSEA (fgseaMultilevel engine) on a named, decreasing-sorted vector of signed statistics. - Ranking construction: Builds the ranked vector from DESeq2 Wald stat, limma moderated t, or signed p-values for edgeR, with deduplication and NA removal. - Per-sample scoring: Produces ssGSEA and GSVA pathway-activity matrices for clustering, survival, or ML workflows. - Use Case: You have a DESeq2 result for 14,000 genes and no natural cutoff. Rank by the Wald statistic, run GO biological-process GSEA with a fixed seed, and report NES, BH-adjusted p-values, and leading-edge genes. ## Quick Start Run GSEA on my DESeq2 results ranked by the Wald statistic against GO biological processes and report the top pathways by adjusted p-value.

Frequently Asked Questions about bio-pathway-gsea

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run GSEA on DESeq2 results in R?▼

Build a named vector from the DESeq2 stat column, remove NAs and duplicate gene names, and sort it strictly decreasing. Then call clusterProfiler's gseGO or gseKEGG with set.seed fixed and eps=0 for exact small p-values.

What ranking statistic should I use for preranked GSEA?▼

Use a signed, variance-calibrated metric: the DESeq2 Wald stat or limma moderated t. For edgeR use sign(logFC) times -log10(p) clamped with pmax(p, 1e-30). Never rank by raw p-value, which erases direction, or bare log2FC, which lets low-count outliers dominate.

GSEA vs ORA: which enrichment method should I use?▼

Use GSEA when you have a ranked statistic for all genes and no natural cutoff; it detects coordinated subtle shifts. Use over-representation analysis (enrichGO/enrichKEGG) only when you have a pre-selected unranked gene list such as GWAS hits or a screen module.

Why are my preranked GSEA p-values too significant?▼

Preranked GSEA in clusterProfiler and fgsea uses gene permutation, which assumes gene independence and is anti-conservative for co-regulated sets. Report the permutation type, and when a design matrix is available use limma's camera with inter.gene.cor=NA for a correlation-honest test.

Why do my GSEA results change between runs?▼

The fgseaMultilevel engine uses stochastic Monte Carlo sampling, so p-values drift without a fixed seed. Call set.seed before every run and pass seed=TRUE; also note gseKEGG queries the live KEGG API, so results change across KEGG releases.

Does the nPerm parameter still work in clusterProfiler GSEA?▼

No. nPerm is silently accepted with only warnings and downgrades the engine from fgseaMultilevel to the coarser fgseaSimple. Remove nPerm entirely and control tiny p-value resolution with the eps parameter instead.