Learn R Programming

speaq (version 1.2.0)

detectSpecPeaks: Peak detection for spectra

Description

Divide the whole spectra into smaller segments and detect peaks by using MassSpecWavelet package. Note that, the peak lists could be found by using other methods, this function is just a choice.

Usage

detectSpecPeaks(X, nDivRange = 128, scales = seq(1, 16, 2),
        baselineThresh = 50000, SNR.Th = -1, verbose=TRUE)

Arguments

X
The spectral dataset in matrix format in which each row contains a single sample
nDivRange
The size of a single small segment after division of spectra
scales
The parameter of peakDetectionCWT function of MassSpecWavelet package, look it up in the original function.
baselineThresh
It will remove all peaks under an intensity set by baselineThresh.
SNR.Th
The parameter of peakDetectionCWT function of MassSpecWavelet package, look it up in the original function. If you set -1, the function will itseff re-compute this value.
verbose
A boolean value to allow print out process information.

Value

  • The peak lists of the spectra

Details

Divide the whole spectra into smaller segments and detect peaks by using MassSpecWavelet package. Note that, the peak lists could be found by using other methods, this function is just a choice.

Examples

Run this code
res=makeSimulatedData();
X=res$data;
groupLabel=res$label;



peakList <- detectSpecPeaks(X,
  nDivRange = c(128),                
  scales = seq(1, 16, 2),
  baselineThresh = 50000,
  SNR.Th = -1,
    verbose=FALSE
);

Run the code above in your browser using DataLab