MetabolomicsWorkbenchAPI.jl

Author senresearch
Popularity
4 Stars
Updated Last
1 Year Ago
Started In
August 2022

Dev CI Coverage

MetabolomicsWorkbenchAPI.jl

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.

Check connection

To check if the website is responding properly:

julia> check_mw()
MetabolomicsWorkbench.org is alive.
200

Get Metabolites Properties

To 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
─────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────
   1479.3376   C24H50NO6P  Glycerophosphocholines  LPC P-16:0            O-LPC         Glycerophospholipids
   2missing    missing     Glycerophosphocholines  PC  P-18:0/18:1(9Z)*  PC            Glycerophospholipids
   3652.6158   C45H80O2    Sterol esters           CE 18:0               Chol. esters  Sterol Lipids
   4717.5672   C40H80NO7P  Glycerophosphocholines  PC O-32:1             O-PC          Glycerophospholipids
   5missing    missing     Triradylglycerols       TG  O-52:2*           O-TAG         Glycerolipids

Get metabolites Data

To get metabolites data for a study.

julia> df = fetch_data("ST001710");
julia> df[1:5,1:3]
5×3 DataFrame
 Row │ Metabolite           1022385746  1022385747 
     │ String               String      String     
─────┼─────────────────────────────────────────────
   1CE(16:0) + CE(18:1)  0.1062      -1.9080
   2CE(18:0)             0.2580      0.2774
   3CE(18:2)             1.0654      0.1419
   4CE(20:4)             0.7983      -0.3442
   5Cer(d18:1/23:0)      1.2658      0.9246

Get metabolites

To 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   
─────┼───────────────────────────────────────────────────────────────────────────────────────
   11,2,4-benzenetriol       239           522741  Fiehn    10787       C02814   205673
   21-monostearin            399           959625  Fiehn    107036      D01947   202835
   32-hydroxyvaleric acid    131           310750  Fiehn    98009                218773
   43-phosphoglycerate       299           611619  Fiehn    724         C00597   217821
   55-hydroxynorvaline NIST  142           494838  Fiehn    95562                200384

Get Samples variables

To 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

Used By Packages

No packages found.