Home


Q-nexus: Installation of preprocessing tools

Q-nexus comprises two applications designed to preprocess ChIP-nexus FASTQ and alignment (BAM) files prior to peak calling with the Q application (using a special flag for ChIP-exo and ChIP-nexus data). This installation guide covers the installation of the preprocessing applications, flexbar and nexbar. This installation guide is subdivided into the following sections:


Installation for Linux

Precompiled binary

We provide precompiled binaries for Linux x86_64. The main Q application as well as flexcat and nexcat can be downloaded as a part of the Q github repository. Clone this repository in order to download all the files (cd to the directory into which you would like to download Q and enter the following command):

git clone https://github.com/charite/Q.git
You will now find executable (binary) files for the applications Q, flexcat, and nexcat as well as a python script that can be used to carry out the entire process of preprocessing, alignment, and PCR duplicate removal at once. Users can use an aligner of their choice. In order to use the script (which uses bowtie and samtools), it is necessary to install Bowtie, Samtools and Python. If you are using Ubuntu, this can be done using the following command

sudo apt-get install samtools bowtie python

Open your hidden personal configuration file using a text editor of your choice (for example gedit or kate).

gedit ~/.profile

Add the following line to your profile:

export PATH=$PATH:$HOME/Q/bin

For the first time you have to reload your profile using:

source ~/.profile

Try the following commands (which will display help messages) to test the installation.

Q --help
flexcat --help
nexcat --help
Q/scripts/preprocess.py --help

Compile Q from source

Preliminaries

Q is written in C++ and makes use of several external libraries. Q uses SeqAn for BAM file I/O, and the SeqAn library is provided together with the Q source code and does not need to be installed separated. The zlib, bz2, and gomp libraries are needed for operating with the (compressed) BAM files and for multiprocessor support. Here, the dev versions of the libraries should be installed (which are guaranteed to have the header files needed for compilation). In addition, the boost library is used by Q for certain statistical calculations.

On Ubuntu/Debian install all required packages using the following command line:

sudo apt-get install zlib1g-dev libbz2-dev libboost-dev libgomp1

On other linux distrubtions, install the libraries using the command appropriate to your system. We have tested Q using the following compiler and library versions.

Installation

Change into the cloned Q directory and use the following command to check if your system has the required libraries and to create a Makefile:

./configure

Assuming no error messages are produce, Q can now be compiled. There are two ways of doing so. You can install the executable in a system wide directory (if you have write permissions, e.g., because you are root):

make; make install

Alternatively, to install Q in another directory, use the following to create the Makefile:

./configure --prefix=/path/to/my/directory

Entering make;make install will now install Q into /path/to/my/directory/bin/Q.

The above will compile a version of Q will all of the library code included as well as debugging symbols. To create a release target, you can use the following command:

make install-strip

In order to make the compile binary available on the command line you will have to adjust your $PATH variable (see section for the precompiled binary).

Compile preprocessing tools from source

The following section describes how to compile the preprocessing tools from source. It has been tested on Ubuntu 14.04.

Install G++ 5.1 or newer

sudo apt-get install g++-5

Install Cmake 3.2 or newer

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake

Install Boost

sudo apt-get install libboost-all-dev

Clone the source code from the github repository if not done already:

git clone https://github.com/charite/Q.git

Change in to the Q source directory:

cd Q/src
git clone https://github.com/seqan/seqan.git seqan2
cd seqan2
git checkout seqan-v2.0.1

Change into the preprocessing directory and execute the build script

cd ../preprocessing
./build_linux_release.sh

Install UCSC's converter tools

Q generates BedGraph files for the fragment coverage profiles on the fly. This section describes the installation of several UCSC executables that will be needed (See the tutorial for details). Sometimes the BigWig format is more suitable and we will implement the generation of BigWig files in near future. By then two tools from the UCSC command line utilities are needed for the conversion from BedGraph to BigWig format. For downloading change to the bin directory within your home directory and enter the following command lines.

wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/fetchChromSizes
wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/bedGraphToBigWig

Now you have to make the utilities executable using the following command:

chmod u+x fetchChromSizes bedGraphToBigWig

If you have added /home/bin to your $PATH variable, the utilities should now be available.