tuneInPeakInfo: Tune in the peak information: peak position and peak scale

View source: R/tuneInPeakInfo.R

tuneInPeakInfoR Documentation

Tune in the peak information: peak position and peak scale

Description

Based on the identified peak position, more precise estimation of the peak information, i.e., peak position and peak scale, can be got by this function. The basic idea is to cut the segment of spectrum near the identified peaks, and then do similar procedures as peakDetectionCWT(), but with more detailed scales around the estimated peak scale.

Usage

tuneInPeakInfo(
  ms,
  majorPeakInfo = NULL,
  peakIndex = NULL,
  peakScale = NULL,
  maxScale = 128,
  ...
)

Arguments

ms

the mass spectrometry spectrum

majorPeakInfo

return of identifyMajorPeaks()

peakIndex

the m/z index of the identified peaks

peakScale

the scales of the identified peaks

maxScale

the maximum scale allowed for the peak

...

other parameters of used by getLocalMaximumCWT(), getRidge(), identifyMajorPeaks()

Details

The majorPeakInfo or peakIndex and peakScale must be provided.

Value

peakCenterIndex

the updated peak center m/z index

peakScale

the updated peak scale

peakValue

the corresponding peak value

Author(s)

Pan Du

References

Du, P., Kibbe, W.A. and Lin, S.M. (2006) Improved peak detection in mass spectrum by incorporating continuous wavelet transform-based pattern matching, Bioinformatics, 22, 2059-2065.

See Also

peakDetectionCWT()

Examples



data(exampleMS)
SNR.Th <- 3
peakInfo <- peakDetectionCWT(exampleMS, SNR.Th = SNR.Th)
majorPeakInfo <- peakInfo$majorPeakInfo
betterPeakInfo <- tuneInPeakInfo(exampleMS, majorPeakInfo)
plot(500:length(exampleMS), exampleMS[500:length(exampleMS)], type = "l", log = "x")
abline(v = betterPeakInfo$peakCenterIndex, col = "red")


zeehio/MassSpecWavelet documentation built on May 6, 2023, 1:32 a.m.