Spectrum
instances) or whole experiments (MSnExp
instances) to
create centroided spectra.
For noisy spectra there are currently two different noise estimators, the
Median Absolute Deviation (method = "MAD"
) and
Friedman's Super Smoother (method = "SuperSmoother"
),
as implemented in the MALDIquant::detectPeaks
and
MALDIquant::estimateNoise
functions respectively.
signature(x = "MSnExp", halfWindowSize = "integer",
method = "character", SNR = "numeric", verbose = "logical", ...)
MSnExp
instance.
method
could be "MAD"
or "SuperSmoother"
.
halfWindowSize
controls the window size of the peak picking
algorithm. The resulting window size is 2 * halfWindowSize + 1
.
The size should be nearly (or slightly larger) the FWHM
(full width at half maximum).
A local maximum is considered as peak if its intensity is SNR
times larger than the estimated noise.
The arguments ...
are passed to the noise estimator functions.
Currenlty only the method = "SuperSmoother"
accepts additional
arguments, e.g. span
. Please see supsmu
for
details.
This method displays a progress bar if verbose = TRUE
.
Returns an MSnExp
instance with centroided spectra.
signature(x = "Spectrum", method = "character",
halfWindowSize = "integer", ...)
Spectrum
instance).
This method is the same as above but returns a centroided Spectrum
instead of an MSnExp
object. It has no verbose
argument.
Please read the details for the above MSnExp
method.
clean
, removePeaks
smooth
,
estimateNoise
and trimMz
for other spectra
processing methods.
sp1 <- new("Spectrum1",
intensity = c(1:6, 5:1),
mz = 1:11)
sp2 <- pickPeaks(sp1)
intensity(sp2)
data(itraqdata)
itraqdata2 <- pickPeaks(itraqdata)
processingData(itraqdata2)
Run the code above in your browser using DataLab