Skip to content

Add IO helper for processing multiple alignments in a group #92

Open
gaoj66-roche wants to merge 4 commits into
vgteam:support-load-onlyfrom
gaoj66-roche:promote-secondary
Open

Add IO helper for processing multiple alignments in a group #92
gaoj66-roche wants to merge 4 commits into
vgteam:support-load-onlyfrom
gaoj66-roche:promote-secondary

Conversation

@gaoj66-roche

Copy link
Copy Markdown

This PR adds a helper grouped_unpaired_for_each_parallel for 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.

gaoj66-roche and others added 2 commits July 15, 2026 21:46
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
gaoj66-roche marked this pull request as ready for review July 22, 2026 05:51
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.

1 participant