Skip to content

Phase 3 — Edge cases: tighten mode + gapped fallback parity + real-data validation #5

Description

@k1sauce

Part of #1. Depends on #4.

Scope

After Phase 2 brings chr22 MAPQ to 97%+, close the remaining gap by porting BT2's score-tightening and verifying the gapped-fallback path matches BT2's behavior in default mode.

Deliverables

Score tightening

BT2 default mode does NOT use tightening (`tighten > 0` is gated on `-M` mode which is off by default). But there are subtle score interactions:

  • Audit BT2's `extendSeedsPaired` for any score-threshold updates that fire in default mode (not just M-mode).
  • Specifically check `ominsc_cur` recomputation at `aligner_sw_driver.cpp:2173-2205` and confirm whether it ever fires when `tighten == 0`.

Gapped fallback parity

  • Our `paired_descent.rs` has a Phase-2 gapped fallback that fires when ungapped finds nothing for both mates. Verify BT2's gapped path fires under the same condition.
  • Verify gapped extension score formula matches BT2's exactly.

Real-data validation

  • Run `scripts/real_data_validate.sh` post-Phase-2.
  • Compare to current 96.8% baseline.
  • If real-data MAPQ <99%, investigate (different read characteristics: longer reads, quality variation, indels).

Exit criterion

  • chr22 MAPQ → 99%+ at hi-cap.
  • Real-data MAPQ → 99%+, or documented why it can't reach.

Risks

  • Real-data has indel-heavy reads that exercise gapped extension more than the synthetic. The synthetic-fitted descent may not transfer cleanly.
  • BT2's actual default mode might have undocumented behaviors we discover here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions