Request

Get the information of all compounds in KEGG (https://www.genome.jp/kegg/compound/).

library(massdatabase)
compound_info <- 
  request_kegg_compound_info()
head(compound_info)
#>   KEGG.ID
#> 1  C00001
#> 2  C00002
#> 3  C00003
#> 4  C00004
#> 5  C00005
#> 6  C00006
#>                                                                                                                                                     Synonyms
#> 1                                                                                                                                                 H2O; Water
#> 2                                                                                                                             ATP; Adenosine 5'-triphosphate
#> 3                                                         NAD+; NAD; Nicotinamide adenine dinucleotide; DPN; Diphosphopyridine nucleotide; Nadide; beta-NAD+
#> 4                                                                                                      NADH; DPNH; Reduced nicotinamide adenine dinucleotide
#> 5                                                                                           NADPH; TPNH; Reduced nicotinamide adenine dinucleotide phosphate
#> 6 NADP+; NADP; Nicotinamide adenine dinucleotide phosphate; beta-Nicotinamide adenine dinucleotide phosphate; TPN; Triphosphopyridine nucleotide; beta-NADP+

Get the information of all drugs in KEGG (https://www.genome.jp/kegg/drug/).

drug_info <- 
  request_kegg_drug_info()
head(drug_info)
#>   KEGG.ID
#> 1  D00001
#> 2  D00002
#> 3  D00003
#> 4  D00004
#> 5  D00005
#> 6  D00006
#>                                                                                                                                                                                                                                     Synonyms
#> 1 Water (JP18/USP); Purified water (JP18); Purified water in containers (JP18); Water, purified (USP); Sterile purified water in containers (JP18); Water for injection (JP18); Water for injection in containers (JP18); Sterile water (TN)
#> 2                                                                                                                                                                                   Nadide (JAN/USAN/INN); Nicotinamide adenine dinucleotide
#> 3                                                                                                                                                                                                                          Oxygen (JP18/USP)
#> 4                                                                                                                                                                                             Carbon dioxide (JP18/USP); Carbon dioxide (TN)
#> 5                                                                                                                                                                                          Flavin adenine dinucleotide (JAN); Adeflavin (TN)
#> 6                                                                                                                                                      Pyridoxal phosphate hydrate (JP18); Pyridoxal phosphate monohydrate; Hipyridoxin (TN)

Get one metabolite information.

x <-
  request_kegg_compound(compound_id = "C02886", return_form = "list")
x
#> $ENTRY
#> Compound 
#> "C02886" 
#> 
#> $NAME
#> [1] "S-Hexyl-glutathione;"  "S-Hexyl-L-glutathione"
#> 
#> $FORMULA
#> [1] "C16H29N3O6S"
#> 
#> $EXACT_MASS
#> [1] "391.1777"
#> 
#> $MOL_WEIGHT
#> [1] "391.483"
#> 
#> $DBLINKS
#> [1] "CAS: 24425-56-7"    "PubChem: 5817"      "ChEBI: 27704"      
#> [4] "PDB-CCD: GTX LEE"   "NIKKAJI: J394.269D"
#> 
#> $ATOM
#>  [1] "26"                             "1   C6a C    20.4431  -14.8878"
#>  [3] "2   O6a O    19.2714  -14.2083" "3   O6a O    20.4493  -16.1764"
#>  [5] "4   C1c C    27.4860  -14.8878" "5   C5a C    28.6642  -14.2083"
#>  [7] "6   N1b N    26.3143  -14.2083" "7   C1b C    27.5110  -16.4896"
#>  [9] "8   O5a O    28.6642  -12.8560" "9   C5a C    25.1363  -14.8878"
#> [11] "10  S2a S    26.2084  -17.2437" "11  C1b C    23.9645  -14.2083"
#> [13] "12  O5a O    25.1363  -16.1764" "13  C1b C    26.2084  -18.6025"
#> [15] "14  C1b C    22.7929  -14.8878" "15  C1b C    25.0367  -19.2818"
#> [17] "16  C1c C    21.6148  -14.2083" "17  C1b C    23.8586  -18.6025"
#> [19] "18  N1a N    21.6148  -12.8560" "19  C1b C    22.6868  -19.2818"
#> [21] "20  C1b C    21.5152  -18.6025" "21  C1a C    20.3371  -19.2818"
#> [23] "22  N1b N    29.8424  -14.9100" "23  C1b C    31.0549  -14.2100"
#> [25] "24  C6a C    32.2673  -14.9100" "25  O6a O    33.4797  -14.2100"
#> [27] "26  O6a O    32.2673  -16.3100"
#> 
#> $BOND
#>  [1] "25"                  "1     1   2 1"       "2     1   3 2"      
#>  [4] "3     4   5 1"       "4     4   6 1"       "5     4   7 1 #Down"
#>  [7] "6     5   8 2"       "7     6   9 1"       "8     7  10 1"      
#> [10] "9     9  11 1"       "10    9  12 2"       "11   10  13 1"      
#> [13] "12   11  14 1"       "13   13  15 1"       "14   14  16 1"      
#> [16] "15   15  17 1"       "16   16  18 1 #Up"   "17   17  19 1"      
#> [19] "18   19  20 1"       "19   20  21 1"       "20    5  22 1"      
#> [22] "21   22  23 1"       "22   23  24 1"       "23   24  25 1"      
#> [25] "24   24  26 2"       "25    1  16 1"
y <-
  request_kegg_compound(compound_id = "C02886", return_form = "data.frame")
y
#>          Lab.ID                              Compound.name     Formula       mz
#> Compound C02886 S-Hexyl-glutathione{}S-Hexyl-L-glutathione C16H29N3O6S 391.1777
#>              CAS.ID HMDB.ID KEGG.ID PUBCHEM.ID CHEBI.ID CHEMBL.ID LIPIDMAPS.ID
#> Compound 24425-56-7      NA  C02886       5817    27704        NA           NA
#>          LIPIDBANK.ID DRUGBANK.ID From_human From_drug KEGG_DRUG.ID
#> Compound           NA          NA        Yes        No           NA
#>                                            Synonyms
#> Compound S-Hexyl-glutathione{}S-Hexyl-L-glutathione

Get one drug information.

x <-
  request_kegg_drug(drug_id = "D00001", return_form = "list")
x
#> $ENTRY
#>     Drug 
#> "D00001" 
#> 
#> $NAME
#> [1] "Water (JP18/USP);"                           
#> [2] "Purified water (JP18);"                      
#> [3] "Purified water in containers (JP18);"        
#> [4] "Water, purified (USP);"                      
#> [5] "Sterile purified water in containers (JP18);"
#> [6] "Water for injection (JP18);"                 
#> [7] "Water for injection in containers (JP18);"   
#> [8] "Sterile water (TN)"                          
#> 
#> $PRODUCT
#> $PRODUCT$PRODUCT
#>  [1] "BACTERIOSTATIC WATER (HF Acquisition Co LLC) 99b0ef9b-600a-40dc-e053-2a95a90aa07e"        
#>  [2] "BACTERIOSTATIC WATER (Hospira) 87d6e9dc-fe3b-4593-ac9a-d7493d1959c7"                      
#>  [3] "BACTERIOSTATIC WATER (REMEDYREPACK) b8f88bab-c914-4ad2-a096-363d57147948"                 
#>  [4] "STERILE WATER (B. Braun Medical) d99f9133-e4d0-4dee-b611-dbc3f918b547"                    
#>  [5] "STERILE WATER (HF Acquisition Co LLC) 7610bf80-61b7-982f-e053-2a91aa0ac1bb"               
#>  [6] "STERILE WATER (HF Acquisition Co LLC) 77bd3c0f-f4ab-7cfa-e053-2a91aa0a1b83"               
#>  [7] "STERILE WATER (HF Acquisition Co LLC) 99b1cb12-0b2d-0c0f-e053-2a95a90ac3b6"               
#>  [8] "STERILE WATER (HF Acquisition Co. LLC) 74ed2a6f-824c-a1ff-e053-2a91aa0a57c0"              
#>  [9] "STERILE WATER (A-S Medication Solutions) dba87371-31d2-47c2-ab83-89aabce4b184"            
#> [10] "STERILE WATER (Asclemed USA) 45c38269-883c-4198-a9d5-03810a4420ec"                        
#> [11] "STERILE WATER (B. Braun Medical) 8924e52e-8622-4ed6-a061-1908183e0a18"                    
#> [12] "STERILE WATER (B. Braun Medical) 8fc8d87a-3951-4ac5-97df-c161ffc90475"                    
#> [13] "STERILE WATER (B. Braun Medical) f4284eb6-e553-46d4-90d8-efc80a90a480"                    
#> [14] "STERILE WATER (Baxter Healthcare Company) 210dc9ab-d6ca-4552-ac19-1be17792d290"           
#> [15] "STERILE WATER (Baxter Healthcare Company) 8bcf5572-49e1-4302-9522-56f57904cb4a"           
#> [16] "STERILE WATER (Baxter Healthcare Corporation) ef3e79c5-3f58-4b36-a296-64b7d9a651c1"       
#> [17] "STERILE WATER (Cardinal Health) 9655cd02-82b5-4a75-813b-854b19551481"                     
#> [18] "BACTERIOSTATIC WATER (General Injectables & Vaccine) 21eadcab-0f74-4d3f-9bcc-6cf7e260fdd0"
#> [19] "STERILE WATER (General Injectables & Vaccines) c6eed2ad-25f3-479e-9c28-1945eea88f8d"      
#> [20] "STERILE WATER (General Injectables and Vaccines) a82d2dd5-dd65-4208-ab85-f0680d0e2bf6"    
#> [21] "STERILE WATER (Henry Schein) 88403fcf-a276-42c0-88b6-bd84a720b564"                        
#> [22] "BACTERIOSTATIC WATER (Henry Schein) a833502e-a622-4e81-8c58-cef6ccb6c4c9"                 
#> [23] "STERILE WATER (Henry Schein) f4087143-9868-4308-b96c-43657ee8ec28"                        
#> [24] "STERILE WATER (Hospira) 1fe046e2-d6e1-413a-a59c-4ea2a4841c79"                             
#> [25] "STERILE WATER (Hospira) 2b9ea23a-f9e9-48a8-25b7-519e3bbd6828"                             
#> [26] "STERILE WATER (ICU Medical) 1c0bbcb7-5ed6-4ee7-b297-080d3359474e"                         
#> [27] "STERILE WATER (ICU Medical) aab10f03-26ae-4dbc-a481-ef025e48b405"                         
#> [28] "STERILE WATER (ICU Medical) e3484bc6-ed7f-43ef-9d49-c131a8dff2dd"                         
#> [29] "BACTERIOSTATIC WATER (Medical Purchasing Solutions) 69485218-9343-952d-e053-2a91aa0ad4e8" 
#> [30] "STERILE WATER (Medical Purchasing Solutions) 81a1a49e-fd89-59d8-e053-2a91aa0ac3c3"        
#> [31] "STERILE WATER (Medical Purchasing Solutions) 9c9851b6-2702-e893-e053-2a95a90a729c"        
#> 
#> $PRODUCT$GENERIC
#> [1] "STERILE WATER (Nephron Pharmaceuticals Corporation) bc04a883-babc-87a6-e053-2995a90a3dfd"
#> [2] "STERILE WATER (Medefil) 99e99a50-82d5-aff6-e053-2a95a90a8c56"                            
#> [3] "STERILE WATER (Civica) 3f49eedf-5bf5-4a95-b704-c956d860ca04"                             
#> [4] "STERILE WATER (Fresenius Kabi USA) b45e9f1d-9c48-4b46-8541-d846b89540df"                 
#> [5] "STERILE WATER (Fresenius Kabi USA) e71c6c83-d518-496c-b2ab-efd5987e4783"                 
#> [6] "STERILE WATER (Hikma Pharmaceuticals USA) 78ef7ad3-451d-43d0-a9b6-5cf0aadca003"          
#> 
#> 
#> $FORMULA
#> [1] "H2O"
#> 
#> $EXACT_MASS
#> [1] "18.0106"
#> 
#> $MOL_WEIGHT
#> [1] "18.0153"
#> 
#> $REMARK
#> [1] "Same as: C00001"                                    
#> [2] "Therapeutic category: 7131"                         
#> [3] "Product: D00001<JP/US>"                             
#> [4] "Product (mixture): D05352<JP> D05354<JP> D06417<JP>"
#> 
#> $EFFICACY
#> [1] "Pharmaceutic aid (solvent)"
#> 
#> $BRITE
#>  [1] "Therapeutic category of drugs in Japan [BR:br08301]"                                                                                                                                                                                
#>  [2] " 7  Agents not mainly for therapeutic purpose"                                                                                                                                                                                      
#>  [3] "  71  Dispensing medicines"                                                                                                                                                                                                         
#>  [4] "   713  Solvents"                                                                                                                                                                                                                   
#>  [5] "    7131  Purified water"                                                                                                                                                                                                           
#>  [6] "     D00001  Water (JP18/USP); Purified water (JP18); Purified water in containers (JP18); Water, purified (USP); Sterile purified water in containers (JP18); Water for injection (JP18); Water for injection in containers (JP18)"
#>  [7] "Risk category of Japanese OTC drugs [BR:br08312]"                                                                                                                                                                                   
#>  [8] " Third-class OTC drugs"                                                                                                                                                                                                             
#>  [9] "  Inorganic and organic chemicals"                                                                                                                                                                                                  
#> [10] "   Water"                                                                                                                                                                                                                           
#> [11] "    D00001  Water (JP18/USP)"                                                                                                                                                                                                       
#> [12] "Drugs listed in the Japanese Pharmacopoeia [BR:br08311]"                                                                                                                                                                            
#> [13] " Chemicals"                                                                                                                                                                                                                         
#> [14] "  D00001  Water"                                                                                                                                                                                                                    
#> [15] "  D00001  Purified water"                                                                                                                                                                                                           
#> [16] "  D00001  Purified water in containers"                                                                                                                                                                                             
#> [17] "  D00001  Sterile purified Water in containers"                                                                                                                                                                                     
#> [18] "  D00001  Water for injection"                                                                                                                                                                                                      
#> [19] "  D00001  Sterile water for injection in containers"                                                                                                                                                                                
#> 
#> $DBLINKS
#> [1] "CAS: 7732-18-5"    "PubChem: 7847069"  "ChEBI: 15377"     
#> [4] "PDB-CCD: HOH O"    "LigandBox: D00001" "NIKKAJI: J43.587B"
#> 
#> $ATOM
#> [1] "1"                              "1   O0  O    32.0259  -17.5852"
#> 
#> $BOND
#> [1] "0"
y <-
  request_kegg_drug(drug_id = "D00001", return_form = "data.frame")
y
#>      Lab.ID
#> Drug D00001
#>                                                                                                                                                                                                                                   Compound.name
#> Drug Water (JP18/USP){}Purified water (JP18){}Purified water in containers (JP18){}Water, purified (USP){}Sterile purified water in containers (JP18){}Water for injection (JP18){}Water for injection in containers (JP18){}Sterile water (TN)
#>      Formula      mz    CAS.ID HMDB.ID KEGG.ID PUBCHEM.ID CHEBI.ID CHEMBL.ID
#> Drug     H2O 18.0106 7732-18-5      NA  D00001    7847069    15377        NA
#>      LIPIDMAPS.ID LIPIDBANK.ID DRUGBANK.ID From_human From_drug KEGG_DRUG.ID
#> Drug           NA           NA          NA        Yes       Yes             
#>                                                                                                                                                                                                                                        Synonyms
#> Drug Water (JP18/USP){}Purified water (JP18){}Purified water in containers (JP18){}Water, purified (USP){}Sterile purified water in containers (JP18){}Water for injection (JP18){}Water for injection in containers (JP18){}Sterile water (TN)

Session information

sessionInfo()
#> R version 4.2.1 (2022-06-23)
#> Platform: x86_64-apple-darwin17.0 (64-bit)
#> Running under: macOS Big Sur ... 10.16
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
#> 
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] massdatabase_0.99.14
#> 
#> loaded via a namespace (and not attached):
#>   [1] readxl_1.4.0                circlize_0.4.15            
#>   [3] systemfonts_1.0.4           igraph_1.3.2               
#>   [5] plyr_1.8.7                  lazyeval_0.2.2             
#>   [7] BiocParallel_1.30.3         listenv_0.8.0              
#>   [9] ChemmineR_3.48.0            GenomeInfoDb_1.32.2        
#>  [11] ggplot2_3.3.6               Rdisop_1.56.0              
#>  [13] digest_0.6.29               foreach_1.5.2              
#>  [15] yulab.utils_0.0.5           htmltools_0.5.2            
#>  [17] viridis_0.6.2               massdataset_1.0.5          
#>  [19] fansi_1.0.3                 magrittr_2.0.3             
#>  [21] memoise_2.0.1               metpath_0.99.4             
#>  [23] cluster_2.1.3               doParallel_1.0.17          
#>  [25] tzdb_0.3.0                  openxlsx_4.2.5             
#>  [27] limma_3.52.2                graphlayouts_0.8.0         
#>  [29] readr_2.1.2                 ComplexHeatmap_2.12.0      
#>  [31] globals_0.15.1              Biostrings_2.64.0          
#>  [33] matrixStats_0.62.0          pkgdown_2.0.5              
#>  [35] prettyunits_1.1.1           colorspace_2.0-3           
#>  [37] ggrepel_0.9.1               rvest_1.0.2                
#>  [39] metid_1.2.15                textshaping_0.3.6          
#>  [41] xfun_0.31                   dplyr_1.0.9                
#>  [43] crayon_1.5.1                RCurl_1.98-1.7             
#>  [45] jsonlite_1.8.0              impute_1.70.0              
#>  [47] iterators_1.0.14            glue_1.6.2                 
#>  [49] polyclip_1.10-0             gtable_0.3.0               
#>  [51] zlibbioc_1.42.0             XVector_0.36.0             
#>  [53] GetoptLong_1.0.5            DelayedArray_0.22.0        
#>  [55] shape_1.4.6                 BiocGenerics_0.42.0        
#>  [57] scales_1.2.0                vsn_3.64.0                 
#>  [59] DBI_1.1.3                   Rcpp_1.0.8.3               
#>  [61] mzR_2.30.0                  progress_1.2.2             
#>  [63] viridisLite_0.4.0           clue_0.3-61                
#>  [65] gridGraphics_0.5-1          preprocessCore_1.58.0      
#>  [67] stats4_4.2.1                MsCoreUtils_1.8.0          
#>  [69] rsvg_2.3.1                  DT_0.23                    
#>  [71] htmlwidgets_1.5.4           httr_1.4.3                 
#>  [73] RColorBrewer_1.1-3          ellipsis_0.3.2             
#>  [75] farver_2.1.1                pkgconfig_2.0.3            
#>  [77] XML_3.99-0.10               sass_0.4.1                 
#>  [79] utf8_1.2.2                  ggplotify_0.1.0            
#>  [81] tidyselect_1.1.2            rlang_1.0.3                
#>  [83] munsell_0.5.0               cellranger_1.1.0           
#>  [85] tools_4.2.1                 cachem_1.0.6               
#>  [87] cli_3.3.0                   generics_0.1.3             
#>  [89] evaluate_0.15               stringr_1.4.0              
#>  [91] fastmap_1.1.0               mzID_1.34.0                
#>  [93] yaml_2.3.5                  ragg_1.2.2                 
#>  [95] knitr_1.39                  fs_1.5.2                   
#>  [97] tidygraph_1.2.1             zip_2.2.0                  
#>  [99] purrr_0.3.4                 ggraph_2.0.5               
#> [101] KEGGREST_1.36.2             ncdf4_1.19                 
#> [103] pbapply_1.5-0               future_1.26.1              
#> [105] xml2_1.3.3                  compiler_4.2.1             
#> [107] rstudioapi_0.13             plotly_4.10.0              
#> [109] curl_4.3.2                  png_0.1-7                  
#> [111] affyio_1.66.0               tweenr_1.0.2               
#> [113] tibble_3.1.7                bslib_0.3.1                
#> [115] stringi_1.7.6               desc_1.4.1                 
#> [117] MSnbase_2.22.0              lattice_0.20-45            
#> [119] ProtGenerics_1.28.0         Matrix_1.4-1               
#> [121] ggsci_2.9                   vctrs_0.4.1                
#> [123] stringdist_0.9.8            pillar_1.7.0               
#> [125] lifecycle_1.0.1             furrr_0.3.0                
#> [127] BiocManager_1.30.18         jquerylib_0.1.4            
#> [129] MALDIquant_1.21             GlobalOptions_0.1.2        
#> [131] data.table_1.14.2           bitops_1.0-7               
#> [133] GenomicRanges_1.48.0        R6_2.5.1                   
#> [135] pcaMethods_1.88.0           affy_1.74.0                
#> [137] gridExtra_2.3               IRanges_2.30.0             
#> [139] parallelly_1.32.0           codetools_0.2-18           
#> [141] MASS_7.3-57                 assertthat_0.2.1           
#> [143] SummarizedExperiment_1.26.1 rprojroot_2.0.3            
#> [145] rjson_0.2.21                S4Vectors_0.34.0           
#> [147] GenomeInfoDbData_1.2.8      hms_1.1.1                  
#> [149] parallel_4.2.1              grid_4.2.1                 
#> [151] tidyr_1.2.0                 rmarkdown_2.14             
#> [153] MatrixGenerics_1.8.1        masstools_0.99.13          
#> [155] ggforce_0.3.3               Biobase_2.56.0             
#> [157] base64enc_0.1-3