Skip to content

Fix reference bases for zero-depth output on master - #113

Merged
sstadick merged 1 commit into
masterfrom
fix/zero-depth-reference-bases-master
Oct 31, 2026
Merged

sstadick merged 1 commit into
masterfrom
fix/zero-depth-reference-bases-master

Conversation

@sstadick

Copy link
Copy Markdown
Owner

Summary

Land the zero-depth reference-base fix from #112 on master. That PR was merged into the stacked perf/reuse-indexed-readers branch rather than master; #111 is already on master.

  • Annotate reference bases after assembling output, including uncovered positions and entirely uncovered contigs.
  • Preserve consistent TSV columns with base-depth -r REF --keep-zeros and correct reference indexing in both coordinate modes.
  • Include the missing Unreleased changelog entry.

Validation

  • Re-ran all 8 reference_bases_in_output cases: BAM/CRAM × zero/one-based coordinates × keep/omit zeros; all passed.
  • cargo fmt --check and git diff --check passed.
  • Prior before/after benchmarking of this source change found no regression across 12 synthetic CLI workloads: no-reference medians within 2%; reference-enabled cases 5.5–42.6% faster; peak memory medians within 1%. Measurements were local macOS/Apple M3, not production-scale or Linux results.

Implemented with Amp; human review required.

Fill reference bases after assembling all output positions so --keep-zeros emits consistent TSV columns, including on entirely uncovered contigs.

Exercise serialized BAM and CRAM output in both coordinate modes, with and without zero retention. The keep-zeros cases reproduce the CSV error before this fix and pass afterward.

Implemented with Amp; pending human review.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18c50-92d6-73c8-af62-326ba8f97fd3
Co-authored-by: Amp <amp@ampcode.com>
@sstadick
sstadick merged commit 8a69393 into master Oct 31, 2026
1 check passed
@sstadick
sstadick deleted the fix/zero-depth-reference-bases-master branch October 31, 2026 09:52
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