Package 'musicNMR'

Title: Conversion of Nuclear Magnetic Resonance Spectra in Audio Files
Description: A collection of functions for converting and visualization the free induction decay of mono dimensional nuclear magnetic resonance (NMR) spectra into an audio file. It facilitates the conversion of Bruker datasets in files WAV. The sound of NMR signals could provide an alternative to the current representation of the individual metabolic fingerprint and supply equally significant information. The package includes also NMR spectra of the urine samples provided by four healthy donors. Based on Cacciatore S, Saccenti E, Piccioli M. Hypothesis: the sound of the individual metabolic phenotype? Acoustic detection of NMR experiments. OMICS. 2015;19(3):147-56. <doi:10.1089/omi.2014.0131>.
Authors: Stefano Cacciatore [aut, trl, cre]
Maintainer: Stefano Cacciatore <[email protected]>
License: GPL (>= 2)
Version: 1.0
Built: 2024-11-06 02:39:22 UTC
Source: https://github.com/cran/musicNMR

Help Index


Collection of Free Induction Decay of Urine Spectra of the Donor AU

Description

This dataset consists of eigth Free Induction Decay (FID) from eight urine samples. All urine were collected from the donor "AU". The urine are divided in two group; in each group urine samples were collected in a time period of a week. The collection of the two groups is separated by a time course of two years.

Usage

data(AU)

Value

A list with the following elements:

sample1A

a matrix object. FID of the sample 1 of group A.

sample2A

a matrix object. FID of the sample 2 of group A.

sample3A

a matrix object. FID of the sample 3 of group A.

sample4A

a matrix object. FID of the sample 4 of group A.

sample1B

a matrix object. FID of the sample 1 of group B.

sample2B

a matrix object. FID of the sample 2 of group B.

sample3B

a matrix object. FID of the sample 3 of group B.

sample4b

a matrix object. FID of the sample 4 of group B.

References

Assfalg M, Bertini I, Colangiuli D, et al.
Evidence of different metabolic phenotypes in humans.
Proc Natl Acad Sci U S A 2008;105(5):1420-4.

Examples

data(AU)
plotFID(AU$sample1B)
plotFID(AU$sample1A,ADD=TRUE,col=2)

Collection of Free Induction Decay of Urine Spectra of the Donor AU

Description

This dataset consists of eigth Free Induction Decay (FID) from eight urine samples. All urine were collected from the donor "AW". The urine are divided in two group; in each group urine samples were collected in a time period of a week. The collection of the two groups is separated by a time course of two years.

Usage

data(AW)

Value

A list with the following elements:

sample1A

a matrix object. FID of the sample 1 of group A.

sample2A

a matrix object. FID of the sample 2 of group A.

sample3A

a matrix object. FID of the sample 3 of group A.

sample4A

a matrix object. FID of the sample 4 of group A.

sample1B

a matrix object. FID of the sample 1 of group B.

sample2B

a matrix object. FID of the sample 2 of group B.

sample3B

a matrix object. FID of the sample 3 of group B.

sample4b

a matrix object. FID of the sample 4 of group B.

References

Assfalg M, Bertini I, Colangiuli D, et al.
Evidence of different metabolic phenotypes in humans.
Proc Natl Acad Sci U S A 2008;105(5):1420-4.

Examples

data(AW)
plotFID(AW$sample1B)
plotFID(AW$sample1A,ADD=TRUE,col=2)

Save an Audio File from a Matrix

Description

This function save a matrix in audio file as *.wav

Usage

musicMatrix(ma,destination)

Arguments

ma

a matrix. The time in second unit is in the firt column. The intensity of the FID is in the second column.

destination

Name of the .wav file

Details

This function uses - three functions from the package tuneR: Wave, normalize and writeWave; - one function from the package seewave: savewav.

Value

No return value.

Author(s)

Stefano Cacciatore

References

Cacciatore S, Saccenti E, Piccioli M. Hypothesis: the sound of the individual metabolic phenotype? Acoustic detection of NMR experiments. OMICS. 2015 Mar;19(3):147-56.

Examples

data(AU)
musicMatrix(AU$sample1A,"audio.wav")

# The function unlink deletes the file
unlink("audio.wav")

Save an Audio File from a Bruker Nuclear Magnetic Resonance Spectrum

Description

This function converts monodimensional Nuclear Magnetic Resonance spectrum in audio file. The spectrum is imported as Bruker format and the audio file is saved as *.wav

Usage

musicNMR(source,destination)

Arguments

source

The folder's address where the Free Induction Decay is located

destination

Name of the .wav file

Details

This function uses - three functions from the package tuneR: Wave, normalize and writeWave; - one function from the package seewave: savewav.

Value

No return value.

Author(s)

Stefano Cacciatore

References

Cacciatore S, Saccenti E, Piccioli M. Hypothesis: the sound of the individual metabolic phenotype? Acoustic detection of NMR experiments. OMICS. 2015 Mar;19(3):147-56.


Free Induction Decay Plotting

Description

A function for ploting Free Induction Decay (FID).

Usage

plotFID(x,ADD=FALSE, ...)

Arguments

x

a matrix. The time in second unit is in the firt column. The intensity of the FID is in the second column.

ADD

For a new plot ADD = FALSE. To overimpose a different FID on an existing plot ADD = TRUE.

...

Arguments to be passed to the plot function.

Value

No return value.

Author(s)

Stefano Cacciatore

References

Cacciatore S, Saccenti E, Piccioli M. Hypothesis: the sound of the individual metabolic phenotype? Acoustic detection of NMR experiments. OMICS. 2015 Mar;19(3):147-56.

Examples

data(AU)
plotFID(AU$sample1B)
plotFID(AU$sample1A,ADD=TRUE,col=2)