Skip to main content
Topic: xcmsSet centWave (Read 6694 times) previous topic - next topic

xcmsSet centWave

I am trying to run xcms on 14 mzXML LC-MS/MS proteomic runs for peak detection and alignment and get the following error:

xs <- xcmsSet(files=mzdatafiles, method="centWave", mslevel=1, ppm=4, peakwidth=c(2,30), snthresh=10, prefilter=c(7,10000), mzCenterFun="wMean", integrate=1, mzdiff=-0.001, fitgauss=FALSE, noise=10000, sleep=0, verbose.columns=FALSE)

Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘findPeaks.centWave’ for signature ‘"missing"’

However, when I run peak detection with the same parameters:
xraw <- xcmsRaw(mzdatafiles[1], includeMSn=TRUE)
peaks <- findPeaks.centWave(xraw, ppm=4, peakwidth=c(2,30), snthresh=10, prefilter=c(7,10000), mzCenterFun="wMean", integrate=1, mzdiff=-0.001, fitgauss=FALSE, scanrange= numeric(), noise=0, sleep=0, verbose.columns=FALSE, ROI.list=list())

 Detecting mass traces at 4 ppm ...
 % finished: 0 10 20 30 40 50 60 70 80 90 100
 26511 m/z ROI's.

 Detecting chromatographic peaks ...
 % finished: 0 10 20 30 40 50 60 70 80 90 100
 7414  Peaks.

I do not get an error.  Please let me know how I can get an xcmsSet object with roughly the above parameters and centWave method of peak detection?

Best regards and thanks in advance.

my sessionInfo:
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252 
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                         
[5] LC_TIME=English_United States.1252   

attached base packages:
[1] parallel  stats    graphics  grDevices utils    datasets  methods 
[8] base   

other attached packages:
[1] snow_0.3-13        xcms_1.40.0        Biobase_2.24.0   
[4] BiocGenerics_0.10.0 mzR_1.10.7          Rcpp_0.11.3       

loaded via a namespace (and not attached):
[1] codetools_0.2-9 tools_3.1.0

Re: xcmsSet centWave

Reply #1
What exactly is the content of mzdatafiles?
What does traceback() say?
Blog: stanstrup.github.io

Re: xcmsSet centWave

Reply #2
Hi Jan and thanks.

mzdatafiles are 14 peptide run RAW data files from an Orbi-XL converted by readw to mzXML. Total file size is ~1.7 GB and I have 16GB RAM.  Note that findPeaks.centWave() (which works) is only running on the first of the 14 files.  xcmsSet() does run, but only with method="MS1", where I am hoping that centWave method and its parameters will do a better job of separating out peptide features for subsequent grouping and retcor().

> mzdatapath <- "e:/IMAC_7x7x7mzXML/"
> list.files(mzdatapath, recursive = TRUE)
 [1] "AD/AD_0500_12.mzXML"  "AD/AD_0500_52.mzXML"  "AD/AD_0503_163.mzXML"
 [4] "AD/AD_e04_186.mzXML"  "AD/AD_e05_04.mzXML"    "AD/AD_e06_158.mzXML" 
 [7] "AD/AD_e08_53.mzXML"    "CT/ctl_0500_06.mzXML"  "CT/ctl_0503_299.mzXML"
[10] "CT/ctl_0503_35.mzXML"  "CT/ctl_0503_390.mzXML" "CT/ctl_a86_46.mzXML" 
[13] "CT/ctl_e05_130.mzXML"  "CT/ctl_e06_41.mzXML" 
> mzdatafiles <- list.files(mzdatapath, recursive = TRUE, full.names = TRUE)

> xs <- xcmsSet(mzdatafiles, method="centWave", mslevel=1, ppm=4, peakwidth=c(2,30), snthresh=10, prefilter=c(7,10000), mzCenterFun="wMean", integrate=1, mzdiff=-0.001, fitgauss=FALSE, noise=10000, sleep=0, verbose.columns=FALSE)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘findPeaks.centWave’ for signature ‘"missing"’
> traceback()
7: stop(gettextf("unable to find an inherited method for function %s for signature %s",
      sQuote(fdef@generic), sQuote(cnames)), domain = NA)
6: (function (classes, fdef, mtable)
  {
      methods <- .findInheritedMethods(classes, fdef, mtable)
      if (length(methods) == 1L)
          return(methods[[1L]])
      else if (length(methods) == 0L) {
          cnames <- paste0(""", sapply(classes, as.character),
              """, collapse = ", ")
          stop(gettextf("unable to find an inherited method for function %s for signature %s",
              sQuote(fdef@generic), sQuote(cnames)), domain = NA)
      }
      else stop("Internal error in finding inherited methods; didn't return a unique method",
          domain = NA)
  })(list("missing"), function (object, ...)
  standardGeneric("findPeaks.centWave"), <environment>)
5: findPeaks.centWave(ppm = 4, peakwidth = c(2, 30), snthresh = 10,
      prefilter = c(7, 10000), mzCenterFun = "wMean", integrate = 1,
      mzdiff = -0.001, fitgauss = FALSE, noise = 10000, sleep = 0,
      verbose.columns = FALSE)
4: do.call(method, params)
3: FUN(X[[1L]], ...)
2: lapply(argList, findPeaksPar)
1: xcmsSet(mzdatafiles, method = "centWave", mslevel = 1, ppm = 4,
      peakwidth = c(2, 30), snthresh = 10, prefilter = c(7, 10000),
      mzCenterFun = "wMean", integrate = 1, mzdiff = -0.001, fitgauss = FALSE,
      noise = 10000, sleep = 0, verbose.columns = FALSE)

The header of a mzXML file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<mzXML xmlns="http://sashimi.sourceforge.net/schema_revision/mzXML_3.1"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://sashimi.sourceforge.net/schema_revision/mzXML_3.1 http://sashimi.sourceforge.net/schema_r ... dx_3.1.xsd" >
 <msRun scanCount="11270" startTime="PT0.5806S" endTime="PT4799.83S" >
  <parentFile fileName="AD_0500_12.RAW" fileType="RAWData" fileSha1="070f5771336b6946c76bb8f845c8ed042023cab2" />
  <msInstrument>
  <msManufacturer category="msManufacturer" value="Thermo Scientific" />
  <msModel category="msModel" value="LTQ Orbitrap XL" />
  <msIonisation category="msIonisation" value="NSI" />
  <msMassAnalyzer category="msMassAnalyzer" value="FTMS" />
  <msDetector category="msDetector" value="unknown" />
  <software type="acquisition" name="Xcalibur" version="2.5.5" />
  </msInstrument>
  <dataProcessing centroided="1" >
  <software type="conversion" name="ReAdW" version="4.3.1(build Sep  9 2009 12:30:29)" />
  </dataProcessing>


-Eric

Re: xcmsSet centWave

Reply #3
Hi all,

I get past the error by removing mslevel=1 from the parameters.