View source: R/support_decoupleR.R
translate_column_HMDB | R Documentation |
This function translates the values in a column using a provided Human Metabolome Database (HMDB) mapper vector. It modifies the input values by replacing certain prefixes and suffixes according to specific rules.
translate_column_HMDB(my_column, HMDB_mapper_vec)
my_column |
A vector of values to be translated. |
HMDB_mapper_vec |
A named vector where the names are the original identifiers and the values are the corresponding HMDB identifiers. |
A vector with the translated values.
# Create a sample column and HMDB mapper vector
my_column <- c("Metab__1234_a", "Gene5678_b", "Metab__91011_c")
HMDB_mapper_vec <- c("1234" = "HMDB00001", "5678" = "HMDB00002", "91011" = "HMDB00003")
# Translate the column
translated_column <- translate_column_HMDB(my_column, HMDB_mapper_vec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.