You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to know whether pysam is the right tool for what I'd like to do:
tl;dr: I'd like to get an iterator of AlignmedSegments over an in-memory binary stream (no file, not stdio).
I'm streaming CRAM/BCF from an htsget server and wrote a client to lazily consume the binary stream. The client exposes it as a buffered read-only file object (io.RawIOBase) so that we can do:
Now I wanted to make this stream easy to work with from python and thought I could just do pysam.AlignmentFile(stream), but it doesn't work because pysam requires that the input file is on disk, or has a file descriptor.
I found that this line in libcalignmentfile.pyx which indeed states this is not possible.
Is this a missing feature, or just out of scope for pysam (e.g. is there a fundamental reason why it is not possible), or maybe I'm just taking the wrong approach?
Any feedback or suggestions welcome :)
The text was updated successfully, but these errors were encountered:
Hello pysam devs
I would like to know whether pysam is the right tool for what I'd like to do:
tl;dr: I'd like to get an iterator of
AlignmedSegment
s over an in-memory binary stream (no file, not stdio).I'm streaming CRAM/BCF from an htsget server and wrote a client to lazily consume the binary stream. The client exposes it as a buffered read-only file object (io.RawIOBase) so that we can do:
Now I wanted to make this stream easy to work with from python and thought I could just do
pysam.AlignmentFile(stream)
, but it doesn't work because pysam requires that the input file is on disk, or has a file descriptor.I found that this line in libcalignmentfile.pyx which indeed states this is not possible.
Is this a missing feature, or just out of scope for pysam (e.g. is there a fundamental reason why it is not possible), or maybe I'm just taking the wrong approach?
Any feedback or suggestions welcome :)
The text was updated successfully, but these errors were encountered: