The Metabolomics Workbench operates as an international repository for metabolomics data and metadata while delivering analysis tools and access to metabolite standards, protocols, and more. The Metabolomics Workbench was developed by the Metabolomics Common Fund's National Metabolomics Data Repository(NMDR) to support the development of next-generation technologies, increase the inventory and availability of high-quality reference standards, and facilitate data sharing and collaboration.
MetabolomicsWorkbenchAPI.jl is a Julia package to work with Metabolomics Workbench REST service. The official MW REST API documentation can be downloaded here. Several request examples of REST urls are presented in the Metabolomics WorkBench REST service web page that includes an interactive "REST url" creator. The current MetabolomicsWorkbenchAPI.jl version provides only access to the database but not to the analysis functions.
To check if the website is responding properly:
julia>check_mw()
MetabolomicsWorkbench.org is alive.
200To get properties for a list of metabolites names.
julia> vNames = ["LPC(16:0p)", "PC(18:0p/18:1(9Z))", "CE(18:0)", "PC(O-32:1)", "TG(O-52:2)"];
julia>fetch_properties(vNames)
5×6 DataFrame
Row │ exactmass formula main_class refmet_name sub_class super_class
│ String? String? String String String String
─────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ 479.3376 C24H50NO6P Glycerophosphocholines LPC P-16:0 O-LPC Glycerophospholipids
2 │ missingmissing Glycerophosphocholines PC P-18:0/18:1(9Z)* PC Glycerophospholipids
3 │ 652.6158 C45H80O2 Sterol esters CE 18:0 Chol. esters Sterol Lipids
4 │ 717.5672 C40H80NO7P Glycerophosphocholines PC O-32:1 O-PC Glycerophospholipids
5 │ missingmissing Triradylglycerols TG O-52:2* O-TAG GlycerolipidsTo get metabolites data for a study.
julia> df =fetch_data("ST001710");
julia> df[1:5,1:3]
5×3 DataFrame
Row │ Metabolite 10223857461022385747 │ String String String ─────┼─────────────────────────────────────────────
1 │ CE(16:0) +CE(18:1) 0.1062-1.90802 │ CE(18:0) 0.25800.27743 │ CE(18:2) 1.06540.14194 │ CE(20:4) 0.7983-0.34425 │ Cer(d18:1/23:0) 1.26580.9246To get the list of metabolites for a study.
julia> df =fetch_metabolites("ST000001");
julia>select(df, Not(["inchi_key", "other_id_type"]))[1:5,:]
5×7 DataFrame
Row │ Metabolite moverz_quant ri ri_type pubchem_id kegg_id other_id │ String String String String String String String ─────┼───────────────────────────────────────────────────────────────────────────────────────
1 │ 1,2,4-benzenetriol 239522741 Fiehn 10787 C02814 2056732 │ 1-monostearin 399959625 Fiehn 107036 D01947 2028353 │ 2-hydroxyvaleric acid 131310750 Fiehn 980092187734 │ 3-phosphoglycerate 299611619 Fiehn 724 C00597 2178215 │ 5-hydroxynorvaline NIST 142494838 Fiehn 95562200384To get samples and experimental variables for a study.
julia> df =fetch_samples("ST000001");
julia>first(df, 3)
3×3 DataFrame
Row │ Sample ID Arabidopsis Genotype Plant Wounding Treatment │ String String String
─────┼─────────────────────────────────────────────────────────────
1 │ LabF_115873 Wassilewskija (Ws) Control - Non-Wounded
2 │ LabF_115878 Wassilewskija (Ws) Control - Non-Wounded
3 │ LabF_115883 Wassilewskija (Ws) Control - Non-Wounded