reactome-database by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill reactome-databaseReactome 是一个免费的、开源的、经过人工审阅的路径数据库,包含 2,825 条以上的人类通路。可查询生物通路、执行过表达和表达分析、将基因映射到通路、通过 REST API 和 Python 客户端探索分子相互作用,用于系统生物学研究。
此技能应在以下情况使用:
Reactome 提供两种主要的 API 服务和一套 Python 客户端库:
查询和检索生物通路数据、分子相互作用和实体信息。
常见操作:
API 基础 URL: https://reactome.org/ContentService
对基因列表和表达数据执行计算分析。
分析类型:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
API 基础 URL: https://reactome.org/AnalysisService
包装 Reactome API 调用的 Python 客户端库,便于程序化访问。
安装:
uv pip install reactome2py
注意: reactome2py 包(版本 3.0.0,发布于 2021 年 1 月)功能正常,但未积极维护。要获得最新的功能,请考虑使用直接的 REST API 调用。
内容服务使用 REST 协议,并以 JSON 或纯文本格式返回数据。
获取数据库版本:
import requests
response = requests.get("https://reactome.org/ContentService/data/database/version")
version = response.text
print(f"Reactome version: {version}")
查询特定实体:
import requests
entity_id = "R-HSA-69278" # 示例通路 ID
response = requests.get(f"https://reactome.org/ContentService/data/query/{entity_id}")
data = response.json()
获取通路中的参与分子:
import requests
event_id = "R-HSA-69278"
response = requests.get(
f"https://reactome.org/ContentService/data/event/{event_id}/participatingPhysicalEntities"
)
molecules = response.json()
import reactome2py
from reactome2py import content
# 查询通路信息
pathway_info = content.query_by_id("R-HSA-69278")
# 获取数据库版本
version = content.get_database_version()
有关详细的 API 端点和参数,请参阅此技能中的 references/api_reference.md。
提交一个基因/蛋白质标识符列表以查找富集的通路。
使用 REST API:
import requests
# 准备标识符列表
identifiers = ["TP53", "BRCA1", "EGFR", "MYC"]
data = "\n".join(identifiers)
# 提交分析
response = requests.post(
"https://reactome.org/AnalysisService/identifiers/",
headers={"Content-Type": "text/plain"},
data=data
)
result = response.json()
token = result["summary"]["token"] # 保存令牌以便稍后检索结果
# 访问通路
for pathway in result["pathways"]:
print(f"{pathway['stId']}: {pathway['name']} (p-value: {pathway['entities']['pValue']})")
通过令牌检索分析结果:
# 令牌有效期为 7 天
response = requests.get(f"https://reactome.org/AnalysisService/token/{token}")
results = response.json()
使用定量值分析基因表达数据集。
输入格式(带以 # 开头的标题行的 TSV):
#Gene Sample1 Sample2 Sample3
TP53 2.5 3.1 2.8
BRCA1 1.2 1.5 1.3
EGFR 4.5 4.2 4.8
提交表达数据:
import requests
# 读取 TSV 文件
with open("expression_data.tsv", "r") as f:
data = f.read()
response = requests.post(
"https://reactome.org/AnalysisService/identifiers/",
headers={"Content-Type": "text/plain"},
data=data
)
result = response.json()
使用 /projection/ 端点将标识符专门映射到人类通路:
response = requests.post(
"https://reactome.org/AnalysisService/identifiers/projection/",
headers={"Content-Type": "text/plain"},
data=data
)
分析结果可以通过构建包含分析令牌的 URL 在 Reactome 通路浏览器中可视化:
token = result["summary"]["token"]
pathway_id = "R-HSA-69278"
url = f"https://reactome.org/PathwayBrowser/#{pathway_id}&DTAB=AN&ANALYSIS={token}"
print(f"View results: {url}")
GET /token/{TOKEN} 端点检索结果Reactome 接受各种标识符格式:
系统会自动检测标识符类型。
对于过表达分析:
对于表达分析:
所有 API 响应都返回包含以下内容的 JSON:
pathways:包含统计指标的富集通路数组summary:分析元数据和令牌entities:匹配和未映射的标识符此技能包含 scripts/reactome_query.py,一个用于常见 Reactome 操作的辅助脚本:
# 查询通路信息
python scripts/reactome_query.py query R-HSA-69278
# 执行过表达分析
python scripts/reactome_query.py analyze gene_list.txt
# 获取数据库版本
python scripts/reactome_query.py version
有关全面的 API 端点文档,请参阅此技能中的 references/api_reference.md。
每周安装次数
126
代码仓库
GitHub 星标数
22.6K
首次出现
2026年1月21日
安全审计
安装于
claude-code109
opencode100
cursor95
gemini-cli94
antigravity88
codex84
Reactome is a free, open-source, curated pathway database with 2,825+ human pathways. Query biological pathways, perform overrepresentation and expression analysis, map genes to pathways, explore molecular interactions via REST API and Python client for systems biology research.
This skill should be used when:
Reactome provides two main API services and a Python client library:
Query and retrieve biological pathway data, molecular interactions, and entity information.
Common operations:
API Base URL: https://reactome.org/ContentService
Perform computational analysis on gene lists and expression data.
Analysis types:
API Base URL: https://reactome.org/AnalysisService
Python client library that wraps Reactome API calls for easier programmatic access.
Installation:
uv pip install reactome2py
Note: The reactome2py package (version 3.0.0, released January 2021) is functional but not actively maintained. For the most up-to-date functionality, consider using direct REST API calls.
The Content Service uses REST protocol and returns data in JSON or plain text formats.
Get database version:
import requests
response = requests.get("https://reactome.org/ContentService/data/database/version")
version = response.text
print(f"Reactome version: {version}")
Query a specific entity:
import requests
entity_id = "R-HSA-69278" # Example pathway ID
response = requests.get(f"https://reactome.org/ContentService/data/query/{entity_id}")
data = response.json()
Get participating molecules in a pathway:
import requests
event_id = "R-HSA-69278"
response = requests.get(
f"https://reactome.org/ContentService/data/event/{event_id}/participatingPhysicalEntities"
)
molecules = response.json()
import reactome2py
from reactome2py import content
# Query pathway information
pathway_info = content.query_by_id("R-HSA-69278")
# Get database version
version = content.get_database_version()
For detailed API endpoints and parameters , refer to references/api_reference.md in this skill.
Submit a list of gene/protein identifiers to find enriched pathways.
Using REST API:
import requests
# Prepare identifier list
identifiers = ["TP53", "BRCA1", "EGFR", "MYC"]
data = "\n".join(identifiers)
# Submit analysis
response = requests.post(
"https://reactome.org/AnalysisService/identifiers/",
headers={"Content-Type": "text/plain"},
data=data
)
result = response.json()
token = result["summary"]["token"] # Save token to retrieve results later
# Access pathways
for pathway in result["pathways"]:
print(f"{pathway['stId']}: {pathway['name']} (p-value: {pathway['entities']['pValue']})")
Retrieve analysis by token:
# Token is valid for 7 days
response = requests.get(f"https://reactome.org/AnalysisService/token/{token}")
results = response.json()
Analyze gene expression datasets with quantitative values.
Input format (TSV with header starting with #):
#Gene Sample1 Sample2 Sample3
TP53 2.5 3.1 2.8
BRCA1 1.2 1.5 1.3
EGFR 4.5 4.2 4.8
Submit expression data:
import requests
# Read TSV file
with open("expression_data.tsv", "r") as f:
data = f.read()
response = requests.post(
"https://reactome.org/AnalysisService/identifiers/",
headers={"Content-Type": "text/plain"},
data=data
)
result = response.json()
Map identifiers to human pathways exclusively using the /projection/ endpoint:
response = requests.post(
"https://reactome.org/AnalysisService/identifiers/projection/",
headers={"Content-Type": "text/plain"},
data=data
)
Analysis results can be visualized in the Reactome Pathway Browser by constructing URLs with the analysis token:
token = result["summary"]["token"]
pathway_id = "R-HSA-69278"
url = f"https://reactome.org/PathwayBrowser/#{pathway_id}&DTAB=AN&ANALYSIS={token}"
print(f"View results: {url}")
GET /token/{TOKEN} endpoint to retrieve resultsReactome accepts various identifier formats:
The system automatically detects identifier types.
For overrepresentation analysis:
For expression analysis:
All API responses return JSON containing:
pathways: Array of enriched pathways with statistical metricssummary: Analysis metadata and tokenentities: Matched and unmapped identifiersThis skill includes scripts/reactome_query.py, a helper script for common Reactome operations:
# Query pathway information
python scripts/reactome_query.py query R-HSA-69278
# Perform overrepresentation analysis
python scripts/reactome_query.py analyze gene_list.txt
# Get database version
python scripts/reactome_query.py version
For comprehensive API endpoint documentation, see references/api_reference.md in this skill.
Weekly Installs
126
Repository
GitHub Stars
22.6K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code109
opencode100
cursor95
gemini-cli94
antigravity88
codex84
Excel财务建模规范与xlsx文件处理指南:专业格式、零错误公式与数据分析
46,700 周安装