+ unsigned char * bam_nt16_table
+
+ int pysam_reference2tid( bam_header_t *header, char * s )
+
+ void pysam_set_stderr( FILE * file )
+
+ # return mapped/unmapped reads on tid
+ uint32_t pysam_get_mapped( bam_index_t *idx, int tid )
+ uint32_t pysam_get_unmapped( bam_index_t *idx, int tid )
+
+# uint32_t pysam_glf_depth( glf1_t * g )
+
+# void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c )
+
+# need to declare all C fields and methods here
+cdef class AlignedRead:
+
+ # object that this AlignedRead represents
+ cdef bam1_t * _delegate
+
+cdef class Samfile:
+ cdef char * _filename
+ # pointer to samfile
+ cdef samfile_t * samfile
+ # pointer to index
+ cdef bam_index_t *index
+ # true if file is a bam file
+ cdef int isbam
+ # true if not a file but a stream
+ cdef int isstream
+ # true if file is not on the local filesystem
+ cdef int isremote
+ # current read within iteration
+ cdef bam1_t * b
+ # file opening mode
+ cdef char * mode
+
+ # beginning of read section
+ cdef int64_t start_offset
+
+ cdef bam_header_t * _buildHeader( self, new_header )
+ cdef bam1_t * getCurrent( self )
+ cdef int cnext(self)
+
+ # write an aligned read
+ cpdef int write( self, AlignedRead read )
+
+ cdef char * _getrname( self, int tid )
+
+cdef class IteratorRow:
+ pass
+
+cdef class IteratorRowAll(IteratorRow):
+ cdef bam1_t * b
+ cdef samfile_t * fp
+ # true if samfile belongs to this object
+ cdef int owns_samfile
+
+ cdef bam1_t * getCurrent( self )
+
+ cdef int cnext(self)
+
+