Skip to content

Bug-fixes and performance improvements for short-read Giraffe's supplementary identification algorithm - #5002

Merged
eizengaj-roche merged 3 commits into
vgteam:masterfrom
eizengaj-roche:supplementary-tune-up
Aug 12, 2026
Merged

Bug-fixes and performance improvements for short-read Giraffe's supplementary identification algorithm#5002
eizengaj-roche merged 3 commits into
vgteam:masterfrom
eizengaj-roche:supplementary-tune-up

Conversation

@eizengaj-roche

Copy link
Copy Markdown
Contributor

Changelog Entry

To be copied to the draft changelog by merger:

  • vg giraffe --supplementary is stable on paired-end reads

Description

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.

@eizengaj-roche
eizengaj-roche merged commit 2cbd362 into vgteam:master Aug 12, 2026
2 checks passed
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.

3 participants