Add SPQR metadata and binary indexing - #7
Draft
CMoumard wants to merge 24 commits into
Draft
Conversation
added 13 commits
July 4, 2026 22:48
CMoumard
force-pushed
the
spqri-index
branch
4 times, most recently
from
July 24, 2026 14:54
c57700e to
481e0e0
Compare
CMoumard
force-pushed
the
spqri-index
branch
8 times, most recently
from
July 25, 2026 20:24
8d3d1cc to
856e7c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BubbleFinder already writes the
.spqrv0.4 format described in theSPQR tree file format specification.
Until now, it was mainly an output file. The SPQR decomposition was there, but
some details needed to safely use it again for bubble computation were lost.
This adds two BubbleFinder extension lines to the text format:
X GRAPH_PROFILE ...records which graph representation was used beforebuilding the decomposition. A raw graph, a subdivided graph and an oriented
doubled graph cannot be interpreted in the same way when loaded back.
X BF_EDGE_TYPE ...keeps the+or-type at both ends of a real edge.This information cannot always be recovered from the SPQR tree alone.
The regular v0.4 records are still written in the same way. These extra lines
are here so a
.spqrcan be loaded again without guessing how its graph wasbuilt.
For large files, reading the text and rebuilding all the lookup tables still
takes time.
.spqriis the binary indexed form added for this case. It storesthe decomposition in flat, typed sections, together with the indexes needed
to use it directly in RAM. Graph topology, node names and haplotype paths can
also be kept when they are available. Sections can be compressed separately
and read in parallel.
This stays structural data. A
.spqrifile does not contain snarls,superbubbles, ultrabubbles or any other computed result.
The index is optional. BubbleFinder can build one from a
.spqr, write onedirectly while computing the SPQR tree, or keep using the normal graph and
.spqrpaths without an index.