id_convert: Convert Metabolite Identifiers

View source: R/id_convert.R

id_convertR Documentation

Convert Metabolite Identifiers

Description

This function can convert metabolite identifiers to other available IDs in FOBI. Input vector can be a combination of different IDs.

Usage

id_convert(ids, to = "FOBI", fobi = fobitools::fobi)

Arguments

ids

A vector with metabolite IDs to convert. Input ID types can be FOBI, raw metabolite names (used in FOBI), HMDB, KEGG, PubChemCID, InChIKey, InChICode, ChemSpider, and a combination of them.

to

Target ID type. If possible, metabolites will be converted to this ID type. Options are "FOBI" (default), "metaboliteNames", "HMDB", "KEGG", "PubChemCID", "InChIKey", "InChICode", and "ChemSpider".

fobi

FOBI table obtained with 'parse_fobi()'. If this value is set to NULL, the last version of FOBI will be downloaded from GitHub.

Value

A tibble with input IDs and converted IDs.

Author(s)

Pol Castellano-Escuder

References

Pol Castellano-Escuder, Raúl González-Domínguez, David S Wishart, Cristina Andrés-Lacueva, Alex Sánchez-Pla, FOBI: an ontology to represent food intake data and associate it with metabolomic data, Database, Volume 2020, 2020, baaa033, https://doi.org/10.1093/databa/baaa033.

Examples


ids <- c(fobitools::idmap$HMDB[1:10], 
         fobitools::idmap$KEGG[11:23], 
         fobitools::idmap$InChIKey[100:150])
fobitools::id_convert(ids, to = "FOBI")


pcastellanoescuder/FOBIEnrichR documentation built on Oct. 21, 2024, 5:33 a.m.