Learn R Programming

MALDIquant (version 1.13)

estimateBaseline-methods: Estimates the baseline of a MassSpectrum object.

Description

This method estimates the baseline of mass spectrometry data (represented by a MassSpectrum object).

Usage

## S3 method for class 'MassSpectrum':
estimateBaseline(object,
  method=c("SNIP", "TopHat", "ConvexHull", "median"),
  ...)

Arguments

object
MassSpectrum object
method
used baseline estimation method, one of "SNIP", "TopHat", "ConvexHull" or "median".
...
arguments to be passed to method

Value

  • Returns a two column matrix (first column: mass, second column: intensity) of the estimated baseline.

Details

[object Object],[object Object],[object Object],[object Object]

References

"SNIP": C.G. Ryan, E. Clayton, W.L. Griffin, S.H. Sie, and D.R. Cousens. 1988. Snip, a statistics-sensitive background treatment for the quantitative analysis of pixe spectra in geoscience applications. Nuclear Instruments and Methods in Physics Research Section B: Beam Interactions with Materials and Atoms, 34(3): 396-402.

M. Morhac. 2009. An algorithm for determination of peak regions and baseline elimination in spectroscopic data. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 600(2), 478-487.

"TopHat": M. van Herk. 1992. A Fast Algorithm for Local Minimum and Maximum Filters on Rectangular and Octagonal Kernels. Pattern Recognition Letters 13.7: 517-521.

J. Y. Gil and M. Werman. 1996. Computing 2-Dimensional Min, Median and Max Filters. IEEE Transactions: 504-507.

"ConvexHull": Andrew, A. M. 1979. Another efficient algorithm for convex hulls in two dimensions. Information Processing Letters, 9(5), 216-219.

See Also

MassSpectrum, removeBaseline,MassSpectrum-method

demo("baseline")

Website: http://strimmerlab.org/software/maldiquant/

Examples

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

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

## choose only the first mass spectrum
s <- fiedler2009subset[[1]]


## SNIP
plot(s)

## estimate baseline
b <- estimateBaseline(s, method="SNIP", iterations=100)

## draw baseline on the plot
lines(b, col="red")


## TopHat
plot(s)

## estimate baseline (try different parameters)
b1 <- estimateBaseline(s, method="TopHat", halfWindowSize=75)
b2 <- estimateBaseline(s, method="TopHat", halfWindowSize=150)

## draw baselines on the plot
lines(b1, col=2)
lines(b2, col=3)

## draw legend
legend(x="topright", lwd=1, legend=paste0("halfWindowSize=", c(75, 150)),
       col=c(2, 3))


## ConvexHull
plot(s)

## estimate baseline
b <- estimateBaseline(s, method="ConvexHull")

## draw baseline on the plot
lines(b, col="red")


## Median
plot(s)

## estimate baseline
b <- estimateBaseline(s, method="median")

## draw baseline on the plot
lines(b, col="red")

Run the code above in your browser using DataLab