wavSmoothing {MALDIrppa} | R Documentation |
Discrete wavelet transformation for MassSpectrum
objects
Description
This function performs undecimated wavelet transform (UDWT) on mass spectra in MassSpectrum
format. Alternatively, smoothing methods included in the MALDIquant
package can be called.
Usage
wavSmoothing(x, method = c("Wavelet", "SavitzkyGolay", "MovingAverage"),
n.levels = 4, ...)
Arguments
x |
A list of |
method |
Smoothing method used. |
n.levels |
Depth of the decomposition for wavelet-based smoothing. |
... |
Other arguments. |
Details
Note that from version 1.1.0 of MALDIrppa
wavelet smoothing is conducted by maximal overlap discrete wavelet transformation and universal thresholding of coefficients based on methods available on the waveslim
package. The optimal level of smoothing is determined by model-driven estimates of the thresholds. The parameter n.levels
(values > 0 and <= log(length(x),2)) can be used to tweak the levels to obtain a smoother or rougher result.
Alternatively, smoothing methods SavitzkyGolay
and MovingAverage
from the MALDIquant
package can be called directly from this function.
If the previous implementation of the wavelet method is required please download and install manually source files of version 1.0.5-1 from the archive of old sources of the package (https://CRAN.R-project.org/package=MALDIrppa).
Value
A list of MassSpectrum
objects with denoised signal intensities.
Examples
# Load example data
data(spectra) # list of MassSpectra class objects
# sqrt transformation and signal smoothing using UDWT
spectra <- transfIntensity(spectra, fun = "sqrt")
spectra <- wavSmoothing(spectra)