partager sur facebook

Tools

 

About mQTL-NMR

mQTL-NMR provides a complete QTL analysis pipeline for metabolomic data. Distinctive features include normalization using various approaches, peak alignment using RSPA approach, dimensionality reduction and mQTL mapping for animal crosses and human cohorts.

 workflow

1- Download:

To install the released version of the package, start R and enter:

source(“http://bioconductor.org/biocLite.R”)

biocLite(“mQTL.NMR”)

Or download the source package here:

mQTL.NMR_1.0.0.tar

2- Manual:

Manual and an example of using the package:

mQTLUse

3- Sample data files:

These files contain sample data supported by the mQTL package. This helps the user to go throughout the different steps using the package. The data come from (JB Cazier et al, J. Proteome Res., 2012, 11 (2), pp 631–642).

a) Raw data
Data files supported by format_mQTL function

The file should be dezipped before any use

b) Formatted data

4- Tutorials:

Application example

We provide below an application example showing the use of mQTL package on real-world dataset. Data used here can be loaded using the function load_demo_data() or from “sample data files” section.

I- Data files format

Supported format of raw metabolomic data file

  • Si: ID of the ith sample
  • ppmi: ith metabolomic variable (chemical shift)

Supported format of raw genomic data file

  • First row: Marker name
  • Chrom: chromosome
  • cM: genomic position in CentiMorgan
  • Mb: genomic position in nucleotide
  • a: homozygote AA
  • b: homozygote BB
  • h: heterozygote AB
  • ND: missing genotype

Additional data

  • Si: ID of the ith sample
  • sex: male or female (0/1)
  • pgm: parental grandmother (0/1)

Formatted data

Raw data files should be formatted according to the targeted type of analysis (mQTL or mGWA analysis). However, this step can be skipped if the data files are already formatted by the user. Data files supported by mQTL-NMR package should be in the comma-delimited format csvs that might be viewed in spreadsheet as shown below:

1. Metabolomic data

  • ppm_xx: metabolomic variable
  • Si: ith sample

 

 

 

 

2. Genomic data

  • NA: missing genotype

Data can be formatted as follows:
# Load mQTL package

– R script to format raw data:

# Load mQTL package
> library(‘mQTL.NMR’)
# Download raw data files
> load_demo_data()
# Format data files
> format_mQTL(phenofile,genofile,physiodat,cleandat,cleangen)
[1] “Start formatting the datafile MetaboFile.txt and the genotype file GenoFile.txt into the csvs files: met.clean.txt gen.clean.txt”

The following files should be generated using the format_mQTL() function in the working directory:

Download

ur.clean.dat.zip
Compressed Archive in ZIP Format [4.2 MB]

Download

ur.clean.gen
Text Document [156.3 KB]

II. Normalisation of metabolomic data

The mQTL-NMR package implements several approache to perform the normalization of metabolomic data. We show below an example of the successive use of two normalisations approaches (constant sum (CS) and probabilistic quotient normalisation (PQN)) as follows:

> # Constant Sum & Probabilistic Quotient normlisation
> nmeth<-‘CS’
> nnfile<-“ur.clean.dat” # fromated data
> nfile<-“ur.norm1.dat” # CS normalised data
> normalise_mQTL(nnfile,nfile,nmeth)
[1] “Start constant sum normalisation:”
> nmeth<-‘PQN’
> nfile2<-“ur.norm.dat”
> normalise_mQTL(nfile,nfile2,nmeth)
[1] “Start probabilistic quotient normalisation:”

III. Alignment of metabolomic data

The mQTL-NMR package uses the Recursive Segment-wise Peak alignment (RSPA) approach to align positions of NMR spectral peaks with respect to a reference spectrum picked up either automatically or manually as follows:

– R script to nomalize and align metabolomic data:
> aligdat<-“ur.alig.txt” # aligned metabolomic file in output
>
align_mQTL(normD,aligdat)
[1] “…Automatic selection of a reference spectrum…”
[1] “”
[1] “…Returning aligned spectra…”

This operation takes few minutes. Then a “csv” file is generated using this script in the following format:

IV. Dimensionality reduction

The mQTL-NMR package offers mainly two approaches in order to reduce the number of traits considered for genetic mapping analysis: statistical recoupling of variables (“SRV”) and binning approaches (“bin”). An example of using SRV approach is given below:

> met=”rectangle” # choose the statistical summarizing measure (“max”,”sum”,”trapez”,…)
> aligdat<-“ur.alig.txt”
> SRVdat<-paste(“ur”,met,”alig.txt”,sep=”.”)
> pre_mQTL(aligdat, SRVdat, RedMet=”SRV”,met, corrT=0.9)
[1] “Processing a 168 x 13454 matrix with minsize of 10 and a correlation Threshold of [1] “length of events: 512”
[1] “Xcluster” “168” “512” “512”
[1] “balise length:” “32”
[1] “Found 482 clusters”
[1] “dataset: data file ur.rectangle.alig.txt generated”

V. Metabolomic Quantitative Trait locus mapping

The mQTL-NMR package enables association studies for different species, from animal crosses to human cohorts. Below an example of mQTL mapping on a mouse cross:

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

–Read the following data:
168 individuals
436 markers
485 phenotypes

–Cross type: f2
[1] “TotM is 689 and np is 482”
[1] 48.000000 5.168098
[1] 96.0000 17.0814
[1] 144.0000 17.0814
[1] 192.0000 17.0814
[1] 240.0000 17.0814
[1] 288.00000 27.46486
[1] 336.00000 27.46486
[1] 384.00000 27.46486
[1] 432.00000 27.46486
[1] 480.00000 27.46486
[1] “SRV ehk in this area was 27.46 for 4.099025 ppm at c9.loc60”

VI. Visualization of results

> post_mQTL(results)

This plots the results in a single figure and saves each sub-figure automatically in user’s working directory:

Figure1

VII. Summary of results

A summary of the results can be obtained in a table as follows:

> redfile<-“rectangle_SRV.ppm”
> summary_mQTL(results,redfile,T=8)
[1] “Summarize single runs rectangle_SRV”
Min Max ppm chr pos lod
rs6307428 1.52585 1.55830 1.542075 13 0.600001 9.594348
rs63074281 1.56380 1.57535 1.569575 13 0.600001 17.081398
rs8281185 2.15835 2.17540 2.166875 2 61.700027 9.026802
rs63074282 2.20950 2.22160 2.215550 13 0.600001 10.460247
rs63074283 2.42235 2.42895 2.425650 13 0.600001 16.763957
rs63074284 2.44655 2.45810 2.452325 13 0.600001 11.903573
rs3691785 2.47460 2.48560 2.480100 13 0.000000 8.947379
c9.loc60 3.72750 3.73575 3.731625 9 60.000000 15.580078
c9.loc601 3.73630 3.74510 3.740700 9 60.000000 12.574294
c9.loc602 3.83860 3.84520 3.841900 9 60.000000 8.769974
c9.loc603 4.09325 4.10480 4.099025 9 60.000000 27.464858
c9.loc65 4.10535 4.11030 4.107825 9 65.000000 14.311054 

VIII. Circular genome-metabolome plot

mQTL.NMR package provides a functionality to visualize the obtained mQTL mapping results. The user can start rst by visualizing the plot of the whole results of mQTL mapping. For optimal visualization, the user can then plot the results for one or several chromosomes.
> circle_mQTL(results, T=8)

Figure2

IX. Structural assignment and metabolite identification

mQTL-NMR package provides several visualization tools to help the user in peak annotation and metabolite identification. In particular, users can visualize identified SRV clusters on the chemical shift axe and automatically generates a plot showing the top ranked SRV cluster in the association study in order to identify the corresponding metabolite.

1. Plot a region of NMR profile

> simple.plot(file=”ur.alig.txt”,lo=3.02,hi=3.08,k=1:168,title=”NMR profile”)

Figure3

2. Visualization of clusters

Displays the NMR profile with the clusters identified by SRV defined by horizontal lines on the profile (green=min cluster border, red=max cluster border)

>SRV.plot(file1=”ur.alig.txt”,file2=”rectangle_SRV.PPM”,lo=3.02,hi=3.08,k=1:168,title=”Clusters”)

Figure4

3. Top SRV cluster

Generates the plot of SRV cluster corresponding to the top association score with the two right and left clusters to be used for metabolite identification

>Top_SRV.plot(file1=”ur.alig.txt”,file2=”rectangle_SRV.PPM”,results=results,met=met,intMeth=”mean”)

Figure5

> SRV_lod.plot(results,”rectangle_SRV.PPM”,T=8)> SRV_lod.plot(results,”rectangle_SRV.PPM”,T=8)

Figure6

The manual page on mQTL.NMR has a number of additional examples that show how applicable functions can be used.

If you have any questions, you may want to check our Frequently Asked Questions (FAQ) section.
If you still do not find the answer to your questions, please do not hesitate to contact us directly by mail (l.hedjazi(a)ican-institute.org). Thank you.