Learn R Programming

MALDIquant (version 1.9)

alignSpectra: Align MassSpectrum objects.

Description

This function aligns a list of MassSpectrum objects (spectra alignment is also known as warping/phase correction).

Usage

alignSpectra(spectra, halfWindowSize=20, noiseMethod="MAD", SNR=2,
  reference, tolerance=0.002, warpingMethod="lowess")

Arguments

spectra
list, list of MassSpectrum objects.
halfWindowSize
numeric, half window size; see detectPeaks.
noiseMethod
a noise estimation method; see detectPeaks.
SNR
single numeric value. SNR is an abbreviation for signal-to-noise-ratio; see detectPeaks.
reference
MassPeaks, reference object to which the samples (l) should be aligned. If missing referencePeaks is used; see
tolerance
double, maximal deviation of a peak position (mass) to be considered as identical; see determineWarpingFunctions.
warpingMethod
used basic warping function; see determineWarpingFunctions.

Value

  • Returns a list of aligned MassSpectrum objects.

Details

alignSpectra is a wrapper function around detectPeaks, determineWarpingFunctions and warpMassSpectra. Please call these functions manually if you need finer control (e.g. plotting of warping functions).

References

See website: http://strimmerlab.org/software/maldiquant/

See Also

detectPeaks, determineWarpingFunctions, referencePeaks, warpMassSpectra, MassSpectrum

Examples

Run this code
## load package
library("MALDIquant")

## load example data
data("fiedler2009subset", package="MALDIquant")

## running typical workflow

## transform intensities
spectra <- transformIntensity(fiedler2009subset, method="sqrt")

## smooth spectra
spectra <- smoothIntensity(spectra, method="MovingAverage")

## baseline correction
spectra <- removeBaseline(spectra)

## align spectra
spectra <- alignSpectra(spectra)

Run the code above in your browser using DataLab