Memory handling metaboanalystr

Hello,

I am working on running a large scale metabolomics pipeline using the raw spectral processing tools of MetaboAnalystR. Specifically, I have been setting up a pipeline following: 2. Example raw spectral data processing (MS1) from the tutorials posted (LC-MS/MS Raw Spectral Data Processing). For smaller datasets on the orders of 3GB for our QC files, and 37 GB in sample files.

We are now trying to process files on the order of 14GB (QC files) and 142 GB in sample files and continuously hitting memory issues even at large memory runs (~1.5TB). Specifically, this is occurring it looks like during step 5 of 6 peak filling. Below I have attached the error and the code I am running. I am also receiving out of memory errors when these jobs fail on my cluster.

Is there a way to control memory through number of cores or the number of files I read in?

Thank you,

Brady

Step 5/6: Started peak filling! This step may take some time…

ERROR:no applicable method for @ applied to an object of class “simpleError”
Error in PerformPeakProfiling(mSet, Params = best_params, plotSettings = SetPlotParam(Plot = FALSE)) :

# Load MetaboAnalystR and OptiLCMS
library(MetaboAnalystR)
library(OptiLCMS)

DataFiles <- list.files("/path/to/QC/mzMLs", full.names = TRUE)
mSet <- PerformROIExtraction(datapath = DataFiles, rt.idx = 0.9, rmConts = TRUE);

best_params <- PerformParamsOptimization(mSet, param = SetPeakParam(platform = "UPLC-Orbitrap"), ncore = 16);

mSet <- ImportRawMSData(path = c("/path/to/sample/mzMLs"), plotSettings = SetPlotParam(Plot = F))
mSet <- PerformPeakProfiling(mSet, Params = best_params, plotSettings = SetPlotParam(Plot=FALSE))

annParams <- SetAnnotationParam(polarity = 'positive', mz_abs_add = 0.015);
mSet <- PerformPeakAnnotation(mSet, annParams)

mSet <- FormatPeakList(mSet, annParams, filtIso = FALSE, filtAdducts = FALSE, missPercent = 1)
# Export annotation results, the annotation will be save as "annotated_peaklist.csv";
Export.Annotation(mSet)
Export.PeakTable(mSet)
Export.PeakSummary(mSet)

You need to first convert spectra into centroid mode. It is usually less than 200MB after this step in our experience