Description Usage Arguments Value References See Also Examples
Forms a multiresolution decomposition (MRD) by taking a specified discrete
wavelet transform of the input spectrum and subsequently inverting each level of the transform
back to the "time" domain. The resulting components of the MRD form an octave-band
decomposition of the original spectrum, and can be summed together to reconstruct the original
spectrum. In many real-world observations, the trend of the data is caught up in
the last decomposition level's so-called smooth, which corresponds to residual
low frequency content. This function allows the user to approximate the baseline trend
in a mass spectrum by calculating the MRD smooth. Additionally, the user has the option
to include relatively higher frequency content in the approximation by including various
MRD details (see the DETAILS section for a definition of MRD details and MRD smooth).
As this function primarily calls the wavMRDSum
function with appropriate arguments,
see the corresponding help documentation for more details.
1 2 3 4 | msSmoothMRD(x, wavelet="s8", levels=1,
xform="modwt", reflect=TRUE,
keep.smooth=TRUE, keep.details=FALSE,
process="msSmoothMRD")
|
x |
A vector containing a uniformly-sampled real-valued time series. |
keep.details |
A logical value. If |
keep.smooth |
A logical value. If |
levels |
An integer vector of integers denoting the MRD detail(s) to sum over in forming
a denoised approximation to the orginal spectrum (the summation is performed across scale and nto across time).
All values must be positive integers,
and cannot exceed |
process |
A character string denoting the name of the
process to register with the (embedded) event history object of the input
after processing the input data. This process is not updated if it
already exists in the event history. Default: |
reflect |
A logical value. If |
wavelet |
A character string denoting the filter type.
See |
xform |
A character string denoting the wavelet transform type.
Choices are |
A vector containing the baseline trend of the input spectrum.
D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.
T.W. Randolph and Y. Yasui, Multiscale Processing of Mass Spectrometry Data, Biometrics, 62:589–97, 2006.
wavMRDSum
, msDetrend
, wavDaubechies
, wavDWT
,
wavMODWT
, wavMRD
, eventHistory
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | if (!exists("qcset")) data("qcset", package="msProcess")
## obtain a subset of a mass spectrum and add some
## noise
x <- qcset$intensity[5000:10000,1]
sd.noise <- 2
set.seed(100)
xnoise <- x + rnorm(length(x), sd=sd.noise)
mz <- as.matrix(as.numeric(names(x)))
## calculate the smooth at decomposition level 9
## and use that as an approximation of the
## spectrum baseline
z <- msSmoothMRD(xnoise, levels=9)
## plot the results
plot(range(mz), range(xnoise), type="n",
xlab="m/z", ylab="Spectrum and Baseline Estimation")
lines(mz, xnoise, type="l", lty=2, col=1)
lines(mz, z, lty=1, lwd=3, col=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.