Bug-fixes and performance improvements for short-read Giraffe's supplementary identification algorithm - #5002
Merged
eizengaj-roche merged 3 commits intoAug 12, 2026
Conversation
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.
Changelog Entry
To be copied to the draft changelog by merger:
vg giraffe --supplementaryis stable on paired-end readsDescription
This PR corrects a handful of bugs in the Giraffe supplementary alignment algorithm that escaped the unit tests and integration tests. Two of them are fairly serious indexing bugs, which could lead to crashes when running on paired end data. The others were type mismatches that led to some of the constraints on supplementary identification becoming silently inactive.
In the process of re-tuning the algorithm after correcting these bugs, I learned that one of these constraints (relative score) was largely ineffective at distinguishing true from false supplementary alignments. It was a condition I had borrowed from BWA without too much evaluation. This is constraint is now inactive by default.
I also took the opportunity to improve the sensitivity of the supplementary algorithm in finding real genome rearrangements, based on some recent observations I've made in real sequencing data. Previously, I required the collection of supplementary alignments to more-or-less fully partition the read in order to be considered valid. This turned out to be a bad criterion, because many molecular mechanisms of rearrangement (e.g. NHEJ, TMEJ, MMBIR, FoSTeS) also introduce inserted sequence between the two breakpoints. This sequence is sometimes truly random, and sometimes it is templated but too short to reasonably map and identify as a third supplementary segment. Accordingly, the alignments can actually be significantly separated on the read. To fix this shortcoming, I disaggregated the parameter that previously determined limits on overlap, separation, and completeness, so that now each of these features is handled by a separate parameter. The parameter that sets limits on separation is set to be intentionally lax compared to the others.
In my hands, the run time impacts of these changes are undetectable.