| deconvolute | R Documentation |
Deconvolutes NMR spectra by modeling each detected signal within a spectrum as Lorentz Curve.
deconvolute(
x,
nfit = 3,
smopts = c(2, 5),
delta = 6.4,
sfr = NULL,
wshw = 0,
ask = FALSE,
force = FALSE,
verbose = TRUE,
nworkers = 1,
use_rust = FALSE
)
x |
A |
nfit |
Integer. Number of iterations for approximating the parameters for the Lorentz curves. See 'Details'. |
smopts |
Numeric vector with two entries: the number of smoothing iterations and the number of data points to use for smoothing (must be odd). See 'Details'. |
delta |
Threshold for peak filtering. Higher values result in more peaks
being filtered out. A peak is filtered if its score is below |
sfr |
Numeric vector with two entries: the ppm positions for the left and right border of the signal-free region of the spectrum. See 'Details'. |
wshw |
Half-width of the water artifact in ppm. See 'Details'. |
ask |
Logical. Whether to ask for user input during the deconvolution process. If FALSE, the provided default values will be used. |
force |
If FALSE, the function stops with an error message if no peaks are found in the signal free region (SFR), as these peaks are required as a reference for peak filtering. If TRUE, the function instead proceeds without peak filtering, potentially increasing runtime and memory usage significantly. |
verbose |
Logical. Whether to print log messages during the deconvolution process. |
nworkers |
Number of workers to use for parallel processing. If
|
use_rust |
Logical. Whether to use the Rust backend for deconvolution. Requires the mdrb package. If TRUE and mdrb is missing, an error is thrown. If FALSE, the R implementation is used. If NULL, the Rust backend is used if available, otherwise the R implementation is used. |
First, an automated curvature based signal selection is performed. Each signal is represented by 3 data points to allow the determination of initial Lorentz curves. These Lorentz curves are then iteratively adjusted to optimally approximate the measured spectrum.
A 'decon2' object as described in Metabodecon Classes.
2024-2025 Tobias Schmidt: initial version.
## Deconvolute a single spectrum
spectrum <- sim[1]
decon <- deconvolute(spectrum)
## Read multiple spectra from disk and deconvolute at once
spectra_dir <- metabodecon_file("sim_subset")
spectra <- read_spectra(spectra_dir)
decons <- deconvolute(spectra, sfr = c(3.55, 3.35))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.