The findChromPeaks
method performs chromatographic peak detection on
LC/GC-MS data. The peak detection algorithm can be selected, and configured,
using the param
argument.
Supported param
objects are:
CentWaveParam()
: chromatographic peak detection using the centWave algorithm.CentWavePredIsoParam()
: centWave with predicted isotopes. Peak detection uses a two-step centWave-based approach considering also feature isotopes.MatchedFilterParam()
: peak detection using the matched filter algorithm.MassifquantParam()
: peak detection using the Kalman filter-based massifquant method.MSWParam()
: single-spectrum non-chromatography MS data peak detection.
For specific examples see the help pages of the individual parameter classes listed above.
Usage
findChromPeaks(object, param, ...)
# S4 method for class 'MsExperiment,Param'
findChromPeaks(
object,
param,
msLevel = 1L,
chunkSize = 2L,
...,
BPPARAM = bpparam()
)
# S4 method for class 'XcmsExperiment,Param'
findChromPeaks(
object,
param,
msLevel = 1L,
chunkSize = 2L,
add = FALSE,
...,
BPPARAM = bpparam()
)
Arguments
- object
The data object on which to perform the peak detection. Can be an
OnDiskMSnExp()
,XCMSnExp()
,MChromatograms()
orMsExperiment()
object.- param
The parameter object selecting and configuring the algorithm.
- ...
Optional parameters.
- msLevel
integer(1)
defining the MS level on which the chromatographic peak detection should be performed.- chunkSize
integer(1)
forobject
being anMsExperiment
orXcmsExperiment()
: defines the number of files (samples) for which the full peaks data (m/z and intensity values) should be loaded into memory at the same time. Peak detection is then performed in parallel (per sample) on this subset of loaded data. This setting thus allows to balance between memory demand and speed (due to parallel processing) of the peak detection. Because parallel processing can only performed on the subset of data loaded currently into memory (in each iteration), the value forchunkSize
should be match the defined parallel setting setup. Using a parallel processing setup using 4 CPUs (separate processes) but usingchunkSize =
1will not perform any parallel processing, as only the data from one sample is loaded in memory at a time. On the other hand, setting
chunkSizeto the total number of samples in an experiment will load the full MS data into memory and will thus in most settings cause an out-of-memory error. By setting
chunkSize = -1the peak detection will be performed separately, and in parallel, for each sample. This will however not work for all
Spectra` backends (see eventuallySpectra()
for details).- BPPARAM
Parallel processing setup. Uses by default the system-wide default setup. See
bpparam()
for more details.- add
logical(1)
(ifobject
contains already chromatographic peaks, i.e. is either anXCMSnExp
orXcmsExperiment
) whether chromatographic peak detection results should be added to existing results. By default (add = FALSE
) any additionalfindChromPeaks
call on a result object will remove previous results.
See also
plotChromPeaks()
to plot identified chromatographic peaks for one file.
refineChromPeaks()
for methods to refine or clean identified
chromatographic peaks.
manualChromPeaks()
to manually add/define chromatographic peaks.
Other peak detection methods:
findChromPeaks-centWave
,
findChromPeaks-centWaveWithPredIsoROIs
,
findChromPeaks-massifquant
,
findChromPeaks-matchedFilter
,
findPeaks-MSW