peaksWithMatchedFilter: Identify peaks in chromatographic data using matchedFilter

Description Usage Arguments Value Author(s) See Also Examples

View source: R/do_findChromPeaks-functions.R

Description

The function performs peak detection using the matchedFilter algorithm on chromatographic data (i.e. with only intensities and retention time).

Usage

1
2
3
4
5
6
7
8
9
peaksWithMatchedFilter(
  int,
  rt,
  fwhm = 30,
  sigma = fwhm/2.3548,
  max = 20,
  snthresh = 10,
  ...
)

Arguments

int

numeric with intensity values.

rt

numeric with the retention time for the intensities. Length has to be equal to length(int).

fwhm

numeric(1) specifying the full width at half maximum of matched filtration gaussian model peak. Only used to calculate the actual sigma, see below.

sigma

numeric(1) specifying the standard deviation (width) of the matched filtration model peak.

max

numeric(1) with the maximal number of peaks that are expected/ will bbe detected in the data

snthresh

numeric(1) defining the signal to noise cut-off to be used in the peak detection step.

...

currently ignored.

Value

A matrix, each row representing an identified chromatographic peak, with columns:

Author(s)

Johannes Rainer

See Also

matchedFilter for a detailed description of the peak detection method.

Other peak detection functions for chromatographic data: peaksWithCentWave()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Read one file from the faahKO package
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]

pks <- peaksWithMatchedFilter(intensity(chr), rtime(chr))
pks

## Plotting the data
plot(rtime(chr), intensity(chr), type = "h")
rect(xleft = pks[, "rtmin"], xright = pks[, "rtmax"], ybottom = c(0, 0),
    ytop = pks[, "maxo"], border = "red")

yclement/xcms documentation built on April 10, 2020, 12:08 a.m.