February 22, 2024
Research Highlight

An R Package for NMR Data Processing

Reproducible workflows for binning and visualizing nuclear magnetic resonance spectra from environmental samples

The logo of the nmrrr package for R with some sample output showing processed NMR spectra.

The nmrrr package can be used to process spectra from solution- and solid-state (pictured here) experiments.

(Image courtesy of Kaizad F. Patel | Pacific Northwest National Laboratory)

The Science

Nuclear magnetic resonance (NMR) spectroscopy is used to detect and identify the structure of molecules, and it has become increasingly important in environmental science. The data produced from NMR analyses need a lot of additional processing to be useful. This makes it difficult for nonexperts to use and apply this technique. We introduce a new R package, called nmrrr, to process and visualize NMR data. This open-source package can be integrated into existing NMR processing workflows. The package can be used to process spectra and peak data, calculate relative abundances, and plot graphs of spectra. The nmrrr package is currently available on two platforms: CRAN and GitHub.

The Impact

Despite advances in NMR analyses, manual integration and data processing are still the norm for environmental sample workflows. The nmrrr package is intended for processing NMR data, including cleaning data from multiple files, visualizing NMR spectra, performing binning/integrations for functional groups, and calculating relative abundances. A major feature of this package is its ability to batch-process multiple samples in a reproducible manner. This package is designed for use in the R language for statistical computing, and it can be easily inserted into analysis workflows to help analyze and interpret NMR data. The nmrrr package has a wide range of applications, as it can be used for various target nuclei, solution- and solid-state NMR data, and high-resolution magic-angle-spinning (HRMAS, gel-state NMR) data.

Summary

NMR spectroscopy is a useful tool for the detection and identification of molecular structural information and has increasing applications in environmental sciences. However, the outputs from NMR instruments contain many differences and require extensive post-processing, creating barriers to their use and application by nonspecialists. The nmrrr package processes and visualizes the spectral data obtained from one-dimensional solution- and solid-state NMR experiments. It also performs the relevant calculations commonly applied in natural organic matter communities, such as computing the relative abundances of various functional groups. In the publication below, the package’s installation, dependencies, and functions are documented, and a standard workflow for processing NMR data is presented. This package is currently available on CRAN and GitHub, and community contributions are welcome.

Contact

Kaizad F. Patel, Pacific Northwest National Laboratory, kaizad.patel@pnnl.gov

Funding

This research was supported by the Department of Energy (DOE), Office of Science, Biological and Environmental Research, as part of the Environmental System Science program, using data developed in the COMPASS-FME project and the River Corridors Science Focus Area at Pacific Northwest National Laboratory. PNNL is operated for the DOE by Battelle Memorial Institute.

Related Links

nmrrr: Binning and Visualizing NMR Spectra in Environmental Samples, The Comprehensive R Archive Network (CRAN)

COMPASS-DOE/nmrrr, GitHub

Published: February 22, 2024

K. F. Patel, et al. 2023. “nmrrr: A reproducible workflow for binning and visualizing NMR spectra from environmental samples.” Journal of Geophysical Research: Biogeosciences 128, e2023JG007768. [DOI: 10.1029/2023JG007768]