translate_ChEBI_to_SMILES: Translate ChEBI to SMILES

View source: R/id_conversion.R

translate_ChEBI_to_SMILESR Documentation

Translate ChEBI to SMILES

Description

The function translate_ChEBI_to_SMILES takes ChEBI identifiers (ids) and translate these via the dictionary rhea_chebi_smiles to SMILES.

Usage

translate_ChEBI_to_SMILES(ids, rhea_chebi_smiles)

Arguments

ids

list, entries contain the

rhea_chebi_smiles

data.frame containing the mappings between ChEBI identifiers and SMILES identifiers

Details

The function will return a named list. Each entry will contain the corresponding SMILES ids. In case there are no corresponding SMILES ids to ids, the list will contain the entry NA.

Value

list

Author(s)

Thomas Naake

Examples

ids <- list("HMDB0004947" = "72956", "HMDB0004949" = "72959", 
    "HMDB0011763" = "74100", "HMDB0004974" = "62107", 
    "HMDB0011594" = "62109")
    
## load rhea_chebi_smiles
file <- file.path(
    path.package("LipidNetworkPredictR"), "extdata", "rhea-chebi-smiles.tsv",
    fsep = .Platform$file.sep)
rhea_chebi_smiles <- read.csv(file, sep = "\t", header = FALSE)

## run the function
translate_ChEBI_to_SMILES(ids = ids, rhea_chebi_smiles = rhea_chebi_smiles)

michaelwitting/wormLipidPredictR documentation built on Nov. 20, 2024, 1:10 a.m.