Description Usage Arguments Value See Also Examples
This function detects peaks in a set of mass spectra.
1 2 |
x |
An object of class |
... |
Additional arguments for the FUN specified. See the specific routine for details. |
FUN |
A character string specifying the method for peak detection.
Possible choices are |
event |
A character string denoting the name of the
event to register with the (embedded) event history object of the input
after processing the input data. Default: |
use.mean |
A logical value specifying if to detect peaks in the mean spectum.
Default: |
An object of class msSet
with elements depending on the value of use.mean:
|
the mean spectrum is attached as element
|
|
the peak info is attached as element
|
msPeakSimple
, msPeakSearch
, msPeakMRD
, msNormalize
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | if (!exists("qcset")) data("qcset", package="msProcess")
## extract several spectra from the build-in
## dataset
z <- qcset[, 1:8]
## denoising
z <- msDenoise(z, FUN="wavelet", n.level=10, thresh.scale=2)
## local noise estimation
z <- msNoise(z, FUN="mean")
## baseline subtraction
z <- msDetrend(z, FUN="monotone", attach=TRUE)
## intensity normalization based on total ion
## current
z <- msNormalize(z, FUN="tic")
## peak detection
z <- msPeak(z, FUN="simple", use.mean=FALSE, snr=2)
## visualize the detected peaks
plot(z, process="msPeak", subset=1:8, offset=100,
xlim=c(13000, 17000))
## perform a similar analysis using a
## multiresolution decomposition approach
z <- qcset[, 1:8]
z <- msDenoise(z, FUN="mrd", levels=6, keep.smooth=FALSE)
z <- msPeak(z, FUN="mrd")
plot(z, process="msPeak", subset=1:8, offset=100,
xlim=c(13000, 17000))
## perform a similar analysis using a CWT approach
# z <- qcset[, 1:8]
# z <- msPeak(z, FUN="cwt", scale.min=8)
# plot(z, process="msPeak", subset=1:8, offset=100,
# xlim=c(13000, 17000))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.