A fast and memory-efficient method for haplotype assembly from long gapless reads, like those produced by SMRT sequencing technologies (PacBio RS II) and Oxford Nanopore flow cell technologies (MinION).
HapCol implements a fixed-parameter algorithm for the k-constrained Minimum Error Correction problem (k-cMEC), a variant of the well-known MEC problem where the maximum number of corrections per column is bounded by an integer k. HapCol, while is as accurate as other exact state-of-the-art combinatorial approaches, is significantly faster and more memory-efficient than them. Moreover, HapCol is able to process datasets composed of both long reads (over 100 000bp long) and coverages up to 25x on standard workstations/small servers, whereas the other approaches cannot handle long reads or coverages greater than 20x.
The detailed description of the algorithm, along with an experimental comparison with other state-of-the-art haplotype assembly tools, is presented in:
Yuri Pirola, Simone Zaccaria, Riccardo Dondi, Gunnar W. Klau, Nadia Pisanti, and Paola Bonizzoni
HapCol: Accurate and Memory-efficient Haplotype Assembly from Long Reads.
HapCol is distributed only on source form. It has been developed and tested on Ubuntu Linux but should work on (or should be easily ported to) on MacOS X.
The latest stable version of HapCol can be downloaded from GitHub in either .tar.gz or in .zip format. Previous stable releases can be downloaded from https://github.com/algolab/hapcol/releases.
HapCol depends on:
- CMake (>= 2.8)
- GNU make
- Boost program_options (tested with 1.48, previous versions should work)
We suggest to build HapCol out-of-tree with the following commands:
mkdir -p build cd build cmake ../src make
The resulting file
hapcol is the standalone executable program.
The execution of HapCol requires to specify at least two parameters:
-i), which specifies the file containing the reads in input (in WIF format);
-o), which specifies the file for the computed haplotypes.
Optional parameters are:
-e), for specifying the estimated sequencing error rate of the input reads;
-a), for specifying the significance level (lower levels require more computational resources but increase the probability of finding a feasible solution);
-u), for discarding weights while computing the optimal solution (notice that accuracy of the reconstructed haplotypes may decrease);
-x), do not mask ambiguous positions in the output haplotypes with a
-U), do not split the input into independent blocks and consider the input as a unique block (notice that by default the input is split into independent blocks and, in correspondence to these, brackets are added to the output).
-A), for solving the input instance under the traditional all-heterozygous assumption.
For example, HapCol can be executed on the sample data included with the program
with the following command (given from the directory
./hapcol -i ../docs/sample.wif -o haplotypes.txt
which should save a solution of cost 62 in the weighted case (or cost 7 in
the unweighted case, if flag
-u is added) in file
HapCol is licensed under the terms of the GNU GPL v2.0
For questions or support, please contact email@example.com or firstname.lastname@example.org