alignPeaks {MALDIrppa} | R Documentation |
Compact peak alignment process for MassPeaks
objects
Description
This function provides a single command for selecting anchor peaks, peak alignment and binning of MassPeaks
class objects (MALDIquant
package). It also deals with alignment-related issues found in high-resolution mass spectrometry data.
Usage
alignPeaks(x, minFreq = 0.9, tolerance = 0.003, ...)
Arguments
x |
A list of |
minFreq |
Minimum relative frequency of a peak over |
tolerance |
Maximal deviation in peak masses to be considered as identical (see |
... |
Other arguments from the original functions in |
Details
See warpMassPeaks
and binPeaks
in the MALDIquant
package for details about the alignment and binning algorithms. Note that alignPeaks
applies an additional binning round which helps to correct for misalignment issues found after using the default strict
or relaxed
bin creation rules in high-resolution mass spectrometry data.
Value
A list of MassPeaks
class objects with aligned peaks along a common m/z range.
Examples
# Load example data
data(spectra) # list of MassSpectra class objects
# Some pre-processing
spectra <- screenSpectra(spectra)$fspectra
spectra <- transformIntensity(spectra, method = "sqrt")
spectra <- wavSmoothing(spectra)
spectra <- removeBaseline(spectra)
peaks <- detectPeaks(spectra)
# Peak alignment
peaks <- alignPeaks(peaks, minFreq = 0.8)