Download Mass Spectra Given HMDB ID
0
1
Entering edit mode
4.5 years ago
taraeicher ▴ 50

I would like to be able to query metabolites in batch by HMDB ID and download the curated mass spectra associated with these ID's (preferably from METLIN, but any other database containing mass spectra would also be fine). Note that I'm looking for the actual sequences of M/Z abundance values, not just images of the spectra. Ultimately, my goal is to build a global spectral similarity network using curated spectra, and that is why I want to query spectra given ID rather than the other way around. Does any database / API exist with this capability?

mass spectrometry metabolomics HMDB • 1.0k views
ADD COMMENT
0
Entering edit mode

I also wish there were, but didn't find any way to do it. Unfortunately, to my knowledge the only way to access HMDB data is to access the xml version of the entry page. You can do it in batch by scripting the build of the url "www.hmdb.ca/metabolites/"+[HMDB ID]+".xml", get the content using a cURL-like command, and parsing the obtained xml tree using your favorite library. For the 'spectra' nodes, you can only get a spectrum id, from which I didn't find a way to get the actual data yet... You can access more info at www.hmdb.ca/spectra/c_ms/[SPECTRUM ID]. Maybe using something like beautiful soup library could help you going further...

ADD REPLY

Login before adding your answer.

Traffic: 2681 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6