Git Product home page Git Product logo

rnmr1d's Introduction

Rnmr1D

Rnmr1D is the main module in the NMRProcFlow web application (http://nmrprocflow.org) 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

packages <- c("impute", "MassSpecWavelet","pcaMethods")
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
   BiocManager::install(setdiff(packages, rownames(installed.packages())));
}

packages <- c('doParallel', 'ptw', 'signal', 'speaq', 'base64enc', 'XML', 'igraph', 'ggplot2', 'plotly', 'plyr')
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
  install.packages(setdiff(packages, rownames(installed.packages())), repos='http://cran.rstudio.com')
}

Installation of the R package

  • Note for Windows 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") )
require(devtools)
install_github("INRA/Rnmr1D", dependencies = TRUE)

Example of use

library(Rnmr1D)

# 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
detectCores()

# 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
ls(out)
ls(out$specMat)

### Stacked Plot with a perspective effect
dev.new()
plotSpecMat(out$specMat, ppm_lim=c(0.5,5), K=0.33)

### Overlaid Plot
dev.new()
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

vignette("Rnmr1D")

You can access the vignette online : https://nmrprocflow.org/themes/html/Rnmr1D.html

rnmr1d's People

Contributors

djacob65 avatar

Stargazers

Félix Boudry avatar Michael Pfister avatar Zhimin Zhang avatar Vitor Mendes de Oliveira avatar def-fun avatar Bárbara Carvalho avatar  avatar Kerner avatar

Watchers

James Cloos avatar  avatar  avatar def-fun avatar Bárbara Carvalho avatar

Forkers

jpgourdine

rnmr1d's Issues

Fixed range in spectra output using the command "doProcessing"

Hello,
I am wondering why the spectra are always output with a fixed range from - 0.5 to 11 ppm. Would it be possible to adjust the range flexibly?
Using the "setPPMbonds(...)" command before "doProcessing" in order to set limits has no effect on the result.

Kind regards,
Michael

No proper ppm scaling at different NMR-Machines

Hi Daniel,
we ran into a problem when reading in data from two different NMR spectrometers. Both are Bruker instruments, one of them with a NEO console. The problem is that the TSP signal is not zeroed correctly. Depending on which spectrometer is first in the listing, the spectra of the second spectrometer are shifted to it. The shift is about 0.04 ppm.
It seems that the TSP signal is not detected correctly. In the macro, only uniform bucketing is performed and no further processing steps are made.
Are we making a mistake in the reading?

With best regards
Michael

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.