Skip to content
Philipp Rescheneder edited this page Jun 28, 2017 · 92 revisions

What is NextGenMap?

NextGenMap is a flexible highly sensitive short read mapping tool that handles much higher mismatch rates than comparable algorithms while still outperforming them in terms of runtime. This allows analysing large scale datasets even with increased SNP rates or higher error rates (e.g. caused by specialized experimental protocols) and avoids biases caused by highly variable regions in the genome.

Quick start

Install using conda:
Install Miniconda (python 3.5 recommended) and set up channels (only required once):

conda config --add channels conda-forge
conda config --add channels defaults
conda config --add channels r
conda config --add channels bioconda

Install NextGenMap:
conda install nextgenmap
If you do not want to use conda, build NextGenMap from source or use the docker image (see below).

Single-end mapping using four CPU threads and SAM as output format:

ngm -q reads.fastq -r reference-sequence.fa -o results.sam -t 4

Single-end mapping using four CPU threads and the GPU for alignment computation:

ngm -q reads.fastq -r reference-sequence.fa -o results.sam -t 4 -g

Paired-end mapping using four CPU threads:

ngm -r reference-sequence.fa -1 forward_reads.fq -2 reverse_reads.fq -o results.sam -t 4

Paired-end mapping using four CPU threads for the candidate search and the GPU for alignment computation:

ngm -r reference-sequence.fa -1 forward_reads.fq -2 reverse_reads.fq -o results.sam -t 4 -g

Index the genome only:

ngm -r reference-sequence.fa

Download

Current release: see here
Older releases: see here

Building NextGenMap from source?

Building NextGenMap on Linux and Mac OSX

see Installation

Running NextGenMap on Windows 10 (bash subsystem)

With the newest update for Windows 10 (anniversary update), Microsoft added the Ubuntu subsystem to Windows.
To run NextGenMap on Windows 10, install all updates (including the anniversary update) start “bash” and follow the Installation instruction for Linux.

Running NextGenMap with Docker

If you have docker installed on your system you can run NextGenMap using the following command. Installing NextGenMap is not necessary in this case!

wget http://www.cibiv.at/~philipp_/files/ngm-testseq.tgz
tar xvzf ngm-testseq.tgz
docker run -m 8g -v $(pwd):/data -ti philres/nextgenmap ngm -r /data/dh10b_ecoli.fasta -1 /data/dh10b_ecoli.fasta_1.fastq -2 /data/dh10b_ecoli.fasta_2.fastq -o /data/dh10b_ecoli.fasta_mapped_ngm.sam

Please note, that docker support is still experimental. If you notice any problems, please let us know!

How to use NextGenMap?

see here for the documentation and FAQ for frequently asked questions.

Please cite

Fritz J. Sedlazeck, Philipp Rescheneder, and Arndt von Haeseler NextGenMap: fast and accurate read mapping in highly polymorphic genomes. Bioinformatics (2013) 29 (21): 2790-2791 first published online August 23, 2013 doi:10.1093/bioinformatics/btt468

Changelog:

see here for recent releases or here for older releases

Hardware & Software requirements

CPU: SSE enabled 64 bit dual-core (quad-core or more recommended)
RAM: 8 GB for human (4 GB for genomes < 500 MBp)
GPU (optional): CUDA (Nvidia) or ATI Stream Technology (ATI) enabled
OS: Linux, Mac OSX (experimental) or Docker (supports all OS)
Software: cmake

Known issues

  • The length of a line in a input FASTA file must not exceed 4096 bp.
  • Using BAM as output (-b) can slow down mapping.
    Workarround: Use SAM output and pipe it directly to samtools. ngm -r ref.fa -q reads.fq | samtools view -Sb – > output.bam

Solved:

  • NextGenMap falsely interprets negative values on the command line as parameters. e.g. “—score-mismatch -1” will cause an “Argument missing for parameter” error.
    Workarround: create a config file (e.g. config.txt) add “score_mismatch = -1” and call NextGenMap with -c config.txt
  • Error message “error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory” when running NextGenMap
    This can be fixed by changing the permissions of the opencl/lib folder: chmod a+rx ngm-0.4.6/opencl/lib/
  • NextGenMap doesn’t work with AMD-APP-SDK v2.7. Please use v2.8 instead. AMD APP SDK installation is now done automatically when building NextGenMap
  • The error message “FATAL: Module fglrx not found.” can be ignored. It will be removed in one of the next AMD APP SDK releases (http://devgurus.amd.com/message/1286600) NextGenMap now uses APP SDK 2.8.1

This documentation is still in an early stage. If you have any problems/questions/comments please don’t hesitate to contact fritz.sedlazeck@univie.ac.at or philipp.rescheneder@univie.ac.at!