Hub labeling makes exact distance calculation practical for large human pangenome graphs

Pangenome graphs are now a standard reference representation, and tools built on them depend on fast minimum-distance queries between graph positions, for example, when clustering seed matches during read alignment. The baseline distance index, previously used by the vg toolkit, answers such queries based on a decomposition of the graph into nested subgraphs called "snarls". Within each snarl, the index uses a dense all-pairs distance matrix. Because such a matrix is quadratic in a snarl's number of children, the large, complex snarls that often occur in many pangenome graphs dominate the overall index size. This means whole-genome graphs can be impractical to index. To mitigate this, the baseline distance index does not fully index the largest snarls, and thus cannot itself answer certain queries involving them. We replace the dense matrix with a hub labeling for snarls above a size limit. Because hub labeling and associated methods are defined for directed graphs, we introduce a directed representation of a snarl's bidirected internal "net graph", whose shortest path lengths are the net graph's minimum walk lengths. Hub labels are built using pruned landmark labeling, ordered by a contraction hierarchy. On four human chromosome pangenomes, our hub-labeling-based distance index indexes every snarl in 0.9 GB to 3.0 GB at a snarl limit of 500, an estimated 28× to 119× less space than dense distance matrices would need for those snarls with more than 500 children, and supports the 3–18.6% of node-to-node queries that the previous index cannot answer by itself. On the queries both indexes can answer, query time distributions broadly overlap. We explore the snarl limit parameter space and are able to build indexes under 50 GB for four human whole-genome pangenomes in under 6 hours, where we estimate dense matrices could have required multiple terabytes.

Authors

Institutions

Publication Details

Journal
bioRxiv (Cold Spring Harbor Laboratory)
Published
2026-11-06
DOI
https://doi.org/10.64898/2026.11.05.764665
Primary Topic
Algorithms and Data Compression
Type
preprint

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Hub labeling makes exact distance calculation practical for large human pangenome graphs

Benedict Paten, Zia Truong, Adam Novak
6 links
bioRxiv (Cold Spring Harbor Laboratory)
Algorithms and Data Compression
preprint

Hub labeling makes exact distance calculation practical for large human pangenome graphs

Benedict Paten, Zia Truong, Adam Novak
preprint en

Abstract

Pangenome graphs are now a standard reference representation, and tools built on them depend on fast minimum-distance queries between graph positions, for example, when clustering seed matches during read alignment. The baseline distance index, previously used by the vg toolkit, answers such queries based on a decomposition of the graph into nested subgraphs called "snarls". Within each snarl, the index uses a dense all-pairs distance matrix. Because such a matrix is quadratic in a snarl's number of children, the large, complex snarls that often occur in many pangenome graphs dominate the overall index size. This means whole-genome graphs can be impractical to index. To mitigate this, the baseline distance index does not fully index the largest snarls, and thus cannot itself answer certain queries involving them. We replace the dense matrix with a hub labeling for snarls above a size limit. Because hub labeling and associated methods are defined for directed graphs, we introduce a directed representation of a snarl's bidirected internal "net graph", whose shortest path lengths are the net graph's minimum walk lengths. Hub labels are built using pruned landmark labeling, ordered by a contraction hierarchy. On four human chromosome pangenomes, our hub-labeling-based distance index indexes every snarl in 0.9 GB to 3.0 GB at a snarl limit of 500, an estimated 28× to 119× less space than dense distance matrices would need for those snarls with more than 500 children, and supports the 3–18.6% of node-to-node queries that the previous index cannot answer by itself. On the queries both indexes can answer, query time distributions broadly overlap. We explore the snarl limit parameter space and are able to build indexes under 50 GB for four human whole-genome pangenomes in under 6 hours, where we estimate dense matrices could have required multiple terabytes.

bioRxiv (Cold Spring Harbor Laboratory)
University of California, Santa Cruz (US)
National Institutes of Health
Algorithms and Data Compression
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Hub labeling makes exact distance calculation practical for large human pangenome graphs — Benedict Paten, Zia Truong, et al. · bioRxiv (Cold Spring Harbor Laboratory) (2026) | TGRS Research Map | TGRS