Skip to contents

Translate IDs to/from KEGG, PubChem, Chebi, HMDB

Usage

TranslateID(
  InputData,
  SettingsInfo = c(InputID = "MetaboliteID", GroupingVariable = "term"),
  From = "kegg",
  To = c("pubchem", "chebi", "hmdb"),
  Summary = FALSE,
  SaveAs_Table = "csv",
  FolderPath = NULL
)

Arguments

InputData

Dataframe with at least one column with the target (e.g. metabolite), you can add other columns such as source (e.g. term). Must be "long" DF, meaning one ID per row.

SettingsInfo

Optional: Column name of Target in Input_GeneSet. Default = list(InputID="MetaboliteID" , GroupingVariable="term")

From

ID type that is present in your data. Choose between "kegg", "pubchem", "chebi", "hmdb". Default = "kegg"

To

One or multiple ID types to which you want to translate your data. Choose between "kegg", "pubchem", "chebi", "hmdb". Default = c("pubchem","chebi","hmdb")

Summary

Optional: If TRUE a long summary tables are created. Default = FALSE

SaveAs_Table

Optional: File types for the analysis results are: "csv", "xlsx", "txt". Default = "csv"

FolderPath

Optional: Path to the folder the results should be saved at. Default = NULL

Value

List with at least three DFs: 1) Original data and the new column of translated ids spearated by comma. 2) Mapping information between Original ID to Translated ID. 3) Mapping summary between Original ID to Translated ID.

Examples

KEGG_Pathways <- MetaProViz::LoadKEGG()
#> Cached file loaded from: ~/.cache/KEGG_Metabolite.rds
Res <- MetaProViz::TranslateID(InputData= KEGG_Pathways, SettingsInfo = c(InputID="MetaboliteID", GroupingVariable="term"), From = c("kegg"), To = c("pubchem","chebi","hmdb"), SaveAs_Table= "csv", FolderPath=NULL)
Res <- MetaProViz::TranslateID(InputData= KEGG_Pathways, SettingsInfo = c(InputID="MetaboliteID", GroupingVariable="term"), From = c("kegg"), To = c("pubchem", "hmdb"))