Last data update: 2014.03.03

R: Removes the baseline of a MassSpectrum object.
removeBaseline-methodsR Documentation

Removes the baseline of a MassSpectrum object.

Description

This method removes the baseline of mass spectrometry data (represented by a MassSpectrum object).
The intensity of the mass spectrometry data would be reduced by baseline.

Usage

## S4 method for signature 'MassSpectrum'
removeBaseline(object,
  method=c("SNIP", "TopHat", "ConvexHull", "median"),
  ...)
## S4 method for signature 'list'
removeBaseline(object, ...)

Arguments

object

MassSpectrum object or a list of MassSpectrum objects.

method

used baseline estimation method, one of "SNIP", "TopHat", "ConvexHull" or "median". See estimateBaseline,MassSpectrum-method for details.

...

arguments to be passed to estimateBaseline,MassSpectrum-method. If object is a list mc.cores is also supported.

Value

Returns a modified MassSpectrum object with reduced intensities.

Author(s)

Sebastian Gibb mail@sebastiangibb.de

See Also

MassSpectrum, estimateBaseline,MassSpectrum-method

demo("baseline")

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

Examples

## load package
library("MALDIquant")

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

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

## plot spectrum
plot(s)

## subtract baseline
b <- removeBaseline(s, method="SNIP")

## draw modified spectrum on the plot
lines(b, col="blue")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MALDIquant)

This is MALDIquant version 1.15
Quantitative Analysis of Mass Spectrometry Data
 See '?MALDIquant' for more information about this package.

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MALDIquant/removeBaseline-methods.Rd_%03d_medium.png", width=480, height=480)
> ### Name: removeBaseline-methods
> ### Title: Removes the baseline of a MassSpectrum object.
> ### Aliases: removeBaseline removeBaseline,MassSpectrum-method
> ###   removeBaseline,list-method
> ### Keywords: methods
> 
> ### ** Examples
> 
> ## load package
> library("MALDIquant")
> 
> ## load example data
> data("fiedler2009subset", package="MALDIquant")
> 
> ## choose only the first mass spectrum
> s <- fiedler2009subset[[1]]
> 
> ## plot spectrum
> plot(s)
> 
> ## subtract baseline
> b <- removeBaseline(s, method="SNIP")
> 
> ## draw modified spectrum on the plot
> lines(b, col="blue")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>