Reduce mapping ambiguities by using detected IDs
Usage
CleanMapping(
InputData,
PriorKnowledge,
DetectedID = "HMDB",
GroupingVariable = "term",
From = "MetaboliteID",
To = "hmdb",
SaveAs_Table = "csv",
FolderPath = NULL
)
Examples
DetectedIDs <- MetaProViz::ToyData(Data="Cells_MetaData")%>% rownames_to_column("Metabolite") %>%select("Metabolite", "HMDB")
#> Error in MetaProViz::ToyData(Data = "Cells_MetaData") %>% rownames_to_column("Metabolite") %>% select("Metabolite", "HMDB"): could not find function "%>%"
PathwayFile <- MetaProViz::TranslateID(InputData= MetaProViz::LoadKEGG(), SettingsInfo = c(InputID="MetaboliteID", GroupingVariable="term"), From = c("kegg"), To = c("hmdb"))[["TranslatedDF"]]
#> Installing package into ‘/home/runner/work/_temp/Library’
#> (as ‘lib’ is unspecified)
#> also installing the dependencies ‘gargle’, ‘uuid’, ‘ids’, ‘rematch2’, ‘conflicted’, ‘dbplyr’, ‘dtplyr’, ‘googledrive’, ‘googlesheets4’, ‘haven’, ‘reprex’
#> `Error in .getUrl(url, .flatFileParser) : Not Found (HTTP 404).` for pathway hsa01524 - Skipping and continuing to the next query.
#> `Error in .getUrl(url, .flatFileParser) : Not Found (HTTP 404).` for pathway hsa01523 - Skipping and continuing to the next query.
#> `Error in .getUrl(url, .flatFileParser) : Not Found (HTTP 404).` for pathway hsa01522 - Skipping and continuing to the next query.
Res <- MetaProViz::CleanMapping(InputData= DetectedIDs, PriorKnowledge= PathwayFile, DetectedID="HMDB", GroupingVariable="term", From="MetaboliteID", To="hmdb")