Skip to content

[Tracking] BT2 full-descent port: path to 100% MAPQ parity #1

Description

@k1sauce

Goal

Achieve 100% MAPQ agreement with BT2 on the chr22 synthetic validation corpus. Stretch goal: same on real-data (NA12878 mitochondrial).

Current state

  • Synthetic chr22 MAPQ: 93.9% (baseline) / 94.2% (--seed-hit-cap 1000 -D 1000) / 94.1% (--joint-descent).
  • Real-data MAPQ: 96.8%.
  • Two BT2 precision bugs already fixed: score_min C-style truncation, mapq bin thresholds f32→f64 cast.
  • Joint-descent infrastructure in place behind --joint-descent flag.

Root-cause analysis (Phase 0, #2 — closed ✓)

The remaining ~6% gap is BT2's default-mode paired-descent traversal-order short-circuit: `bestUnchosenCScore` comes from the pair BT2 happens to emit during a tightly truncated descent (mean pool size ~1.2 entries), not the cartesian-second-best. Our pool keeps 30+ entries with a different specific secbest. Capping our pool to size 2 doesn't fix it — top-2-by-score picks the wrong entry.

Full writeup in `rusttie.md` (Phase 0 section).

Plan

Checkpoints

  • After Phase 0: Smoking gun found ✓ → continue with Phase 1.
  • After Phase 1: Single-end metrics unchanged → continue or debug.
  • After Phase 2: MAPQ moves to 97%+ → continue or accept new ceiling.

Honest unknowns

  1. Phase 0 might fail → resolved, root cause confirmed.
  2. The 6% gap might be a combination, not GroupWalk alone — each phase might only close a fraction.
  3. BT2 is GPL-3; this must be clean-room reimplementation, not copy.
  4. Real-data might not converge even if chr22 does — different read characteristics.

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