blex-max
unread,Nov 25, 2025, 8:04:45 AMNov 25Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pysam User group
Hello,
I have a program written in C/C++ using htslib that generates bam1_t
objects. I'd like to make a python interface/bindings for that tool, and
rather than reinventing the wheel I'm wondering if I would be able to
access the generated bam1_t objects via pysam, since that is the library
we usually use on the python side. I could manually assemble alignedsegments from the pointer I imagine, or at worst I could write to an in-memory bam file and then read that, but I imagine there must be an more elegant approach to doing so. Could anyone offer guidance? If it's useful I haven't settled on a particular choice of FFI. I usually use SWIG but I imagine for this project I'll opt for something else, maybe ctypes of pybind11
Many thanks,
Alex