Skip to content

Fix OutputFileWriter crash when produce_fastq=false and only BAM outp…#268

Merged
joshfactorial merged 1 commit into
developfrom
fix/bam-only-output
Apr 27, 2026
Merged

Fix OutputFileWriter crash when produce_fastq=false and only BAM outp…#268
joshfactorial merged 1 commit into
developfrom
fix/bam-only-output

Conversation

@joshfactorial
Copy link
Copy Markdown
Collaborator

…ut requested

The no-files guard in OutputFileWriter.init was raising ValueError whenever file_handles was empty, but in BAM-only mode the top-level OFW intentionally has no open file handle (pysam manages the merged BAM directly). Guard now exempts the case where a BAM output path is set.

Adds unit tests for BAM-only and VCF-only OFW construction, and integration tests for all three produce_fastq=false output combinations through the full runner, which would have caught this regression.

…ut requested

The no-files guard in OutputFileWriter.__init__ was raising ValueError whenever
file_handles was empty, but in BAM-only mode the top-level OFW intentionally has
no open file handle (pysam manages the merged BAM directly). Guard now exempts
the case where a BAM output path is set.

Adds unit tests for BAM-only and VCF-only OFW construction, and integration
tests for all three produce_fastq=false output combinations through the full
runner, which would have caught this regression.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@joshfactorial
Copy link
Copy Markdown
Collaborator Author

Found a small bug during integration tests. Fixed and tests written by Claude to help prevent this kind of error.

@joshfactorial joshfactorial merged commit cce0e82 into develop Apr 27, 2026
1 check passed
@joshfactorial joshfactorial deleted the fix/bam-only-output branch April 27, 2026 04:45
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