View source: R/id_conversion.R
translate_id_to_ChEBI | R Documentation |
The function translate_id_to_ChEBI
will translate identifiers
(ids
) of type id_type
to ChEBI identifiers.
translate_id_to_ChEBI(
ids,
id_type = colnames(annotation_set),
annotation_set = annotation_set
)
ids |
character, identifiers to be translated to ChEBI ids |
id_type |
character(1), one of |
annotation_set |
data.frame containing the mappings between different ids |
The function will return a named list. Each entry will contain the
corresponding ChEBI ids. In case there are no corresponding ChEBI ids
to ids
, the list will contain the entry NA
.
list
Thomas Naake
## define the identifiers and the id type
ids <- c("HMDB0004947", "HMDB0004949", "HMDB0011763", "HMDB0004974", "HMDB0011594")
id_type <- "HMDB"
## define the mapping table
library(AnnotationHub)
ah <- AnnotationHub()
datasets <- query(ah, "metaboliteIDmapping")
annotation_set <- ah[["AH91792"]]
## run the function
translate_id_to_ChEBI(ids = ids, id_type = id_type,
annotation_set = annotation_set)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.