The function detects peaks on an nmr_dataset_1D object, using
speaq::detectSpecPeaks. detectSpecPeaks
divides the whole spectra into
smaller segments and uses MassSpecWavelet::peakDetectionCWT for peak
detection.
Arguments
- nmr_dataset
An nmr_dataset_1D.
- nDivRange_ppm
Segment size, in ppms, to divide the spectra and search for peaks.
- scales
The parameter of peakDetectionCWT function of MassSpecWavelet package, look it up in the original function.
- baselineThresh
All peaks with intensities below the thresholds are excluded. Either:
A numeric vector of length the number of samples. Each number is a threshold for that sample
A single number. All samples use this number as baseline threshold.
NULL
. If that's the case, a default function is used (nmr_baseline_threshold()
), which assumes that there is no signal in the region 9.5-10 ppm.
- 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.
- range_without_peaks
A numeric vector of length two with a region without peaks, only used when
baselineThresh = NULL
- fit_lorentzians
If
TRUE
, fit a lorentzian to each detected peak, to infer its inflection points. For now disabled for backwards compatibility.- verbose
Logical (
TRUE
orFALSE
). Show informational messages, such as the estimated baseline
Value
A data frame with the NMRExperiment, the sample index, the position in ppm and index and the peak intensity
Details
Optionally afterwards, the peak apex and the peak inflection points are used to efficiently adjust a lorentzian to each peak, and compute the peak area and width, as well as the error of the fit. These peak features can be used afterwards to reject false detections.
See also
nmr_align for peak alignment with the detected peak table
Peak_detection
Other peak detection functions:
Pipelines
,
nmr_baseline_threshold()
,
nmr_detect_peaks_plot()
,
nmr_detect_peaks_plot_overview()
,
nmr_detect_peaks_tune_snr()
,
nmr_identify_regions_blood()
,
nmr_identify_regions_cell()
,
nmr_identify_regions_urine()
,
nmr_integrate_regions()