Question: Download Mass Spectra Given HMDB ID
1
gravatar for taraeicher
12 months ago by
taraeicher30
National Institute for Advancing Translational Sciences
taraeicher30 wrote:

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?

ADD COMMENTlink modified 12 months ago • written 12 months ago by taraeicher30

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 REPLYlink written 11 months ago by Clément Frainay50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1689 users visited in the last hour