Last data update: 2014.03.03

R: Metabolomic Quantitative Trait Locus mapping for 1H NMR data
mQTL.NMR-packageR Documentation

Metabolomic Quantitative Trait Locus mapping for 1H NMR data

Description

mQTL.NMR provides a complete mQTL analysis pipeline for 1H NMR data. Distinctive features include normalisation using most-used approaches, peak alignment using RSPA approach, dimensionality reduction using SRV and binning approaches, and mQTL analysis for animal and human cohorts.

Details

Package: mQTL.NMR
Type: Package
Version: 0.99.2
Link: http://www.ican-institute.org/tools
Date: 2014-05-19
License: Artistic-2.0

Main fucntions:

  • format_mQTL: generates the proper format of animal crosses data

  • format_mGWA: generates the proper format of human data

  • align_mQTL: peak alignment

  • normalise_mQTL: normalisation of metabolomic data using different approaches (Probabilistic quotient, constant sum,...)

  • pre_mQTL: dimension reduction by statistical recoupling of variables or bining

  • process_mQTL: computes LODs using extended Haley-Knott method for animal crosses

  • process_mGWA: computes p-values using a standard linear regression approach for human

  • post_mQTL: plots the results of a given run

  • summary_mQTL: provides the results as a table

  • simple.plot: Plots a region of NMR profile

  • SRV.plot: Plots the regions identified by SRV in NMR profiles

  • ppersp: Plot 3-D profile of LODs as function of genomic position and chemical shift

  • pplot: Plot a color scale layer

  • Top_SRV.plot: Plot top SRV clusters for structural assignment

  • circle_mQTL: Plot a circular genome-metabolome plot

Author(s)

Lyamine Hedjazi and Jean-Baptiste Cazier

Maintainer: Lyamine Hedjazi <mqtl@ican-institute.org>

References

- L. HEDJAZI, D. GAUGUIER, P. ZALLOUA, J. NICHOLSON, M-E DUMAS and J-B CAZIER, mQTL-NMR: an integrated suite for genetic mapping of quantitative variations of 1H NMR-based metabolic profiles, Analytical Chemistry, 2015, doi: 10.1021/acs.analchem.5b00145.

Examples


# Download data files

load_datafiles()

# Format data

format_mQTL(phenofile,genofile,physiodat,cleandat,cleangen)

# Constant Sum normlisation
nmeth<-'CS'
normalise_mQTL(cleandat,CSnorm,nmeth)

# Alignment
align_mQTL(CSnorm,aligdat)

# Dimensionality reduction
met="rectangle" # choose the statistical summarizing measure ("max","sum","trapez",...)
RedMet="SRV" # reduction method ("SRV" or "bin")

pre_mQTL(aligdat, reducedF, RedMet="SRV",met, corrT=0.9)

# mQTL mapping
results<- list() # a list to stock the mQTL mapping results
nperm<- 0 # number of permutations if required
results<-process_mQTL(reducedF, cleangen, nperm)

## Post-Process
post_mQTL(results)

## Summarize 
redfile<-"rectangle_SRV.ppm"
summary_mQTL(results,redfile,T=8)

#plot circular genome
circle_mQTL(results, Th=8,spacing=0)

## visualisation and metabolite identification
#plot NMR profile
simple.plot(file=cleandat,lo=3.02,hi=3.08,k=1:20,title="NMR profile") 

#plot SRV regions
SRV.plot(file1=cleandat,file2=rectangle_SRV,lo=3.02,hi=3.08,k=1:20,title="Cluster plot")

#plot lod for the region of interest
SRV_lod.plot(results,rectangle_SRV,Th=1)

#plot top lod SRV regions
Top_SRV.plot(file1=cleandat,file2=rectangle_SRV,results=results,met=met,intMeth="mean")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(mQTL.NMR)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/mQTL.NMR/mQTL.NMR-package.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mQTL.NMR-package
> ### Title: Metabolomic Quantitative Trait Locus mapping for 1H NMR data
> ### Aliases: mQTL.NMR-package mQTL.NMR
> 
> ### ** Examples
> 
> 
> # Download data files
> 
> load_datafiles()
> 
> # Format data
> 
> format_mQTL(phenofile,genofile,physiodat,cleandat,cleangen)
[1] "Start formatting the datafile /home/ddbj/local/lib64/R/library/mQTL.NMR/extdata/phenofile.txt and the genotype file /home/ddbj/local/lib64/R/library/mQTL.NMR/extdata/genofile.txt into the csvs files: met.clean.txt gen.clean.txt"
> 
> # Constant Sum normlisation
> nmeth<-'CS'
> normalise_mQTL(cleandat,CSnorm,nmeth)
[1] "Start constant sum normalisation:"
> 
> # Alignment
> align_mQTL(CSnorm,aligdat)
[1] "...Automatic selection of a reference spectrum..."
[1] ""
[1] "...Returning aligned spectra..."
There were 40 warnings (use warnings() to see them)
> 
> # Dimensionality reduction
> met="rectangle" # choose the statistical summarizing measure ("max","sum","trapez",...)
> RedMet="SRV" # reduction method ("SRV" or "bin")
> 
> pre_mQTL(aligdat, reducedF, RedMet="SRV",met, corrT=0.9)
[1] "Processing a 168 x 1454 matrix with minsize of 10  and a correlation Threshold of 0.9 using the rectangle"
[1] "length of events: 66"
[1] "Xcluster" "168"      "66"       "66"      
[1] "balise length:" "3"             
[1] "Found 64  clusters"
[1] "dataset: data file /home/ddbj/local/lib64/R/library/mQTL.NMR/extdata/reducedF.txt generated"
> 
> # mQTL mapping
> results<- list() # a list to stock the mQTL mapping results
> nperm<- 0 # number of permutations if required
> results<-process_mQTL(reducedF, cleangen, nperm)
 --Read the following data:
	 168  individuals
	 30  markers
	 67  phenotypes
 --Cross type: f2 
[1] "TotM is  44 and np is 64"
[1] 6.000000 1.265767
[1] 12.000000  3.069176
[1] 18.000000  3.069176
[1] 24.000000  3.069176
[1] 30.000000  3.069176
[1] 36.000000  3.069176
[1] 42.000000  3.069176
[1] 48.000000  3.069176
[1] 54.000000  3.069176
[1] 60.00000 19.76617
[1] "SRV ehk in this area was 19.77 for 3.73905 ppm at c9.loc65"
Warning message:
In summary.cross(cross) :
  Some markers at the same position on chr 9; use jittermap().
> 
> ## Post-Process
> post_mQTL(results)
[1] "Post processing"
Error in dev.new(width = 11, height = 11, pointsize = 10) : 
  no suitable unused file name for pdf()
Calls: post_mQTL -> dev.new
Execution halted