Repository navigation
Fix reference bases for zero-depth output positions - #112
Merged
sstadick merged 1 commit intoOct 31, 2026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #111 so this PR shows only the zero-depth fix. Merge #111 first, then retarget this PR to master if GitHub has not done so automatically.
Populate REF_BASE after assembling all output positions, including uncovered bases added by --keep-zeros. This fixes inconsistent TSV column counts when a reference is supplied and handles entirely uncovered contigs as well as leading, internal, and trailing gaps.
The annotation step uses the original zero-based reference coordinate regardless of the selected output coordinate mode. Each region retrieves its reference sequence once.
Validation
AI disclosure
Implemented with Amp. Draft for human review.