Ahmed Doghri Logo Image
Ahmed Doghri

pangraphmap

A linear reference loses reads that carry real structural variation. pangraphmap adds the alternate path and maps 25 of 25 reads instead of 6.

pangraphmap reproduced benchmark result

One Reference Cannot Represent Everyone

A read spanning an insertion can be perfectly correct and still look broken against one linear genome. The mapper takes the blame for a reference that never contained the path.

pangraphmap creates a reference haplotype, an alternate structural-variant path, and reads that cross the bubble. Both mappers use the same mismatch rule; only the reference representation changes.

Add The Path, Remove The Bias

The linear mapper searches one string. The graph-aware mapper scores both valid haplotype paths and keeps the best alignment.

It is the smallest useful demonstration of why pangenomes matter: not because graphs are fashionable, but because missing variation turns into missing reads.

The Number

The linear reference maps 6 of 25 reads under the same edit threshold. The pangenome maps all 25, a 76-point gain.

This is a seeded structural-variant simulation, not a replacement for vg or Minigraph-Cactus. The benchmark and test run without third-party dependencies.

Research Basis

Inspired by Nature Genetics' 2025 pangenome graph review. The portfolio number above comes from this repository's own controlled benchmark, not from the paper.

Tools Used

Python
Genomics
Pangenome Graphs
Read Mapping
Structural Variation
unittest
GitHub Actions CI