View source: R/id_conversion.R
translate_ChEBI_to_SMILES | R Documentation |
The function translate_ChEBI_to_SMILES
takes ChEBI identifiers
(ids
) and translate these via the dictionary rhea_chebi_smiles
to SMILES.
translate_ChEBI_to_SMILES(ids, rhea_chebi_smiles)
ids |
list, entries contain the |
rhea_chebi_smiles |
data.frame containing the mappings between ChEBI identifiers and SMILES identifiers |
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
.
list
Thomas Naake
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.