Learn R Programming

MALDIquant (version 1.0)

MALDIquant-package: Quantitative Analysis of Mass Spectrometric Data

Description

MALDIquant provides a complete analysis pipeline for MALDI-TOF and other mass spectrometric data. Distinctive features include baseline subtraction using the SNIP algorithm, peak alignment using warping functions, handling of replicated measurements as well as allowing spectra with different resolutions.

For a first overview run demo("MALDIquant").

Arguments

Details

ll{ Package: MALDIquant Version: 1.0 Date: 2012-03-28 License: GPL (>= 3) URL: http://strimmerlab.org/software/maldiquant/ }

Main classes:

MassPeaks: Represents a peak list of a single spectrum. MassSpectrum: Represents a single spectrum.

References

S. Gibb and K. Strimmer. 2012. MALDIquant: a versatile R package for the analysis of mass spectrometric data. http://arxiv.org/abs/1203.5885.

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

See Also

MassPeaks, MassSpectrum

Examples

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

## load example data
data("spectra", package="MALDIquant");

## choose only a subset
spectra <- spectra[1:2];

## show some information
spectra

## running typical workflow

## transform intensities
t <- lapply(spectra, transformIntensity, fun=sqrt);

## smoothing function
movingAvg <- function(y) {
    ma <- rep(1, 5)/5;
    return(filter(y, ma, sides=2));
}

## smooth spectra
s <- lapply(t, transformIntensity, fun=movingAvg);

## baseline correction
b <- lapply(s, removeBaseline);

## detect peaks
p <- lapply(b, detectPeaks);

## plot results
par(mfcol=c(3, length(spectra)));
for (i in seq(along=spectra)) {
    plot(spectra[[i]], main="raw spectrum");
    plot(s[[i]], main="transformed (sqrt) and smoothed (ma5)");
    plot(b[[i]], main="baseline removed and peaks detected");
    points(p[[i]], pch=4, col=2);
}
par(mfrow=c(1, 1));

## bin peaks
bp <- binPeaks(p);

## show intensity matrix
intensityMatrix(bp);

Run the code above in your browser using DataLab