技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
hmdb-database【数据与研究】Access the Human Metabolome Database (HMDB) to search metabolites by name/structure/ID and extract chemical/biological/clinical fields when you need metabolomics research data or automated HMDB XML mining.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
HMDB0000001) and want to extract standardized chemical/biological/clinical fields for downstream analysis.HMDB0000001)>=3.9xml.etree.ElementTree (built-in)pandas >= 1.5Download the HMDB metabolite XML dataset from:
Assume you saved it as:
data/hmdb_metabolites.xml
from scripts.hmdb_parser import HMDBParser
def main():
# Path to the HMDB XML dump downloaded from hmdb.ca/downloads
xml_path = "data/hmdb_metabolites.xml"
parser = HMDBParser(xml_path)
# Search by metabolite name (text query)
results = parser.search("Caffeine")
# Print basic information from the first match (structure depends on implementation)
if not results:
print("No results found.")
return
first = results[0]
print("Top match:")
print(first)
if __name__ == "__main__":
main()
For a curated list of extractable fields and how they map to HMDB XML elements, see:
references/hmdb_data_fields.mdData acquisition
Parsing approach
xml.etree.ElementTree.references/hmdb_data_fields.md.Search behavior
HMDBParser (e.g., SMILES/InChI).Integration / cross-references
Spectral analysis (conceptual)