detectSpecPeaks: Peak detection for spectra

detectSpecPeaksR Documentation

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 itself re-compute this value.

verbose

A boolean value to allow print out process information.

Value

The peak lists of the spectra

Author(s)

Trung Nghia Vu

Examples

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
);


speaq documentation built on May 23, 2022, 5:06 p.m.