Add IO helper for processing multiple alignments in a group #92
Open
gaoj66-roche wants to merge 4 commits into
Open
Add IO helper for processing multiple alignments in a group #92gaoj66-roche wants to merge 4 commits into
gaoj66-roche wants to merge 4 commits into
Conversation
Add grouped_unpaired_for_each_parallel and gaf_grouped_unpaired_for_each_parallel, which keep each read's alignments (a primary and its secondaries, grouped by read name) together in one call while still processing distinct groups in parallel. Batches are cut only at group boundaries: a batch keeps accepting reads until it holds at least batch_size reads and the next read starts a new group. This never splits a group across worker threads, at the cost of occasionally exceeding batch_size. Used by vg surject secondary promotion. Co-authored-by: Ona <no-reply@ona.com>
…econdary promotion was dropped vg surject's GAF+--promote-secondary path was removed because GAF carries no is_secondary flag and cannot distinguish primary from secondary alignments. gaf_grouped_unpaired_for_each_parallel was added solely to support that path so it is removed here. gaf_paired_interleaved_for_each is retained as it predates the secondary promotion work and is unrelated to it. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
gaoj66-roche
marked this pull request as ready for review
July 22, 2026 05:51
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.
This PR adds a helper
grouped_unpaired_for_each_parallelfor processing groups of alignments in parallel. This is introduced to support the secondary promotion feature (vgteam/vg#4973) where primary and secondary alignments need to be processed as a group.