Repository navigation
Preserve bounded BAM stream errors without pipe seek failures - #111
Merged
Merged
Conversation
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.
A Sid ONT partner-query timeout interrupted a buffered BAM header. Pysam then raised an unraisable
Illegal seekerror while destroying its partially constructed AlignmentFile on the pipe. An offline producer that flushes a partial BGZF header and stalls reproduces the same cleanup failure.Read the forward-only BAM framing through Python's gzip reader and copy original header/record blocks to a local BGZF file. This avoids constructing AlignmentFile on a pipe and preserves stored SEQ, QUAL, CIGAR, tag widths and float payloads. Keep the process deadline, overflow cap, stderr, and kill/reap cleanup; truncated streams and nonzero producers still fail without publishing a partial derivative. Version: 0.15.4.
Validation: ruff and all 412 tests passed. New regressions exercise large headers, mid-header timeouts with no unraisable cleanup error, exact record multiplicities after success, overflow, truncated compressed/record blocks, nonzero exit with stderr, and successful acquisition after failure. This fixes the secondary cleanup exception; it does not claim to fix slow remote queries.
Fixes #106. Related: openvax/isovar#436.