Skip to main content
Topic: findChromPeaks-centWave {xcms} - Prefilter Settings and Code Documentation (Read 205 times) previous topic - next topic

findChromPeaks-centWave {xcms} - Prefilter Settings and Code Documentation

Dear Forum,

I would like to inquire about the prefilter setting for the function findChromPeaks-centWave {xcms}.

I am using R 3.5.3. under Windows7 (64bit) with packageVersion("MSnbase") ‘2.8.3’ and packageVersion("xcms") ‘3.4.4’.

Concerning the prefilter-parameter, here the code documentation says:

 CentWaveParam(ppm = 25, peakwidth = c(20, 50), snthresh = 10,
  prefilter = c(3, 100), mzCenterFun = "wMean", integrate = 1L,
  mzdiff = -0.001, fitgauss = FALSE, noise = 0,
  verboseColumns = FALSE, roiList = list(),
  firstBaselineCheck = TRUE, roiScales = numeric())

prefilter
numeric(2): c(k, I) specifying the prefilter step for the first analysis step (ROI detection). Mass traces are only retained if they contain at least k peaks with intensity >= I.

For this documentation/explanation, is the term "peak" right here, or is rather "scans" the more adequate word.
From my understanding of the documentation of the prefilter, a peak (consisting of several(10-20) scan points) has to have more than k scans of intensity I.

Is that right?

thanks
Tony

Re: findChromPeaks-centWave {xcms} - Prefilter Settings and Code Documentation

Reply #1
Hi Tony,

Yes, I do believe you are correct with your interpretation of the documentation.
It looks like the prefilter check is done here: do_findChromPeaks-functions.R. The vapply iterates over each ROI index list and counts the number of scans with intensity above the prefilter threshold (I). If this is above 'k', the ROI is kept.

Also, 'scans' would probably be a better word to use  :)

Re: findChromPeaks-centWave {xcms} - Prefilter Settings and Code Documentation

Reply #2
Hello Corey,

understood. All right.  Thanks!

kind regards
Tony