Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moved load_model to allow stream processing #203

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jamestwebber
Copy link
Member

This PR closes #199 (I hope). As described in the issue, various longbow commands were failing when reading from stdin. This PR changes load_model() to expect an open pysam.AlignmentFile rather than a stream or filename, and moves the call inside the with statement where the file is being read (which is almost always what happens immediately after loading a model from a BAM file).

This should be okay to do, as the model is stored in the header if at all, and so load_model will only consume the first piece of the stream and none of the reads.

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.

pysam output issue
1 participant