refineChromPeaks-clean: Remove chromatographic peaks with too large rt width

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Remove chromatographic peaks with a retention time range larger than the provided maximal acceptable width (maxPeakwidth).

Usage

1
2
3
4
CleanPeaksParam(maxPeakwidth = 10)

## S4 method for signature 'XCMSnExp,CleanPeaksParam'
refineChromPeaks(object, param = CleanPeaksParam(), msLevel = 1L)

Arguments

maxPeakwidth

for CleanPeaksParam: numeric(1) defining the maximal allowed peak width (in retention time).

object

XCMSnExp object with identified chromatographic peaks.

param

CleanPeaksParam object defining the settings for the method.

msLevel

integer defining for which MS level(s) the chromatographic peaks should be cleaned.

Value

XCMSnExp object with chromatographic peaks exceeding the specified maximal retention time width being removed.

Note

refineChromPeaks methods will always remove feature definitions, because a call to this method can change or remove identified chromatographic peaks, which may be part of features.

Author(s)

Johannes Rainer

See Also

Other chromatographic peak refinement methods: MergeNeighboringPeaksParam

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Perform chromatographic peak detection on a test file.
fl <- system.file("microtofq/MM14.mzML", package = "msdata")
data <- readMSData(fl, mode = "onDisk")

data <- findChromPeaks(data, param = CentWaveParam(peakwidth = c(2, 8)))

## Distribution of chromatographic peak widths
quantile(chromPeaks(data)[, "rtmax"] - chromPeaks(data)[, "rtmin"])

## Remove all chromatographic peaks with a width larger 5 seconds
data <- refineChromPeaks(data, param = CleanPeaksParam(5))

quantile(chromPeaks(data)[, "rtmax"] - chromPeaks(data)[, "rtmin"])

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