Check and summarize prior_knowledge-to-MeasuredFeatures relationship
Source:R/RefactorPriorKnoweldge.R
checkmatch_pk_to_data.Rd
Check and summarize prior_knowledge-to-MeasuredFeatures relationship
Usage
checkmatch_pk_to_data(
data,
input_pk,
metadata_info = c(InputID = "HMDB", PriorID = "HMDB", grouping_variable = "term"),
save_table = "csv",
path = NULL
)
Arguments
- data
dataframe with at least one column with the detected metabolite IDs (e.g. HMDB). If there are multiple IDs per detected peak, please separate them by comma ("," or ", " or chr list). If there is a main ID and additional IDs, please provide them in separate columns.
- input_pk
dataframe with at least one column with the metabolite ID (e.g. HMDB) that need to match data metabolite IDs "source" (e.g. term). If there are multiple IDs, as the original pathway IDs (e.g. KEGG) where translated (e.g. to HMDB), please separate them by comma ("," or ", " or chr list).
- metadata_info
Colum name of Metabolite IDs in data and input_pk as well as column name of grouping_variable in input_pk. Default = c(InputID="HMDB", PriorID="HMDB", grouping_variable="term")
- save_table
Optional: File types for the analysis results are: "csv", "xlsx", "txt". Default = "csv"
- path
Optional: Path to the folder the results should be saved at. Default = NULL
Examples
DetectedIDs <- cellular_meta %>%dplyr::select("Metabolite", "HMDB")%>%tidyr::drop_na()
input_pathway <- MetaProViz::translate_id(data= MetaProViz::metsigdb_kegg(), metadata_info = c(InputID="MetaboliteID", grouping_variable="term"), from = c("kegg"), to = c("hmdb"))[["TranslatedDF"]]%>%tidyr::drop_na()
Res <- MetaProViz::checkmatch_pk_to_data(data= DetectedIDs, input_pk= input_pathway, metadata_info = c(InputID="HMDB", PriorID="hmdb", grouping_variable="term"))
#> Warning: 4 duplicated IDs were removed from columnHMDB
#> Warning: 8739 duplicated IDs were removed from columnhmdb