Description Usage Arguments Details Value The Pipeline Author(s) Examples
View source: R/preprocessing.R
Preproc()
is a function aimed at streamlining the preprocessing stage of analysing NMR spectra. It harnesses the power of the package metabom8
to quickly and easily process spectra.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
X |
A matrix containing the non-preprocessed NMR spectral data. The rows should containing all values of a single experiment, and the columns, the values of the chemical shift variables. |
ppm |
An array of the chemical shift variables, column matched to X. |
meta |
The matrix of metadata pertaining to the X matrix. This is crucial for the TSP calibration and line width calculation. |
baseline |
Default is set to |
flip |
Default is set to |
cali |
Default is set to |
calibrant |
This is the signal you wish to use as the calibrant. This signal must be compatible with |
lineWid |
This argument provides import for |
lowCut |
A single floating point number defining the ppm value that the lower limit of the spectra are trimmed to. |
watCut |
The lower and upper ppm values concatenated, from which the water region will be trimmed and omitted. Water regions provide no important information and should be removed prior to data analysis. Default is set to |
ureCut |
The lower and upper ppm values concatenated, from which the urea region will be trimmed and omitted. Urea regions also provide no important information and should be removed prior to data analysis. Default is set to |
uppCut |
A single floating point number defining the ppm value that the upper limit of the spectra are trimmed to. |
noi_sh |
The shift of the noise region used to calculate estimation of noise |
Preproc()
is powered by the metabom8
package and is simply a tool to harness and streamline functions in metabom8
when preprocessing NMR spectra, not replace them.
This function returns a list with:
The processed X matrix in the first element,
The processed ppm array in the second element, and
The line width results in a data frame in the third element.
Following the example below will extract the results quickly and easily.
This function streamlines the preprocessing of NMR urine spectra by combining a range of functions. It:
Orientates the spectra correctly,
Calibrates the spectra by a specific peak,
Calculates the line widths of the peaks and returns a warning with the spectra that exceed the specified threshold,
Removes the lower, upper, water and urea regions of the spectra,
Corrects the baseline of the spectra using asymmetric least squares
Verifies that the resulting X, ppm and meta objects match appropriately.
1 | path = system.file('extdata', package = 'unorm')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.