findChromPeaks-Chromatogram-CentWaveParam: centWave-based peak detection in purely chromatographic data

Description Usage Arguments Value Author(s) See Also Examples

Description

findChromPeaks on a Chromatogram or Chromatograms 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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S4 method for signature 'Chromatogram,CentWaveParam'
findChromPeaks(object, param, ...)

## S4 method for signature 'Chromatograms,CentWaveParam'
findChromPeaks(object, param,
  BPPARAM = bpparam(), ...)

## S4 method for signature 'Chromatograms,MatchedFilterParam'
findChromPeaks(object, param,
  BPPARAM = BPPARAM, ...)

Arguments

object

a Chromatogram or Chromatograms object.

param

a CentWaveParam object specifying the settings for the peak detection. See peaksWithCentWave() for the description of arguments used for peak detection.

...

currently ignored.

BPPARAM

a parameter class specifying if and how parallel processing should be performed (only for XChromatograms objects). It defaults to bpparam(). See bpparam() for more information.

Value

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.

Author(s)

Johannes Rainer

See Also

peaksWithCentWave() for the downstream function and centWave for details on the method.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
od <- readMSData(system.file("cdf/KO/ko15.CDF", package = "faahKO"),
    mode = "onDisk")

## 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)

## Modify the settings
cwp <- CentWaveParam(snthresh = 5, peakwidth = c(10, 60))
xchr <- findChromPeaks(chr, cwp)
xchr

plot(xchr)

## Perform peak detection on an Chromatograms object
od3 <- readMSData(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")),
    mode = "onDisk")

## 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)

anupbharade09/xcms_test documentation built on May 14, 2019, 4:07 a.m.