Important changes in version 1.3.1
- Major bug fix in reading missing genotypes in VCF/BCF files. This bug affected variants with a DS field in their genotype's FORMAT and have a missing genotype (DS field is .) in one of the samples, in which case genotypes for all the samples are set to missing, effectively removing this variant from the analyses. Affected modes: cis, correct, gwas, pca, rep, trans, rtc-union. IT'S HIGHLY RECOMMENDED THAT YOU CHECK IF YOU ARE AFFECTED BY THIS, AND UPDATE TO THE LATEST VERSION IF YOU WANT TO FIX THE ISSUE.
- Multiple new modes are officially released and documentation is made available, most importantly you can now run allele specific allele (ASE) analysis.
- We now provide the R-squared in mode cis, and an option to print out the standard error.
- Multiple bug fixes in the pca mode regarding ploidy, and we remove the MT, X, and Y chromosomes by default.
- All documentation is updated.
- Changes to some option defaults.
- Minor bug fixes and spelling corrections.
- We will only release the source code from this version onwards.
Important changes in version 1.2
For best performance it is highly recommended that you compile from source rather than using the precompiled binaries.
The quan mode in version 1.2 and above is not compatible with the quantifications generated by the previous versions. This due to bug fixes and slight adjustments to the way we quantify. DO NOT MIX QUANTIFICATIONS GENERATED BY EARLIER VERSIONS OF QTLTOOLS WITH QUANTIFICATIONS FROM VERSION 1.2 AND ABOVE AS THIS WILL CREATE A BIAS IN YOUR DATASET.
The Eigen library is upgraded to version 3.3.7. We have observed that this results in the principal components produced by the pca mode to be ever so slightly different from the previous versions. This could also impact any analysis where the --cov option is used, however in our internal testing we have not encountered this issue. Thus for ongoing analyses it is recommended that you do not upgrade your QTLtools version.
Testing if QTLtools runs on your machine
To test if QTLtools can run on your plateform, run:
QTLtools --help
If it does not complain for missing libraries, you're good to go. Otherwise, first check your glibc version by running:
locate libc.so.6
This is going to tell you where is the library. Assuming it is in /lib/x86_64-linux-gnu/, then check glibc version by running:
/lib/x86_64-linux-gnu/libc.so.6
...which gives:
GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6.9) stable release version 2.19, by Roland McGrath et al.
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
...
Given this, you can then choose the appropriate binary by picking up one based on an older or identical glibc version. If your version of glibc is older than 2.12, it is very likely that you need to recompile QTLtools following the instructions below:
Compiling QTLtools
Please also see Compilation examples
If the provided binaries do not directly work, QTLtools needs to be re-compiled on your platform. For this, you may need to install few standard libraries required by QTLtools if you do not have them already installed. To do so, you need to update the path of the required libraries in the Makefile.
Prerequisites
The development versions of following libraries are required to compile QTLtools (you will also need the static versions of these libraries if you want to create a statically linked binary):
- zlib
- bzip2
- lzma
- curl
- gsl
- boost
- Rmath
- HTSlib
0. C++ compiler
Please make sure that the version of your g++ is above 4.6. To check this, use:
g++ --version
1. The GNU Scientific Library
This library is usually installed by default on most linux platforms, otherwise instructions to install it can be found here. This librry does not need any modification of the Makefile since it is dynamically linked.
2. The Boost C++ library
This collection of C++ libraries is also usually installed by default on most computers. Detailed instructions to install it can be found here. Once installed, you need to edit the Makefile and set the two following variables BOOST_INC and BOOST_LIB correctly.
First, find the file program_options.hpp where you installed the Boost libraries. For this, you can use the find command. Assuming that it is located here: /usr/include/boost/program_options.hpp, you can then set BOOST_INC in the Makefile as follows:
BOOST_INC=/sur/include
Here, do not forget to remove boost/program_options.hpp from the full path.
Then, look for the file libboost_program_options.a. If it is located here: /usr/lib/x86_64-linux-gnu/, set BOOST_LIB as follows:
BOOST_LIB=/usr/lib/x86_64-linux-gnu
3. The standalone Rmath library
This library provided by R contains all basic functions to simulate from standard probability distributions (ex: qnorm, pnorm, rnorm, etc ...). Instructions to install it can be found here. A pre-compiled version can be directly obtained by installing the package r-mathlib on Debian/Ubuntu or libRmath-dev on Fedora/RedHat. Otherwise, proceed as follows:
First download the R source code from here.
Then, move the tgz in the folder where you want to install the library (e.g. $(HOME)/Libraries), and run the following commands:
tar xzvf R-3.2.2.tar.gz
cd R-3.2.2/
./configure
cd src/nmath/standalone/
make
This generates a library file libRmath.a. If the file is located here: /home/me/Libraries/R-3.2.2/src/nmath/standalone/, then set up RMATH_INC and RMATH_LIB as follows:
RMATH_INC=/home/me/Libraries/R-3.2.2/src/include
RMATH_LIB=/home/me/Libraries/R-3.2.2/src/nmath/standalone
4. The HTSlib library
This library written in C allows reading and parsing efficiently VCF, BCF, BAM and BED file. This is used by widely used tools such as samtools or bcftools for example. Download the library from here. Then, move the tgz in the folder you want to install the library and run the following commands:
tar xjvf htslib-1.3.1.tar.bz2
cd htslib-1.3.1/
./configure
make
If you are using HTSlib version 1.4 or above make sure you have the zlib, bzip2, lzma libraries, omit the configuration step (./configure) and type make directly. This will avoid linking in the curl library. Alternatively you can modify the makefile to include this library.
This generates a library file libhts.a. If the file is located here: /home/olivier/Libraries/htslib-1.3.1/, then set up HTSLD_INC and HTSLD_LIB as follows:
HTSLD_INC=/home/olivier/Libraries/htslib-1.3.1
HTSLD_LIB=/home/olivier/Libraries/htslib-1.3.1
5. Compile QTLtools
Once the variables BOOST_INC, BOOST_LIB, RMATH_INC, RMATH_LIB, HTSLD_INC, HTSLD_LIB correctly set up, you should have something like this:
########################################################
# YOU NEED TO UPDATE THESE 6 PATHS TO COMPILE QTLTOOLS #
########################################################
BOOST_INC=/usr/include
BOOST_LIB=/usr/lib/x86_64-linux-gnu
RMATH_INC=/home/me/Libraries/R-3.2.2/src/include
RMATH_LIB=/home/me/Libraries/R-3.2.2/src/nmath/standalone
HTSLD_INC=/home/olivier/Libraries/htslib-1.3.1
HTSLD_LIB=/home/olivier/Libraries/htslib-1.3.1
Then, you can proceed with the compilation using:
make
This will generate the binary ./bin/QTLtools. And you're ready to go!
If you have root privileges, you can install QTLtools with:
make install
This will install the binary, man pages, scripts, and the bash autocomplete script.
If you do not have root privileges, then you can append ./bin/ to your $PATH and ./man/ to your $MANPATH variables.