referencePeaks | R Documentation |
MassPeaks
object.
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
referencePeaks(l, method=c("strict", "relaxed"), minFrequency=0.9,
tolerance=0.002)
l |
|
method |
bin creation rule (see |
minFrequency |
|
tolerance |
|
Returns a new MassPeaks
objects.
The intensity
slot of the returned
MassPeaks
represents the frequency of this mass position
in all samples.
Sebastian Gibb mail@sebastiangibb.de
binPeaks
,
filterPeaks
,
MassPeaks
Website: https://strimmerlab.github.io/software/maldiquant/
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.