Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

referencePeaks-functions

Creates a reference MassPeaks object.


Description

This function creates a reference MassPeaks object (also called Anchor Peaks) from a list of MassPeaks objects.
Generally it is a combination of binPeaks and filterPeaks

Usage

referencePeaks(l, method=c("strict", "relaxed"), minFrequency=0.9,
               tolerance=0.002)

Arguments

l

list, list of MassPeaks objects.

method

bin creation rule (see binPeaks).

minFrequency

double, remove all peaks which occur in less than minFrequency*length(l) MassPeaks objects.

tolerance

double, maximal relative deviation of a peak position (mass) to be considered as identical. Must be multiplied by 10^-6 for ppm, e.g. use tolerance=5e-6 for 5 ppm.

Value

Returns a new MassPeaks objects.
The intensity slot of the returned MassPeaks represents the frequency of this mass position in all samples.

Author(s)

Sebastian Gibb mail@sebastiangibb.de

See Also

Examples

## load package
library("MALDIquant")

## create four MassPeaks objects and add them to the list
p<- list(createMassPeaks(mass=1:2, intensity=1:2),
         createMassPeaks(mass=1:3, intensity=1:3),
         createMassPeaks(mass=1:4, intensity=1:4),
         createMassPeaks(mass=1:5, intensity=1:5))

## only use peaks which occur in all MassPeaks objects as reference peaks
refPeaks <- referencePeaks(p, minFrequency=1)

mass(refPeaks)      # 1:2
intensity(refPeaks) # c(1, 1)

MALDIquant

Quantitative Analysis of Mass Spectrometry Data

v1.19.3
GPL (>= 3)
Authors
Sebastian Gibb [aut, cre] (<https://orcid.org/0000-0001-7406-4443>), Korbinian Strimmer [ths] (<https://orcid.org/0000-0001-7917-2056>)
Initial release
2019-05-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.