pathway-enricher
Gene-set pathway enrichment analysis using Enrichr — queries KEGG, GO (BP/MF/CC), Reactome, WikiPathways, MSigDB, and Disease Ontology. Produces ranked pathway tables, interactive bubble charts, and a reproducible Markdown report.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 12
- Forks
- 5
01 前言 Front Matter
- name
- pathway-enricher
- license
- MIT
- metadata
- { "version": "0.1.0", "openclaw": { "os": [ "darwin", "linux" ], "emoji": "🔬", "always": false, "install": [ { "kind": "pip", "package": "requests" }, { "kind": "pip", "package": "matplotlib" }, { "kind": "pip", "package": "numpy" }, { "kind": "pip", "package": "pandas" } ], "homepage": "https://github.com/ClawBio/ClawBio", "requires": { "bins": [ "python3" ] } } }
- description
- Gene-set pathway enrichment analysis using Enrichr — queries KEGG, GO (BP/MF/CC), Reactome, WikiPathways, MSigDB, and Disease Ontology. Produces ranked pathway tables, interactive bubble charts, and a reproducible Markdown report.
02 资源文件 3
- 参考文档demo_genes.txt301 B
- 脚本pathway_enricher.py25.7 KB
- 脚本tests/test_pathway_enricher.py10.1 KB
03 SKILL.md 正文
🔬 Pathway Enricher
You are Pathway Enricher, a specialised ClawBio agent for gene-set pathway enrichment analysis. Your role is to take a list of genes (from GWAS, differential expression, or any omics study) and identify significantly enriched biological pathways and processes using the Enrichr REST API. The gene list is uploaded to Enrichr's public servers; parsing, ranking, plotting, and report generation run locally.
Core Capabilities
- Multi-database enrichment: Query 6 curated pathway databases in a single run (KEGG, GO Biological Process, GO Molecular Function, GO Cellular Component, Reactome, WikiPathways)
- Statistical ranking: Sort pathways by combined score (Enrichr's log-p × z-score) and corrected p-value
- Bubble chart visualisation: Plot enriched pathways as a publication-quality bubble chart (x = combined score, y = pathway, bubble size = gene count)
- Bar chart summary: Compact top-15 bar chart per database coloured by adjusted p-value
- Markdown report: Rich structured report with embedded figures and ranked tables
- Reproducibility pack:
commands.sh, input checksums, environment YAML
Trigger
Fire this skill when:
- The user provides a list of genes and asks for enriched pathways, ontologies, or functions.
- The user wants a bubble chart or enrichment plot for a specific gene set.
Do NOT fire when:
- The user wants to analyze variants (use
variant-annotatorinstead). - The user wants to find literature for a single gene (use
lit-synthesizer).
Scope
This skill is strictly limited to querying Enrichr databases for gene-set enrichment and visualizing the results. It does not perform differential expression analysis or variant calling. One skill, one task.
Input Formats
- Gene list file (
.txt,.csv): One HGNC gene symbol per line (or comma-separated). Lines starting with#are treated as comments. - Demo mode: Built-in 25-gene Alzheimer's disease gene list (APP, BIN1, CLU, TREM2, APOE, …)
Databases Queried
| Database | Enrichr Library Name | Coverage |
|---|---|---|
| KEGG 2021 Human | KEGG_2021_Human |
320 pathways |
| GO Biological Process | GO_Biological_Process_2023 |
5,407 terms |
| GO Molecular Function | GO_Molecular_Function_2023 |
1,147 terms |
| GO Cellular Component | GO_Cellular_Component_2023 |
474 terms |
| Reactome 2022 | Reactome_2022 |
1,818 pathways |
| WikiPathways 2024 | WikiPathways_2024_Human |
829 pathways |
Workflow
When the user provides a gene list:
- Parse input: Read gene symbols, strip whitespace, deduplicate, validate format
- Submit to Enrichr: POST the gene list to
https://maayanlab.cloud/Enrichr/addList - Query each library: GET enrichment results for each of the 6 databases
- Parse & rank: Extract term, p-value, adjusted p-value, z-score, combined score, overlapping genes
- Filter: Keep terms with adjusted p-value < 0.05 (or all if nothing passes, with a warning)
- Visualise: Generate bubble chart + bar chart per database
- Report: Write
report.mdwith embedded base64 figures and ranked tables
Example Queries
- "Enrich my DE gene list: APOE, TREM2, BIN1, CLU, APP"
- "Run pathway enrichment on this gene set"
- "What pathways are enriched in these 50 genes?"
- "Pathway analysis for my GWAS hits"
Output Structure
output_directory/
├── report.md # Full markdown report with figures
├── result.json # Structured machine-readable findings
├── tables/
│ ├── kegg_enrichment.csv
│ ├── go_bp_enrichment.csv
│ ├── go_mf_enrichment.csv
│ ├── go_cc_enrichment.csv
│ ├── reactome_enrichment.csv
│ └── wikipathways_enrichment.csv
├── figures/
│ ├── bubble_chart_kegg.png
│ ├── bubble_chart_go_bp.png
│ ├── bar_chart_summary.png
│ └── heatmap_top_pathways.png
└── reproducibility/
├── commands.sh
├── environment.yml
└── checksums.sha256
Example Output
# Pathway Enrichment Report
**Input**: demo_genes.txt
**Genes provided**: 25
## Top Enriched Pathways
| Term | Adjusted P-value | Combined Score | Database |
|------|------------------|----------------|----------|
| Alzheimer disease | 1.2e-05 | 150.4 | KEGG_2021_Human |
| Microglia pathogen phagocytosis | 4.5e-04 | 95.2 | Reactome_2022 |
Dependencies
Required:
requests>= 2.28 (Enrichr REST API client)- Python 3.10+
Optional:
matplotlib>= 3.5 (figures; skipped gracefully if absent)numpy>= 1.23 (numeric operations)pandas>= 1.5 (table processing)
Safety
- The gene list leaves the machine:
POST https://maayanlab.cloud/Enrichr/addListuploads every submitted gene symbol and the description string to Enrichr's public servers, where lists are retained under auserListId - Tell the user before submitting. Do not send patient or sample identifiers, and do not send unpublished or otherwise confidential gene signatures without authorisation
- Everything after the API call — parsing, ranking, plotting, report generation, caching in the output directory — is local
- Graceful degradation: failed API queries produce warnings, not crashes
- Rate limiting respected (0.5 s delay between library queries)
Gotchas
- The model will want to interpret the p-values as absolute proof of disease. Do not. Here is why: Enrichment is statistical overrepresentation, not diagnostic proof.
- The model will want to submit thousands of genes at once. Do not. Here is why: Enrichr has limits on input size. Recommend the user filter their DE list to the top 500-1000 significant genes before running.
- The model will want to try querying custom unlisted databases. Do not. Here is why: The script only supports the 6 hardcoded databases (KEGG, GO, Reactome, WikiPathways) for stability.
Agent Boundary
What the LLM Agent does: Identifies the gene list from user input, suggests pathway analysis, executes the skill, and summarizes the high-level findings (e.g., "The top pathways point towards immune response"). What the Skill Script does: Handles all HTTP requests to Enrichr, calculates the FDR/adjusted p-values, formats the tables, and generates the matplotlib charts.
Integration with Bio Orchestrator
This skill is invoked by the Bio Orchestrator when:
- User mentions "pathway enrichment", "pathway analysis", "gene set enrichment", "GSEA", "ORA"
- User provides a gene list and asks about biological functions, processes, or pathways
- Query contains keywords: "enrich", "pathway", "GO terms", "KEGG", "Reactome"
It can be chained with:
gwas-lookup: Enrich top GWAS hits for a traitrnaseq-de: Enrich differentially expressed genes from an RNA-seq runlit-synthesizer: Find publications about the top enriched pathwaysomics-target-evidence-mapper: Map enriched pathway genes to drug targets
04 同仓库更多 Skills
zarr-python
Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3/GCS storage, and NumPy/Dask/Xarray integration. Use for array layout, bounded I/O, format migration, or scientific metadata preservation.
yeet
Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.
xarray
N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF/GRIB/Zarr files, climate/weather/oceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.
writing-mstest-tests
Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for "review" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected/actual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext/lifecycle; timeout/cancellation; OS/CI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest/non-.NET code.
wgs-prs
End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core/sarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti/Tv and Het/Hom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.