findChromPeaks,Chromatogram,CentWaveParam-method | R Documentation |
findChromPeaks
on a Chromatogram or MChromatograms object with a
CentWaveParam parameter object performs centWave-based peak detection
on purely chromatographic data. See centWave for details on the method
and CentWaveParam for details on the parameter class.
Note that not all settings from the CentWaveParam
will be used.
See peaksWithCentWave()
for the arguments used for peak detection
on purely chromatographic data.
After chromatographic peak detection, identified peaks can also be refined
with the refineChromPeaks()
method, which can help to reduce peak
detection artifacts.
## S4 method for signature 'Chromatogram,CentWaveParam'
findChromPeaks(object, param, ...)
## S4 method for signature 'MChromatograms,CentWaveParam'
findChromPeaks(object, param, BPPARAM = bpparam(), ...)
## S4 method for signature 'MChromatograms,MatchedFilterParam'
findChromPeaks(object, param, BPPARAM = BPPARAM, ...)
object |
a Chromatogram or MChromatograms object. |
param |
a CentWaveParam object specifying the settings for the
peak detection. See |
... |
currently ignored. |
BPPARAM |
a parameter class specifying if and how parallel processing
should be performed (only for |
If called on a Chromatogram
object, the method returns an XChromatogram
object with the identified peaks. See peaksWithCentWave()
for details on
the peak matrix content.
Johannes Rainer
peaksWithCentWave()
for the downstream function and centWave
for details on the method.
library(MSnbase)
## Loading a test data set with identified chromatographic peaks
faahko_sub <- loadXcmsData("faahko_sub2")
faahko_sub <- filterRt(faahko_sub, c(2500, 3700))
##
od <- as(filterFile(faahko_sub, 1L), "MsExperiment")
## Extract chromatographic data for a small m/z range
chr <- chromatogram(od, mz = c(272.1, 272.3))[1, 1]
## Identify peaks with default settings
xchr <- findChromPeaks(chr, CentWaveParam())
xchr
## Plot data and identified peaks.
plot(xchr)
library(MsExperiment)
library(xcms)
## Perform peak detection on an MChromatograms object
fls <- c(system.file("cdf/KO/ko15.CDF", package = "faahKO"),
system.file("cdf/KO/ko16.CDF", package = "faahKO"),
system.file("cdf/KO/ko18.CDF", package = "faahKO"))
od3 <- readMsExperiment(fls)
## Disable parallel processing for this example
register(SerialParam())
## Extract chromatograms for a m/z - retention time slice
chrs <- chromatogram(od3, mz = 344, rt = c(2500, 3500))
## Perform peak detection using CentWave
xchrs <- findChromPeaks(chrs, param = CentWaveParam())
xchrs
## Extract the identified chromatographic peaks
chromPeaks(xchrs)
## plot the result
plot(xchrs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.