Dear all,
I am using the MetaboAnalystR and want to compare two conditions using a table of peak areas. However, independent of the order of the columns that contain the values for each sample, the results are the same. Shouldn’t the order of the samples affect the pre-fix of the change/enrichment, e.g., condition A vs condition B is positively enriched in mechanism x, while condition B vs condition A is negatively enriched in mechanism x. Is there any argument that reorders the columns prior to the analysis, independent of the order beforehand? I am looking forward to hearing your feedback.
Thanks!
##Mummichog analysis on MS1 peak table
# Create objects for storing processed data
mSet <- InitDataObjects("mass_table", "mummichog", FALSE)
# Set parameters, ppm is 4.3 here
# Only positive mode (ESI+) included
mSet <- SetPeakFormat(mSet, "mpt")
mSet <- UpdateInstrumentParameters(mSet, 15, ion, "yes", 0.05);
mSet <- SetRTincluded(mSet, "minutes")
# Read Peak table
mSet <- Read.TextData(mSet, paste0("analyst_input_", name, ".csv"), "mpt", "disc");
mSet <- SanityCheckMummichogData(mSet)
# Replace minimum value and data filtration
mSet <- ReplaceMin(mSet)
mSet <- SanityCheckMummichogData(mSet)
mSet <- FilterVariable(mSet, "none", -1, "F", 25, F)
# Perform data normalization
# The normailization distribution will be displaced in figure "norm_0_dpi72.png" and "snorm_0_dpi72.png"
# in your working directory
mSet <- PreparePrenormData(mSet)
mSet <- Normalization(mSet, "NULL", "LogNorm", "NULL", ratio=FALSE, ratioNum=20)
mSet <- PlotNormSummary(mSet, paste0("norm_", name, "_"), "pdf", 72, width=NA)
mSet <- PlotSampleNormSummary(mSet, paste0("snorm_", name, "_"), "pdf", 72, width=NA)
# Perform functional analysis with mummichog algorithm
mSet <- SetPeakEnrichMethod(mSet, "integ", "v2") #Alternatively, set method to "GSEA" or "mum"
mSet <- PreparePeakTable4PSEA(mSet)
mSet <- SetMummichogPval(mSet, 0.05)
mSet <- PerformPSEA(mSet, "hsa_mfn", "current", 3 , 100)
mSet <- PlotPeaks2Paths(mSet, paste0("peaks_to_paths_", name, "_"), "pdf", 72, width=NA)