snrPeaks | R Documentation |
MassPeaks
objects
This function extracts the thresholds used to determine peaks from mass spectra based on signal-to-noise ratio (SNR) (threshold equal to SNR*noise
).
snrPeaks(x)
x |
A list of |
Given a collection of MassPeaks
objects as obtained from detectPeaks
, this function provides the thresholds used in each case to determine peaks from the original mass spectra. The thresholds are calculated as the product of a SNR value set by the user and the estimated noise of the signal (see detectPeaks
).
A list of vectors of SNR-based thresholds, one for each sample.
# Load example data
data(spectra) # list of MassSpectra class objects
# Some pre-processing
spectra <- screenSpectra(spectra)$fspectra
spectra <- transformIntensity(spectra, method = "sqrt")
spectra <- wavSmoothing(spectra)
spectra <- removeBaseline(spectra)
peaks <- detectPeaks(spectra)
# Extract thresholds for each mass peak profile
SNRs <- snrPeaks(peaks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.