rietho / IPO

A Tool for automated Optimization of XCMS Parameters
http://bioconductor.org/packages/IPO/
Other
34 stars 20 forks source link

Issue running optimizeXcmsSet() with CAMERA isotope peak detection on multiple files. #48

Closed crmclean closed 7 years ago

crmclean commented 7 years ago

Good Afternoon,

I wanted to report an error I had running the IPO function "optimizeXcmsSet()", specifically when I tried running this function with multiple data files using CAMERA as the Isotope detection algorithm rather than the IPO algorithm. When I try this, I get the error "Error in xsAnnotate(xset, sample = sample) : First argument must be a xcmsSet with group information or contain only one sample." after centWave appeared to have finished running. The function does work with a single file, as with the example provided in the R documentation for the function:

mzmlfile <- file.path(find.package("msdata"), "microtofq/MM14.mzML")

paramsPP <- getDefaultXcmsSetStartingParams()
paramsPP$mzdiff <- -0.001
paramsPP$min_peakwidth <- c(7,14)
paramsPP$max_peakwidth <- c(20,30)

#example using CAMERA isotope identification
resultPP <- optimizeXcmsSet(mzmlfile, paramsPP, isotopeIdentification="CAMERA", 
                            subdir="mtbls2", ppm=15, maxcharge=2)

I did try to review the source code to try to diagnose why the error takes place with multiple samples, but I was a little confused by the treatment of the xset object.

I would be very grateful for your assistance in helping resolve the problem.

Craig

sneumann commented 7 years ago

Hi, the optimizeXcmsSet() is optimising the feature detection (peak picking) step, not yet the grouping. CAMERA requires an xcms group()ed xcmsSet in case there are n>1 samples. Since IPO hasn't worked/optimised group() yet, it can't deliver that to CAMERA. Either you process files individually, or go to the IPO isotope detection.

Yours, Steffen

P.S.: IPO could refuse to use CAMERA for n>1 files right away.

crmclean commented 7 years ago

Hi Steffen,

Thank you for your quick answer. This makes a lot of sense. I appreciate you clarifying the issue to me.

Craig