Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/do_findChromPeaks-functions.R
peaksWithCentWave
identifies (chromatographic) peaks in purely
chromatographic data, i.e. based on intensity and retention time values
without m/z values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
int |
|
rt |
|
peakwidth |
|
snthresh |
|
prefilter |
|
integrate |
|
fitgauss |
|
noise |
|
verboseColumns |
|
firstBaselineCheck |
|
extendLengthMSW |
|
... |
currently ignored. |
The method uses the same algorithm for the peak detection than centWave,
employs however a different approach to identify the initial regions in
which the peak detection is performed (i.e. the regions of interest ROI).
The method first identifies all local maxima in the chromatographic data and
defines the corresponding positions +/- peakwidth[2]
as the ROIs. Noise
estimation bases also on these ROIs and can thus be different from centWave
resulting in different signal to noise ratios.
A matrix, each row representing an identified chromatographic peak, with columns:
"rt"
: retention time of the peak's midpoint (time of the maximum signal).
"rtmin"
: minimum retention time of the peak.
"rtmax"
: maximum retention time of the peak.
"into"
: integrated (original) intensity of the peak.
"intb"
: per-peak baseline corrected integrated peak intensity.
"maxo"
: maximum (original) intensity of the peak.
"sn"
: signal to noise ratio of the peak defined as
(maxo - baseline)/sd
with sd
being the standard deviation of the local
chromatographic noise.
Additional columns for verboseColumns = TRUE
:
"mu"
: gaussian parameter mu.
"sigma"
: gaussian parameter sigma.
"h"
: gaussian parameter h.
"f"
: region number of the m/z ROI where the peak was localized.
"dppm"
: m/z deviation of mass trace across scans in ppm (always NA
).
"scale"
: scale on which the peak was localized.
"scpos"
: peak position found by wavelet analysis (index in int
).
"scmin"
: left peak limit found by wavelet analysis (index in int
).
"scmax"
: right peak limit found by wavelet analysis (index in int
).
Johannes Rainer
centWave for a detailed description of the peak detection method.
Other peak detection functions for chromatographic data:
peaksWithMatchedFilter()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Reading a file
library(xcms)
od <- readMSData(system.file("cdf/KO/ko15.CDF", package = "faahKO"),
mode = "onDisk")
## Extract chromatographic data for a small m/z range
mzr <- c(272.1, 272.2)
chr <- chromatogram(od, mz = mzr, rt = c(3000, 3300))[1, 1]
int <- intensity(chr)
rt <- rtime(chr)
## Plot the region
plot(chr, type = "h")
## Identify peaks in the chromatographic data
pks <- peaksWithCentWave(intensity(chr), rtime(chr))
pks
## Highlight the peaks
rect(xleft = pks[, "rtmin"], xright = pks[, "rtmax"],
ybottom = rep(0, nrow(pks)), ytop = pks[, "maxo"], col = "#ff000040",
border = "#00000040")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.