GenHap: A novel computational method based on genetic algorithms for haplotype assembly

Andrea Tangherloni, Simone Spolaor, Leonardo Rundo, Marco S. Nobile, Ivan Merelli, Paolo Cazzaniga, Daniela Besozzi, Giancarlo Mauri, Pietro Liò

Abstract

Haplotype assembly is a critical task in genomics, involving the reconstruction of the two distinct copies of an individual's chromosomes from sequencing data. This paper presents GenHap, a novel computational tool that utilizes Genetic Algorithms (GAs) to solve the Weighted Minimum Error Correction (wMEC) problem. By employing a "divide-and-conquer" strategy and parallel processing, GenHap achieves significant performance gains, offering up to a 20x speedup over existing state-of-the-art methods. GenHap maintains high accuracy across various sequencing technologies, particularly demonstrating robustness with the long-read data produced by third-generation sequencing platforms.

Introduction

Humans are diploid organisms, possessing two copies of each chromosome—one inherited from each parent. While modern DNA sequencing identifies genetic variations like Single Nucleotide Polymorphisms (SNPs), it frequently lacks the "phase" information needed to assign these variants to their respective parental chromosomes. Reconstructing these complete haplotypes is vital for applications in drug design, disease susceptibility research, and personalized medicine.

The computational challenge lies in the Weighted Minimum Error Correction (wMEC) problem. The goal is to partition sequencing reads into two sets such that the number of corrections needed to make the reads consistent within each set is minimized. Because wMEC is NP-hard, exact algorithms become computationally prohibitive as sequencing depth and read lengths increase. GenHap addresses this by providing a heuristic approach that scales effectively to the massive datasets produced by modern "third-generation" sequencing technologies like PacBio or Oxford Nanopore.

Methods

GenHap models haplotype assembly as an optimization problem solved through a Genetic Algorithm. In this framework, each "individual" in the population is represented as a binary string where each bit corresponds to a sequencing read, assigning it to one of two haplotypes. The fitness function evaluates the number of corrections required for a specific partition, with the goal of minimization. Standard genetic operators, including tournament selection, single-point crossover, and bit-flipping mutations, are used to evolve the population over generations.

A key innovation in GenHap is the "Divide-et-Impera" (Divide and Conquer) strategy. To manage the complexity of large datasets, the algorithm partitions the global fragment matrix into smaller sub-matrices consisting of blocks of $\gamma$ reads. Each block is optimized independently, and the results are subsequently merged. This modular approach, combined with a Master-Slave parallel architecture implemented via MPI (Message Passing Interface), allows GenHap to distribute the workload across multiple CPU cores efficiently.

Evaluation and Datasets

The performance of GenHap was evaluated using both synthetic and real-world datasets:

  • Synthetic Data: Generated using the GemSIM toolbox to mimic Roche/454 (shorter, accurate reads) and PacBio RS II (longer, noisier reads) technologies at various coverage levels (30x and 60x).
  • Real Data: High-coverage PacBio long-read data from human chromosome 22, provided by the Genome in a Bottle (GIAB) consortium (individual NA12878).

Key Results

GenHap demonstrated superior performance in terms of both speed and accuracy:

  • Speed: GenHap achieved up to a 4x speedup on Roche/454 data and a 20x speedup on PacBio datasets compared to the state-of-the-art tool HapCol.
  • Accuracy: The Haplotype Error (HE) rate remained consistently low, often falling below 1% for synthetic data.
  • High Coverage Handling: While many existing tools are limited to 30x coverage, GenHap successfully processed 60x coverage data. Increased data depth actually improved assembly accuracy without a prohibitive increase in runtime.
  • Real-World Performance: On the GIAB NA12878 dataset, GenHap phased chromosome 22 in approximately 10 minutes, achieving 87% agreement with benchmark solutions without requiring aggressive data down-sampling.

Conclusion and Future Work

GenHap offers a scalable and accurate heuristic for haplotype assembly, particularly suited for the noisy, long-read data of modern sequencing. By prioritizing heuristic efficiency over exactness, it avoids the exponential complexity explosion that plagues other tools. While it does not guarantee global optimality, its practical performance is highly effective for biological applications. Future work will explore extending GenHap to polyploid organisms and incorporating additional genomic features, such as DNA methylation patterns, into the optimization process.

Summary updated

Abstract

The process of inferring a full haplotype of a cell is known as haplotyping, which consists in assigning all heterozygous Single Nucleotide Polymorphisms (SNPs) to exactly one of the two chromosomes. In this work, we propose a novel computational method for haplotype assembly based on Genetic Algorithms (GAs), named GenHap. Our approach could efficiently solve large instances of the weighted Minimum Error Correction (wMEC) problem, yielding optimal solutions by means of a global search process. wMEC consists in computing the two haplotypes that partition the sequencing reads into two unambiguous sets with the least number of corrections to the SNP values. Since wMEC was proven to be an NP-hard problem, we tackle this problem exploiting GAs, a population-based optimization strategy that mimics Darwinian processes. In GAs, a population composed of randomly generated individuals undergoes a selection mechanism and is modified by genetic operators. Based on a quality measure (i.e., the fitness value), inspired by Darwin’s “survival of the fittest” laws, each individual is involved in a selection process. Our preliminary experimental results show that GenHap is able to achieve correct solutions in short running times. Moreover, this approach can be used to compute haplotypes in organisms with different ploidity. The proposed evolutionary technique has the advantage that it could be formulated and extended using a multi-objective fitness function taking into account additional insights, such as the methylation patterns of the different chromosomes or the gene proximity in maps achieved through Chromosome Conformation Capture (3C) experiments.
BibTeX
@article{tangherloni2019genhap,
  author = {Andrea Tangherloni and Simone Spolaor and Leonardo Rundo and Marco S. Nobile and Ivan Merelli and Paolo Cazzaniga and Daniela Besozzi and Giancarlo Mauri and Pietro Liò},
  title = {{GenHap: A novel computational method based on genetic algorithms for haplotype assembly}},
  journal = {BMC Bioinformatics},
  year = {2019},
  doi = {10.1186/s12859-019-2691-y},
}
Figure