WhatsHap: fast and accurate read-based phasing
Marcel MartiniD, Murray PattersoniD, Shilpa GargiD, Sarah O. Fischer, Nadia PisantiiD, Gunnar W. KlauiD, Alexander SchönhuthiD, Tobias MarschalliD
Abstract
Read-based phasing allows to reconstruct the haplotypes of a sample purely from sequencing reads. While phasing is an important step for answering questions about population genetics, compound heterozygosity, and to aid in clinical decision making, there has been a lack of accurate, usable and standards-based software.\n\nWhatsHap is a production-ready tool for highly accurate read-based phasing. It was designed from the beginning to leverage third-generation sequencing technologies, whose long reads can span many variants and are therefore ideal for phasing. WhatsHap works also well with second-generation data, is easy to use and will phase not only SNVs, but also indels and other variants. It is unique in its ability to combine read-based with pedigree-based phasing, allowing to further improve accuracy if multiple related samples are provided.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 454
- Organism
- Assay
- Research Focus
- Approach
In-depth summary
Claude Opus 5.5 · xhigh effort · 17 Oct 2026 · from the full text of version 2 (14 Nov 2016) · CC BY 4.0
Re-aligning reads to both alleles gives WhatsHap the lowest PacBio switch error rates (full coverage: 0.24% real, 0.02% simulated) and better indel phasing than hapCUT and phASER.
Read-based phasing software was mostly proof-of-principle code with non-standard formats, and GATK ReadBackedPhasing, one of the few VCF-native options, is unpublished and no longer maintained. WhatsHap pairs an exact fixed-parameter tractable solver for weighted minimum error correction with VCF/BAM input and output, allele re-alignment that also handles indels, and joint read-based and pedigree phasing, which the authors say no other tool offers.
Key results
ShownOn SNVs, WhatsHap with re-alignment had the lowest switch error rate of all evaluated tools at every coverage, on both real and simulated PacBio data.
Full coverage, real chromosome 1 data (60.2×): 0.24% vs 0.48% for WhatsHap without re-alignment; phASER did not finish within 24 hours (trend near 0.5%). Simulated: 0.02% (eight switch errors) vs 0.3% without re-alignment. Comparators were ReadBackedPhasing, hapCUT and phASER. · 3.4 Results on SNVs only; 3.1 Experimental setup
ShownRe-aligning each read locally against both the reference and the alternative allele, instead of trusting the aligner, drives most of the accuracy gain and outweighs differences between phasing algorithms.
At 10× coverage, re-alignment cut the switch error rate from 1.1% to 0.1% in simulation and from 1.8% to 0.3% on real data, with phasing completeness virtually unchanged. · 3.4 Results on SNVs only; 2.1 Detecting alleles in reads
ShownFor indels and other non-SNVs, WhatsHap phased more variants than hapCUT and phASER and incurred far fewer additional switch errors per additionally phased variant.
Switch error rate over additionally phased variants at full coverage: 3.8% (simulated) and 8.3% (real) for WhatsHap vs over 20% for hapCUT and phASER at any coverage; WhatsHap phased 97% of non-SNVs in both datasets, the others at most 90%. · 3.5 Results on non-SNVs
ShownWhatsHap's haplotype blocks come close to the theoretical maximum connectivity, whereas ReadBackedPhasing's apparently higher completeness comes from joining variants that no read connects.
Phase connection ratio compared with the read-connectivity optimum: ReadBackedPhasing exceeded the optimum from 3× coverage upward, which the authors confirmed by inspecting its blocks in IGV. · 3.4 Results on SNVs only; 3.3 Measuring performance
ShownRuntime was competitive: WhatsHap or hapCUT was the fastest tool at every coverage, with WhatsHap ahead at low coverage and hapCUT at high coverage.
Measured on simulated data with SNVs only so that all tools could run; hapCUT timings include its pre-processing step. The authors report that I/O rather than the phasing algorithm dominates runtime. Timing values are in a figure or table not reproduced here. · 3.6 Runtime; 3.2 Tools; 4 Discussion and conclusions
Methods, data and reproducibility
WhatsHap solves weighted minimum error correction (wMEC) exactly with a dynamic program that is fixed-parameter tractable in read coverage, after re-aligning a ±10 bp read window to the reference and alternative alleles and greedily selecting informative reads (15× by default); a PedMEC mode adds pedigree constraints. It was benchmarked against ReadBackedPhasing, hapCUT and phASER.
- GIAB Ashkenazim child NA24385, chromosome 1: PacBio reads (60.2× mean coverage) with NIST consensus genotypes phased by SHAPEIT as the reference · human · n = 48 023 heterozygous SNVs and 4 265 heterozygous non-SNVs
- Simulated PacBio-like reads (pbsim) for a virtual child recombined in silico from parents NA24143 and NA24149, aligned to GRCh37 · human · n = 45 625 heterozygous variants (42 062 SNVs, 3 563 non-SNVs)
- Coverage series made by randomly downsampling the real and simulated alignments · human · n = 2×, 3×, 4×, 5×, 10× and 15× mean coverage
- 1000 Genomes Project Phase 3 reference panel, used by SHAPEIT · human
- Methods & tools
- WhatsHap, GATK ReadBackedPhasing, hapCUT, phASER, SHAPEIT, pbsim, BWA-MEM, IGV, Cython, PyVCF, pysam, pyfaidx
- Reagents & environment
- WhatsHap 0.12: Python 3 front-end, C++ core, Cython bindings; requires Python 3.3 or later and a C/C++ compiler on Linux or OS X; installable from PyPI or bioconda. Compared: GATK v3.5 ReadBackedPhasing, hapCUT 0.7, phASER 0.8; SHAPEIT v2-r837; BWA-MEM 0.7.12.
- Experimental conditions
- Runtimes compared on simulated SNV-only data (values not in this text); phASER did not finish at full coverage within 24 hours; the authors say I/O dominates WhatsHap's runtime. No hardware is stated.
- Reproducibility gaps
- The paper says WhatsHap is open source (MIT) with a home page, and that all files and instructions to reproduce the results are online, but neither link is in this text.
Limitations (6)
- Real-data accuracy is measured against SHAPEIT statistical phasing, which errs at rare variants, so part of the residual real-data error (a plateau slightly above 0.2%) may belong to the reference. · stated by the authors
- Phasing non-SNVs is much harder: even in simulation, the error rate over additionally phased variants is at least an order of magnitude above the SNV-only switch error rate. · stated by the authors
- Competing tools needed source changes or special parameters for PacBio data; ReadBackedPhasing required a 144-combination parameter search, and phASER was built for RNA-seq, so its results here may not reflect what it achieves on RNA-seq data. · stated by the authors
- Large structural variants cannot be detected by the re-alignment step, and the exact algorithm depends on capping coverage through heuristic read selection. · stated by the authors
- The pedigree mode (trio phasing at 2× matching single-sample accuracy at 15× in some cases) is cited from earlier work and is not benchmarked in this paper. · noted in this summary
- Real-data evaluation covers chromosome 1 of one individual, plus one simulated child, with PacBio reads only; Oxford Nanopore, 10X Genomics and Hi-C inputs are described as supported but are not tested here. · noted in this summary
Who should read:Read this if you phase SNVs and indels from long or mixed-technology reads and want a VCF-native tool, or want evidence on how allele re-alignment affects phasing error.
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Read-Based Phasing of Related Individuals
Shilpa Garg, Marcel Martin, Tobias Marschall·bioRxiv·Jan 18, 2016
- Selecting Reads for Haplotype Assembly
Sarah O. Fischer, Tobias Marschall·bioRxiv·Apr 6, 2016
- Phasing millions of samples achieves near perfect accuracy, enabling parent-of-origin classification of variants
Cole M. Williams, Jared O’Connell, … Amy L. Williams·bioRxiv·May 6, 2024
- An accurate phasing tool via high-quality heterozygous variations
Jun Zhang, Fan Nie, Jianxin Wang·bioRxiv·Dec 23, 2025
- HiPhase: Jointly phasing small and structural variants from HiFi sequencing
James Holt, Christopher T. Saunders, … Michael A. Eberle·bioRxiv·May 3, 2023
- GPhase: Greedy Approach for Accurate Haplotype Inferencing
Kshitij Tayal, Naveen Sivadasan, Rajgopal Srinivasan·bioRxiv·Sep 4, 2016