Identifying all snarls and superbubbles in linear-time, via a unified SPQR-tree framework

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Sena, Francisco, Politov, Aleksandr, Moumard, Corentin, Cáceres, Manuel, Schmidt, Sebastian, Harviainen, Juha, Tomescu, Alexandru I.
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912732207382528
author Sena, Francisco
Politov, Aleksandr
Moumard, Corentin
Cáceres, Manuel
Schmidt, Sebastian
Harviainen, Juha
Tomescu, Alexandru I.
author_facet Sena, Francisco
Politov, Aleksandr
Moumard, Corentin
Cáceres, Manuel
Schmidt, Sebastian
Harviainen, Juha
Tomescu, Alexandru I.
contents Snarls and superbubbles are fundamental pangenome decompositions capturing variant sites. These bubble-like structures underpin key tasks in computational pangenomics, including structural-variant genotyping, distance indexing, haplotype sampling, and variant annotation. Snarls can be quadratically-many in the size of the graph, and since their introduction in 2018 with the vg toolkit, there has been no work on identifying all snarls in linear time. Moreover, while it is known how to find superbubbles in linear time, this result is a highly specialized solution only achieved after a long series of papers. We present the first algorithm identifying all snarls in linear time. This is based on a new representation of all snarls, of size linear in the input graph size, and which can be computed in linear time. Our algorithm is based on a unified framework that also provides a new linear-time algorithm for finding superbubbles. An observation behind our results is that all such structures are separated from the rest of the graph by two vertices (except for cases which are trivially computable), i.e. their endpoints are a 2-separator of the underlying undirected graph. Based on this, we employ the well-known SPQR tree decomposition, which encodes all 2-separators, to guide a traversal that finds the bubble-like structures efficiently. We implemented our algorithms in C++ (available at https://github.com/algbio/BubbleFinder) and evaluated them on various pangenomic datasets. Our algorithms outcompete or they are on the same level of existing methods. For snarls, we are up to two times faster than vg, while identifying all snarls. When computing superbubbles, we are up to 50 times faster than BubbleGun. Our SPQR tree framework provides a unifying perspective on bubble-like structures in pangenomics, together with a template for finding other bubble-like structures efficiently.
format Preprint
id arxiv_https___arxiv_org_abs_2511_21919
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Identifying all snarls and superbubbles in linear-time, via a unified SPQR-tree framework
Sena, Francisco
Politov, Aleksandr
Moumard, Corentin
Cáceres, Manuel
Schmidt, Sebastian
Harviainen, Juha
Tomescu, Alexandru I.
Data Structures and Algorithms
Discrete Mathematics
Quantitative Methods
Snarls and superbubbles are fundamental pangenome decompositions capturing variant sites. These bubble-like structures underpin key tasks in computational pangenomics, including structural-variant genotyping, distance indexing, haplotype sampling, and variant annotation. Snarls can be quadratically-many in the size of the graph, and since their introduction in 2018 with the vg toolkit, there has been no work on identifying all snarls in linear time. Moreover, while it is known how to find superbubbles in linear time, this result is a highly specialized solution only achieved after a long series of papers. We present the first algorithm identifying all snarls in linear time. This is based on a new representation of all snarls, of size linear in the input graph size, and which can be computed in linear time. Our algorithm is based on a unified framework that also provides a new linear-time algorithm for finding superbubbles. An observation behind our results is that all such structures are separated from the rest of the graph by two vertices (except for cases which are trivially computable), i.e. their endpoints are a 2-separator of the underlying undirected graph. Based on this, we employ the well-known SPQR tree decomposition, which encodes all 2-separators, to guide a traversal that finds the bubble-like structures efficiently. We implemented our algorithms in C++ (available at https://github.com/algbio/BubbleFinder) and evaluated them on various pangenomic datasets. Our algorithms outcompete or they are on the same level of existing methods. For snarls, we are up to two times faster than vg, while identifying all snarls. When computing superbubbles, we are up to 50 times faster than BubbleGun. Our SPQR tree framework provides a unifying perspective on bubble-like structures in pangenomics, together with a template for finding other bubble-like structures efficiently.
title Identifying all snarls and superbubbles in linear-time, via a unified SPQR-tree framework
topic Data Structures and Algorithms
Discrete Mathematics
Quantitative Methods
url https://arxiv.org/abs/2511.21919