R

Reactome Database Kit

Enterprise-grade skill for query, reactome, rest, pathway. Includes structured workflows, validation checks, and reusable patterns for scientific.

SkillClipticsscientificv1.0.0MIT
0 views0 copies

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

EndpointDescriptionExample
/search/queryFull-text searchSearch pathways by keyword
/data/pathway/{id}Pathway detailsGet pathway information
/data/pathway/{id}/containedEventsSub-pathways and reactionsPathway hierarchy
/data/participants/{id}Molecular participantsGenes/proteins in pathway
/analysis/identifiersEnrichment analysisGene list analysis
/analysis/token/{token}Analysis resultsRetrieve 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

ParameterDescriptionDefault
speciesTarget organism"Homo sapiens"
interactorsInclude protein-protein interactionsfalse
page_sizeResults per page20
sort_bySort enrichment results"ENTITIES_FDR"
p_value_cutoffMaximum p-value for significance0.05
projectionProject to human orthologstrue

Best Practices

  1. 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.

  2. Apply FDR correction, not raw p-values — With 2,800+ pathways tested, raw p-values produce many false positives. Use the fdr field from results (Benjamini-Hochberg corrected) with a cutoff of 0.05 for reliable pathway identification.

  3. 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.

  4. Use projection for non-human species — Set projection=true to 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.

  5. 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.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates