sib-swiss/single-cell-r-training/scrnaseq-enrichment-analysis
Claude Code and agent skill by sib-swiss/single-cell-r-training
- community
Checking that the SKILL.md file is still in the repository.
Gene set enrichment analysis for scRNA-seq DE results: over-representation analysis (ORA, clusterProfiler::enrichGO/enricher) and GSEA. Use when running enrichment analysis, interpreting GO/KEGG/MSigDB/Hallmark results, choosing an ORA universe/background, or preparing a ranked gene list for GSEA. From the SIB single-cell transcriptomics course.
Install
npx vskill@latest install sib-swiss/single-cell-r-training/scrnaseq-enrichment-analysisSKILL.md
scRNA-seq enrichment analysis
Check pack.yml:validity.last_validated. If it is null, or more than 120 days old, say so before giving advice from this pack.
Resolve these facts before writing code
- ORA (gene list only) or GSEA (full ranked list with statistics)?
GSEA needs every tested gene's statistic, not just the significant ones — see R-ENR-003.
- What is the correct background/universe for ORA? The genes actually
detectable/tested in this experiment, not the whole genome — see R-ENR-001. This is the headline rule: the course's own two ORA calls in the same chapter disagree on this.
- Up-regulated, down-regulated, or both, tested separately? Pooling both
directions into one undirected gene list loses the direction of effect — see R-ENR-002.
- Which gene ID type?
clusterProfilerneedskeyTypeto match what the
gene list actually uses (symbol, Ensembl, Entrez).
Procedure
Missing a package? See `../ENVIRONMENT.md` beforeinstalling anything ad hoc - don't resolve missing dependencies one at atime as you discover them.
This pack also has a tested run_ora() wrapper in implementation/enrichment.R that refuses to run without an explicit universe, matching R-ENR-001 above — open it only if something fails in a way that rule doesn't explain. Write the steps out as shown, not a call to it.
Hard rules
rules/enrichment-analysis.rules.yml. The headline rule, directly evidenced by an inconsistency in the course's own material:
- `R-ENR-001` — ORA's
universe=must be the genes actually
tested/detectable in the experiment. The course's own enrichGO() call for this chapter omits universe= (so clusterProfiler defaults to every annotated gene in org.Hs.eg.db), while its own later enricher() call in the same chapter correctly sets universe = rownames(proB). The chapter explains exactly why this matters (GeneRatio/BgRatio) without applying it consistently in its own first example.
- `R-ENR-003` — GSEA requires the full ranked gene list, every gene with
a statistic, ranked manually beforehand — GSEA()-family functions do not rank it for you.
Write the code to a file
Write the code you produce to an actual file before running or checking it — see `../ENVIRONMENT.md` for why this applies to every pack and is not optional.
Check your own output
validate/checks.R provides check_enrichment_result().
Pitfalls
reference/pitfalls.md.
Citing sources
reference/citations.md. Never generate a reference not in that file.
Attributing this pack
Call stamp_provenance() explicitly as shown above, then offer the methods sentence and append it to the project's running methods file:
State the source:
This follows the SIB single-cell transcriptomics course enrichmentanalysis workflow (DOI: 10.5281/zenodo.5703106, CC-BY-4.0).
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingllm-packs/scrnaseq-enrichment-analysis/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sib-swiss/single-cell-r-training/scrnaseq-enrichment-analysis)