Part of #1. Depends on #3 (GroupWalk ordering must be in place).
Scope
BT2's `RedundantAlns` (`vendor/bowtie2/aligner_result.cpp:980`) tracks per-cell `(refid, fw, refoff, read_row)` occupancy and rejects new alignments that overlap previously-seen ones. For ungapped same-position alignments this is equivalent to our (ref_id, ref_off, strand) dedup, but for gapped alignments it differentiates much more finely.
Additionally, BT2's `extendSeedsPaired` (`aligner_sw_driver.cpp:1582-2585`) has an outer iteration structure over anchors that interleaves with mate-find in a specific way. Our `align_pair_jointly` is a simplified approximation.
Deliverables
Exit criterion
- chr22 MAPQ at `--joint-descent --seed-hit-cap 1000 -D 1000` jumps to 97%+.
- If it stays at 94%, something else is structural — we re-plan before Phase 3.
Risks
- `RedundantAlns` is per-mate, but in joint-descent we generate pairs. Need to figure out how the per-mate dedup interacts with pair-pool composition (does an excluded mate alignment mean its (mate, partner) pair is also excluded? Yes per BT2 source, but verify).
- BT2's `extendSeedsPaired` interacts with the alignment cache (`AlignmentCacheIface`). We may or may not need to model that.
Files referenced
- `vendor/bowtie2/aligner_result.h:1657` (RedundantAlns class)
- `vendor/bowtie2/aligner_result.cpp:980-1032` (overlap impl)
- `vendor/bowtie2/aligner_sw_driver.cpp:1582-2585` (extendSeedsPaired)
- `crates/rusttie-align/src/paired_descent.rs` (our impl to refactor)
Part of #1. Depends on #3 (GroupWalk ordering must be in place).
Scope
BT2's `RedundantAlns` (`vendor/bowtie2/aligner_result.cpp:980`) tracks per-cell `(refid, fw, refoff, read_row)` occupancy and rejects new alignments that overlap previously-seen ones. For ungapped same-position alignments this is equivalent to our (ref_id, ref_off, strand) dedup, but for gapped alignments it differentiates much more finely.
Additionally, BT2's `extendSeedsPaired` (`aligner_sw_driver.cpp:1582-2585`) has an outer iteration structure over anchors that interleaves with mate-find in a specific way. Our `align_pair_jointly` is a simplified approximation.
Deliverables
Exit criterion
Risks
Files referenced