Skip to contents

Create Mapping Ambiguities between two ID types

Usage

MappingAmbiguity(
  InputData,
  From,
  To,
  GroupingVariable = NULL,
  Summary = FALSE,
  SaveAs_Table = "csv",
  FolderPath = NULL
)

Arguments

InputData

Translated DF from MetaProViz::TranslateID reults or Dataframe with at least one column with the target metabolite ID and another MetaboliteID type. One of the IDs can only have one ID per row, the other ID can be either separated by comma or a list. Optional: add other columns such as source (e.g. term).

From

Column name of the secondary or translated metabolite identifier in InputData. Here can be multiple IDs per row either separated by comma " ," or a list of IDs.

To

Column name of original metabolite identifier in InputData. Here should only have one ID per row.

GroupingVariable

Optional: If NULL no groups are used. If TRUE provide column name in InputData containing the GroupingVariable and features are grouped. Default = NULL

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 4 DFs: 1-3) From-to-To: 1. MappingIssues, 2. MappingIssues Summary, 3. Long summary (If Summary=TRUE) & 4-6) To-to-From: 4. MappingIssues, 5. MappingIssues Summary, 6. Long summary (If Summary=TRUE) & 7) Combined summary table (If Summary=TRUE)

Examples

KEGG_Pathways <- MetaProViz::LoadKEGG()
#> Cached file loaded from: ~/.cache/KEGG_Metabolite.rds
InputDF <- MetaProViz::TranslateID(InputData= KEGG_Pathways, SettingsInfo = c(InputID="MetaboliteID", GroupingVariable="term"), From = c("kegg"), To = c("pubchem"))[["TranslatedDF"]]
Res <- MetaProViz::MappingAmbiguity(InputData= InputDF, From = "MetaboliteID", To = "pubchem", GroupingVariable = "term", Summary=TRUE)