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

Perform the complete processing of a set of proton nuclear magnetic resonance spectra from the free induction decay (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. More detail can be found in Jacob et al. (2017) .

Rnmr1D is the main module in the NMRProcFlow web application ( concerning the NMR spectra processing.

  • Inside NMRProcFlow, Rnmr1D allows users to process their NMR spectra within a GUI application and thus the macro-command sequence coming from this process can be saved.

  • Outside NMRProcFlow Rnmr1D become an R package allowing users to replay the macro-command sequence generated within NMRProcFlow. Moreover, without using NMRProcFlow, this package can also be used to replace any 'home-made script' by a macro-command sequence.

  • See the Macro-command Reference Guide to have more details about macro-commands.

Installation of some dependencies

install.packages(c('doParallel', 'ptw', 'signal', 'speaq', 'base64enc', 'XML', 'igraph'), repos='')

Installation of the R package

  • Note for Windows 7/10: Before performing the installation within R GUI it may require to specify the Compiler binaries path in the PATH environment variable so that the C++ code compilation will be correctly done ( check with Sys.getenv("PATH") )
install_github("INRA/Rnmr1D", dependencies = TRUE)

Example of use

# Test with the provided example data
data_dir <- system.file("extra", package = "Rnmr1D")
RAWDIR <- file.path(data_dir, "CD_BBI_16P02")
CMDFILE <- file.path(data_dir, "NP_macro_cmd.txt")
SAMPLEFILE <- file.path(data_dir, "Samples.txt")
# Detect the number of Cores
# Launch the pre-processing then the processing defined in the macro-command file
out <- Rnmr1D::doProcessing(RAWDIR, cmdfile=CMDFILE, samplefile=SAMPLEFILE, ncpu=detectCores())
# Have a look on returned data structure
### Stacked Plot with a perspective effect
plotSpecMat(out$specMat, ppm_lim=c(0.5,5), K=0.33)
### Overlaid Plot
plotSpecMat(out$specMat, ppm_lim=c(0.5,5), K=0, pY=0.1)
# Get the data matrix 
outMat <- getBucketsDataset(out, norm_meth='CSN')
# Get the Signal/Noise Ratio (SNR) matrix 
outSNR <- getSnrDataset(out, c(10.2,10.5), ratio=TRUE)
# Get the bucket table
outBucket <- getBucketsTable(out)
# Get the spectra data
spectra <- getSpectraData(out)

See a more complete illustation within the vignette



Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.2.1 by Daniel Jacob, 4 months ago

Browse source code at

Authors: Daniel Jacob [cre, aut] , Catherine Deborde [ctb] , Marie Lefebvre [ctb]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports Rcpp, base64enc, MASS, Matrix, methods, doParallel, foreach, igraph, impute, MassSpecWavelet, ptw, signal, speaq, XML

Suggests knitr, rmarkdown

Linking to Rcpp

See at CRAN