Request one specific the compound information in FoodB

request_foodb_compound(
  url = "https://foodb.ca/compounds",
  compound_id = "FDB000004",
  return_form = c("list", "data.frame")
)

Arguments

url

Default is "https://foodb.ca/compounds".

compound_id

compound id. For example, FDB000004.

return_form

data.frame or list.

Value

A data frame or list.

Author

Xiaotao Shen shenxt1990@outlook.com

Examples

x = request_foodb_compound( compound_id = "FDB000004", return_form = "list")
x[1:2]
#> $version
#> [1] "1.0"
#> 
#> $creation_date
#> [1] "2010-04-08 22:04:24 UTC"
#> 
y = request_foodb_compound(compound_id = "FDB000004", return_form = "data.frame")
head(y)
#>   version           creation_date             update_date accession
#> 1     1.0 2010-04-08 22:04:24 UTC 2020-02-24 19:10:06 UTC FDB000004
#>                                  name
#> 1 Cyanidin 3-(6''-acetyl-galactoside)
#>                                                                                                                                   description
#> 1 Constituent of the leaves of Nymphaea alba [CCD]. Cyanidin 3-(6''-acetyl-galactoside) is found in lowbush blueberry and highbush blueberry.
#>                                                                  synonyms
#> 1 Cyanidin 3-(6-acetylgalactoside){}Cyanidin 3-O-(6''-acetyl-galactoside)
#>   chemical_formula average_molecular_weight monisotopic_moleculate_weight
#> 1        C23H23O12                 491.4215                       491.119
#>                                                                                                                                 iupac_name
#> 1 3-{[(2S,3R,4S,5R,6R)-6-[(acetyloxy)methyl]-3,4,5-trihydroxyoxan-2-yl]oxy}-2-(3,4-dihydroxyphenyl)-5,7-dihydroxy-1lambda4-chromen-1-ylium
#>                                                                                                                          traditional_iupac
#> 1 3-{[(2S,3R,4S,5R,6R)-6-[(acetyloxy)methyl]-3,4,5-trihydroxyoxan-2-yl]oxy}-2-(3,4-dihydroxyphenyl)-5,7-dihydroxy-1lambda4-chromen-1-ylium
#>   cas_registry_number
#> 1         350602-26-5
#>                                                                                                               smiles
#> 1 [H][C@]1(COC(C)=O)O[C@@]([H])(OC2=CC3=C(O)C=C(O)C=C3[O+]=C2C2=CC=C(O)C(O)=C2)[C@]([H])(O)[C@@]([H])(O)[C@@]1([H])O
#>                                                                                                                                                                                                           inchi
#> 1 InChI=1S/C23H22O12/c1-9(24)32-8-18-19(29)20(30)21(31)23(35-18)34-17-7-12-14(27)5-11(25)6-16(12)33-22(17)10-2-3-13(26)15(28)4-10/h2-7,18-21,23,29-31H,8H2,1H3,(H3-,25,26,27,28)/p+1/t18-,19+,20+,21-,23-/m1/s1
#>                      inchikey state pathways   hmdb_id pubchem_compound_id
#> 1 HBXXDBKJLPLXPR-DLBZZEGUSA-O    NA       NA HMDB29236                  NA
#>   chemspider_id kegg_id chebi_id biocyc_id het_id wikipidia vmh_id fbonto_id
#> 1            NA      NA       NA        NA     NA        NA     NA        NA
#>   foodb_id general_references                                 foods flavors
#> 1       NA                 NA Highbush blueberry{}Lowbush blueberry      NA
#>   enzymes health_effects
#> 1      NA             NA