Alterlab hmdb

From AlterLab-IEU/AlterLab-Academic-Skills · View interactive version

Alterlab hmdb is an AI agent skill from the GitHub repository AlterLab-IEU/AlterLab-Academic-Skills. Access the Human Metabolome Database (HMDB, 220K+ metabolites), searching by name, HMDB ID, or structure to retrieve chemical properties, biomarker data, NMR/MS reference spectra, and associated pathways. Use when identifying a human metabolite, looking up its biomarker or disease associations, matc

How to use this skill

Skill file

HMDB Database

Overview

The Human Metabolome Database (HMDB) is a comprehensive, freely available resource containing detailed information about small molecule metabolites found in the human body.

Scripts

HMDB serves no public REST API, and the whole site (records, .xml URLs, search, downloads)

answers scripted requests with a Cloudflare challenge (HTTP 403, cf-mitigated: challenge;

checked 2026-10-23). Start with scripts/hmdb_open.py (stdlib only, JSON to stdout), which

assembles HMDB content from keyless mirrors and labels every value with its source:

python scripts/hmdb_open.py record HMDB0000001        # identity + HMDB annotations + concentrations
python scripts/hmdb_open.py disease "diabetes mellitus type 2" --biofluid Blood   # biomarkers
python scripts/hmdb_open.py structure "CN1C=NC2=C1C(=O)N(C(=O)N2)C"   # SMILES -> HMDB ID(s)

monoisotopic mass, SMILES, InChI/InChIKey; PubChem's HMDB-sourced PUG-View entries give tissue

and cellular locations, metabolite pathways and disease associations with PubMed IDs; MarkerDB

(Wishart lab, built on HMDB) gives measured normal and condition concentrations per biofluid.

HMDB0000001 -> 1-methyl-L-histidine, C7H11N3O2, 169.18; measured in Blood (normal 12.7 µM) and

Urine. HMDB's full biospecimen list (e.g. CSF, saliva, feces entries without concentrations)

is only on hmdb.ca: say so instead of filling it in from memory.

normal concentration, p-value/AUC where given, clinical status, PMIDs and HMDB ID. "Diabetes

Mellitus Type 2" -> 28 records over 24 metabolites, 21 in Blood (e.g. D-glucose HMDB0000122

6300 vs 3900 µM; 1,5-anhydrosorbitol HMDB0002712 62 vs 150 µM). MarkerDB/HMDB report serum

and plasma together as "Blood".

isomers that carry an HMDB accession (paraxanthine HMDB0001860 vs theophylline HMDB0001889 and

theobromine HMDB0002825 — a mass match alone cannot separate them).

scripts/query_hmdb.py fetches and parses the HMDB XML record itself (`python

scripts/query_hmdb.py HMDB0000001`) and works only where hmdb.ca lets your network through.

For bulk work download the XML/SDF dumps from https://www.hmdb.ca/downloads in a browser.

When to Use This Skill

This skill should be used when performing metabolomics research, clinical chemistry, biomarker discovery, or metabolite identification tasks: identifying a human metabolite, reading its biofluid concentrations and disease/biomarker associations, or matching it against HMDB reference NMR/MS spectra.

Does NOT Trigger

| Scenario | Use Instead |

|----------|-------------|

| Generic compound identifiers, properties, or bioassays for any small molecule | alterlab-pubchem |

| Primary metabolomics study datasets, RefMet standardized names | alterlab-metabolomics-wb |

| Pathway maps and KEGG compound/reaction IDs | alterlab-kegg |

| Computing MS/MS spectral similarity on your own spectra files | alterlab-matchms |

| Drug pharmacology, targets, and interactions | alterlab-drugbank |

Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-pubchem) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.

Database Contents

HMDB version 5.0 (released 2022; latest major version as of mid-2026) contains:

Core Capabilities

1. Web-Based Metabolite Searches

Access HMDB through the web interface at https://www.hmdb.ca/ for:

Text Searches:

Structure-Based Searches:

Spectral Searches:

Advanced Searches:

2. Accessing Metabolite Information

When retrieving metabolite data, HMDB provides:

Chemical Information:

Biological Context:

Clinical Relevance:

Analytical Data:

3. Downloadable Datasets

HMDB offers bulk data downloads at https://www.hmdb.ca/downloads in multiple formats:

Available Formats:

Dataset Categories:

Best Practices:

Usage Requirements:

4. Programmatic Access

HMDB publishes no documented public REST API. Practical programmatic routes, in order of preference:

5. Common Research Workflows

Metabolite Identification in Untargeted Metabolomics:

  1. Obtain experimental MS or NMR spectra from samples
  2. Use HMDB spectral search tools to match against reference spectra
  3. Verify candidates by checking molecular weight, retention time, and MS-MS fragmentation
  4. Review biological plausibility (expected in specimen type, known pathways)

Biomarker Discovery:

  1. Search HMDB for metabolites associated with disease of interest
  2. Review concentration ranges in normal vs. disease states
  3. Identify metabolites with strong differential abundance
  4. Examine pathway context and biological mechanisms
  5. Cross-reference with literature via PubMed links

Pathway Analysis:

  1. Identify metabolites of interest from experimental data
  2. Look up HMDB entries for each metabolite
  3. Extract pathway associations and enzymatic reactions
  4. Use linked SMPDB (Small Molecule Pathway Database) for pathway diagrams
  5. Identify pathway enrichment for biological interpretation

Database Integration:

  1. Download HMDB data in XML or CSV format
  2. Parse and extract relevant fields for local database
  3. Link with external IDs (KEGG, PubChem, ChEBI) for cross-database queries
  4. Build local tools or pipelines incorporating HMDB reference data

Related HMDB Resources

The HMDB ecosystem includes related databases:

These databases share similar structure and identifiers, enabling integrated queries across human metabolome, drug, toxin, and food databases.

Best Practices

Data Quality:

Version Tracking:

Citation:

Performance:

Reference Documentation

See references/hmdb_data_fields.md for detailed information about available data fields and their meanings.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.