Ok, thanks for reply. Let's move on and try to findPeaks:
peaks <- findPeaks.centWave(xset, ppm=20, peakwidth = c(20, 50), snthresh=5)
Result:
zeleniy@zeleniy-HP-Pro-3400:~/workspace/mass/peaks$ Rscript xcms.r
Loading required package: methods
ecoli1_600_pos_1: 80:0 130:18 180:47 230:74 280:103 330:135 380:169 430:202 480:223 530:229 580:236 630:265 680:279 730:306 780:348 830:354 880:356 930:356 980:356 1030:356 1080:356 1130:356 1180:356 1230:356 1280:356 1330:356 1380:356 1430:356 1480:356 1530:356 1580:356 1630:356 1680:356 1730:356 1780:356 1830:356 1880:356 1930:356 1980:356 2030:356 2080:356 2130:356 2180:356 2230:356 2280:356 2330:356 2380:356 2430:356 2480:356 2530:356 2580:356 2630:356 2680:356 2730:356 2780:356 2830:356 2880:356 2930:356 2980:356
Error in function (classes, fdef, mtable) :
unable to find an inherited method for function "findPeaks.centWave", for signature "xcmsSet"
Calls: findPeaks.centWave -> <Anonymous>
Execution halted
Why ? Documentation for findPeaks.centWave:
findPeaks.centWave-methods package:xcms R Documentation
Feature detection for high resolution LC/MS data
Description:
Peak density and wavelet based feature detection for high
resolution LC/MS data in centroid mode
Arguments:
object: ‘xcmsSet’ object
ppm: maxmial tolerated m/z deviation in consecutive scans, in ppm
(parts per million)
peakwidth: Chromatographic peak width, given as range (min,max) in
seconds
snthresh: signal to noise ratio cutoff, definition see below.
prefilter: ‘prefilter=c(k,I)’. Prefilter step for the first phase. Mass
traces are only retained if they contain at least ‘k’ peaks
with intensity >= ‘I’.
mzCenterFun: Function to calculate the m/z center of the feature:
‘wMean’ intensity weighted mean of the feature m/z values,
‘mean’ mean of the feature m/z values, ‘apex’ use m/z value
at peak apex, ‘wMeanApex3’ intensity weighted mean of the m/z
value at peak apex and the m/z value left and right of it,
‘meanApex3’ mean of the m/z value at peak apex and the m/z
value left and right of it.
integrate: Integration method. If ‘=1’ peak limits are found through
descent on the mexican hat filtered data, if ‘=2’ the descent
is done on the real data. Method 2 is very accurate but prone
to noise, while method 1 is more robust to noise but less
exact.
mzdiff: minimum difference in m/z for peaks with overlapping
retention times, can be negative to allow overlap
fitgauss: logical, if TRUE a Gaussian is fitted to each peak
scanrange: scan range to process
noise: optional argument which is useful for data that was
centroided without any intensity threshold, centroids with
intensity < ‘noise’ are omitted from ROI detection
sleep: number of seconds to pause between plotting peak finding
cycles
verbose.columns: logical, if TRUE additional peak meta data columns are
returned
Details:
This algorithm is most suitable for high resolution
LC/{TOF,OrbiTrap,FTICR}-MS data in centroid mode. In the first
phase of the method mass traces (characterised as regions with
less than ‘ppm’ m/z deviation in consecutive scans) in the LC/MS
map are located. In the second phase these mass traces are
further analysed. Continuous wavelet transform (CWT) is used to
locate chromatographic peaks on different scales.
Value:
A matrix with columns:
mz: weighted (by intensity) mean of peak m/z across scans
mzmin: m/z peak minimum
mzmax: m/z peak maximum
rt: retention time of peak midpoint
rtmin: leading edge of peak retention time
rtmax: trailing edge of peak retention time
into: integrated peak intensity
intb: baseline corrected integrated peak intensity
maxo: maximum peak intensity
sn: Signal/Noise ratio, defined as ‘(maxo - baseline)/sd’, where
‘maxo’ is the maximum peak intensity,
‘baseline’ the estimated baseline value and
‘sd’ the standard deviation of local chromatographic noise.
egauss: RMSE of Gaussian fit
: if ‘verbose.columns’ is ‘TRUE’ additionally :
mu: Gaussian parameter mu
sigma: Gaussian parameter sigma
h: Gaussian parameter h
f: Region number of m/z ROI where the peak was localised
dppm: m/z deviation of mass trace across scans in ppm
scale: Scale on which the peak was localised
scpos: Peak position found by wavelet analysis
scmin: Left peak limit found by wavelet analysis (scan number)
scmax: Right peak limit found by wavelet analysis (scan number)
Methods:
object = "xcmsRaw" ‘ findPeaks.centWave(object, ppm=25,
peakwidth=c(20,50), snthresh=10, prefilter=c(3,100),
mzCenterFun="wMean", integrate=1, mzdiff=-0.001,
fitgauss=FALSE, scanrange= numeric(), noise=0, sleep=0,
verbose.columns=FALSE) ’
Author(s):
Ralf Tautenhahn
References:
Ralf Tautenhahn, Christoph Böttcher, and Steffen Neumann "Highly
sensitive feature detection for high resolution LC/MS" BMC
Bioinformatics 2008, 9:504
See Also:
‘findPeaks-methods’ ‘xcmsRaw-class’