sciagent-skill-creator
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md…
GSEA and over-representation analysis (ORA) for RNA-seq and proteomics. Wraps Enrichr for ORA against MSigDB, KEGG, GO, and 200+ databases; runs preranked GSEA on ranked DE gene lists. Outputs enrichment tables and running-score plots. Use after DESeq2 or edgeR for pathway-level
Claude Code
$ npx -y skills add jaechang-hits/SciAgent-Skills --skill gseapy-gene-enrichment --agent claude-code
Codex
$ npx skills add jaechang-hits/SciAgent-Skills --skill gseapy-gene-enrichment -a codex -y
Cursor
$ npx skills add jaechang-hits/SciAgent-Skills --skill gseapy-gene-enrichment -a cursor -y
Gemini CLI
$ npx skills add jaechang-hits/SciAgent-Skills --skill gseapy-gene-enrichment -a gemini-cli -y
GitHub Copilot
$ npx skills add jaechang-hits/SciAgent-Skills --skill gseapy-gene-enrichment -a github-copilot -y
OpenCode
$ npx skills add jaechang-hits/SciAgent-Skills --skill gseapy-gene-enrichment -a opencode -y
Windsurf
$ npx skills add jaechang-hits/SciAgent-Skills --skill gseapy-gene-enrichment -a windsurf -y
name: "gseapy-gene-enrichment" description: "GSEA and over-representation analysis (ORA) for RNA-seq and proteomics. Wraps Enrichr for ORA against MSigDB, KEGG, GO, and 200+ databases; runs preranked GSEA on ranked DE gene lists. Outputs enrichment tables and running-score plots. Use after DESeq2 or edgeR for pathway-level interpretation." license: "MIT"
GSEApy provides Python implementations of GSEA and over-representation analysis (ORA) for interpreting gene expression changes at the pathway level. The `enrich` module queries the Enrichr API to test a gene list against 200+ databases (GO, KEGG, MSigDB Hallmarks, Reactome, WikiPathways). The `prerank` and `gsea` modules run the GSEA algorithm on a pre-ranked gene list or expression matrix — computing normalized enrichment scores (NES) and FDR values for each gene set. GSEApy integrates directly with pandas DataFrames from DESeq2 or scanpy differential expression output, making it the standard Python tool for pathway analysis in RNA-seq workflows.
pip install gseapy # Verify python -c "import gseapy; print(gseapy.__version__)" # 1.1.3
Settle these with the user before writing any analysis code.
decisions:
- id: D1
param: analysis_mode
kind: required
source: upstream
ask: "Test only the genes that passed a significance cut (ORA), or the whole ranked list without a cut (GSEA prerank)?"
default: "prerank when the upstream stage yields a full ranking; ORA when it yields a gene list"
- id: D2
param: organism
kind: derived
source: upstream
ask: "Which species are these genes from?"
default: "carried from the upstream dataset"
- id: D3
param: gene_sets
kind: required
source: user
depends_on: [D2]
ask: "Which collections should the genes be tested against - GO terms, pathways, disease or perturbation signatures?"
default: null
- id: D4
param: rnk
kind: optional
source: user
depends_on: [D1]
ask: "What should order the genes - effect size, signed significance, or the test statistic?"
default: "log2FoldChange"
skip_if: "ORA mode - ranking is not used"
- id: D5
param: cutoff
kind: optional
source: user
ask: "How strong must a term's evidence be before it is reported?"
default: 0.05
- id: D6
param: min_size, max_size
kind: optional_conditional
source: user
ask: "Should very small or very broad gene sets be excluded as uninformative?"
default: "15-500 genes"
- id: D7
param: permutation_num
kind: optional_conditional
source: user
ask: "More permutations give finer p-values at proportionally more runtime - is the default enough?"
default: 1000
- id: D8
param: weighted_score_type
kind: optional
source: user
ask: "Should GSEA use the standard weighted enrichment score, or a different weighting for this ranking?"
default: 1
- id: D9
param: seed, threads
kind: never_ask
source: data
reason: "A fixed seed and available CPU cores affect reproducibility and runtime, not the enrichment model."
default: "seed fixed, threads min(4, available_cores)"Two orderings matter here. D3 hangs on D2 because Enrichr's libraries are species-specific — the catalog itself changes with the organism. D4 hangs on D1 because a ranking metric only exists in prerank mode; under ORA the question has no answer, which is what `skip_if` records.
import gseapy as gp
# ORA: test a gene list against GO Biological Process
gene_list = ["TP53", "BRCA1", "CDK2", "CCND1", "MYC", "EGFR", "KRAS", "PTEN"]
enr = gp.enrichr(gene_list=gene_list,
gene_sets=["GO_Biological_Process_2023"],
organism="human",
outdir=None)
print(enr.results.head(5)[["Term", "P-value", "Adjusted P-value", "Genes"]])Test a gene list against pathway databases via the Enrichr API.
import gseapy as gp
import pandas as pd
# Gene list from DESeq2 (significant upregulated genes)
sig_genes = ["TP53", "BRCA1", "CDK2", "CCND1", "MYC", "EGFR",
"KRAS", "PTEN", "RB1", "AKT1", "PIK3CA", "MDM2"]
# Run ORA against multiple databases
enr = gp.enrichr(
gene_list=sig_genes,
gene_sets=[
"GO_Biological_Process_2023",
"KEGG_2021_Human",
"MSigDB_Hallmark_2020",
"Reactome_2022",
],
organism="human",
outdir="enrichr_results/",
cutoff=0.05,
)
# Display top results
results = enr.results
print(f"Enriched terms: {len(results[results['Adjusted P-value'] < 0.05])}")
print(results[results["Adjusted P-value"] < 0.05].sort_values("Adjusted P-value")
.head(10)[["Gene_set", "Term", "Adjusted P-value", "Combined Score"]])Discover the 200+ databases available through Enrichr.
im
Turn your AI coding agent into a life sciences expert — 199 bioinformatics skills for Claude Code covering RNA-seq, single-cell analysis, genomics, proteomics, drug discovery, and more. Boosted BixBench from 65% to 92%. Open source.
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md…
Bayesian modeling with PyMC 5: priors, likelihood, NUTS/ADVI sampling, diagnostics (R-hat, ESS), LOO/WAIC comparison, prediction.…
Time-to-event modeling with scikit-survival: Cox PH (elastic net), Random Survival Forests, Boosting, SVMs for censored data.…
Guided statistical analysis: test choice, assumption checks, effect sizes, power, APA reporting. Pick tests, verify assumptions,…
Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR),…
DL cell/nucleus segmentation for fluorescence and brightfield microscopy. Pre-trained models (cyto3, nuclei, tissuenet) and a…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.