compound_tbl_lipidblast extracts basic comopund annotations from a
LipidBlast file in (json format) downloaded from
http://mona.fiehnlab.ucdavis.edu/downloads
Arguments
- file
character(1)with the name of the file name.- collapse
optional
character(1)to be used to collapse multiple values in the columns"synonyms". See examples for details.
Value
A tibble::tibble with general compound information (one row per compound):
compound_id: the ID of the compound.name: the compound's name.inchi: the InChI of the compound.inchikey: the InChI key.formula: the chemical formula.exactmass: the compound's mass.synonyms: the compound's synonyms (aliases). This type of this column is by default alistto support multiple aliases per compound, unless argumentcollapseis provided, in which case multiple synonyms are pasted into a single element separated by the value ofcollapse.
See also
Other compound table creation functions:
compound_tbl_sdf()
Examples
## Read compound information from a subset of HMDB
fl <- system.file("json/MoNa-LipidBlast_sub.json", package = "CompoundDb")
cmps <- compound_tbl_lipidblast(fl)
cmps
#> # A tibble: 8 × 7
#> compound_id name inchi inchikey formula exactmass synonyms
#> <chr> <chr> <chr> <chr> <chr> <dbl> <chr>
#> 1 LipidBlast000001 CerP 24:0 InChI=1S/C24H5… NA C24H50… 479. CerP(d1…
#> 2 LipidBlast000002 CerP 26:0 InChI=1S/C26H5… NA C26H54… 507. CerP(d1…
#> 3 LipidBlast000003 CerP 28:0 InChI=1S/C28H5… NA C28H58… 535. CerP(d1…
#> 4 LipidBlast000004 CerP 30:0 InChI=1S/C30H6… NA C30H62… 563. CerP(d1…
#> 5 LipidBlast000005 CerP 32:0 InChI=1S/C32H6… NA C32H66… 591. CerP(d1…
#> 6 LipidBlast000006 CerP 32:1 InChI=1S/C32H6… NA C32H64… 589. CerP(d1…
#> 7 LipidBlast000007 CerP 34:0 InChI=1S/C34H7… NA C34H70… 619. CerP(d1…
#> 8 LipidBlast000008 CerP 36:0 InChI=1S/C36H7… NA C36H74… 648. CerP(d1…
