Skip to content
Philipp Rescheneder edited this page Mar 29, 2017 · 35 revisions

In order to build NextGenMap only cMake (>=2.8) and g++ are required. Typically these tools should be already available on your computer. If not, please install them.

For example on Ubuntu use:

sudo apt-get install cmake
sudo apt-get install build-essential

To build NextGenMap type:

wget https://github.com/Cibiv/NextGenMap/archive/v0.5.2.tar.gz -O NextGenMap-0.5.2.tar.gz
tar xzvf NextGenMap-0.5.2.tar.gz
cd NextGenMap-0.5.2/
mkdir -p build/
cd build/
cmake ..
make

cd ../bin/ngm*
./ngm

Please note that NextGenMap doesn’t follow the typical make/make install approach. Instead running make creates a directory called ngm-0.×.x in the bin folder that contains all files required to run NextGenMap. To use NextGenMap add this folder to your PATH environment variable. If you want to move NextGenMap to a different location please move the whole folder!

To test NextGenMap try:

wget http://www.cibiv.at/~philipp_/files/ngm-testseq.tgz
tar xvzf ngm-testseq.tgz
./ngm -r dh10b_ecoli.fasta -1 dh10b_ecoli.fasta_1.fastq -2  dh10b_ecoli.fasta_2.fastq -o test.sam
#For NextGenMap 0.4.4 or lower
./ngm-utils interleave -1 dh10b_ecoli.fasta_1.fastq -2 dh10b_ecoli.fasta_2.fastq -o dh10b_ecoli.fasta_all.fastq
./ngm -r dh10b_ecoli.fasta -q dh10b_ecoli.fasta_all.fastq -o test.sam -p
#For NextGenMap 0.4.5 and higher
./ngm -r dh10b_ecoli.fasta -1 dh10b_ecoli.fasta_1.fastq -2  dh10b_ecoli.fasta_2.fastq -o test.sam

The last line of the NextGenMap output should look like this:

[MAIN] Done (2000 reads mapped (100.00%), 0 reads not mapped, 2000 reads written)(elapsed: 3.327003s)

Important
In order to set the necessary environment variables, NextGenMap uses a wrapper script (ngm) to call the actual program (ngm-core). Due to this it is currently not supported to use more than one soft link on ngm.

For example:

ln -s /home/xxx/NextGenMap/bin/ngm-0.4.6/ngm /usr/bin/ngm-0.4.6
ngm-0.4.6

will work, but

ln -s /home/xxx/NextGenMap/bin/ngm-0.4.6/ngm /usr/bin/ngm-0.4.6
ln -s /usr/bin/ngm-0.4.6 /usr/bin/ngm
ngm

won’t work!

Using Nvidia GPUs

If you wan’t to use a Nvidia GPU to speedup the mapping, please install the most recent Nvidia driver for your GPU. Please note, that it is not necessary anymore to install the CUDA (SDK).

Since Nvidia changed the names of the OpenCL libraries recently please execute the following command after installing the driver:

cp /etc/OpenCL/vendors/nvidia.icd <ngm source directory>/bin/ngm-<ngm version number>/opencl/vendor/nvidia.icd 

To tell NextGenMap to use the GPU use the -g parameter.

NextGenMap 0.4.4 was tested on openSUSE 11.4/12.2 (x86_64) with GCC 4.3.4/4.7.1 and on Ubuntu 12.04/12.10 (x86_64) with GCC 4.4.3/4.6.3

Building ngm-0.4.3 or lower

Required software for building MASon:
build-essentials (gcc, …)
cmake
zlib (Ubuntu: zlib1g-dev)
AMD-APP SDK (required for mapping on the CPU or on ATI GPUs)
cudatoolkit (required for mapping on Nvidia GPUs)

Build NGM:

wget https://github.com/Cibiv/NextGenMap/tarball/master -O NGM.tar.gz
tar xvfz NGM.tar.gz
cd Cibiv-NextGenMap*
mkdir -p build/release
cd build/release/
cmake -DCMAKE_BUILD_TYPE=Release ../..
make

cd ../../bin
./NGM

For BAM support Bamtools (http://sourceforge.net/projects/bamtools/) is required.
If the bamtools or the OpenCL includes/libs are not installed in the default directories (e.g. /user/lib) please add:

-DCMAKE_PREFIX_PATH="<path to bamtools folder>[;<path to opencl>]"

to the camke command.

Example:

cmake ../../ -DCMAKE_PREFIX_PATH="/software/ngm/src/bamtools/;/home/CIBIV/philipp_/AMD-APP-SDK/" -DCMAKE_BUILD_TYPE=Release

NGM was tested on openSUSE 11.4 (x86_64) with GCC 4.3.4. and on Ubuntu 12.04 (x86_64) with GCC 4.6.3

Clone this wiki locally