jpayne@69: # cython: language_level=3 jpayne@69: from pysam.libcalignmentfile cimport AlignedSegment, AlignmentFile jpayne@69: jpayne@69: ################################################# jpayne@69: # Compatibility Layer for pysam < 0.8 jpayne@69: jpayne@69: # import all declarations from htslib jpayne@69: from pysam.libchtslib cimport * jpayne@69: jpayne@69: cdef class AlignedRead(AlignedSegment): jpayne@69: pass jpayne@69: jpayne@69: cdef class Samfile(AlignmentFile): jpayne@69: pass jpayne@69: jpayne@69: # import the conversion functions jpayne@69: cdef extern from "htslib_util.h": jpayne@69: jpayne@69: # add *nbytes* into the variable length data of *src* at *pos* jpayne@69: bam1_t * pysam_bam_update(bam1_t * b, jpayne@69: size_t nbytes_old, jpayne@69: size_t nbytes_new, jpayne@69: uint8_t * pos) jpayne@69: jpayne@69: # now: static jpayne@69: int aux_type2size(int) jpayne@69: jpayne@69: char * pysam_bam_get_qname(bam1_t * b) jpayne@69: uint32_t * pysam_bam_get_cigar(bam1_t * b) jpayne@69: uint8_t * pysam_bam_get_seq(bam1_t * b) jpayne@69: uint8_t * pysam_bam_get_qual(bam1_t * b) jpayne@69: uint8_t * pysam_bam_get_aux(bam1_t * b) jpayne@69: int pysam_bam_get_l_aux(bam1_t * b) jpayne@69: char pysam_bam_seqi(uint8_t * s, int i) jpayne@69: jpayne@69: uint16_t pysam_get_bin(bam1_t * b) jpayne@69: uint8_t pysam_get_qual(bam1_t * b) jpayne@69: uint8_t pysam_get_l_qname(bam1_t * b) jpayne@69: uint16_t pysam_get_flag(bam1_t * b) jpayne@69: uint32_t pysam_get_n_cigar(bam1_t * b) jpayne@69: void pysam_set_bin(bam1_t * b, uint16_t v) jpayne@69: void pysam_set_qual(bam1_t * b, uint8_t v) jpayne@69: void pysam_set_l_qname(bam1_t * b, uint8_t v) jpayne@69: void pysam_set_flag(bam1_t * b, uint16_t v) jpayne@69: void pysam_set_n_cigar(bam1_t * b, uint32_t v) jpayne@69: void pysam_update_flag(bam1_t * b, uint16_t v, uint16_t flag)