MassPeaks objectsalignPeaks.RdThis 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.
alignPeaks(x, minFreq = 0.9, tolerance = 0.003, ...)A list of MassPeaks class objects.
Minimum relative frequency of a peak over x to be considered as anchor peak for alignment (see referencePeaks).
Maximal deviation in peak masses to be considered as identical (see referencePeaks, binPeaks).
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.
A list of MassPeaks class objects with aligned peaks along a common m/z range.
# 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)