I have the following code, where I want to type a:
for a in samfile: flag = a.flag is_reverse = flag & 0x10 ....
It should have the type AlignedSegment from https://github.com/pysam-developers/pysam/blob/master/pysam/libcalignedsegment.pxd because that seems to be the type of a:
In : a Out: <pysam.libcalignedsegment.AlignedSegment at 0x7f7fc5e53588>
When I use
from pysam.libcalignedsegment cimport AlignedSegment
I get the error
read_bam.cpp:618:28: fatal error: htslib/kstring.h: No such file or directory compilation terminated.
I understand this means that it cannot find htslib when compiling. However pysam works so I guess it is me just cimporting pysam in the wrong way.
To be clear, I want to type a so I get no overhead:
cdef AlignedSegment a
What do I import?