[ PROMPT_NODE_27240 ]
Reactome Database API 参考
[ SKILL_DOCUMENTATION ]
# Reactome API 参考
本文档提供了 Reactome REST API 的全面参考信息。
## 基础 URL
- **内容服务 (Content Service)**: `https://reactome.org/ContentService`
- **分析服务 (Analysis Service)**: `https://reactome.org/AnalysisService`
## 内容服务 API
内容服务通过 REST 端点提供对 Reactome 经审阅通路数据的访问。
### 数据库信息
#### 获取数据库版本
GET /data/database/version
**响应:** 包含数据库版本号的纯文本
**示例:**
python
import requests
response = requests.get("https://reactome.org/ContentService/data/database/version")
print(response.text) # 例如 "94"
#### 获取数据库名称
GET /data/database/name
**响应:** 包含数据库名称的纯文本
### 实体查询
#### 按 ID 查询实体
GET /data/query/{id}
**参数:**
- `id` (路径): 稳定标识符或数据库 ID (例如 "R-HSA-69278")
**响应:** 包含完整实体信息的 JSON 对象,包括:
- `stId`: 稳定标识符
- `displayName`: 人类可读名称
- `schemaClass`: 实体类型(通路、反应、复合物等)
- `species`: 物种信息数组
- 其他类型特定字段
**示例:**
python
import requests
response = requests.get("https://reactome.org/ContentService/data/query/R-HSA-69278")
pathway = response.json()
print(f"Pathway: {pathway['displayName']}")
print(f"Species: {pathway['species'][0]['displayName']}")
#### 查询实体属性
GET /data/query/{id}/{attribute}
**参数:**
- `id` (路径): 实体标识符
- `attribute` (路径): 特定属性名称 (例如 "displayName", "compartment")
**响应:** 根据属性类型返回 JSON 或纯文本
**示例:**
python
response = requests.get("https://reactome.org/ContentService/data/query/R-HSA-69278/displayName")
name = response.text
### 通路查询
#### 获取通路实体
GET /data/event/{id}/participatingPhysicalEntities
**参数:**
- `id` (路径): 通路或反应稳定标识符
**响应:** 通路中参与的物理实体(蛋白质、复合物、小分子)的 JSON 数组
**示例:**
python
response = requests.get(
"https://reactome.org/ContentService/data/event/R-HSA-69278/participatingPhysicalEntities"
)
entities = response.json()
for entity in entities:
print(f"{entity['stId']}: {entity['displayName']} ({entity['schemaClass']})")
#### 获取容器