Skip to content

Rank traversal bugfixes#4831

Merged
faithokamoto merged 9 commits intomasterfrom
rank-traversals
Feb 17, 2026
Merged

Rank traversal bugfixes#4831
faithokamoto merged 9 commits intomasterfrom
rank-traversals

Conversation

@faithokamoto
Copy link
Contributor

@faithokamoto faithokamoto commented Feb 13, 2026

Changelog Entry

To be copied to the draft changelog by merger:

  • Better distance indexing in complex DAG snarls. Distance indexes should be re-made.

Description

Three bugfixes, which were found in decreasing order of complexity. These all affect the traversal which assigns ranks to children of snarls.

  1. Actually implement a proper DAG traversal algorithm, as was written in comments, by adding tips into the list of sources that should be traversed from.
  2. Fix the tip-finding algorithm to properly handle chains which function as tips. In particular, use the correct chain bound node, and its corresponding orientation, when checking for edges incident to a chain side. The previous algorithm checked both orientations from the chain start node, instead of checking from start/end.
  3. Shift raw indexes for all_children into ranks, by subtracting two, before checking whether that rank has already been visited. This was done everywhere except one spot.

I also slightly modified the way we stored tips and bumped the distance index version vgteam/libbdsg#238 with the latter being because we really want people to re-index to get better distances. Old indexes are technically compatible but will get worse chaining mode alignments.

@faithokamoto
Copy link
Contributor Author

bugfix no 3 doesn't have a test because it turns out to be difficult to configure a situation where the initially-assigned ranks (arbitrary order in the children vector) have exactly the relationship needed.

@faithokamoto
Copy link
Contributor Author

Results came back; slight speed drop and slight increase in accuracy. About 0.5% of reads which used to be mapping incorrectly will now map correctly.

@faithokamoto faithokamoto merged commit 3a8c99d into master Feb 17, 2026
2 checks passed
@faithokamoto faithokamoto deleted the rank-traversals branch February 17, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments