compound_tbl_lipidblast: Extract compound data from LipidBlast

View source: R/createCompDbPackage.R

compound_tbl_lipidblastR Documentation

Extract compound data from LipidBlast

Description

compound_tbl_lipidblast extracts basic comopund annotations from a LipidBlast file in (json format) downloaded from http://mona.fiehnlab.ucdavis.edu/downloads

Usage

compound_tbl_lipidblast(file, collapse)

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 a list to support multiple aliases per compound, unless argument collapse is provided, in which case multiple synonyms are pasted into a single element separated by the value of collapse.

Author(s)

Johannes Rainer and Jan Stanstrup

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

EuracBiomedicalResearch/CompoundDb documentation built on March 5, 2024, 5:26 a.m.