Reactome Database Kit
Enterprise-grade skill for query, reactome, rest, pathway. Includes structured workflows, validation checks, and reusable patterns for scientific.
Reactome Database Kit
Query and analyze biological pathways from Reactome, a curated open-source pathway database with 2,800+ human pathways. This skill covers pathway search, enrichment analysis, pathway visualization, cross-species comparisons, and integrating pathway data with gene expression analysis.
When to Use This Skill
Choose Reactome Database Kit when you need to:
- Perform pathway enrichment analysis on gene lists from experiments
- Explore detailed molecular pathway diagrams and reaction steps
- Cross-reference genes with curated biological pathways and reactions
- Compare pathway conservation across species (human, mouse, rat, etc.)
Consider alternatives when:
- You need metabolic pathway-focused analysis (use KEGG)
- You need gene ontology term enrichment (use GO enrichment tools)
- You need drug-target-pathway relationships (use Open Targets)
Quick Start
pip install requests pandas matplotlib
import requests import pandas as pd BASE_URL = "https://reactome.org/ContentService" # Search for pathways response = requests.get( f"{BASE_URL}/search/query", params={"query": "apoptosis", "types": "Pathway", "species": "Homo sapiens"} ) results = response.json() for entry in results.get("results", [])[:5]: for item in entry.get("entries", []): print(f"{item['stId']}: {item['name']}")
Core Concepts
API Endpoints
| Endpoint | Description | Example |
|---|---|---|
/search/query | Full-text search | Search pathways by keyword |
/data/pathway/{id} | Pathway details | Get pathway information |
/data/pathway/{id}/containedEvents | Sub-pathways and reactions | Pathway hierarchy |
/data/participants/{id} | Molecular participants | Genes/proteins in pathway |
/analysis/identifiers | Enrichment analysis | Gene list analysis |
/analysis/token/{token} | Analysis results | Retrieve enrichment results |
Pathway Enrichment Analysis
import requests import pandas as pd def reactome_enrichment(gene_list, species="Homo sapiens"): """Perform pathway enrichment analysis via Reactome API.""" # Submit gene list for analysis response = requests.post( "https://reactome.org/AnalysisService/identifiers/projection", headers={"Content-Type": "text/plain"}, data="\n".join(gene_list), params={"interactors": "false", "pageSize": 50, "page": 1} ) data = response.json() # Extract pathway results pathways = [] for pathway in data.get("pathways", []): pathways.append({ "pathway_id": pathway["stId"], "name": pathway["name"], "p_value": pathway["entities"]["pValue"], "fdr": pathway["entities"]["fdr"], "found": pathway["entities"]["found"], "total": pathway["entities"]["total"], "ratio": pathway["entities"]["ratio"] }) df = pd.DataFrame(pathways) df = df.sort_values("fdr") print(f"Significant pathways (FDR < 0.05): " f"{(df['fdr'] < 0.05).sum()}/{len(df)}") return df # Enrichment for cancer-related genes genes = ["TP53", "BRCA1", "BRCA2", "EGFR", "KRAS", "MYC", "AKT1", "PIK3CA", "PTEN", "RB1", "CDK4", "BRAF"] enriched = reactome_enrichment(genes) print(enriched[["name", "fdr", "found", "total"]].head(15))
Configuration
| Parameter | Description | Default |
|---|---|---|
species | Target organism | "Homo sapiens" |
interactors | Include protein-protein interactions | false |
page_size | Results per page | 20 |
sort_by | Sort enrichment results | "ENTITIES_FDR" |
p_value_cutoff | Maximum p-value for significance | 0.05 |
projection | Project to human orthologs | true |
Best Practices
-
Use gene symbols, not Ensembl IDs, for the analysis API — Reactome's enrichment endpoint works best with HGNC gene symbols. Convert Ensembl IDs to symbols before submission. Mixed identifier types in a single submission reduce mapping coverage.
-
Apply FDR correction, not raw p-values — With 2,800+ pathways tested, raw p-values produce many false positives. Use the
fdrfield from results (Benjamini-Hochberg corrected) with a cutoff of 0.05 for reliable pathway identification. -
Check pathway hierarchy for redundancy — Reactome pathways are hierarchical (e.g., "Apoptosis" contains "Intrinsic Pathway of Apoptosis"). Enrichment often flags both parent and child pathways. Use the hierarchy API to identify and collapse redundant results.
-
Use projection for non-human species — Set
projection=trueto map non-human genes to their human orthologs before enrichment. This leverages Reactome's extensive human pathway curation even when working with mouse, rat, or other model organism data. -
Combine with expression data for context — Enrichment tells you which pathways are overrepresented, but not the direction of change. Overlay fold-change data onto enriched pathways using Reactome's expression analysis mode to distinguish upregulated vs downregulated pathways.
Common Issues
Gene list returns zero enriched pathways — Check that gene identifiers match Reactome's expected format (HGNC symbols for human). Test with known pathway genes first (e.g., TP53, BRCA1) to verify the API is working. Also check that the gene list isn't too small (<5 genes) for statistical enrichment.
Analysis token expires — Reactome analysis results are stored temporarily with a token. Tokens expire after a few hours. Save the full results immediately after analysis rather than relying on retrieving them later with the token.
Same pathway appears multiple times — Reactome distinguishes between species-specific pathway instances. Filter results by species with the species parameter to avoid seeing the same pathway for human, mouse, and other organisms. Also deduplicate by parent pathway ID to handle hierarchical redundancy.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.