Skip to main content
Topic: Trying to run XCMS script in R and having trouble (Read 855 times) previous topic - next topic

Trying to run XCMS script in R and having trouble

Hey everyone,

I am very new to R, but am somewhat familiar with metabolomics.
I am trying to better understand how to run XCMS through R, and have watched several videos and (tried) to run through several vignettes. I am still not completely understanding something though as I keep running into errors.

For example, in the CAMERA documentation, there is some example code for preprocessing with xcms that goes like this:
(code is from https://www.bioconductor.org/packages/release/bioc/html/CAMERA.html)

library(CAMERA)
file<-system.file('mzML/MM14.mzML',package="CAMERA")
xs<-xcmsSet(file,method="centWave",ppm=30,peakwidth=c(5,10))

When I try to run this, I get the following error:
Error in xcmsSet(file, method = "centWave", ppm = 30, peakwidth = c(5,  :
Chromatographic peak detection failed for all files! The first error was: Error in validObject(.Object): invalid class “xcmsPeaks” object: superclass "mMatrix" not defined in the environment of the object's class

Can anyone help me with this? Is the code the example I'm trying to recreate deprecated?

Is there a good source of information that you all learned how to run xcms in R?

Thanks, sorry if there is an obvious answer to this.