1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
from __future__ import absolute_import
from pysam.libchtslib cimport bam1_t, bam_endpos
from pysam.libcsamfile cimport aux_type2size
from pysam.libcalignedsegment cimport AlignedSegment
import pysam
cpdef build_read():
cdef AlignedSegment read = pysam.AlignedSegment()
read.query_name = "hello"
read.query_sequence = "ACGT"
read.reference_start = 10
read.cigarstring = "4M"
# Test calling htslib function
cdef bam1_t *calign = read._delegate
print(bam_endpos(calign))
# Test calling pysam htslib_util function
print(aux_type2size(12))
return read
|