mcpField
M
metabolomics-workbench-database

metabolomics-workbench-database

github.com/ovachiever数据与数据库5647 次安装48 周前更新
代码仓库

关于 metabolomics-workbench-database

Metabolomics Workbench Database skill 通过平台的 REST API,以编程方式访问代谢物、研究、基因和蛋白质信息。它支持研究者查询研究数据、用 RefMet 规范代谢物名称,并搜索质谱候选物。

主要功能

  1. 01代谢物查询与结构获取
  2. 02研究元数据与实验数据
  3. 03RefMet 名称标准化
  4. 04质荷比搜索
  5. 05按分析与生物条件筛选研究
  6. 06基因和蛋白质关联

适用场景

  1. 01查找测量特定代谢物的研究
  2. 02获取研究实验数据
  3. 03根据质谱 m/z 值识别候选物
  4. 04探索特定疾病和分析平台的研究

MCP 相关

该 skill 使用 Metabolomics Workbench REST API 检索数据。输入未说明 MCP 服务或专用 MCP 接口。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/ovachiever/droid-tings --skill metabolomics-workbench-database

安装后在 Claude Code 中输入/metabolomics-workbench-database确认已加载。

附带文件references/api_reference.md

详细介绍

代谢组学工作台数据库

概述

代谢组学工作台是一个由 NIH Common Fund 资助、托管于 UCSD 的综合平台,也是代谢组学研究数据的主要存储库。它提供对 4,200 多项已处理研究(其中 3,790 多项公开可用)的程序化访问,通过 RefMet 提供标准化的代谢物命名,并支持跨多种分析平台(GC-MS、LC-MS、NMR)的强大搜索功能。

何时使用此技能

在通过代谢组学工作台 REST API 查询代谢物结构、访问研究数据、标准化命名、执行质谱搜索,或检索基因/蛋白质与代谢物的关联时,应使用此技能。

核心功能

1. 查询代谢物结构和数据

访问全面的代谢物信息,包括结构、标识符以及与外部数据库的交叉引用。

关键操作:

  • 通过多种标识符检索化合物数据(PubChem CID、InChI Key、KEGG ID、HMDB ID 等)
  • 下载 MOL 文件或 PNG 图片格式的分子结构
  • 访问标准化的化合物分类
  • 在不同代谢物数据库之间进行交叉引用

示例查询:

import requests

# Get compound information by PubChem CID
response = requests.get('https://www.metabolomicsworkbench.org/rest/compound/pubchem_cid/5281365/all/json')

# Download molecular structure as PNG
response = requests.get('https://www.metabolomicsworkbench.org/rest/compound/regno/11/png')

# Get compound name by registry number
response = requests.get('https://www.metabolomicsworkbench.org/rest/compound/regno/11/name/json')
2. 访问研究元数据和实验结果

根据各种条件查询代谢组学研究,并检索完整的实验数据集。

关键操作:

  • 按代谢物、研究机构、研究人员或标题搜索研究
  • 访问研究摘要、实验因素和分析详情
  • 以多种格式检索完整的实验数据
  • 下载包含完整研究信息的 mwTab 格式文件
  • 查询非靶向代谢组学数据

示例查询:

# List all available public studies
response = requests.get('https://www.metabolomicsworkbench.org/rest/study/study_id/ST/available/json')

# Get study summary
response = requests.get('https://www.metabolomicsworkbench.org/rest/study/study_id/ST000001/summary/json')

# Retrieve experimental data
response = requests.get('https://www.metabolomicsworkbench.org/rest/study/study_id/ST000001/data/json')

# Find studies containing a specific metabolite
response = requests.get('https://www.metabolomicsworkbench.org/rest/study/refmet_name/Tyrosine/summary/json')
3. 使用 RefMet 标准化代谢物命名

使用 RefMet 数据库标准化代谢物名称,并访问涵盖四个结构解析级别的系统分类。

关键操作:

  • 将常见代谢物名称匹配到标准化的 RefMet 名称
  • 按化学式、精确质量或 InChI Key 查询
  • 访问分层分类(超类、主类、子类)
  • 检索所有 RefMet 条目,或按分类筛选

示例查询:

# Standardize a metabolite name
response = requests.get('https://www.metabolomicsworkbench.org/rest/refmet/match/citrate/name/json')

# Query by molecular formula
response = requests.get('https://www.metabolomicsworkbench.org/rest/refmet/formula/C12H24O2/all/json')

# Get all metabolites in a specific class
response = requests.get('https://www.metabolomicsworkbench.org/rest/refmet/main_class/Fatty%20Acids/all/json')

# Retrieve complete RefMet database
response = requests.get('https://www.metabolomicsworkbench.org/rest/refmet/all/json')
4. 执行质谱搜索

根据指定的离子加合物和容差,通过质荷比(m/z)搜索化合物。

关键操作:

  • 跨多个数据库(代谢组学工作台、LIPIDS、RefMet)搜索前体离子质量
  • 指定离子加合物类型(M+H、M-H、M+Na、M+NH4、M+2H 等)
  • 计算已知代谢物在特定加合物下的精确质量
  • 设置质量容差以灵活匹配

示例查询:

# Search by m/z value with M+H adduct
response = requests.get('https://www.metabolomicsworkbench.org/rest/moverz/MB/635.52/M+H/0.5/json')

# Calculate exact mass for a metabolite with specific adduct
response = requests.get('https://www.metabolomicsworkbench.org/rest/moverz/exactmass/PC(34:1)/M+H/json')

# Search across RefMet database
response = requests.get('https://www.metabolomicsworkbench.org/rest/moverz/REFMET/200.15/M-H/0.3/json')
5. 按分析和生物学参数筛选研究

使用 MetStat 上下文查找符合特定实验条件的研究。

关键操作:

  • 按分析方法筛选(LCMS、GCMS、NMR)
  • 指定电离极性(POSITIVE、NEGATIVE)
  • 按色谱类型筛选(HILIC、RP、GC)
  • 指定物种、样本来源或疾病
  • 使用以分号分隔的格式组合多个筛选条件

示例查询:

# Find human blood studies on diabetes using LC-MS
response = requests.get('https://www.metabolomicsworkbench.org/rest/metstat/LCMS;POSITIVE;HILIC;Human;Blood;Diabetes/json')

# Find all human blood studies containing tyrosine
response = requests.get('https://www.metabolomicsworkbench.org/rest/metstat/;;;Human;Blood;;;Tyrosine/json')

# Filter by analytical method only
response = requests.get('https://www.metabolomicsworkbench.org/rest/metstat/GCMS;;;;;;/json')
6. 访问基因和蛋白质信息

检索与代谢通路和代谢物代谢相关的基因和蛋白质数据。

关键操作:

  • 按符号、名称或 ID 查询基因
  • 访问蛋白质序列和注释
  • 在基因 ID、RefSeq ID 和 UniProt ID 之间进行交叉引用
  • 检索基因与代谢物的关联

示例查询:

# Get gene information by symbol
response = requests.get('https://www.metabolomicsworkbench.org/rest/gene/gene_symbol/ACACA/all/json')

# Retrieve protein data by UniProt ID
response = requests.get('https://www.metabolomicsworkbench.org/rest/protein/uniprot_id/Q13085/all/json')

常见工作流

工作流 1:查找包含特定代谢物的研究

要查找所有包含特定代谢物测量数据的研究:

  1. 首先使用 RefMet 标准化代谢物名称:

    response = requests.get('https://www.metabolomicsworkbench.org/rest/refmet/match/glucose/name/json')
    
  2. 使用标准化后的名称搜索研究:

    response = requests.get('https://www.metabolomicsworkbench.org/rest/study/refmet_name/Glucose/summary/json')
    
  3. 从指定研究中检索实验数据:

    response = requests.get('https://www.metabolomicsworkbench.org/rest/study/study_id/ST000001/data/json')
    
工作流 2:根据 MS 数据识别化合物

根据质谱 m/z 值识别潜在化合物:

  1. 使用适当的加合离子和容差执行 m/z 搜索:

    response = requests.get('https://www.metabolomicsworkbench.org/rest/moverz/MB/180.06/M+H/0.5/json')
    
  2. 查看结果中的候选化合物

  3. 获取候选化合物的详细信息:

    response = requests.get('https://www.metabolomicsworkbench.org/rest/compound/regno/{regno}/all/json')
    
  4. 下载结构以进行确认:

    response = requests.get('https://www.metabolomicsworkbench.org/rest/compound/regno/{regno}/png')
    
工作流 3:探索疾病特异性代谢组学

查找针对特定疾病和分析平台的代谢组学研究:

  1. 使用 MetStat 筛选研究:

    response = requests.get('https://www.metabolomicsworkbench.org/rest/metstat/LCMS;POSITIVE;;Human;;Cancer/json')
    
  2. 查看结果中的研究 ID

  3. 获取研究的详细信息:

    response = requests.get('https://www.metabolomicsworkbench.org/rest/study/study_id/ST{ID}/summary/json')
    
  4. 获取完整的实验数据:

    response = requests.get('https://www.metabolomicsworkbench.org/rest/study/study_id/ST{ID}/data/json')
    

输出格式

API 支持两种主要输出格式:

  • JSON(默认):机器可读格式,适合以编程方式访问
  • TXT:人类可读的制表符分隔文本格式

在 API URL 后附加 /json 或 /txt 以指定格式。若未指定格式,则默认返回 JSON。

最佳实践

  1. 使用 RefMet 进行标准化:搜索研究前,务必通过 RefMet 标准化代谢物名称,以确保命名一致

  2. 指定适当的加合离子:执行 m/z 搜索时,请根据分析方法使用正确的离子加合类型(例如,正离子模式 ESI 下的 M+H)

  3. 设置合理的容差:使用适当的质量容差值(低分辨率通常为 0.5 Da,高分辨率 MS 通常为 0.01 Da)

  4. 缓存参考数据:考虑缓存常用的参考数据(RefMet 数据库、化合物信息),以尽量减少 API 调用

  5. 处理分页:对于大型结果集,请做好处理响应中多个数据结构的准备

  6. 验证标识符:尽可能跨多个数据库交叉核对代谢物标识符,以确保正确识别化合物

资源

references/

详细的 API 参考文档见 references/api_reference.md,其中包括:

  • 完整的 REST API 端点规范
  • 所有可用上下文(compound、study、refmet、metstat、gene、protein、moverz)
  • 输入/输出参数详情
  • 质谱的离子加合类型
  • 其他查询示例

需要详细的 API 规范或使用较少见的端点时,请加载此参考文件。

评论

支持 Markdown