Skip to content

Add grouped parallel I/O for graph placements of unpaired reads - #93

Open
Sagorikanag wants to merge 1 commit into
vgteam:masterfrom
Sagorikanag:diploid-map-single-read-io
Open

Add grouped parallel I/O for graph placements of unpaired reads#93
Sagorikanag wants to merge 1 commit into
vgteam:masterfrom
Sagorikanag:diploid-map-single-read-io

Conversation

@Sagorikanag

Copy link
Copy Markdown

Summary

Adds parallel grouped single-read alignment iteration for multiple graph placements sharing the same read name.

This will be needed by vg surject --diploid-map, where the primary and secondary graph placements for a read must be processed together.

Changes

  • Add a generic grouped_for_each_parallel iterator.
  • Add grouped GAM input using ProtobufIterator.
  • Add grouped GAF input by query name.
  • Perform expensive GAF-to-Alignment conversion on worker threads.
  • Return the number of processed read-name groups (runs).

Input requirement

Records belonging to the same read must be consecutive in the input.

@gaoj66-roche

Copy link
Copy Markdown

@adamnovak @Sagorikanag Is this PR ready? Once this is merged I can rebase my PR for rescuing/promoting secondary alignments, although in order to fully support the features introduced in my PR, we also need a grouping iterator for interleaved input.

@adamnovak

Copy link
Copy Markdown
Member

I still have to do a full review, but I think this is on the right track.

The interleaved reads we think won't just automagically work because they're going to have different read names (/1, /2, etc.) and thus different keys, right?

But @Sagorikanag, aren't you already dealing with paired-end data in diploid surjection, using this code? How do you end up keeping the pair partners together through this?

@Sagorikanag

Sagorikanag commented Aug 5, 2026

Copy link
Copy Markdown
Author

Hi @adamnovak @gaoj66-roche
Yes, these wrappers are for non-interleaved reads only, I have the wrappers for the interleaved reads too, just doing some more testing as they interact with the new fragment length distribution learning I've incorporated. Will have a PR for them soon.

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