Description Usage Arguments Value S3 METHODS References See Also Examples
Performs waveshrink on a given spectrum over a (wide) range
of thresholds. For each threshold, a waveshrunk version of the
input spectrum is calculated and a separation statistic is formed
based on the absolute difference between the waveshrunk output and an
infinitely smooth reference series. The reference series is
a the result of waveshrinking the input spectrum with a very large
threshold, where (nearly) all the wavelet coefficients are
(shrunk toward) zero in the shrinkage process.
The plot
method can be used to display an image of the separation
statistics over the specified range of thresholds and corresponding
m/z values. This technique eliminates adaptive thresholding, where
a unique threshold is used to shrink the wavelet coefficients at different
scales, since only a single threshold is supplied.
1 2 3 4 5 6 | msDenoiseWaveletThreshold(x, wavelet="s8",
n.level=as.integer(floor(logb(length(x), 2))),
shrink.fun="hard", thresh.scale=NULL,
xform="modwt", reflect=TRUE, n.threshold=500,
thresh.fun="universal", noise.variance=NULL,
min.thresh=NULL, max.thresh=NULL)
|
x |
A vector containing a uniformly-sampled real-valued time series, typically a mass spectrum. |
min.thresh, max.thresh |
Numeric scalars defining the threshold range.
These arguments are only used if the default value of the |
n.level |
The number of decomposition levels, limited to
|
n.threshold |
The number of thresholds. This argument is only used
if the default value of the |
noise.variance |
A numeric scalar representing (an estimate of) the additive Gaussian white noise variance. If unknown, setting this value to 0.0 (or less) will prompt the function to automatically estimate the noise variance based on the median absolute deviation (MAD) of the scale one wavelet coefficients. Default: NA (MAD estimate will be used). |
reflect |
A logical value. If |
shrink.fun |
A character string denoting the shrinkage function.
Choices are |
thresh.fun |
A character string denoting the threshold function to use in calculating the waveshrink thresholds.
Note: if |
thresh.scale |
A numeric vector containing the threshold values
to use in denoising the wavelet coefficients. This vector must contain
at least two numeric values.
Default: |
wavelet |
A character string denoting the filter type.
See |
xform |
A character string denoting the wavelet transform type.
Choices are |
An object of class msDenoiseWaveletThreshold
.
Plots an image of the separation statistics as a function of threshold (ordinate) and m/z value (abscissa). For reference, a line plot of the original and infinitely smoothed spectra are overlaid on the image. Available options are:
character string defining x-axis label. Default: "m/z"
.
character string defining y-axis label. Default: "Waveshrink Threshold"
.
an integer denoting the line type ala the par
function. Default: 1.
an integer denoting the line width ala the par
function. Default: 2.
...
additional argument sent directly to the lines
function used to overlay the
image with the original and infiniteluyu smooth spectra.
Prints a summary of the returned object. Available options are:
text justification ala the format
function. Default: "left"
.
header separator. Default: ":"
.
Donoho, D. and Johnstone, I. Ideal Spatial Adaptation by Wavelet Shrinkage. Technical report, Department of Statistics, Stanford University, 1992.
Donoho, D. and Johnstone, I. Adapting to Unknown Smoothness via Wavelet Shrinkage. Technical report, Department of Statistics, Stanford University, 1992.
D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.
http://bioinformatics.mdanderson.org/sizer.html.
msDenoiseWavelet
, msDenoise
, rescale
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if (!exists("qcset")) data("qcset", package="msProcess")
## grab portion of a mass spectrum and plot
x <- qcset$intensity[5000:7000,1]
## create noise and add it to the spectrum portion
sd.noise <- 2
set.seed(100)
xnoise <- x + rnorm(length(x), sd=sd.noise)
## calculate the waveshrink separation statistics
z <- msDenoiseWaveletThreshold(xnoise)
print(z)
plot(z)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.