View source: R/do_findChromPeaks-functions.R
do_findChromPeaks_centWave | R Documentation |
This function performs peak density and wavelet based chromatographic peak detection for high resolution LC/MS data in centroid mode [Tautenhahn 2008].
do_findChromPeaks_centWave(
mz,
int,
scantime,
valsPerSpect,
ppm = 25,
peakwidth = c(20, 50),
snthresh = 10,
prefilter = c(3, 100),
mzCenterFun = "wMean",
integrate = 1,
mzdiff = -0.001,
fitgauss = FALSE,
noise = 0,
verboseColumns = FALSE,
roiList = list(),
firstBaselineCheck = TRUE,
roiScales = NULL,
sleep = 0,
extendLengthMSW = FALSE,
verboseBetaColumns = FALSE
)
mz |
Numeric vector with the individual m/z values from all scans/ spectra of one file/sample. |
int |
Numeric vector with the individual intensity values from all scans/spectra of one file/sample. |
scantime |
Numeric vector of length equal to the number of spectra/scans of the data representing the retention time of each scan. |
valsPerSpect |
Numeric vector with the number of values for each spectrum. |
ppm |
|
peakwidth |
|
snthresh |
|
prefilter |
|
mzCenterFun |
Name of the function to calculate the m/z center of the
chromatographic peak. Allowed are: |
integrate |
Integration method. For |
mzdiff |
|
fitgauss |
|
noise |
|
verboseColumns |
|
roiList |
An optional list of regions-of-interest (ROI) representing
detected mass traces. If ROIs are submitted the first analysis step is
omitted and chromatographic peak detection is performed on the submitted
ROIs. Each ROI is expected to have the following elements specified:
|
firstBaselineCheck |
|
roiScales |
Optional numeric vector with length equal to |
sleep |
|
extendLengthMSW |
Option to force centWave to use all scales when
running centWave rather than truncating with the EIC length. Uses the "open"
method to extend the EIC to a integer base-2 length prior to being passed to
|
verboseBetaColumns |
Option to calculate two additional metrics of peak
quality via comparison to an idealized bell curve. Adds |
This algorithm is most suitable for high resolution
LC/{TOF,OrbiTrap,FTICR}-MS data in centroid mode. In the first phase
the method identifies regions of interest (ROIs) representing
mass traces that are characterized as regions with less than ppm
m/z deviation in consecutive scans in the LC/MS map. In detail, starting
with a single m/z, a ROI is extended if a m/z can be found in the next scan
(spectrum) for which the difference to the mean m/z of the ROI is smaller
than the user defined ppm
of the m/z. The mean m/z of the ROI is then
updated considering also the newly included m/z value.
These ROIs are then, after some cleanup, analyzed using continuous wavelet
transform (CWT) to locate chromatographic peaks on different scales. The
first analysis step is skipped, if regions of interest are passed with
the roiList
parameter.
A matrix, each row representing an identified chromatographic peak, with columns:
Intensity weighted mean of m/z values of the peak across scans.
Minimum m/z of the peak.
Maximum m/z of the peak.
Retention time of the peak's midpoint.
Minimum retention time of the peak.
Maximum retention time of the peak.
Integrated (original) intensity of the peak.
Per-peak baseline corrected integrated peak intensity.
Maximum intensity of the peak.
Signal to noise ratio, defined as (maxo - baseline)/sd
,
sd
being the standard deviation of local chromatographic noise.
RMSE of Gaussian fit.
Additional columns for verboseColumns = TRUE
:
Gaussian parameter mu.
Gaussian parameter sigma.
Gaussian parameter h.
Region number of the m/z ROI where the peak was localized.
m/z deviation of mass trace across scans in ppm.
Scale on which the peak was localized.
Peak position found by wavelet analysis (scan number).
Left peak limit found by wavelet analysis (scan number).
Right peak limit found by wavelet analysis (scan numer).
Additional columns for verboseBetaColumns = TRUE
:
Correlation between an "ideal" bell curve and the raw data
Signal-to-noise residuals calculated from the beta_cor fit
The centWave was designed to work on centroided mode, thus it is expected that such data is presented to the function.
This function exposes core chromatographic peak detection functionality of the centWave method. While this function can be called directly, users will generally call the corresponding method for the data object instead.
Ralf Tautenhahn, Johannes Rainer
Ralf Tautenhahn, Christoph Böttcher, and Steffen Neumann "Highly sensitive feature detection for high resolution LC/MS" BMC Bioinformatics 2008, 9:504
centWave
for the standard user interface method.
Other core peak detection functions:
do_findChromPeaks_centWaveWithPredIsoROIs()
,
do_findChromPeaks_massifquant()
,
do_findChromPeaks_matchedFilter()
,
do_findPeaks_MSW()
## Load the test file
faahko_sub <- loadXcmsData("faahko_sub")
## Subset to one file and restrict to a certain retention time range
data <- filterRt(filterFile(faahko_sub, 1), c(2500, 3000))
## Get m/z and intensity values
mzs <- mz(data)
ints <- intensity(data)
## Define the values per spectrum:
valsPerSpect <- lengths(mzs)
## Calling the function. We're using a large value for noise and prefilter
## to speed up the call in the example - in a real use case we would either
## set the value to a reasonable value or use the default value.
res <- do_findChromPeaks_centWave(mz = unlist(mzs), int = unlist(ints),
scantime = rtime(data), valsPerSpect = valsPerSpect, noise = 10000,
prefilter = c(3, 10000))
head(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.