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:

  • /json is not always JSON. The moverz context and the study summary/search outputs return tab-delimited text even when you ask for /json. The scripts/query_metabolomics_wb.py helper wraps such bodies as {"raw": "<tsv>"} rather than failing. Parse the TSV; do not assume keyed JSON objects.
  • moverz issues a 302 redirect to an internal .php handler. urllib/requests follow redirects automatically; raw curl does not unless you pass -L (otherwise you get an empty body).
  • List available studies with /txt, not /json. study/study_id/ST/available/json returns an empty body; use study/study_id/ST/available/txt (columns: project_id, study_id, analysis_id).
  • refmet/match returns the field refmet_name (plus formula, exactmass, classes, refmet_id) — not name.
  • Study search by refmet_name uses the indexed RefMet name, which may differ from refmet/match output (e.g. match/citrate gives Citric acid, but the study index is keyed on Tyrosine-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):

Installs
57
GitHub Stars
61
First Seen
Apr 12, 2026
alterlab-metabolomics-wb — alterlab-ieu/alterlab-academic-skills