polyploid-haplotype-assembly-eval
pHapCompass: Probabilistic Assembly and Uncertainty Quantification of Polyploid Haplotype Phase — Hosseini et al. (2025) (arXiv:2512.04393, 2025)
What this evaluates
Evaluates the accuracy and continuity of polyploid haplotype assembly methods by measuring switch errors and read-haplotype conflicts, while also quantifying phasing uncertainty across varying ploidies, coverages, and genomic structures.
Datasets
Metrics
Generalized Vector Error Rate (VER) (primary) — range: [0, 1]
- VER(H, H*) = VE(H, H*) / L, where VE is the minimum number of haplotype-matching switches over L SNPs across all valid bijections between predicted and true haplotypes. Includes penalties for genotype mismatches and additional phased blocks.
Block-adjusted Minimum Error Correction (MEC) — range: [0, 1]
- MEC(R, H*) = (1/|R|) * sum_r min_k d(r, h_k*[r]) + penalties for reads spanning multiple blocks. Measures the proportion of alleles flipped to perfectly match reconstructed haplotypes, adjusted for fragmented assemblies.
Input / output format
Input: Aligned sequencing reads (BAM/VCF or Hap10 fragment files) with base qualities, covering heterozygous SNPs in diploid or polyploid genomes.
Output: Reconstructed haplotype sequences represented as phased allele blocks, and optionally a distribution of phasings via forward-filtering backward-sampling (FFBS) for uncertainty quantification.
Scoring recipe
def compute_ver(true_haps, pred_haps, L):
ve = min_over_bijections(sum(phi[l](k) != phi[l-1](k) for l in range(2, L+1)))
return ve / L
def compute_mec(reads, pred_haps, K):
total_flips = 0.0
total_alleles = 0
for r in reads:
total_alleles += len(r)
min_dist = min(hamming(r, pred_haps[k][r.snps]) for k in range(1, K+1))
total_flips += min_dist
if r.num_blocks > 1:
total_flips += (r.num_blocks - 1) * (1 - 1/K)
return total_flips / total_alleles
Common pitfalls
- Standard MEC and VER assume contiguous, fully phased diploid genomes; polyploid assemblers output fragmented blocks and may phase fewer than K haplotypes, requiring the paper's block-adjusted and genotype-penalized extensions.
- Computing VER requires solving a K! permutation matching problem at each SNP, which is often approximated or ignored in standard tools, leading to underestimation of switch errors.
- Uncertainty quantification via FFBS sampling plateaus at larger SNP distances because Hamming distance is undefined for unassembled SNPs, not due to model failure.
Evidence (verbatim from paper)
To facilitate a fair comparison across both deterministic and probabilistic assemblers, we extend the commonly used evaluation metrics of minimum error correction (MEC) and vector error rate (VER) to accommodate the complexity associated with partially phased haplotype blocks and assembly uncertainty.
Citation
@misc{hosseini2025phapcompass,
title={pHapCompass: Probabilistic Assembly and Uncertainty Quantification of Polyploid Haplotype Phase},
author={Hosseini et al. (2025)},
year={2025},
note={arXiv:2512.04393}
}
1---2name: polyploid-haplotype-assembly-eval3description: Evaluates the accuracy and continuity of polyploid haplotype assembly methods by measuring switch errors and read-haplotype conflicts, while also quantifying phasing uncertainty across varying ploidies, coverages, and genomic structures. Use when the user wants to benchmark on Synthetic Polyploid Genomes (S. tuberosum), Experimental Octoploid Strawberry (F. x ananassa), or asks about evaluating this task. Reports Generalized Vector Error Rate (VER).4metadata:5 source: https://skillmd.com/skills/qhjqhj00/polyploid-haplotype-assembly-eval6 skill_kind: dataset_eval7 source_arxiv: 2512.043938 bibtex_key: hosseini2025phapcompass9 confidence: high10---1112# polyploid-haplotype-assembly-eval1314> pHapCompass: Probabilistic Assembly and Uncertainty Quantification of Polyploid Haplotype Phase — Hosseini et al. (2025) (arXiv:2512.04393, 2025)1516## What this evaluates1718Evaluates the accuracy and continuity of polyploid haplotype assembly methods by measuring switch errors and read-haplotype conflicts, while also quantifying phasing uncertainty across varying ploidies, coverages, and genomic structures.1920## Datasets2122- **Synthetic Polyploid Genomes (S. tuberosum)** — total 3120; splits: test (-1); repo https://github.com/bayesomicslab/pHapCompass23- **Experimental Octoploid Strawberry (F. x ananassa)** — total ?; splits: test (-1); repo https://github.com/bayesomicslab/pHapCompass2425## Metrics2627- `Generalized Vector Error Rate (VER)` **(primary)** — range: [0, 1]28 - VER(H, H*) = VE(H, H*) / L, where VE is the minimum number of haplotype-matching switches over L SNPs across all valid bijections between predicted and true haplotypes. Includes penalties for genotype mismatches and additional phased blocks.29- `Block-adjusted Minimum Error Correction (MEC)` — range: [0, 1]30 - MEC(R, H*) = (1/|R|) * sum_r min_k d(r, h_k*[r]) + penalties for reads spanning multiple blocks. Measures the proportion of alleles flipped to perfectly match reconstructed haplotypes, adjusted for fragmented assemblies.3132## Input / output format3334**Input**: Aligned sequencing reads (BAM/VCF or Hap10 fragment files) with base qualities, covering heterozygous SNPs in diploid or polyploid genomes.3536**Output**: Reconstructed haplotype sequences represented as phased allele blocks, and optionally a distribution of phasings via forward-filtering backward-sampling (FFBS) for uncertainty quantification.3738## Scoring recipe3940```python41def compute_ver(true_haps, pred_haps, L):42 ve = min_over_bijections(sum(phi[l](k) != phi[l-1](k) for l in range(2, L+1)))43 return ve / L4445def compute_mec(reads, pred_haps, K):46 total_flips = 0.047 total_alleles = 048 for r in reads:49 total_alleles += len(r)50 min_dist = min(hamming(r, pred_haps[k][r.snps]) for k in range(1, K+1))51 total_flips += min_dist52 if r.num_blocks > 1:53 total_flips += (r.num_blocks - 1) * (1 - 1/K)54 return total_flips / total_alleles55```5657## Common pitfalls5859- Standard MEC and VER assume contiguous, fully phased diploid genomes; polyploid assemblers output fragmented blocks and may phase fewer than K haplotypes, requiring the paper's block-adjusted and genotype-penalized extensions.60- Computing VER requires solving a K! permutation matching problem at each SNP, which is often approximated or ignored in standard tools, leading to underestimation of switch errors.61- Uncertainty quantification via FFBS sampling plateaus at larger SNP distances because Hamming distance is undefined for unassembled SNPs, not due to model failure.6263## Evidence (verbatim from paper)6465> To facilitate a fair comparison across both deterministic and probabilistic assemblers, we extend the commonly used evaluation metrics of minimum error correction (MEC) and vector error rate (VER) to accommodate the complexity associated with partially phased haplotype blocks and assembly uncertainty.6667## Citation6869```bibtex70@misc{hosseini2025phapcompass,71 title={pHapCompass: Probabilistic Assembly and Uncertainty Quantification of Polyploid Haplotype Phase},72 author={Hosseini et al. (2025)},73 year={2025},74 note={arXiv:2512.04393}75}76```7778- arXiv: 2512.04393