read_varian_2dspectra_raw: Function that reads raw 2D spectra (intensity over time...

Description Usage Arguments Value Warning

View source: R/read_NMR_spectra.R

Description

This function read raw 2D spectra (i.e. intensity over time spectra) from the varian format and processess them to intensity over ppm spectra. For this function to work, in each spectrum directory should be present a fid and procpar files.

Python 3 with module nmrglue must be installed.

Usage

1
2
3
4
5
read_varian_2dspectra_raw(varian_spectra_directory,
                          metadata_file=NULL, m.header_col=T, m.header_row=T, m.sep=",",
                          samples.names=NULL, zero_filling=T, apodization=T, zipped=T,
                          description="", label.x="ppm", 
                          label.y="ppm", label.values="intensity")

Arguments

varian_spectra_directory

Path of the directory with all the directories of the varian 2D spectra.

metadata_file

Path of the metadata file.

m.header_col

Boolean value indicating if the metadata CSV file contains a header column with the name of the metadata variables.

m.header_row

Boolean value indicating if the metadata CSV file contains a header row with the name of the samples.

m.sep

The separator character of the metadata file.

samples.names

CSV file where the first column represents the samples names and in the second column the names of the spectra directories to which they correspond. If NULL, it will be considered that the directories names are the samples names (it has to be the same names that appear in the metadata file).

zero_filling

Boolean value indicating whether zero-filling should be performed or not when processing the fid of the 2D spectra. Defaults to TRUE.

apodization

Boolean value indicating whether exponential apodization should be performed or not when processing the fid of the 2D spectra. Defaults to TRUE.

zipped

Boolean value indicating if the spectra directories are zipped or not. Defaults to TRUE.

description

A short text describing the dataset.

label.x

The label for the x values (indirect dimension).

label.y

The label for the y values (direct dimension).

label.values

The label for the pair'(x,y) values.

Value

Returns a list representing a 2D dataset for specmine:

data

A list of matrices where each matrix matches one 2D spectra.

type

The type of the data in the dataset.

description

A short text describing the dataset.

metadata

A dataframe with the metadata variables.

F1_ppm

The ppm values regarding indirect dimension.

F2_ppm

The ppm values regarding direct dimension.

labels

A list of vectors for the x, y and pairs'(x,y) values.

Warning

You must not call this function unless you have Python (>=3.5.2) installed in your machine and the module nmrglue.


specmine documentation built on Sept. 21, 2021, 5:06 p.m.