Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

doProcessing

doProcessing


Description

doProcessing is the main function of this package. Indeed, this function performs the complete processing of a set of 1D NMR spectra from the FID (raw data) and based on a processing sequence (macro-command file). An additional file specifies all the spectra to be considered by associating their sample code as well as the levels of experimental factors to which they belong. In this way it is possible to select only a subset of spectra instead of the whole set.

Usage

doProcessing(path, cmdfile, samplefile = NULL, bucketfile = NULL,
  ncpu = 1)

Arguments

path

The full path of either the raw spectra directory on the disk

cmdfile

The full path name of the Macro-commands file for processing (text format)

samplefile

The full path name of the Sample file (tabular format)

bucketfile

The full path name of the file of bucket's zones (tabular format)

ncpu

The number of cores [default: 1]

Value

doProcessing returns a list containing the following components:

  • samples : the samples matrix with the correspondence of the raw spectra, as well as the levels of the experimental factors if specified in the input.

  • factors : the factors matrix with the corresponding factor names. At minimum, the list contains the Samplecode label corresponding to the samples without their group level.

  • rawids : list of the full directories of the raw spectra (i.e. where the FID files are accessible)

  • infos : list of the acquisition and processing parameters for each (raw) spectra.

  • specMat : objects list regarding the spectra data.

    • int : the matrix of the spectra data (nspec rows X size columns)

    • nspec : the number of spectra

    • size : the size (i.e number of points) of each spectra

    • ppm_min, ppm_max : the minimum and the maximum ppm values of spectra

    • ppm : the vector of the ppm values (size values)

    • dppm : the ppm increment between each point

    • buckets_zones : the matrix of the buckets zones including two columns (min and max)

    • namesASintMax : boolean - If TRUE, generate all output matrix with bucket names based on ppm values of the maximum of the average intensity of all spectra within the ppm range of each bucket. If FALSE (default), then bucket names will be based on the ppm range center of each bucket.

See Also

the NMRProcFlow online documentation https://nmrprocflow.org/ and especially the Macro-command Reference Guide (https://nmrprocflow.org/themes/pdf/Macrocommand.pdf)

Examples

data_dir <- system.file("extra", package = "Rnmr1D")
    cmdfile <- file.path(data_dir, "NP_macro_cmd.txt")
    samplefile <- file.path(data_dir, "Samples.txt")
    out <- Rnmr1D::doProcessing(data_dir, cmdfile=cmdfile, 
                                samplefile=samplefile, ncpu=detectCores())

Rnmr1D

Perform the Complete Processing of a Set of Proton Nuclear Magnetic Resonance Spectra

v1.2.5
GPL (>= 2)
Authors
Daniel Jacob [cre, aut] (<https://orcid.org/0000-0002-6687-7169>), Catherine Deborde [ctb], Marie Lefebvre [ctb]
Initial release
2019-11-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.