alterlab-metabolomics-wb
Installation
SKILL.md
Metabolomics Workbench Database
Overview
The Metabolomics Workbench is a comprehensive NIH Common Fund-sponsored platform hosted at UCSD that serves as the primary repository for metabolomics research data. It provides programmatic access to several thousand processed studies (4,300+ publicly available via the REST API as of 2026-06), standardized metabolite nomenclature through RefMet, and powerful search capabilities across multiple analytical platforms (GC-MS, LC-MS, NMR).
API gotchas (verified 2026-06)
Read these before parsing responses — several behaviors contradict the naive "/json always returns JSON" assumption:
/jsonis not always JSON. Themoverzcontext and thestudysummary/search outputs return tab-delimited text even when you ask for/json. Thescripts/query_metabolomics_wb.pyhelper wraps such bodies as{"raw": "<tsv>"}rather than failing. Parse the TSV; do not assume keyed JSON objects.moverzissues a 302 redirect to an internal.phphandler.urllib/requestsfollow redirects automatically; rawcurldoes not unless you pass-L(otherwise you get an empty body).- List available studies with
/txt, not/json.study/study_id/ST/available/jsonreturns an empty body; usestudy/study_id/ST/available/txt(columns:project_id,study_id,analysis_id). refmet/matchreturns the fieldrefmet_name(plusformula,exactmass, classes,refmet_id) — notname.- Study search by
refmet_nameuses the indexed RefMet name, which may differ fromrefmet/matchoutput (e.g.match/citrategivesCitric acid, but the study index is keyed onTyrosine-style entries). Verify the name resolves to studies; an empty result usually means a name-index mismatch, not "no studies."
Scripts
scripts/query_metabolomics_wb.py — query the Metabolomics Workbench REST API (stdlib only, JSON to stdout):