-/* Generated by Cython 0.18 on Fri Jun 28 06:37:45 2013 */
+/* Generated by Cython 0.18 on Fri Sep 20 00:20:26 2013 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
};
/*--- Type declarations ---*/
-struct __pyx_obj_5pysam_9csamtools_PileupRead;
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr;
struct __pyx_obj_5pysam_9csamtools_IteratorRow;
-struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion;
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr;
-struct __pyx_obj_5pysam_9csamtools_Samfile;
+struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs;
+struct __pyx_obj_5pysam_9csamtools_SNPCall;
+struct __pyx_obj_5pysam_9csamtools_AlignedRead;
+struct __pyx_obj_5pysam_9csamtools_Fastqfile;
+struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection;
+struct __pyx_obj_5pysam_9csamtools_IndexedReads;
+struct __pyx_obj_5pysam_9csamtools_IteratorRowAll;
struct __pyx_obj_5pysam_9csamtools_IteratorColumn;
+struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion;
+struct __pyx_obj_5pysam_9csamtools_Samfile;
+struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr;
struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs;
struct __pyx_obj_5pysam_9csamtools_Fastafile;
+struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr;
struct __pyx_obj_5pysam_9csamtools_PileupProxy;
-struct __pyx_obj_5pysam_9csamtools_IndexedReads;
-struct __pyx_obj_5pysam_9csamtools_IteratorRowAll;
-struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion;
-struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs;
-struct __pyx_obj_5pysam_9csamtools_AlignedRead;
-struct __pyx_obj_5pysam_9csamtools_SNPCall;
-struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection;
+struct __pyx_obj_5pysam_9csamtools_PileupRead;
+struct __pyx_obj_5pysam_9csamtools_FastqProxy;
+struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion;
struct __pyx_t_5pysam_9csamtools___iterdata;
typedef struct __pyx_t_5pysam_9csamtools___iterdata __pyx_t_5pysam_9csamtools___iterdata;
struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData;
struct __pyx_t_5pysam_9csamtools_MateData;
typedef struct __pyx_t_5pysam_9csamtools_MateData __pyx_t_5pysam_9csamtools_MateData;
-/* "pysam/csamtools.pxd":394
+/* "pysam/csamtools.pxd":414
* # Utility types
*
* ctypedef struct __iterdata: # <<<<<<<<<<<<<<
int seq_len;
};
-/* "pysam/csamtools.pxd":523
+/* "pysam/csamtools.pxd":554
* cdef char * getSequence( self )
* cdef setMask( self, mask )
* cdef setupIteratorData( self, # <<<<<<<<<<<<<<
int reopen;
};
-/* "pysam/csamtools.pyx":518
+/* "pysam/csamtools.pyx":644
* counter[0] += 1;
*
* ctypedef struct MateData: # <<<<<<<<<<<<<<
uint32_t flag;
};
-/* "pysam/csamtools.pxd":455
- * cdef int n_pu
+/* "pysam/csamtools.pxd":495
+ * cdef uint32_t _is_tail
+ *
+ * cdef class IteratorRow: # <<<<<<<<<<<<<<
+ * pass
*
- * cdef class PileupRead: # <<<<<<<<<<<<<<
- * cdef AlignedRead _alignment
- * cdef int32_t _qpos
*/
-struct __pyx_obj_5pysam_9csamtools_PileupRead {
+struct __pyx_obj_5pysam_9csamtools_IteratorRow {
PyObject_HEAD
- struct __pyx_obj_5pysam_9csamtools_AlignedRead *_alignment;
- int32_t _qpos;
- int _indel;
- int _level;
- uint32_t _is_del;
- uint32_t _is_head;
- uint32_t _is_tail;
};
-/* "pysam/csamtools.pyx":140
- * cdef char* CODE2CIGAR= "MIDNSHP=X"
- * if IS_PYTHON3:
- * CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) ) # <<<<<<<<<<<<<<
- * else:
- * CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
+/* "pysam/csamtools.pxd":518
+ * cdef int cnext(self)
+ *
+ * cdef class IteratorRowAllRefs(IteratorRow): # <<<<<<<<<<<<<<
+ * cdef Samfile samfile
+ * cdef int tid
*/
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr {
+struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs {
+ struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
+ struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
+ int tid;
+ struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *rowiter;
+};
+
+
+/* "pysam/csamtools.pyx":3467
+ * return retval, out_stderr, out_stdout
+ *
+ * cdef class SNPCall: # <<<<<<<<<<<<<<
+ * '''the results of a SNP call.'''
+ * cdef int _tid
+ */
+struct __pyx_obj_5pysam_9csamtools_SNPCall {
PyObject_HEAD
- PyObject *__pyx_v_x;
- PyObject *__pyx_v_y;
- PyObject *__pyx_t_0;
- PyObject *__pyx_t_1;
- PyObject *(*__pyx_t_2)(PyObject *);
+ int _tid;
+ int _pos;
+ char _reference_base;
+ char _genotype;
+ int _consensus_quality;
+ int _snp_quality;
+ int _rms_mapping_quality;
+ int _coverage;
};
-/* "pysam/csamtools.pxd":464
- * cdef uint32_t _is_tail
+/* "pysam/csamtools.pxd":446
+ * cdef int cnext(self)
*
- * cdef class IteratorRow: # <<<<<<<<<<<<<<
- * pass
+ * cdef class AlignedRead: # <<<<<<<<<<<<<<
*
+ * # object that this AlignedRead represents
*/
-struct __pyx_obj_5pysam_9csamtools_IteratorRow {
+struct __pyx_obj_5pysam_9csamtools_AlignedRead {
PyObject_HEAD
+ bam1_t *_delegate;
};
-/* "pysam/csamtools.pxd":467
- * pass
+/* "pysam/csamtools.pxd":438
+ * cdef kseq_t * _delegate
*
- * cdef class IteratorRowRegion(IteratorRow): # <<<<<<<<<<<<<<
- * cdef bam_iter_t iter # iterator state object
- * cdef bam1_t * b
+ * cdef class Fastqfile: # <<<<<<<<<<<<<<
+ * cdef char * _filename
+ * cdef gzFile fastqfile
*/
-struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion {
+struct __pyx_obj_5pysam_9csamtools_Fastqfile {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_5pysam_9csamtools_Fastqfile *__pyx_vtab;
+ char *_filename;
+ gzFile fastqfile;
+ kseq_t *entry;
+};
+
+
+/* "pysam/csamtools.pxd":523
+ * cdef IteratorRowRegion rowiter
+ *
+ * cdef class IteratorRowSelection(IteratorRow): # <<<<<<<<<<<<<<
+ * cdef bam1_t * b
+ * cdef int current_pos
+ */
+struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection {
struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
- struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion *__pyx_vtab;
- bam_iter_t iter;
+ struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection *__pyx_vtab;
bam1_t *b;
- int retval;
- struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
+ int current_pos;
samfile_t *fp;
+ PyObject *positions;
int owns_samfile;
};
-/* "pysam/csamtools.pyx":142
- * CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
- * else:
- * CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) ) # <<<<<<<<<<<<<<
- * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
+/* "pysam/csamtools.pxd":570
+ * pass
*
+ * cdef class IndexedReads: # <<<<<<<<<<<<<<
+ * cdef Samfile samfile
+ * cdef samfile_t * fp
*/
-struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr {
+struct __pyx_obj_5pysam_9csamtools_IndexedReads {
PyObject_HEAD
- PyObject *__pyx_v_x;
- PyObject *__pyx_v_y;
- PyObject *__pyx_t_0;
- PyObject *__pyx_t_1;
- PyObject *(*__pyx_t_2)(PyObject *);
+ struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
+ samfile_t *fp;
+ PyObject *index;
+ int owns_samfile;
};
-/* "pysam/csamtools.pxd":420
- * cdef bam1_t * _delegate
+/* "pysam/csamtools.pxd":511
+ * cdef int cnext(self)
*
- * cdef class Samfile: # <<<<<<<<<<<<<<
- * cdef char * _filename
- * # pointer to samfile
+ * cdef class IteratorRowAll(IteratorRow): # <<<<<<<<<<<<<<
+ * cdef bam1_t * b
+ * cdef samfile_t * fp
*/
-struct __pyx_obj_5pysam_9csamtools_Samfile {
- PyObject_HEAD
- struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *__pyx_vtab;
- char *_filename;
- samfile_t *samfile;
- bam_index_t *index;
- int isbam;
- int isstream;
- int isremote;
+struct __pyx_obj_5pysam_9csamtools_IteratorRowAll {
+ struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
+ struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll *__pyx_vtab;
bam1_t *b;
- char *mode;
- int64_t start_offset;
+ samfile_t *fp;
+ int owns_samfile;
};
-/* "pysam/csamtools.pxd":504
+/* "pysam/csamtools.pxd":535
* cdef int cnext(self)
*
* cdef class IteratorColumn: # <<<<<<<<<<<<<<
};
-/* "pysam/csamtools.pxd":536
+/* "pysam/csamtools.pxd":562
+ * cdef reset( self, tid, start, end )
+ *
+ * cdef class IteratorColumnRegion(IteratorColumn): # <<<<<<<<<<<<<<
+ * cdef int start
+ * cdef int end
+ */
+struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion {
+ struct __pyx_obj_5pysam_9csamtools_IteratorColumn __pyx_base;
+ int start;
+ int end;
+ int truncate;
+};
+
+
+/* "pysam/csamtools.pxd":451
+ * cdef bam1_t * _delegate
+ *
+ * cdef class Samfile: # <<<<<<<<<<<<<<
+ * cdef char * _filename
+ * # pointer to samfile
+ */
+struct __pyx_obj_5pysam_9csamtools_Samfile {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *__pyx_vtab;
+ char *_filename;
+ samfile_t *samfile;
+ bam_index_t *index;
+ int isbam;
+ int isstream;
+ int isremote;
+ bam1_t *b;
+ char *mode;
+ int64_t start_offset;
+};
+
+
+/* "pysam/csamtools.pyx":142
+ * CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
+ * else:
+ * CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) ) # <<<<<<<<<<<<<<
+ * CIGAR_REGEX = re.compile( "(\d+)([MIDNSHP=X])" )
+ *
+ */
+struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct_1_genexpr {
+ PyObject_HEAD
+ PyObject *__pyx_v_x;
+ PyObject *__pyx_v_y;
+ PyObject *__pyx_t_0;
+ PyObject *__pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pysam/csamtools.pxd":567
* cdef int truncate
*
* cdef class IteratorColumnAllRefs(IteratorColumn): # <<<<<<<<<<<<<<
};
-/* "pysam/csamtools.pxd":408
+/* "pysam/csamtools.pxd":428
* # Note: need to declare all C fields and methods here
* #
* cdef class Fastafile: # <<<<<<<<<<<<<<
};
-/* "pysam/csamtools.pxd":449
+/* "pysam/csamtools.pyx":140
+ * cdef char* CODE2CIGAR= "MIDNSHP=X"
+ * if IS_PYTHON3:
+ * CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) ) # <<<<<<<<<<<<<<
+ * else:
+ * CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
+ */
+struct __pyx_obj_5pysam_9csamtools___pyx_scope_struct__genexpr {
+ PyObject_HEAD
+ PyObject *__pyx_v_x;
+ PyObject *__pyx_v_y;
+ PyObject *__pyx_t_0;
+ PyObject *__pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pysam/csamtools.pxd":480
* cdef char * _getrname( self, int tid )
*
* cdef class PileupProxy: # <<<<<<<<<<<<<<
};
-/* "pysam/csamtools.pxd":539
- * pass
+/* "pysam/csamtools.pxd":486
+ * cdef int n_pu
*
- * cdef class IndexedReads: # <<<<<<<<<<<<<<
- * cdef Samfile samfile
- * cdef samfile_t * fp
+ * cdef class PileupRead: # <<<<<<<<<<<<<<
+ * cdef AlignedRead _alignment
+ * cdef int32_t _qpos
*/
-struct __pyx_obj_5pysam_9csamtools_IndexedReads {
+struct __pyx_obj_5pysam_9csamtools_PileupRead {
PyObject_HEAD
- struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
- samfile_t *fp;
- PyObject *index;
- int owns_samfile;
-};
-
-
-/* "pysam/csamtools.pxd":480
- * cdef int cnext(self)
- *
- * cdef class IteratorRowAll(IteratorRow): # <<<<<<<<<<<<<<
- * cdef bam1_t * b
- * cdef samfile_t * fp
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorRowAll {
- struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
- struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll *__pyx_vtab;
- bam1_t *b;
- samfile_t *fp;
- int owns_samfile;
-};
-
-
-/* "pysam/csamtools.pxd":531
- * cdef reset( self, tid, start, end )
- *
- * cdef class IteratorColumnRegion(IteratorColumn): # <<<<<<<<<<<<<<
- * cdef int start
- * cdef int end
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion {
- struct __pyx_obj_5pysam_9csamtools_IteratorColumn __pyx_base;
- int start;
- int end;
- int truncate;
-};
-
-
-/* "pysam/csamtools.pxd":487
- * cdef int cnext(self)
- *
- * cdef class IteratorRowAllRefs(IteratorRow): # <<<<<<<<<<<<<<
- * cdef Samfile samfile
- * cdef int tid
- */
-struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs {
- struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
- struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
- int tid;
- struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *rowiter;
+ struct __pyx_obj_5pysam_9csamtools_AlignedRead *_alignment;
+ int32_t _qpos;
+ int _indel;
+ int _level;
+ uint32_t _is_del;
+ uint32_t _is_head;
+ uint32_t _is_tail;
};
-/* "pysam/csamtools.pxd":415
+/* "pysam/csamtools.pxd":435
* cdef char * _fetch( self, char * reference, int start, int end, int * length )
*
- * cdef class AlignedRead: # <<<<<<<<<<<<<<
+ * cdef class FastqProxy: # <<<<<<<<<<<<<<
+ * cdef kseq_t * _delegate
*
- * # object that this AlignedRead represents
*/
-struct __pyx_obj_5pysam_9csamtools_AlignedRead {
+struct __pyx_obj_5pysam_9csamtools_FastqProxy {
PyObject_HEAD
- bam1_t *_delegate;
+ kseq_t *_delegate;
};
-/* "pysam/csamtools.pyx":3250
- * return retval, out_stderr, out_stdout
- *
- * cdef class SNPCall: # <<<<<<<<<<<<<<
- * '''the results of a SNP call.'''
- * cdef int _tid
- */
-struct __pyx_obj_5pysam_9csamtools_SNPCall {
- PyObject_HEAD
- int _tid;
- int _pos;
- char _reference_base;
- char _genotype;
- int _consensus_quality;
- int _snp_quality;
- int _rms_mapping_quality;
- int _coverage;
-};
-
-
-/* "pysam/csamtools.pxd":492
- * cdef IteratorRowRegion rowiter
+/* "pysam/csamtools.pxd":498
+ * pass
*
- * cdef class IteratorRowSelection(IteratorRow): # <<<<<<<<<<<<<<
- * cdef bam1_t * b
- * cdef int current_pos
+ * cdef class IteratorRowRegion(IteratorRow): # <<<<<<<<<<<<<<
+ * cdef bam_iter_t iter # iterator state object
+ * cdef bam1_t * b
*/
-struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection {
+struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion {
struct __pyx_obj_5pysam_9csamtools_IteratorRow __pyx_base;
- struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection *__pyx_vtab;
+ struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion *__pyx_vtab;
+ bam_iter_t iter;
bam1_t *b;
- int current_pos;
+ int retval;
+ struct __pyx_obj_5pysam_9csamtools_Samfile *samfile;
samfile_t *fp;
- PyObject *positions;
int owns_samfile;
};
-/* "pysam/csamtools.pyx":545
+/* "pysam/csamtools.pyx":1921
+ * return ret
*
+ * cdef class IteratorColumn: # <<<<<<<<<<<<<<
+ * '''abstract base class for iterators over columns.
*
- * cdef class Samfile: # <<<<<<<<<<<<<<
- * '''*(filename, mode=None, template = None, referencenames = None, referencelengths = None, text = NULL, header = None,
- * add_sq_text = False, check_header = True, check_sq = True )*
*/
-struct __pyx_vtabstruct_5pysam_9csamtools_Samfile {
- bam_header_t *(*_buildHeader)(struct __pyx_obj_5pysam_9csamtools_Samfile *, PyObject *);
- bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_Samfile *);
- int (*cnext)(struct __pyx_obj_5pysam_9csamtools_Samfile *);
- int (*write)(struct __pyx_obj_5pysam_9csamtools_Samfile *, struct __pyx_obj_5pysam_9csamtools_AlignedRead *, int __pyx_skip_dispatch);
- char *(*_getrname)(struct __pyx_obj_5pysam_9csamtools_Samfile *, int);
+struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn {
+ int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *);
+ char *(*getSequence)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *);
+ PyObject *(*setMask)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *);
+ PyObject *(*setupIteratorData)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, int, int, int, struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData *__pyx_optional_args);
+ PyObject *(*reset)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *, PyObject *, PyObject *);
};
-static struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *__pyx_vtabptr_5pysam_9csamtools_Samfile;
+static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn *__pyx_vtabptr_5pysam_9csamtools_IteratorColumn;
-/* "pysam/csamtools.pyx":1545
- * if self.owns_samfile: samclose( self.fp )
- *
- * cdef class IteratorRowAll(IteratorRow): # <<<<<<<<<<<<<<
- * """*(Samfile samfile, int reopen = True)*
+/* "pysam/csamtools.pyx":2083
+ * self.iterdata.seq = NULL
*
+ * cdef class IteratorColumnRegion(IteratorColumn): # <<<<<<<<<<<<<<
+ * '''iterates over a region only.
+ * '''
*/
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll {
- bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *);
- int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *);
+struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion {
+ struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn __pyx_base;
};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll *__pyx_vtabptr_5pysam_9csamtools_IteratorRowAll;
+static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion *__pyx_vtabptr_5pysam_9csamtools_IteratorColumnRegion;
-/* "pysam/csamtools.pyx":1466
+/* "pysam/csamtools.pyx":1597
*
*
* cdef class IteratorRowRegion(IteratorRow): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion *__pyx_vtabptr_5pysam_9csamtools_IteratorRowRegion;
-/* "pysam/csamtools.pyx":1771
- * return ret
+/* "pysam/csamtools.pyx":1792
+ * raise StopIteration
*
- * cdef class IteratorColumn: # <<<<<<<<<<<<<<
- * '''abstract base class for iterators over columns.
+ * cdef class IteratorRowSelection(IteratorRow): # <<<<<<<<<<<<<<
+ * """*(Samfile samfile)*
*
*/
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn {
- int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *);
- char *(*getSequence)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *);
- PyObject *(*setMask)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *);
- PyObject *(*setupIteratorData)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, int, int, int, struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData *__pyx_optional_args);
- PyObject *(*reset)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *, PyObject *, PyObject *);
+struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection {
+ bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *);
+ int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *);
};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn *__pyx_vtabptr_5pysam_9csamtools_IteratorColumn;
+static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection *__pyx_vtabptr_5pysam_9csamtools_IteratorRowSelection;
-/* "pysam/csamtools.pyx":1936
- * self.iterdata.seq = NULL
+/* "pysam/csamtools.pyx":382
+ * ## Public methods
+ * ######################################################################
+ * cdef class Fastafile: # <<<<<<<<<<<<<<
+ * '''*(filename)*
*
- * cdef class IteratorColumnRegion(IteratorColumn): # <<<<<<<<<<<<<<
- * '''iterates over a region only.
- * '''
*/
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion {
- struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumn __pyx_base;
+struct __pyx_vtabstruct_5pysam_9csamtools_Fastafile {
+ char *(*_fetch)(struct __pyx_obj_5pysam_9csamtools_Fastafile *, char *, int, int, int *);
};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion *__pyx_vtabptr_5pysam_9csamtools_IteratorColumnRegion;
+static struct __pyx_vtabstruct_5pysam_9csamtools_Fastafile *__pyx_vtabptr_5pysam_9csamtools_Fastafile;
+
+
+/* "pysam/csamtools.pyx":546
+ * else: return None
+ *
+ * cdef class Fastqfile: # <<<<<<<<<<<<<<
+ * '''*(filename)*
+ *
+ */
+
+struct __pyx_vtabstruct_5pysam_9csamtools_Fastqfile {
+ kseq_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_Fastqfile *);
+ int (*cnext)(struct __pyx_obj_5pysam_9csamtools_Fastqfile *);
+};
+static struct __pyx_vtabstruct_5pysam_9csamtools_Fastqfile *__pyx_vtabptr_5pysam_9csamtools_Fastqfile;
-/* "pysam/csamtools.pyx":1973
+/* "pysam/csamtools.pyx":2120
* self.n_plp )
*
* cdef class IteratorColumnAllRefs(IteratorColumn): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *__pyx_vtabptr_5pysam_9csamtools_IteratorColumnAllRefs;
-/* "pysam/csamtools.pyx":1646
- * raise StopIteration
+/* "pysam/csamtools.pyx":671
*
- * cdef class IteratorRowSelection(IteratorRow): # <<<<<<<<<<<<<<
- * """*(Samfile samfile)*
*
+ * cdef class Samfile: # <<<<<<<<<<<<<<
+ * '''*(filename, mode=None, template = None, referencenames = None, referencelengths = None, text = NULL, header = None,
+ * add_sq_text = False, check_header = True, check_sq = True )*
*/
-struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection {
- bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *);
- int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *);
+struct __pyx_vtabstruct_5pysam_9csamtools_Samfile {
+ bam_header_t *(*_buildHeader)(struct __pyx_obj_5pysam_9csamtools_Samfile *, PyObject *);
+ bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_Samfile *);
+ int (*cnext)(struct __pyx_obj_5pysam_9csamtools_Samfile *);
+ int (*write)(struct __pyx_obj_5pysam_9csamtools_Samfile *, struct __pyx_obj_5pysam_9csamtools_AlignedRead *, int __pyx_skip_dispatch);
+ char *(*_getrname)(struct __pyx_obj_5pysam_9csamtools_Samfile *, int);
};
-static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection *__pyx_vtabptr_5pysam_9csamtools_IteratorRowSelection;
+static struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *__pyx_vtabptr_5pysam_9csamtools_Samfile;
-/* "pysam/csamtools.pyx":375
- * ## Public methods
- * ######################################################################
- * cdef class Fastafile: # <<<<<<<<<<<<<<
- * '''*(filename)*
+/* "pysam/csamtools.pyx":1681
+ * if self.owns_samfile: samclose( self.fp )
+ *
+ * cdef class IteratorRowAll(IteratorRow): # <<<<<<<<<<<<<<
+ * """*(Samfile samfile, int reopen = True)*
*
*/
-struct __pyx_vtabstruct_5pysam_9csamtools_Fastafile {
- char *(*_fetch)(struct __pyx_obj_5pysam_9csamtools_Fastafile *, char *, int, int, int *);
+struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll {
+ bam1_t *(*getCurrent)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *);
+ int (*cnext)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *);
};
-static struct __pyx_vtabstruct_5pysam_9csamtools_Fastafile *__pyx_vtabptr_5pysam_9csamtools_Fastafile;
+static struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowAll *__pyx_vtabptr_5pysam_9csamtools_IteratorRowAll;
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
/* Module declarations from 'pysam.csamtools' */
static PyTypeObject *__pyx_ptype_5pysam_9csamtools_Fastafile = 0;
+static PyTypeObject *__pyx_ptype_5pysam_9csamtools_FastqProxy = 0;
+static PyTypeObject *__pyx_ptype_5pysam_9csamtools_Fastqfile = 0;
static PyTypeObject *__pyx_ptype_5pysam_9csamtools_AlignedRead = 0;
static PyTypeObject *__pyx_ptype_5pysam_9csamtools_Samfile = 0;
static PyTypeObject *__pyx_ptype_5pysam_9csamtools_PileupProxy = 0;
static PyObject *__pyx_f_5pysam_9csamtools_makeAlignedRead(bam1_t *); /*proto*/
static PyObject *__pyx_f_5pysam_9csamtools_makePileupProxy(bam_pileup1_t **, int, int, int); /*proto*/
static PyObject *__pyx_f_5pysam_9csamtools_makePileupRead(bam_pileup1_t *); /*proto*/
+static PyObject *__pyx_f_5pysam_9csamtools_makeFastqProxy(kseq_t *); /*proto*/
static PyObject *__pyx_f_5pysam_9csamtools_convertBinaryTagToList(uint8_t *); /*proto*/
static int __pyx_f_5pysam_9csamtools_fetch_callback(bam1_t *, void *); /*proto*/
static int __pyx_f_5pysam_9csamtools_pileup_callback(uint32_t, uint32_t, int, bam_pileup1_t *, void *); /*proto*/
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_IOError;
+static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_OverflowError;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_OSError;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_KeyError;
-static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_min;
static PyObject *__pyx_builtin_max;
static PyObject *__pyx_builtin_chr;
static void __pyx_pf_5pysam_9csamtools_9Fastafile_10__dealloc__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_8filename___get__(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pysam_9csamtools_9Fastafile_12fetch(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region); /* proto */
+static int __pyx_pf_5pysam_9csamtools_10FastqProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_4name___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_8sequence___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_7comment___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_7quality___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self); /* proto */
+static int __pyx_pf_5pysam_9csamtools_9Fastqfile___cinit__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_2_isOpen(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_4_open(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_6close(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
+static void __pyx_pf_5pysam_9csamtools_9Fastqfile_8__dealloc__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_8filename___get__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_10__iter__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_12__next__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_14test(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self); /* proto */
static int __pyx_pf_5pysam_9csamtools_7Samfile___cinit__(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_2_isOpen(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pysam_9csamtools_7Samfile_4_hasIndex(struct __pyx_obj_5pysam_9csamtools_Samfile *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_12is_duplicate___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
static int __pyx_pf_5pysam_9csamtools_11AlignedRead_12is_duplicate_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_9positions___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_15inferred_length___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_13aligned_pairs___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_10overlap(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, uint32_t __pyx_v_start, uint32_t __pyx_v_end); /* proto */
static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_12opt(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
static char __pyx_k_17[] = "start out of range (%i)";
static char __pyx_k_18[] = "end out of range (%i)";
static char __pyx_k_19[] = "%s:%i-%i";
-static char __pyx_k_24[] = "invalid file opening mode `%s`";
-static char __pyx_k_26[] = "-";
-static char __pyx_k_27[] = "http:";
-static char __pyx_k_28[] = "ftp:";
-static char __pyx_k_29[] = "either supply options `template`, `header` or both `referencenames` and `referencelengths` for writing";
-static char __pyx_k_30[] = "unequal names and lengths of reference sequences";
-static char __pyx_k_31[] = "@SQ\tSN:%s\tLN:%s\n";
-static char __pyx_k_32[] = "file `%s` not found";
-static char __pyx_k_33[] = "could not open file (mode='%s') - is it SAM/BAM format?";
-static char __pyx_k_34[] = "file does not have valid header (mode='%s') - is it BAM format?";
-static char __pyx_k_35[] = "file does not have valid header (mode='%s') - is it SAM format?";
-static char __pyx_k_36[] = "file header is empty (mode='%s') - is it SAM/BAM format?";
-static char __pyx_k_37[] = ".bai";
-static char __pyx_k_38[] = "error while opening index `%s` ";
-static char __pyx_k_41[] = "tid %i out of range 0<=tid<%i";
-static char __pyx_k_43[] = "[:-]";
-static char __pyx_k_45[] = "invalid reference `%s`";
-static char __pyx_k_46[] = "invalid coordinates: start (%i) > end (%i)";
-static char __pyx_k_48[] = "seek only available in bam files";
-static char __pyx_k_50[] = "seek no available in streams";
-static char __pyx_k_56[] = "fetch called on bamfile without index";
-static char __pyx_k_58[] = "callback functionality requires a region/reference";
-static char __pyx_k_60[] = "no index available for fetch";
-static char __pyx_k_62[] = "fetching by region is not available for sam files";
-static char __pyx_k_64[] = "callback not implemented yet";
-static char __pyx_k_66[] = "fetch called for samfile without header";
-static char __pyx_k_69[] = "read %s: is unpaired";
-static char __pyx_k_70[] = "mate %s: is unmapped";
-static char __pyx_k_71[] = "mate not found";
-static char __pyx_k_76[] = "counting functionality requires a region/reference";
-static char __pyx_k_79[] = "count for a region is not available for sam files";
-static char __pyx_k_82[] = "no index available for pileup";
-static char __pyx_k_85[] = "pileup of samfiles not implemented yet";
-static char __pyx_k_92[] = "Samfile.mapped only available in bam files";
-static char __pyx_k_94[] = "mapping information not recorded in index or index not available";
-static char __pyx_k_97[] = "Samfile.unmapped only available in bam files";
+static char __pyx_k_21[] = "No such file or directory: %s";
+static char __pyx_k_24[] = "name: %s\n";
+static char __pyx_k_25[] = "comment: %s\n";
+static char __pyx_k_26[] = "seq: %s\n";
+static char __pyx_k_27[] = "qual: %s\n";
+static char __pyx_k_28[] = "return value: %d\n";
+static char __pyx_k_32[] = "invalid file opening mode `%s`";
+static char __pyx_k_34[] = "-";
+static char __pyx_k_35[] = "http:";
+static char __pyx_k_36[] = "ftp:";
+static char __pyx_k_37[] = "either supply options `template`, `header` or both `referencenames` and `referencelengths` for writing";
+static char __pyx_k_38[] = "unequal names and lengths of reference sequences";
+static char __pyx_k_39[] = "@SQ\tSN:%s\tLN:%s\n";
+static char __pyx_k_40[] = "file `%s` not found";
+static char __pyx_k_41[] = "could not open file (mode='%s') - is it SAM/BAM format?";
+static char __pyx_k_42[] = "file does not have valid header (mode='%s') - is it BAM format?";
+static char __pyx_k_43[] = "file does not have valid header (mode='%s') - is it SAM format?";
+static char __pyx_k_44[] = "file header is empty (mode='%s') - is it SAM/BAM format?";
+static char __pyx_k_45[] = ".bai";
+static char __pyx_k_46[] = "error while opening index `%s` ";
+static char __pyx_k_49[] = "tid %i out of range 0<=tid<%i";
+static char __pyx_k_51[] = "[:-]";
+static char __pyx_k_53[] = "invalid reference `%s`";
+static char __pyx_k_54[] = "invalid coordinates: start (%i) > end (%i)";
+static char __pyx_k_56[] = "seek only available in bam files";
+static char __pyx_k_58[] = "seek no available in streams";
+static char __pyx_k_64[] = "fetch called on bamfile without index";
+static char __pyx_k_66[] = "callback functionality requires a region/reference";
+static char __pyx_k_68[] = "no index available for fetch";
+static char __pyx_k_70[] = "fetching by region is not available for sam files";
+static char __pyx_k_72[] = "callback not implemented yet";
+static char __pyx_k_74[] = "fetch called for samfile without header";
+static char __pyx_k_77[] = "read %s: is unpaired";
+static char __pyx_k_78[] = "mate %s: is unmapped";
+static char __pyx_k_79[] = "mate not found";
+static char __pyx_k_84[] = "counting functionality requires a region/reference";
+static char __pyx_k_87[] = "count for a region is not available for sam files";
+static char __pyx_k_90[] = "no index available for pileup";
+static char __pyx_k_93[] = "pileup of samfiles not implemented yet";
static char __pyx_k__A[] = "A";
static char __pyx_k__B[] = "B";
static char __pyx_k__C[] = "C";
static char __pyx_k__r[] = "r";
static char __pyx_k__s[] = "s";
static char __pyx_k__w[] = "w";
-static char __pyx_k_102[] = "@";
-static char __pyx_k_104[] = "header line without '@': '%s'";
-static char __pyx_k_106[] = "header line with invalid type '%s': '%s'";
-static char __pyx_k_107[] = ":";
-static char __pyx_k_108[] = "malformatted header: no ':' in field";
-static char __pyx_k_111[] = "unknown field code '%s' in record '%s'";
-static char __pyx_k_112[] = "multiple '%s' lines are not permitted";
-static char __pyx_k_113[] = "@%s";
-static char __pyx_k_114[] = "%s:%s";
-static char __pyx_k_115[] = "invalid type for record %s: %s, expected %s";
-static char __pyx_k_117[] = "incomplete sequence information in '%s'";
-static char __pyx_k_120[] = "can not iterate over samfile without header";
-static char __pyx_k_123[] = "no index available for iteration";
-static char __pyx_k_129[] = "can only use this iterator on bam files";
-static char __pyx_k_130[] = "reference sequence for '%s' (tid=%i) not found";
-static char __pyx_k_131[] = "unknown stepper option `%s` in IteratorColumn";
-static char __pyx_k_133[] = "error during iteration";
-static char __pyx_k_136[] = "Invalid clipping in CIGAR string";
-static char __pyx_k_139[] = "%i%c";
-static char __pyx_k_140[] = "quality and sequence mismatch: %i != %i";
-static char __pyx_k_141[] = "%c";
-static char __pyx_k_142[] = "<";
-static char __pyx_k_144[] = "integer %i out of range of BAM/SAM specification";
-static char __pyx_k_145[] = "2sccI%i%s";
-static char __pyx_k_149[] = "2sc%is";
-static char __pyx_k_151[] = "create_string_buffer";
-static char __pyx_k_152[] = "tag '%s' not present";
-static char __pyx_k_153[] = "unknown auxilliary type '%s'";
-static char __pyx_k_154[] = "Contig index";
-static char __pyx_k_155[] = "Mapped position on contig";
-static char __pyx_k_156[] = "Contig index for mate pair";
-static char __pyx_k_157[] = "Position of mate pair";
-static char __pyx_k_158[] = "Insert size";
-static char __pyx_k_159[] = "Binary flag";
-static char __pyx_k_160[] = "Count of cigar entries";
-static char __pyx_k_161[] = "Cigar entries";
-static char __pyx_k_162[] = "Mapping quality";
-static char __pyx_k_163[] = "Bam index bin number";
-static char __pyx_k_164[] = "Length of query name";
-static char __pyx_k_165[] = "Query name";
-static char __pyx_k_166[] = "Length of query sequence";
-static char __pyx_k_167[] = "Query sequence";
-static char __pyx_k_168[] = "Quality scores";
-static char __pyx_k_169[] = "Length of auxilary data";
-static char __pyx_k_170[] = "Maximum data length";
-static char __pyx_k_171[] = "Current data length";
-static char __pyx_k_172[] = "%-30s %-10s= %s";
-static char __pyx_k_173[] = "(";
-static char __pyx_k_174[] = ")";
-static char __pyx_k_175[] = "This class cannot be instantiated from Python";
-static char __pyx_k_177[] = "PileupProxy accessed after iterator finished";
-static char __pyx_k_181[] = "No such file or directory: '%s'";
-static char __pyx_k_182[] = "-o";
-static char __pyx_k_183[] = "option -o is forbidden in samtools view";
-static char __pyx_k_189[] = "can only IndexReads on bam files";
-static char __pyx_k_190[] = "read %s not found";
-static char __pyx_k_191[] = "number of :term:`filename` associated with this object.";
-static char __pyx_k_192[] = "the query name (None if not present)";
-static char __pyx_k_193[] = "the :term:`cigar` alignment (None if not present). The alignment\n is returned as a list of tuples of (operation, length). \n The operations are:\n\n +-----+--------------+-----+\n |M |BAM_CMATCH |0 |\n +-----+--------------+-----+\n |I |BAM_CINS |1 |\n +-----+--------------+-----+\n |D |BAM_CDEL |2 |\n +-----+--------------+-----+\n |N |BAM_CREF_SKIP |3 |\n +-----+--------------+-----+\n |S |BAM_CSOFT_CLIP|4 |\n +-----+--------------+-----+\n |H |BAM_CHARD_CLIP|5 |\n +-----+--------------+-----+\n |P |BAM_CPAD |6 |\n +-----+--------------+-----+\n |= |BAM_CEQUAL |7 |\n +-----+--------------+-----+\n |X |BAM_CDIFF |8 |\n +-----+--------------+-----+\n\n .. note::\n The output is a list of (operation, length) tuples, such as\n ``[ (0, 30) ]``.\n This is different from the SAM specification and the\n the :meth:`cigarstring` property, which uses a\n (length,operation order, for example: ``30M``.\n\n ";
-static char __pyx_k_194[] = "the :term:`cigar` alignment as a string.\n \n The cigar string is a string of alternating integers\n and characters denoting the length and the type of\n an operation.\n\n .. note::\n The order length,operation is specified in the\n SAM format. It is different from the order of\n the :meth:`cigar` property.\n\n Returns the empty string if not present.\n ";
-static char __pyx_k_195[] = "read sequence bases, including :term:`soft clipped` bases (None if not present).\n\n In Python 3, this property is of type bytes and assigning a unicode string to it consisting of ASCII characters only will work, but is inefficient.";
-static char __pyx_k_196[] = "read sequence base qualities, including :term:`soft clipped` bases (None if not present).\n\n In Python 3, this property is of type bytes and assigning a unicode string to it consisting of ASCII characters only will work, but is inefficient.";
-static char __pyx_k_197[] = "aligned portion of the read and excludes any flanking bases that were :term:`soft clipped` (None if not present).\n\n In Python 3, this property is of type bytes. Assigning a unicode string to it consisting of ASCII characters only will work, but is inefficient.\n\n SAM/BAM files may included extra flanking bases sequences that were\n not part of the alignment. These bases may be the result of the\n Smith-Waterman or other algorithms, which may not require alignments\n that begin at the first residue or end at the last. In addition,\n extra sequencing adapters, multiplex identifiers, and low-quality bases that\n were not considered for alignment may have been retained.";
-static char __pyx_k_198[] = "aligned query sequence quality values (None if not present). This property is read-only.\n\n In Python 3, this property is of type bytes.";
-static char __pyx_k_199[] = "start index of the aligned query portion of the sequence (0-based, inclusive)";
-static char __pyx_k_200[] = "end index of the aligned query portion of the sequence (0-based, exclusive)";
-static char __pyx_k_201[] = "Length of the aligned query sequence";
-static char __pyx_k_202[] = "the tags in the AUX field.\n\n This property permits convenience access to\n the tags. Changes it the returned list will\n not update the tags automatically. Instead,\n the following is required for adding a\n new tag::\n\n read.tags = read.tags + [(\"RG\",0)]\n\n\n This method will happily write the same tag\n multiple times.\n ";
-static char __pyx_k_203[] = "properties flag";
-static char __pyx_k_204[] = "\n :term:`target` ID\n\n DEPRECATED from pysam-0.4 - use tid in the future.\n The rname field caused a lot of confusion as it returns\n the :term:`target` ID instead of the reference sequence\n name.\n\n .. note::\n\n This field contains the index of the reference sequence\n in the sequence dictionary. To obtain the name\n of the reference sequence, use :meth:`pysam.Samfile.getrname()`\n\n ";
-static char __pyx_k_205[] = "\n :term:`target` ID\n\n .. note::\n\n This field contains the index of the reference sequence\n in the sequence dictionary. To obtain the name\n of the reference sequence, use :meth:`pysam.Samfile.getrname()`\n\n ";
-static char __pyx_k_206[] = "0-based leftmost coordinate";
-static char __pyx_k_207[] = "properties bin";
-static char __pyx_k_208[] = "length of the read (read only). Returns 0 if not given.";
-static char __pyx_k_209[] = "aligned reference position of the read on the reference genome. \n \n aend points to one past the last aligned residue.\n Returns None if not available.";
-static char __pyx_k_210[] = "aligned length of the read on the reference genome. Returns None if\n not available.";
-static char __pyx_k_211[] = "mapping quality";
-static char __pyx_k_212[] = "the :term:`reference` id of the mate\n deprecated, use RNEXT instead.\n ";
-static char __pyx_k_213[] = "the :term:`reference` id of the mate ";
-static char __pyx_k_214[] = "the position of the mate\n deprecated, use PNEXT instead.";
-static char __pyx_k_215[] = "the position of the mate";
-static char __pyx_k_216[] = "the insert size\n deprecated: use tlen instead";
-static char __pyx_k_217[] = "the insert size";
-static char __pyx_k_218[] = "true if read is paired in sequencing";
-static char __pyx_k_219[] = "true if read is mapped in a proper pair";
-static char __pyx_k_220[] = "true if read itself is unmapped";
-static char __pyx_k_221[] = "true if the mate is unmapped";
-static char __pyx_k_222[] = "true if read is mapped to reverse strand";
-static char __pyx_k_223[] = "true is read is mapped to reverse strand";
-static char __pyx_k_224[] = "true if this is read1";
-static char __pyx_k_225[] = "true if this is read2";
-static char __pyx_k_226[] = "true if not primary alignment";
-static char __pyx_k_227[] = "true if QC failure";
-static char __pyx_k_228[] = "true if optical or PCR duplicate";
-static char __pyx_k_229[] = "a list of reference positions that this read aligns to.";
-static char __pyx_k_230[] = "a list of aligned read and reference positions.\n\n Unaligned position are marked by None.\n ";
-static char __pyx_k_231[] = "number of :term:`reference` sequences in the file.";
-static char __pyx_k_232[] = "tuple with the names of :term:`reference` sequences.";
-static char __pyx_k_233[] = "tuple of the lengths of the :term:`reference` sequences. The lengths are in the same order as\n :attr:`pysam.Samfile.references`\n ";
-static char __pyx_k_234[] = "total number of mapped reads in file.\n ";
-static char __pyx_k_235[] = "total number of unmapped reads in file.\n ";
-static char __pyx_k_236[] = "full contents of the :term:`sam file` header as a string.";
-static char __pyx_k_237[] = "header information within the :term:`sam file`. The records and fields are returned as\n a two-level dictionary.\n ";
-static char __pyx_k_238[] = "the chromosome ID as is defined in the header";
-static char __pyx_k_239[] = "number of reads mapping to this column.";
-static char __pyx_k_240[] = "list of reads (:class:`pysam.PileupRead`) aligned to this column";
-static char __pyx_k_241[] = "a :class:`pysam.AlignedRead` object of the aligned read";
-static char __pyx_k_242[] = "position of the read base at the pileup site, 0-based";
-static char __pyx_k_243[] = "indel length; 0 for no indel, positive for ins and negative for del";
-static char __pyx_k_244[] = "1 iff the base on the padded read is a deletion";
-static char __pyx_k_245[] = "current sequence length.";
-static char __pyx_k_246[] = "nucleotide position of SNP.";
-static char __pyx_k_247[] = "reference base at pos. ``N`` if no reference sequence supplied.";
-static char __pyx_k_248[] = "the genotype called.";
-static char __pyx_k_249[] = "the genotype quality (Phred-scaled).";
-static char __pyx_k_250[] = "the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.";
-static char __pyx_k_251[] = "the root mean square (rms) of the mapping quality of all reads involved in the call.";
-static char __pyx_k_252[] = "coverage or read depth - the number of reads involved in the call.";
-static char __pyx_k_253[] = "getfilesystemencoding";
-static char __pyx_k_254[] = "MIDNSHP=X";
-static char __pyx_k_255[] = "(\\d+)([MIDNSHP=X])";
-static char __pyx_k_257[] = "=ACMGRSVTWYHKDBN";
-static char __pyx_k_260[] = "/home/andreas/devel/pysam/pysam/csamtools.pyx";
-static char __pyx_k_261[] = "PileupColumn.__str__";
-static char __pyx_k_262[] = "pysam.csamtools";
-static char __pyx_k_263[] = "A pileup column. A pileup column contains\n all the reads that map to a certain target base.\n\n tid\n chromosome ID as is defined in the header\n pos\n the target base coordinate (0-based)\n n\n number of reads mapping to this column\n pileups\n list of reads (:class:`pysam.PileupRead`) aligned to this column\n ";
-static char __pyx_k_266[] = "StderrStore.__init__";
-static char __pyx_k_269[] = "StderrStore.readAndRelease";
-static char __pyx_k_272[] = "StderrStore.release";
-static char __pyx_k_275[] = "StderrStore.__del__";
-static char __pyx_k_276[] = "\n stderr is captured.\n ";
-static char __pyx_k_279[] = "StderrStoreWindows.__init__";
-static char __pyx_k_282[] = "StderrStoreWindows.readAndRelease";
-static char __pyx_k_285[] = "StderrStoreWindows.release";
-static char __pyx_k_286[] = "does nothing. stderr can't be redirected on windows";
-static char __pyx_k_295[] = "Outs.__init__";
-static char __pyx_k_298[] = "Outs.setdevice";
-static char __pyx_k_301[] = "Outs.setfile";
-static char __pyx_k_304[] = "Outs.setfd";
-static char __pyx_k_307[] = "Outs.restore";
-static char __pyx_k_308[] = "http://mail.python.org/pipermail/python-list/2000-June/038406.html";
+static char __pyx_k_100[] = "Samfile.mapped only available in bam files";
+static char __pyx_k_102[] = "mapping information not recorded in index or index not available";
+static char __pyx_k_105[] = "Samfile.unmapped only available in bam files";
+static char __pyx_k_110[] = "@";
+static char __pyx_k_112[] = "header line without '@': '%s'";
+static char __pyx_k_114[] = "header line with invalid type '%s': '%s'";
+static char __pyx_k_115[] = ":";
+static char __pyx_k_116[] = "malformatted header: no ':' in field";
+static char __pyx_k_119[] = "unknown field code '%s' in record '%s'";
+static char __pyx_k_120[] = "multiple '%s' lines are not permitted";
+static char __pyx_k_121[] = "@%s";
+static char __pyx_k_122[] = "%s:%s";
+static char __pyx_k_123[] = "invalid type for record %s: %s, expected %s";
+static char __pyx_k_125[] = "incomplete sequence information in '%s'";
+static char __pyx_k_128[] = "can not iterate over samfile without header";
+static char __pyx_k_131[] = "no index available for iteration";
+static char __pyx_k_137[] = "can only use this iterator on bam files";
+static char __pyx_k_138[] = "reference sequence for '%s' (tid=%i) not found";
+static char __pyx_k_139[] = "unknown stepper option `%s` in IteratorColumn";
+static char __pyx_k_141[] = "error during iteration";
+static char __pyx_k_144[] = "Invalid clipping in CIGAR string";
+static char __pyx_k_147[] = "%i%c";
+static char __pyx_k_148[] = "quality and sequence mismatch: %i != %i";
+static char __pyx_k_149[] = "%c";
+static char __pyx_k_150[] = "<";
+static char __pyx_k_152[] = "integer %i out of range of BAM/SAM specification";
+static char __pyx_k_153[] = "2sccI%i%s";
+static char __pyx_k_157[] = "2sc%is";
+static char __pyx_k_159[] = "create_string_buffer";
+static char __pyx_k_160[] = "tag '%s' not present";
+static char __pyx_k_161[] = "unknown auxilliary type '%s'";
+static char __pyx_k_162[] = "Contig index";
+static char __pyx_k_163[] = "Mapped position on contig";
+static char __pyx_k_164[] = "Contig index for mate pair";
+static char __pyx_k_165[] = "Position of mate pair";
+static char __pyx_k_166[] = "Insert size";
+static char __pyx_k_167[] = "Binary flag";
+static char __pyx_k_168[] = "Count of cigar entries";
+static char __pyx_k_169[] = "Cigar entries";
+static char __pyx_k_170[] = "Mapping quality";
+static char __pyx_k_171[] = "Bam index bin number";
+static char __pyx_k_172[] = "Length of query name";
+static char __pyx_k_173[] = "Query name";
+static char __pyx_k_174[] = "Length of query sequence";
+static char __pyx_k_175[] = "Query sequence";
+static char __pyx_k_176[] = "Quality scores";
+static char __pyx_k_177[] = "Length of auxilary data";
+static char __pyx_k_178[] = "Maximum data length";
+static char __pyx_k_179[] = "Current data length";
+static char __pyx_k_180[] = "%-30s %-10s= %s";
+static char __pyx_k_181[] = "(";
+static char __pyx_k_182[] = ")";
+static char __pyx_k_183[] = "This class cannot be instantiated from Python";
+static char __pyx_k_185[] = "PileupProxy accessed after iterator finished";
+static char __pyx_k_189[] = "No such file or directory: '%s'";
+static char __pyx_k_190[] = "-o";
+static char __pyx_k_191[] = "option -o is forbidden in samtools view";
+static char __pyx_k_197[] = "can only IndexReads on bam files";
+static char __pyx_k_198[] = "read %s not found";
+static char __pyx_k_199[] = "number of :term:`filename` associated with this object.";
+static char __pyx_k_200[] = "the query name (None if not present)";
+static char __pyx_k_201[] = "the :term:`cigar` alignment (None if not present). The alignment\n is returned as a list of tuples of (operation, length). \n The operations are:\n\n +-----+--------------+-----+\n |M |BAM_CMATCH |0 |\n +-----+--------------+-----+\n |I |BAM_CINS |1 |\n +-----+--------------+-----+\n |D |BAM_CDEL |2 |\n +-----+--------------+-----+\n |N |BAM_CREF_SKIP |3 |\n +-----+--------------+-----+\n |S |BAM_CSOFT_CLIP|4 |\n +-----+--------------+-----+\n |H |BAM_CHARD_CLIP|5 |\n +-----+--------------+-----+\n |P |BAM_CPAD |6 |\n +-----+--------------+-----+\n |= |BAM_CEQUAL |7 |\n +-----+--------------+-----+\n |X |BAM_CDIFF |8 |\n +-----+--------------+-----+\n\n .. note::\n The output is a list of (operation, length) tuples, such as\n ``[ (0, 30) ]``.\n This is different from the SAM specification and the\n the :meth:`cigarstring` property, which uses a\n (length,operation order, for example: ``30M``.\n\n ";
+static char __pyx_k_202[] = "the :term:`cigar` alignment as a string.\n \n The cigar string is a string of alternating integers\n and characters denoting the length and the type of\n an operation.\n\n .. note::\n The order length,operation is specified in the\n SAM format. It is different from the order of\n the :meth:`cigar` property.\n\n Returns the empty string if not present.\n ";
+static char __pyx_k_203[] = "read sequence bases, including :term:`soft clipped` bases \n (None if not present).\n\n In Python 3, this property is of type bytes and assigning a\n unicode string to it consisting of ASCII characters only will\n work, but is inefficient.\n\n Note that assigning to seq will invalidate any quality scores.\n Thus, to in-place edit the sequence and quality scores, copies of\n the quality scores need to be taken. Consider trimming for example::\n\n q = read.qual\n read.seq = read.seq[5:10]\n read.qual = q[5:10]\n\n ";
+static char __pyx_k_204[] = "read sequence base qualities, including :term:`soft\n clipped` bases (None if not present).\n\n In Python 3, this property is of type bytes and assigning a\n unicode string to it consisting of ASCII characters only will\n work, but is inefficient.\n\n Note that to set quality scores the sequence has to be set\n previously as this will determine the permitted length of\n the quality score array.\n\n This method raises a ValueError if the length of the \n quality scores and the sequence are not the same.\n ";
+static char __pyx_k_205[] = "aligned portion of the read and excludes any flanking bases that were :term:`soft clipped` (None if not present).\n\n In Python 3, this property is of type bytes. Assigning a unicode string to it consisting of ASCII characters only will work, but is inefficient.\n\n SAM/BAM files may included extra flanking bases sequences that were\n not part of the alignment. These bases may be the result of the\n Smith-Waterman or other algorithms, which may not require alignments\n that begin at the first residue or end at the last. In addition,\n extra sequencing adapters, multiplex identifiers, and low-quality bases that\n were not considered for alignment may have been retained.";
+static char __pyx_k_206[] = "aligned query sequence quality values (None if not present). This property is read-only.\n\n In Python 3, this property is of type bytes.";
+static char __pyx_k_207[] = "start index of the aligned query portion of the sequence (0-based, inclusive)";
+static char __pyx_k_208[] = "end index of the aligned query portion of the sequence (0-based, exclusive)";
+static char __pyx_k_209[] = "Length of the aligned query sequence";
+static char __pyx_k_210[] = "the tags in the AUX field.\n\n This property permits convenience access to\n the tags. Changes it the returned list will\n not update the tags automatically. Instead,\n the following is required for adding a\n new tag::\n\n read.tags = read.tags + [(\"RG\",0)]\n\n\n This method will happily write the same tag\n multiple times.\n ";
+static char __pyx_k_211[] = "properties flag";
+static char __pyx_k_212[] = "\n :term:`target` ID\n\n DEPRECATED from pysam-0.4 - use tid in the future.\n The rname field caused a lot of confusion as it returns\n the :term:`target` ID instead of the reference sequence\n name.\n\n .. note::\n\n This field contains the index of the reference sequence\n in the sequence dictionary. To obtain the name\n of the reference sequence, use :meth:`pysam.Samfile.getrname()`\n\n ";
+static char __pyx_k_213[] = "\n :term:`target` ID\n\n .. note::\n\n This field contains the index of the reference sequence\n in the sequence dictionary. To obtain the name\n of the reference sequence, use :meth:`pysam.Samfile.getrname()`\n\n ";
+static char __pyx_k_214[] = "0-based leftmost coordinate";
+static char __pyx_k_215[] = "properties bin";
+static char __pyx_k_216[] = "length of the read (read only). Returns 0 if not given.";
+static char __pyx_k_217[] = "aligned reference position of the read on the reference genome. \n \n aend points to one past the last aligned residue.\n Returns None if not available.";
+static char __pyx_k_218[] = "aligned length of the read on the reference genome. Returns None if\n not available.";
+static char __pyx_k_219[] = "mapping quality";
+static char __pyx_k_220[] = "the :term:`reference` id of the mate\n deprecated, use RNEXT instead.\n ";
+static char __pyx_k_221[] = "the :term:`reference` id of the mate ";
+static char __pyx_k_222[] = "the position of the mate\n deprecated, use PNEXT instead.";
+static char __pyx_k_223[] = "the position of the mate";
+static char __pyx_k_224[] = "the insert size\n deprecated: use tlen instead";
+static char __pyx_k_225[] = "the insert size";
+static char __pyx_k_226[] = "true if read is paired in sequencing";
+static char __pyx_k_227[] = "true if read is mapped in a proper pair";
+static char __pyx_k_228[] = "true if read itself is unmapped";
+static char __pyx_k_229[] = "true if the mate is unmapped";
+static char __pyx_k_230[] = "true if read is mapped to reverse strand";
+static char __pyx_k_231[] = "true is read is mapped to reverse strand";
+static char __pyx_k_232[] = "true if this is read1";
+static char __pyx_k_233[] = "true if this is read2";
+static char __pyx_k_234[] = "true if not primary alignment";
+static char __pyx_k_235[] = "true if QC failure";
+static char __pyx_k_236[] = "true if optical or PCR duplicate";
+static char __pyx_k_237[] = "a list of reference positions that this read aligns to.";
+static char __pyx_k_238[] = "inferred read length from CIGAR string.\n\n Returns 0 if CIGAR string is not present.\n ";
+static char __pyx_k_239[] = "a list of aligned read and reference positions.\n\n Unaligned position are marked by None.\n ";
+static char __pyx_k_240[] = "number of :term:`reference` sequences in the file.";
+static char __pyx_k_241[] = "tuple with the names of :term:`reference` sequences.";
+static char __pyx_k_242[] = "tuple of the lengths of the :term:`reference` sequences. The lengths are in the same order as\n :attr:`pysam.Samfile.references`\n ";
+static char __pyx_k_243[] = "total number of mapped reads in file.\n ";
+static char __pyx_k_244[] = "total number of unmapped reads in file.\n ";
+static char __pyx_k_245[] = "full contents of the :term:`sam file` header as a string.";
+static char __pyx_k_246[] = "header information within the :term:`sam file`. The records and fields are returned as\n a two-level dictionary.\n ";
+static char __pyx_k_247[] = "the chromosome ID as is defined in the header";
+static char __pyx_k_248[] = "number of reads mapping to this column.";
+static char __pyx_k_249[] = "list of reads (:class:`pysam.PileupRead`) aligned to this column";
+static char __pyx_k_250[] = "a :class:`pysam.AlignedRead` object of the aligned read";
+static char __pyx_k_251[] = "position of the read base at the pileup site, 0-based";
+static char __pyx_k_252[] = "indel length; 0 for no indel, positive for ins and negative for del";
+static char __pyx_k_253[] = "1 iff the base on the padded read is a deletion";
+static char __pyx_k_254[] = "current sequence length.";
+static char __pyx_k_255[] = "nucleotide position of SNP.";
+static char __pyx_k_256[] = "reference base at pos. ``N`` if no reference sequence supplied.";
+static char __pyx_k_257[] = "the genotype called.";
+static char __pyx_k_258[] = "the genotype quality (Phred-scaled).";
+static char __pyx_k_259[] = "the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.";
+static char __pyx_k_260[] = "the root mean square (rms) of the mapping quality of all reads involved in the call.";
+static char __pyx_k_261[] = "coverage or read depth - the number of reads involved in the call.";
+static char __pyx_k_262[] = "getfilesystemencoding";
+static char __pyx_k_263[] = "MIDNSHP=X";
+static char __pyx_k_264[] = "(\\d+)([MIDNSHP=X])";
+static char __pyx_k_266[] = "=ACMGRSVTWYHKDBN";
+static char __pyx_k_269[] = "/home/andreas/devel/pysam/pysam/csamtools.pyx";
+static char __pyx_k_270[] = "PileupColumn.__str__";
+static char __pyx_k_271[] = "pysam.csamtools";
+static char __pyx_k_272[] = "A pileup column. A pileup column contains\n all the reads that map to a certain target base.\n\n tid\n chromosome ID as is defined in the header\n pos\n the target base coordinate (0-based)\n n\n number of reads mapping to this column\n pileups\n list of reads (:class:`pysam.PileupRead`) aligned to this column\n ";
+static char __pyx_k_275[] = "StderrStore.__init__";
+static char __pyx_k_278[] = "StderrStore.readAndRelease";
+static char __pyx_k_281[] = "StderrStore.release";
+static char __pyx_k_284[] = "StderrStore.__del__";
+static char __pyx_k_285[] = "\n stderr is captured.\n ";
+static char __pyx_k_288[] = "StderrStoreWindows.__init__";
+static char __pyx_k_291[] = "StderrStoreWindows.readAndRelease";
+static char __pyx_k_294[] = "StderrStoreWindows.release";
+static char __pyx_k_295[] = "does nothing. stderr can't be redirected on windows";
+static char __pyx_k_304[] = "Outs.__init__";
+static char __pyx_k_307[] = "Outs.setdevice";
+static char __pyx_k_310[] = "Outs.setfile";
+static char __pyx_k_313[] = "Outs.setfd";
+static char __pyx_k_316[] = "Outs.restore";
+static char __pyx_k_317[] = "http://mail.python.org/pipermail/python-list/2000-June/038406.html";
static char __pyx_k__AS[] = "AS";
static char __pyx_k__CL[] = "CL";
static char __pyx_k__CN[] = "CN";
static char __pyx_k__truncate[] = "truncate";
static char __pyx_k__warnings[] = "warnings";
static char __pyx_k__Fastafile[] = "Fastafile";
+static char __pyx_k__Fastqfile[] = "Fastqfile";
static char __pyx_k__TypeError[] = "TypeError";
static char __pyx_k____enter__[] = "__enter__";
static char __pyx_k___hasIndex[] = "_hasIndex";
static char __pyx_k__VALID_HEADER_FIELDS[] = "VALID_HEADER_FIELDS";
static PyObject *__pyx_kp_u_1;
static PyObject *__pyx_kp_s_10;
+static PyObject *__pyx_kp_s_100;
static PyObject *__pyx_kp_s_102;
-static PyObject *__pyx_kp_s_104;
-static PyObject *__pyx_kp_s_106;
-static PyObject *__pyx_kp_s_107;
-static PyObject *__pyx_kp_s_108;
-static PyObject *__pyx_kp_s_111;
+static PyObject *__pyx_kp_s_105;
+static PyObject *__pyx_kp_s_110;
static PyObject *__pyx_kp_s_112;
-static PyObject *__pyx_kp_s_113;
static PyObject *__pyx_kp_s_114;
static PyObject *__pyx_kp_s_115;
-static PyObject *__pyx_kp_s_117;
+static PyObject *__pyx_kp_s_116;
+static PyObject *__pyx_kp_s_119;
static PyObject *__pyx_kp_s_120;
+static PyObject *__pyx_kp_s_121;
+static PyObject *__pyx_kp_s_122;
static PyObject *__pyx_kp_s_123;
-static PyObject *__pyx_kp_s_129;
+static PyObject *__pyx_kp_s_125;
+static PyObject *__pyx_kp_s_128;
static PyObject *__pyx_kp_s_13;
-static PyObject *__pyx_kp_s_130;
static PyObject *__pyx_kp_s_131;
-static PyObject *__pyx_kp_s_133;
+static PyObject *__pyx_kp_s_137;
+static PyObject *__pyx_kp_s_138;
static PyObject *__pyx_kp_s_139;
-static PyObject *__pyx_kp_s_140;
static PyObject *__pyx_kp_s_141;
-static PyObject *__pyx_kp_s_142;
-static PyObject *__pyx_kp_s_144;
-static PyObject *__pyx_kp_s_145;
+static PyObject *__pyx_kp_s_147;
+static PyObject *__pyx_kp_s_148;
static PyObject *__pyx_kp_s_149;
static PyObject *__pyx_kp_s_15;
-static PyObject *__pyx_n_s_151;
+static PyObject *__pyx_kp_s_150;
static PyObject *__pyx_kp_s_152;
static PyObject *__pyx_kp_s_153;
-static PyObject *__pyx_kp_s_154;
-static PyObject *__pyx_kp_s_155;
-static PyObject *__pyx_kp_s_156;
static PyObject *__pyx_kp_s_157;
-static PyObject *__pyx_kp_s_158;
-static PyObject *__pyx_kp_s_159;
+static PyObject *__pyx_n_s_159;
static PyObject *__pyx_kp_b_16;
static PyObject *__pyx_kp_s_16;
static PyObject *__pyx_kp_s_160;
static PyObject *__pyx_kp_s_173;
static PyObject *__pyx_kp_s_174;
static PyObject *__pyx_kp_s_175;
+static PyObject *__pyx_kp_s_176;
static PyObject *__pyx_kp_s_177;
+static PyObject *__pyx_kp_s_178;
+static PyObject *__pyx_kp_s_179;
static PyObject *__pyx_kp_s_18;
+static PyObject *__pyx_kp_s_180;
static PyObject *__pyx_kp_s_181;
static PyObject *__pyx_kp_s_182;
static PyObject *__pyx_kp_s_183;
+static PyObject *__pyx_kp_s_185;
static PyObject *__pyx_kp_s_189;
static PyObject *__pyx_kp_s_19;
static PyObject *__pyx_kp_s_190;
-static PyObject *__pyx_kp_s_24;
-static PyObject *__pyx_n_s_253;
-static PyObject *__pyx_kp_s_255;
-static PyObject *__pyx_kp_s_260;
-static PyObject *__pyx_n_s_261;
+static PyObject *__pyx_kp_s_191;
+static PyObject *__pyx_kp_s_197;
+static PyObject *__pyx_kp_s_198;
+static PyObject *__pyx_kp_s_21;
static PyObject *__pyx_n_s_262;
-static PyObject *__pyx_kp_s_263;
-static PyObject *__pyx_n_s_266;
-static PyObject *__pyx_n_s_269;
-static PyObject *__pyx_n_s_272;
+static PyObject *__pyx_kp_s_264;
+static PyObject *__pyx_kp_s_269;
+static PyObject *__pyx_n_s_270;
+static PyObject *__pyx_n_s_271;
+static PyObject *__pyx_kp_s_272;
static PyObject *__pyx_n_s_275;
-static PyObject *__pyx_kp_s_276;
-static PyObject *__pyx_n_s_279;
-static PyObject *__pyx_n_s_282;
-static PyObject *__pyx_n_s_285;
-static PyObject *__pyx_kp_s_286;
-static PyObject *__pyx_kp_s_29;
-static PyObject *__pyx_n_s_295;
-static PyObject *__pyx_n_s_298;
+static PyObject *__pyx_n_s_278;
+static PyObject *__pyx_n_s_281;
+static PyObject *__pyx_n_s_284;
+static PyObject *__pyx_kp_s_285;
+static PyObject *__pyx_n_s_288;
+static PyObject *__pyx_n_s_291;
+static PyObject *__pyx_n_s_294;
+static PyObject *__pyx_kp_s_295;
static PyObject *__pyx_kp_u_3;
-static PyObject *__pyx_kp_s_30;
-static PyObject *__pyx_n_s_301;
static PyObject *__pyx_n_s_304;
static PyObject *__pyx_n_s_307;
-static PyObject *__pyx_kp_s_308;
-static PyObject *__pyx_kp_s_31;
+static PyObject *__pyx_n_s_310;
+static PyObject *__pyx_n_s_313;
+static PyObject *__pyx_n_s_316;
+static PyObject *__pyx_kp_s_317;
static PyObject *__pyx_kp_s_32;
-static PyObject *__pyx_kp_s_33;
-static PyObject *__pyx_kp_s_34;
-static PyObject *__pyx_kp_s_35;
-static PyObject *__pyx_kp_s_36;
-static PyObject *__pyx_kp_b_37;
+static PyObject *__pyx_kp_s_37;
static PyObject *__pyx_kp_s_38;
+static PyObject *__pyx_kp_s_39;
+static PyObject *__pyx_kp_s_40;
static PyObject *__pyx_kp_s_41;
+static PyObject *__pyx_kp_s_42;
static PyObject *__pyx_kp_s_43;
-static PyObject *__pyx_kp_s_45;
+static PyObject *__pyx_kp_s_44;
+static PyObject *__pyx_kp_b_45;
static PyObject *__pyx_kp_s_46;
-static PyObject *__pyx_kp_s_48;
+static PyObject *__pyx_kp_s_49;
static PyObject *__pyx_kp_s_5;
-static PyObject *__pyx_kp_s_50;
+static PyObject *__pyx_kp_s_51;
+static PyObject *__pyx_kp_s_53;
+static PyObject *__pyx_kp_s_54;
static PyObject *__pyx_kp_s_56;
static PyObject *__pyx_kp_s_58;
static PyObject *__pyx_kp_s_6;
-static PyObject *__pyx_kp_s_60;
-static PyObject *__pyx_kp_s_62;
static PyObject *__pyx_kp_s_64;
static PyObject *__pyx_kp_s_66;
-static PyObject *__pyx_kp_s_69;
+static PyObject *__pyx_kp_s_68;
static PyObject *__pyx_kp_s_7;
static PyObject *__pyx_kp_s_70;
-static PyObject *__pyx_kp_s_71;
-static PyObject *__pyx_kp_s_76;
+static PyObject *__pyx_kp_s_72;
+static PyObject *__pyx_kp_s_74;
+static PyObject *__pyx_kp_s_77;
+static PyObject *__pyx_kp_s_78;
static PyObject *__pyx_kp_s_79;
-static PyObject *__pyx_kp_s_82;
-static PyObject *__pyx_kp_s_85;
+static PyObject *__pyx_kp_s_84;
+static PyObject *__pyx_kp_s_87;
static PyObject *__pyx_kp_s_9;
-static PyObject *__pyx_kp_s_92;
-static PyObject *__pyx_kp_s_94;
-static PyObject *__pyx_kp_s_97;
+static PyObject *__pyx_kp_s_90;
+static PyObject *__pyx_kp_s_93;
static PyObject *__pyx_kp_s__2scB;
static PyObject *__pyx_kp_s__2scH;
static PyObject *__pyx_kp_s__2scI;
static PyObject *__pyx_n_s__F;
static PyObject *__pyx_n_s__FO;
static PyObject *__pyx_n_s__Fastafile;
+static PyObject *__pyx_n_s__Fastqfile;
static PyObject *__pyx_n_s__GO;
static PyObject *__pyx_n_s__H;
static PyObject *__pyx_n_s__HD;
static PyObject *__pyx_int_536870912;
static PyObject *__pyx_int_4294967295;
static PyObject *__pyx_int_neg_2147483648;
-static PyObject *__pyx_k_21;
-static PyObject *__pyx_k_22;
-static PyObject *__pyx_k_23;
-static PyObject *__pyx_k_54;
-static PyObject *__pyx_k_73;
-static int __pyx_k_132;
-static PyObject *__pyx_k_180;
+static PyObject *__pyx_k_29;
+static PyObject *__pyx_k_30;
+static PyObject *__pyx_k_31;
+static PyObject *__pyx_k_62;
+static PyObject *__pyx_k_81;
+static int __pyx_k_140;
+static PyObject *__pyx_k_188;
static PyObject *__pyx_k_tuple_2;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_8;
static PyObject *__pyx_k_tuple_12;
static PyObject *__pyx_k_tuple_14;
static PyObject *__pyx_k_tuple_20;
-static PyObject *__pyx_k_tuple_25;
-static PyObject *__pyx_k_tuple_39;
-static PyObject *__pyx_k_tuple_40;
-static PyObject *__pyx_k_tuple_42;
-static PyObject *__pyx_k_tuple_44;
+static PyObject *__pyx_k_tuple_22;
+static PyObject *__pyx_k_tuple_23;
+static PyObject *__pyx_k_tuple_33;
static PyObject *__pyx_k_tuple_47;
-static PyObject *__pyx_k_tuple_49;
-static PyObject *__pyx_k_tuple_51;
+static PyObject *__pyx_k_tuple_48;
+static PyObject *__pyx_k_tuple_50;
static PyObject *__pyx_k_tuple_52;
-static PyObject *__pyx_k_tuple_53;
static PyObject *__pyx_k_tuple_55;
static PyObject *__pyx_k_tuple_57;
static PyObject *__pyx_k_tuple_59;
+static PyObject *__pyx_k_tuple_60;
static PyObject *__pyx_k_tuple_61;
static PyObject *__pyx_k_tuple_63;
static PyObject *__pyx_k_tuple_65;
static PyObject *__pyx_k_tuple_67;
-static PyObject *__pyx_k_tuple_68;
-static PyObject *__pyx_k_tuple_72;
-static PyObject *__pyx_k_tuple_74;
+static PyObject *__pyx_k_tuple_69;
+static PyObject *__pyx_k_tuple_71;
+static PyObject *__pyx_k_tuple_73;
static PyObject *__pyx_k_tuple_75;
-static PyObject *__pyx_k_tuple_77;
-static PyObject *__pyx_k_tuple_78;
+static PyObject *__pyx_k_tuple_76;
static PyObject *__pyx_k_tuple_80;
-static PyObject *__pyx_k_tuple_81;
+static PyObject *__pyx_k_tuple_82;
static PyObject *__pyx_k_tuple_83;
-static PyObject *__pyx_k_tuple_84;
+static PyObject *__pyx_k_tuple_85;
static PyObject *__pyx_k_tuple_86;
-static PyObject *__pyx_k_tuple_87;
static PyObject *__pyx_k_tuple_88;
static PyObject *__pyx_k_tuple_89;
-static PyObject *__pyx_k_tuple_90;
static PyObject *__pyx_k_tuple_91;
-static PyObject *__pyx_k_tuple_93;
+static PyObject *__pyx_k_tuple_92;
+static PyObject *__pyx_k_tuple_94;
static PyObject *__pyx_k_tuple_95;
static PyObject *__pyx_k_tuple_96;
+static PyObject *__pyx_k_tuple_97;
static PyObject *__pyx_k_tuple_98;
static PyObject *__pyx_k_tuple_99;
-static PyObject *__pyx_k_tuple_100;
static PyObject *__pyx_k_tuple_101;
static PyObject *__pyx_k_tuple_103;
-static PyObject *__pyx_k_tuple_105;
+static PyObject *__pyx_k_tuple_104;
+static PyObject *__pyx_k_tuple_106;
+static PyObject *__pyx_k_tuple_107;
+static PyObject *__pyx_k_tuple_108;
static PyObject *__pyx_k_tuple_109;
-static PyObject *__pyx_k_tuple_110;
-static PyObject *__pyx_k_tuple_116;
+static PyObject *__pyx_k_tuple_111;
+static PyObject *__pyx_k_tuple_113;
+static PyObject *__pyx_k_tuple_117;
static PyObject *__pyx_k_tuple_118;
-static PyObject *__pyx_k_tuple_119;
-static PyObject *__pyx_k_tuple_121;
-static PyObject *__pyx_k_tuple_122;
static PyObject *__pyx_k_tuple_124;
-static PyObject *__pyx_k_tuple_125;
static PyObject *__pyx_k_tuple_126;
static PyObject *__pyx_k_tuple_127;
-static PyObject *__pyx_k_tuple_128;
+static PyObject *__pyx_k_tuple_129;
+static PyObject *__pyx_k_tuple_130;
+static PyObject *__pyx_k_tuple_132;
+static PyObject *__pyx_k_tuple_133;
static PyObject *__pyx_k_tuple_134;
static PyObject *__pyx_k_tuple_135;
-static PyObject *__pyx_k_tuple_137;
-static PyObject *__pyx_k_tuple_138;
+static PyObject *__pyx_k_tuple_136;
+static PyObject *__pyx_k_tuple_142;
static PyObject *__pyx_k_tuple_143;
+static PyObject *__pyx_k_tuple_145;
static PyObject *__pyx_k_tuple_146;
-static PyObject *__pyx_k_tuple_147;
-static PyObject *__pyx_k_tuple_148;
-static PyObject *__pyx_k_tuple_150;
-static PyObject *__pyx_k_tuple_176;
-static PyObject *__pyx_k_tuple_178;
-static PyObject *__pyx_k_tuple_179;
+static PyObject *__pyx_k_tuple_151;
+static PyObject *__pyx_k_tuple_154;
+static PyObject *__pyx_k_tuple_155;
+static PyObject *__pyx_k_tuple_156;
+static PyObject *__pyx_k_tuple_158;
static PyObject *__pyx_k_tuple_184;
-static PyObject *__pyx_k_tuple_185;
static PyObject *__pyx_k_tuple_186;
static PyObject *__pyx_k_tuple_187;
-static PyObject *__pyx_k_tuple_188;
-static PyObject *__pyx_k_tuple_256;
-static PyObject *__pyx_k_tuple_258;
-static PyObject *__pyx_k_tuple_264;
+static PyObject *__pyx_k_tuple_192;
+static PyObject *__pyx_k_tuple_193;
+static PyObject *__pyx_k_tuple_194;
+static PyObject *__pyx_k_tuple_195;
+static PyObject *__pyx_k_tuple_196;
+static PyObject *__pyx_k_tuple_265;
static PyObject *__pyx_k_tuple_267;
-static PyObject *__pyx_k_tuple_270;
static PyObject *__pyx_k_tuple_273;
-static PyObject *__pyx_k_tuple_277;
-static PyObject *__pyx_k_tuple_280;
-static PyObject *__pyx_k_tuple_283;
-static PyObject *__pyx_k_tuple_287;
-static PyObject *__pyx_k_tuple_288;
+static PyObject *__pyx_k_tuple_276;
+static PyObject *__pyx_k_tuple_279;
+static PyObject *__pyx_k_tuple_282;
+static PyObject *__pyx_k_tuple_286;
static PyObject *__pyx_k_tuple_289;
-static PyObject *__pyx_k_tuple_290;
-static PyObject *__pyx_k_tuple_291;
static PyObject *__pyx_k_tuple_292;
-static PyObject *__pyx_k_tuple_294;
static PyObject *__pyx_k_tuple_296;
+static PyObject *__pyx_k_tuple_297;
+static PyObject *__pyx_k_tuple_298;
static PyObject *__pyx_k_tuple_299;
-static PyObject *__pyx_k_tuple_302;
+static PyObject *__pyx_k_tuple_300;
+static PyObject *__pyx_k_tuple_301;
+static PyObject *__pyx_k_tuple_303;
static PyObject *__pyx_k_tuple_305;
-static PyObject *__pyx_k_tuple_309;
-static PyObject *__pyx_k_codeobj_259;
-static PyObject *__pyx_k_codeobj_265;
+static PyObject *__pyx_k_tuple_308;
+static PyObject *__pyx_k_tuple_311;
+static PyObject *__pyx_k_tuple_314;
+static PyObject *__pyx_k_tuple_318;
static PyObject *__pyx_k_codeobj_268;
-static PyObject *__pyx_k_codeobj_271;
static PyObject *__pyx_k_codeobj_274;
-static PyObject *__pyx_k_codeobj_278;
-static PyObject *__pyx_k_codeobj_281;
-static PyObject *__pyx_k_codeobj_284;
+static PyObject *__pyx_k_codeobj_277;
+static PyObject *__pyx_k_codeobj_280;
+static PyObject *__pyx_k_codeobj_283;
+static PyObject *__pyx_k_codeobj_287;
+static PyObject *__pyx_k_codeobj_290;
static PyObject *__pyx_k_codeobj_293;
-static PyObject *__pyx_k_codeobj_297;
-static PyObject *__pyx_k_codeobj_300;
-static PyObject *__pyx_k_codeobj_303;
+static PyObject *__pyx_k_codeobj_302;
static PyObject *__pyx_k_codeobj_306;
-static PyObject *__pyx_k_codeobj_310;
+static PyObject *__pyx_k_codeobj_309;
+static PyObject *__pyx_k_codeobj_312;
+static PyObject *__pyx_k_codeobj_315;
+static PyObject *__pyx_k_codeobj_319;
static PyObject *__pyx_gb_5pysam_9csamtools_4generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
/* "pysam/csamtools.pyx":140
* dest._is_tail = src.is_tail
* return dest # <<<<<<<<<<<<<<
*
- * cdef convertBinaryTagToList( uint8_t * s ):
+ * cdef class FastqProxy
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject *)__pyx_v_dest));
return __pyx_r;
}
-/* "pysam/csamtools.pyx":188
+/* "pysam/csamtools.pyx":189
+ *
+ * cdef class FastqProxy
+ * cdef makeFastqProxy( kseq_t * src): # <<<<<<<<<<<<<<
+ * '''enter src into AlignedRead.'''
+ * cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
+ */
+
+static PyObject *__pyx_f_5pysam_9csamtools_makeFastqProxy(kseq_t *__pyx_v_src) {
+ struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_dest = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("makeFastqProxy", 0);
+ __Pyx_TraceCall("makeFastqProxy", __pyx_f[0], 189);
+
+ /* "pysam/csamtools.pyx":191
+ * cdef makeFastqProxy( kseq_t * src):
+ * '''enter src into AlignedRead.'''
+ * cdef FastqProxy dest = FastqProxy.__new__(FastqProxy) # <<<<<<<<<<<<<<
+ * dest._delegate = src
+ * return dest
+ */
+ __pyx_t_1 = __Pyx_tp_new(((PyObject*)__pyx_ptype_5pysam_9csamtools_FastqProxy)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pysam_9csamtools_FastqProxy)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_dest = ((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pysam/csamtools.pyx":192
+ * '''enter src into AlignedRead.'''
+ * cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
+ * dest._delegate = src # <<<<<<<<<<<<<<
+ * return dest
+ *
+ */
+ __pyx_v_dest->_delegate = __pyx_v_src;
+
+ /* "pysam/csamtools.pyx":193
+ * cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
+ * dest._delegate = src
+ * return dest # <<<<<<<<<<<<<<
+ *
+ * cdef convertBinaryTagToList( uint8_t * s ):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject *)__pyx_v_dest));
+ __pyx_r = ((PyObject *)__pyx_v_dest);
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pysam.csamtools.makeFastqProxy", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_dest);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":195
* return dest
*
* cdef convertBinaryTagToList( uint8_t * s ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("convertBinaryTagToList", 0);
- __Pyx_TraceCall("convertBinaryTagToList", __pyx_f[0], 188);
+ __Pyx_TraceCall("convertBinaryTagToList", __pyx_f[0], 195);
- /* "pysam/csamtools.pyx":195
+ /* "pysam/csamtools.pyx":202
*
* # get byte size
* auxtype = s[0] # <<<<<<<<<<<<<<
*/
__pyx_v_auxtype = (__pyx_v_s[0]);
- /* "pysam/csamtools.pyx":196
+ /* "pysam/csamtools.pyx":203
* # get byte size
* auxtype = s[0]
* byte_size = bam_aux_type2size( auxtype ) # <<<<<<<<<<<<<<
*/
__pyx_v_byte_size = bam_aux_type2size(__pyx_v_auxtype);
- /* "pysam/csamtools.pyx":197
+ /* "pysam/csamtools.pyx":204
* auxtype = s[0]
* byte_size = bam_aux_type2size( auxtype )
* s += 1 # <<<<<<<<<<<<<<
*/
__pyx_v_s = (__pyx_v_s + 1);
- /* "pysam/csamtools.pyx":199
+ /* "pysam/csamtools.pyx":206
* s += 1
* # get number of values in array
* nvalues = (<int32_t*>s)[0] # <<<<<<<<<<<<<<
*/
__pyx_v_nvalues = (((int32_t *)__pyx_v_s)[0]);
- /* "pysam/csamtools.pyx":200
+ /* "pysam/csamtools.pyx":207
* # get number of values in array
* nvalues = (<int32_t*>s)[0]
* s += 4 # <<<<<<<<<<<<<<
*/
__pyx_v_s = (__pyx_v_s + 4);
- /* "pysam/csamtools.pyx":202
+ /* "pysam/csamtools.pyx":209
* s += 4
* # get values
* values = [] # <<<<<<<<<<<<<<
* if auxtype == 'c':
* for x from 0 <= x < nvalues:
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_values = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":203
+ /* "pysam/csamtools.pyx":210
* # get values
* values = []
* if auxtype == 'c': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'c');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":204
+ /* "pysam/csamtools.pyx":211
* values = []
* if auxtype == 'c':
* for x from 0 <= x < nvalues: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_nvalues;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":205
+ /* "pysam/csamtools.pyx":212
* if auxtype == 'c':
* for x from 0 <= x < nvalues:
* values.append((<int8_t*>s)[0]) # <<<<<<<<<<<<<<
* s += 1
* elif auxtype == 'C':
*/
- __pyx_t_1 = __Pyx_PyInt_to_py_int8_t((((int8_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int8_t((((int8_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":206
+ /* "pysam/csamtools.pyx":213
* for x from 0 <= x < nvalues:
* values.append((<int8_t*>s)[0])
* s += 1 # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pysam/csamtools.pyx":207
+ /* "pysam/csamtools.pyx":214
* values.append((<int8_t*>s)[0])
* s += 1
* elif auxtype == 'C': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'C');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":208
+ /* "pysam/csamtools.pyx":215
* s += 1
* elif auxtype == 'C':
* for x from 0 <= x < nvalues: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_nvalues;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":209
+ /* "pysam/csamtools.pyx":216
* elif auxtype == 'C':
* for x from 0 <= x < nvalues:
* values.append((<uint8_t*>s)[0]) # <<<<<<<<<<<<<<
* s += 1
* elif auxtype == 's':
*/
- __pyx_t_1 = __Pyx_PyInt_to_py_uint8_t((((uint8_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint8_t((((uint8_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":210
+ /* "pysam/csamtools.pyx":217
* for x from 0 <= x < nvalues:
* values.append((<uint8_t*>s)[0])
* s += 1 # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pysam/csamtools.pyx":211
+ /* "pysam/csamtools.pyx":218
* values.append((<uint8_t*>s)[0])
* s += 1
* elif auxtype == 's': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 's');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":212
+ /* "pysam/csamtools.pyx":219
* s += 1
* elif auxtype == 's':
* for x from 0 <= x < nvalues: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_nvalues;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":213
+ /* "pysam/csamtools.pyx":220
* elif auxtype == 's':
* for x from 0 <= x < nvalues:
* values.append((<int16_t*>s)[0]) # <<<<<<<<<<<<<<
* s += 2
* elif auxtype == 'S':
*/
- __pyx_t_1 = __Pyx_PyInt_to_py_int16_t((((int16_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int16_t((((int16_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":214
+ /* "pysam/csamtools.pyx":221
* for x from 0 <= x < nvalues:
* values.append((<int16_t*>s)[0])
* s += 2 # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pysam/csamtools.pyx":215
+ /* "pysam/csamtools.pyx":222
* values.append((<int16_t*>s)[0])
* s += 2
* elif auxtype == 'S': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'S');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":216
+ /* "pysam/csamtools.pyx":223
* s += 2
* elif auxtype == 'S':
* for x from 0 <= x < nvalues: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_nvalues;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":217
+ /* "pysam/csamtools.pyx":224
* elif auxtype == 'S':
* for x from 0 <= x < nvalues:
* values.append((<uint16_t*>s)[0]) # <<<<<<<<<<<<<<
* s += 2
* elif auxtype == 'i':
*/
- __pyx_t_1 = __Pyx_PyInt_to_py_uint16_t((((uint16_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint16_t((((uint16_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":218
+ /* "pysam/csamtools.pyx":225
* for x from 0 <= x < nvalues:
* values.append((<uint16_t*>s)[0])
* s += 2 # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pysam/csamtools.pyx":219
+ /* "pysam/csamtools.pyx":226
* values.append((<uint16_t*>s)[0])
* s += 2
* elif auxtype == 'i': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'i');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":220
+ /* "pysam/csamtools.pyx":227
* s += 2
* elif auxtype == 'i':
* for x from 0 <= x < nvalues: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_nvalues;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":221
+ /* "pysam/csamtools.pyx":228
* elif auxtype == 'i':
* for x from 0 <= x < nvalues:
* values.append((<int32_t*>s)[0]) # <<<<<<<<<<<<<<
* s += 4
* elif auxtype == 'I':
*/
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t((((int32_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t((((int32_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":222
+ /* "pysam/csamtools.pyx":229
* for x from 0 <= x < nvalues:
* values.append((<int32_t*>s)[0])
* s += 4 # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pysam/csamtools.pyx":223
+ /* "pysam/csamtools.pyx":230
* values.append((<int32_t*>s)[0])
* s += 4
* elif auxtype == 'I': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'I');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":224
+ /* "pysam/csamtools.pyx":231
* s += 4
* elif auxtype == 'I':
* for x from 0 <= x < nvalues: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_nvalues;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":225
+ /* "pysam/csamtools.pyx":232
* elif auxtype == 'I':
* for x from 0 <= x < nvalues:
* values.append((<uint32_t*>s)[0]) # <<<<<<<<<<<<<<
* s += 4
* elif auxtype == 'f':
*/
- __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t((((uint32_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t((((uint32_t *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":226
+ /* "pysam/csamtools.pyx":233
* for x from 0 <= x < nvalues:
* values.append((<uint32_t*>s)[0])
* s += 4 # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pysam/csamtools.pyx":227
+ /* "pysam/csamtools.pyx":234
* values.append((<uint32_t*>s)[0])
* s += 4
* elif auxtype == 'f': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'f');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":228
+ /* "pysam/csamtools.pyx":235
* s += 4
* elif auxtype == 'f':
* for x from 0 <= x < nvalues: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_nvalues;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":229
+ /* "pysam/csamtools.pyx":236
* elif auxtype == 'f':
* for x from 0 <= x < nvalues:
* values.append((<float*>s)[0]) # <<<<<<<<<<<<<<
* s += 4
*
*/
- __pyx_t_1 = PyFloat_FromDouble((((float *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyFloat_FromDouble((((float *)__pyx_v_s)[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":230
+ /* "pysam/csamtools.pyx":237
* for x from 0 <= x < nvalues:
* values.append((<float*>s)[0])
* s += 4 # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":232
+ /* "pysam/csamtools.pyx":239
* s += 4
*
* return byte_size, nvalues, values # <<<<<<<<<<<<<<
* #####################################################################
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_uint8_t(__pyx_v_byte_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint8_t(__pyx_v_byte_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = __Pyx_PyInt_to_py_int32_t(__pyx_v_nvalues); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyInt_to_py_int32_t(__pyx_v_nvalues); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
return __pyx_r;
}
-/* "pysam/csamtools.pyx":239
+/* "pysam/csamtools.pyx":246
* ## Generic callbacks for inserting python callbacks.
* #####################################################################
* cdef int fetch_callback( bam1_t *alignment, void *f): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("fetch_callback", 0);
- __Pyx_TraceCall("fetch_callback", __pyx_f[0], 239);
+ __Pyx_TraceCall("fetch_callback", __pyx_f[0], 246);
- /* "pysam/csamtools.pyx":244
+ /* "pysam/csamtools.pyx":251
* calls function in *f* with a new :class:`AlignedRead` object as parameter.
* '''
* a = makeAlignedRead( alignment ) # <<<<<<<<<<<<<<
* (<object>f)(a)
*
*/
- __pyx_t_1 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_a = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":245
+ /* "pysam/csamtools.pyx":252
* '''
* a = makeAlignedRead( alignment )
* (<object>f)(a) # <<<<<<<<<<<<<<
*
* class PileupColumn(object):
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_a);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_a);
__Pyx_GIVEREF(__pyx_v_a);
- __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_f), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_f), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":260
+/* "pysam/csamtools.pyx":267
* list of reads (:class:`pysam.PileupRead`) aligned to this column
* '''
* def __str__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__str__", 0);
- __Pyx_TraceCall("__str__", __pyx_f[0], 260);
+ __Pyx_TraceCall("__str__", __pyx_f[0], 267);
- /* "pysam/csamtools.pyx":261
+ /* "pysam/csamtools.pyx":268
* '''
* def __str__(self):
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- /* "pysam/csamtools.pyx":262
+ /* "pysam/csamtools.pyx":269
* def __str__(self):
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
* "\n" + "\n".join( map(str, self.pileups) ) # <<<<<<<<<<<<<<
*
* cdef int pileup_callback( uint32_t tid, uint32_t pos, int n, bam_pileup1_t *pl, void *f):
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "pysam/csamtools.pyx":261
+ /* "pysam/csamtools.pyx":268
* '''
* def __str__(self):
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ # <<<<<<<<<<<<<<
* "\n" + "\n".join( map(str, self.pileups) )
*
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "pysam/csamtools.pyx":262
+ /* "pysam/csamtools.pyx":269
* def __str__(self):
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
* "\n" + "\n".join( map(str, self.pileups) ) # <<<<<<<<<<<<<<
*
* cdef int pileup_callback( uint32_t tid, uint32_t pos, int n, bam_pileup1_t *pl, void *f):
*/
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pileups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pileups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":264
+/* "pysam/csamtools.pyx":271
* "\n" + "\n".join( map(str, self.pileups) )
*
* cdef int pileup_callback( uint32_t tid, uint32_t pos, int n, bam_pileup1_t *pl, void *f): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("pileup_callback", 0);
- __Pyx_TraceCall("pileup_callback", __pyx_f[0], 264);
+ __Pyx_TraceCall("pileup_callback", __pyx_f[0], 271);
- /* "pysam/csamtools.pyx":281
+ /* "pysam/csamtools.pyx":288
* '''
*
* p = PileupColumn() # <<<<<<<<<<<<<<
* p.tid = tid
* p.pos = pos
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PileupColumn); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PileupColumn); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_p = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":282
+ /* "pysam/csamtools.pyx":289
*
* p = PileupColumn()
* p.tid = tid # <<<<<<<<<<<<<<
* p.pos = pos
* p.n = n
*/
- __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__tid, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__tid, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":283
+ /* "pysam/csamtools.pyx":290
* p = PileupColumn()
* p.tid = tid
* p.pos = pos # <<<<<<<<<<<<<<
* p.n = n
* pileups = []
*/
- __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__pos, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__pos, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":284
+ /* "pysam/csamtools.pyx":291
* p.tid = tid
* p.pos = pos
* p.n = n # <<<<<<<<<<<<<<
* pileups = []
*
*/
- __pyx_t_2 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__n, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__n, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":285
+ /* "pysam/csamtools.pyx":292
* p.pos = pos
* p.n = n
* pileups = [] # <<<<<<<<<<<<<<
*
* cdef int x
*/
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_pileups = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":288
+ /* "pysam/csamtools.pyx":295
*
* cdef int x
* for x from 0 <= x < n: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_n;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":289
+ /* "pysam/csamtools.pyx":296
* cdef int x
* for x from 0 <= x < n:
* pileups.append( makePileupRead( &(pl[x]) ) ) # <<<<<<<<<<<<<<
* p.pileups = pileups
*
*/
- __pyx_t_2 = __pyx_f_5pysam_9csamtools_makePileupRead((&(__pyx_v_pl[__pyx_v_x]))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_makePileupRead((&(__pyx_v_pl[__pyx_v_x]))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyList_Append(__pyx_v_pileups, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_pileups, __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- /* "pysam/csamtools.pyx":290
+ /* "pysam/csamtools.pyx":297
* for x from 0 <= x < n:
* pileups.append( makePileupRead( &(pl[x]) ) )
* p.pileups = pileups # <<<<<<<<<<<<<<
*
* (<object>f)(p)
*/
- if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__pileups, ((PyObject *)__pyx_v_pileups)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__pileups, ((PyObject *)__pyx_v_pileups)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":292
+ /* "pysam/csamtools.pyx":299
* p.pileups = pileups
*
* (<object>f)(p) # <<<<<<<<<<<<<<
*
* cdef int pileup_fetch_callback( bam1_t *b, void *data):
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_p);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_p);
__Pyx_GIVEREF(__pyx_v_p);
- __pyx_t_1 = PyObject_Call(((PyObject *)__pyx_v_f), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)__pyx_v_f), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":294
+/* "pysam/csamtools.pyx":301
* (<object>f)(p)
*
* cdef int pileup_fetch_callback( bam1_t *b, void *data): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("pileup_fetch_callback", 0);
- __Pyx_TraceCall("pileup_fetch_callback", __pyx_f[0], 294);
+ __Pyx_TraceCall("pileup_fetch_callback", __pyx_f[0], 301);
- /* "pysam/csamtools.pyx":300
+ /* "pysam/csamtools.pyx":307
* '''
* cdef bam_plbuf_t * buf
* buf = <bam_plbuf_t*>data # <<<<<<<<<<<<<<
*/
__pyx_v_buf = ((bam_plbuf_t *)__pyx_v_data);
- /* "pysam/csamtools.pyx":301
+ /* "pysam/csamtools.pyx":308
* cdef bam_plbuf_t * buf
* buf = <bam_plbuf_t*>data
* bam_plbuf_push(b, buf) # <<<<<<<<<<<<<<
*/
bam_plbuf_push(__pyx_v_b, __pyx_v_buf);
- /* "pysam/csamtools.pyx":302
+ /* "pysam/csamtools.pyx":309
* buf = <bam_plbuf_t*>data
* bam_plbuf_push(b, buf)
* return 0 # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":308
+/* "pysam/csamtools.pyx":315
* stderr is captured.
* '''
* def __init__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- __Pyx_TraceCall("__init__", __pyx_f[0], 308);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 315);
- /* "pysam/csamtools.pyx":309
+ /* "pysam/csamtools.pyx":316
* '''
* def __init__(self):
* return # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":314
+/* "pysam/csamtools.pyx":321
* self.stderr_save.setfd( self.stderr_h )
*
* def readAndRelease( self ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("readAndRelease", 0);
- __Pyx_TraceCall("readAndRelease", __pyx_f[0], 314);
+ __Pyx_TraceCall("readAndRelease", __pyx_f[0], 321);
- /* "pysam/csamtools.pyx":315
+ /* "pysam/csamtools.pyx":322
*
* def readAndRelease( self ):
* return [] # <<<<<<<<<<<<<<
* lines = []
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":323
+/* "pysam/csamtools.pyx":330
* return lines
*
* def release(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("release", 0);
- __Pyx_TraceCall("release", __pyx_f[0], 323);
+ __Pyx_TraceCall("release", __pyx_f[0], 330);
- /* "pysam/csamtools.pyx":324
+ /* "pysam/csamtools.pyx":331
*
* def release(self):
* return # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":329
+/* "pysam/csamtools.pyx":336
* os.remove( self.stderr_f )
*
* def __del__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
- __Pyx_TraceCall("__del__", __pyx_f[0], 329);
+ __Pyx_TraceCall("__del__", __pyx_f[0], 336);
- /* "pysam/csamtools.pyx":330
+ /* "pysam/csamtools.pyx":337
*
* def __del__(self):
* self.release() # <<<<<<<<<<<<<<
*
* class StderrStoreWindows():
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__release); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__release); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":334
+/* "pysam/csamtools.pyx":341
* class StderrStoreWindows():
* '''does nothing. stderr can't be redirected on windows'''
* def __init__(self): pass # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- __Pyx_TraceCall("__init__", __pyx_f[0], 334);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 341);
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pysam/csamtools.pyx":335
+/* "pysam/csamtools.pyx":342
* '''does nothing. stderr can't be redirected on windows'''
* def __init__(self): pass
* def readAndRelease(self): return [] # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("readAndRelease", 0);
- __Pyx_TraceCall("readAndRelease", __pyx_f[0], 335);
+ __Pyx_TraceCall("readAndRelease", __pyx_f[0], 342);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":336
+/* "pysam/csamtools.pyx":343
* def __init__(self): pass
* def readAndRelease(self): return []
* def release(self): pass # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("release", 0);
- __Pyx_TraceCall("release", __pyx_f[0], 336);
+ __Pyx_TraceCall("release", __pyx_f[0], 343);
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pysam/csamtools.pyx":387
+/* "pysam/csamtools.pyx":394
* '''
*
* def __cinit__(self, *args, **kwargs ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_TraceCall("__cinit__", __pyx_f[0], 387);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 394);
- /* "pysam/csamtools.pyx":388
+ /* "pysam/csamtools.pyx":395
*
* def __cinit__(self, *args, **kwargs ):
* self.fastafile = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->fastafile = NULL;
- /* "pysam/csamtools.pyx":389
+ /* "pysam/csamtools.pyx":396
* def __cinit__(self, *args, **kwargs ):
* self.fastafile = NULL
* self._filename = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->_filename = NULL;
- /* "pysam/csamtools.pyx":390
+ /* "pysam/csamtools.pyx":397
* self.fastafile = NULL
* self._filename = NULL
* self._open( *args, **kwargs ) # <<<<<<<<<<<<<<
*
* def _isOpen( self ):
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_t_3 = ((PyObject *)__pyx_v_kwargs);
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":392
+/* "pysam/csamtools.pyx":399
* self._open( *args, **kwargs )
*
* def _isOpen( self ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_isOpen", 0);
- __Pyx_TraceCall("_isOpen", __pyx_f[0], 392);
+ __Pyx_TraceCall("_isOpen", __pyx_f[0], 399);
- /* "pysam/csamtools.pyx":394
+ /* "pysam/csamtools.pyx":401
* def _isOpen( self ):
* '''return true if samfile has been opened.'''
* return self.fastafile != NULL # <<<<<<<<<<<<<<
* def __len__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->fastafile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->fastafile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":396
+/* "pysam/csamtools.pyx":403
* return self.fastafile != NULL
*
* def __len__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- __Pyx_TraceCall("__len__", __pyx_f[0], 396);
+ __Pyx_TraceCall("__len__", __pyx_f[0], 403);
- /* "pysam/csamtools.pyx":397
+ /* "pysam/csamtools.pyx":404
*
* def __len__(self):
* if self.fastafile == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->fastafile == NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":398
+ /* "pysam/csamtools.pyx":405
* def __len__(self):
* if self.fastafile == NULL:
* raise ValueError( "calling len() on closed file" ) # <<<<<<<<<<<<<<
*
* return faidx_fetch_nseq(self.fastafile)
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":400
+ /* "pysam/csamtools.pyx":407
* raise ValueError( "calling len() on closed file" )
*
* return faidx_fetch_nseq(self.fastafile) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":402
+/* "pysam/csamtools.pyx":409
* return faidx_fetch_nseq(self.fastafile)
*
* def _open( self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_open", 0);
- __Pyx_TraceCall("_open", __pyx_f[0], 402);
+ __Pyx_TraceCall("_open", __pyx_f[0], 409);
__Pyx_INCREF(__pyx_v_filename);
- /* "pysam/csamtools.pyx":410
+ /* "pysam/csamtools.pyx":417
*
* # close a previously opened file
* if self.fastafile != NULL: self.close() # <<<<<<<<<<<<<<
*/
__pyx_t_1 = (__pyx_v_self->fastafile != NULL);
if (__pyx_t_1) {
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":411
+ /* "pysam/csamtools.pyx":418
* # close a previously opened file
* if self.fastafile != NULL: self.close()
* if self._filename != NULL: free(self._filename) # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":412
+ /* "pysam/csamtools.pyx":419
* if self.fastafile != NULL: self.close()
* if self._filename != NULL: free(self._filename)
* filename = _my_encodeFilename(filename) # <<<<<<<<<<<<<<
* self._filename = strdup(filename)
* self.fastafile = fai_load( filename )
*/
- __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_9csamtools__my_encodeFilename(__pyx_v_filename)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_9csamtools__my_encodeFilename(__pyx_v_filename)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_v_filename);
__pyx_v_filename = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":413
+ /* "pysam/csamtools.pyx":420
* if self._filename != NULL: free(self._filename)
* filename = _my_encodeFilename(filename)
* self._filename = strdup(filename) # <<<<<<<<<<<<<<
* self.fastafile = fai_load( filename )
*
*/
- __pyx_t_4 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_filename = strdup(__pyx_t_4);
- /* "pysam/csamtools.pyx":414
+ /* "pysam/csamtools.pyx":421
* filename = _my_encodeFilename(filename)
* self._filename = strdup(filename)
* self.fastafile = fai_load( filename ) # <<<<<<<<<<<<<<
*
* if self.fastafile == NULL:
*/
- __pyx_t_4 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->fastafile = fai_load(__pyx_t_4);
- /* "pysam/csamtools.pyx":416
+ /* "pysam/csamtools.pyx":423
* self.fastafile = fai_load( filename )
*
* if self.fastafile == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->fastafile == NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":417
+ /* "pysam/csamtools.pyx":424
*
* if self.fastafile == NULL:
* raise IOError("could not open file `%s`" % filename ) # <<<<<<<<<<<<<<
*
* def close( self ):
*/
- __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":419
+/* "pysam/csamtools.pyx":426
* raise IOError("could not open file `%s`" % filename )
*
* def close( self ): # <<<<<<<<<<<<<<
int __pyx_t_1;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("close", 0);
- __Pyx_TraceCall("close", __pyx_f[0], 419);
+ __Pyx_TraceCall("close", __pyx_f[0], 426);
- /* "pysam/csamtools.pyx":420
+ /* "pysam/csamtools.pyx":427
*
* def close( self ):
* if self.fastafile != NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->fastafile != NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":421
+ /* "pysam/csamtools.pyx":428
* def close( self ):
* if self.fastafile != NULL:
* fai_destroy( self.fastafile ) # <<<<<<<<<<<<<<
*/
fai_destroy(__pyx_v_self->fastafile);
- /* "pysam/csamtools.pyx":422
+ /* "pysam/csamtools.pyx":429
* if self.fastafile != NULL:
* fai_destroy( self.fastafile )
* self.fastafile = NULL # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":424
+/* "pysam/csamtools.pyx":431
* self.fastafile = NULL
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- __Pyx_TraceCall("__dealloc__", __pyx_f[0], 424);
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 431);
- /* "pysam/csamtools.pyx":425
+ /* "pysam/csamtools.pyx":432
*
* def __dealloc__(self):
* self.close() # <<<<<<<<<<<<<<
* if self._filename != NULL: free(self._filename)
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":426
+ /* "pysam/csamtools.pyx":433
* def __dealloc__(self):
* self.close()
* if self._filename != NULL: free(self._filename) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":430
+/* "pysam/csamtools.pyx":437
* property filename:
* '''number of :term:`filename` associated with this object.'''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 430);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 437);
- /* "pysam/csamtools.pyx":431
+ /* "pysam/csamtools.pyx":438
* '''number of :term:`filename` associated with this object.'''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* return self._filename
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":432
+ /* "pysam/csamtools.pyx":439
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* return self._filename # <<<<<<<<<<<<<<
* def fetch( self,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyBytes_FromString(__pyx_v_self->_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyBytes_FromString(__pyx_v_self->_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_r = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,0};
PyObject* values[4] = {0,0,0,0};
- /* "pysam/csamtools.pyx":435
+ /* "pysam/csamtools.pyx":442
*
* def fetch( self,
* reference = None, # <<<<<<<<<<<<<<
*/
values[0] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":436
+ /* "pysam/csamtools.pyx":443
* def fetch( self,
* reference = None,
* start = None, # <<<<<<<<<<<<<<
*/
values[1] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":437
+ /* "pysam/csamtools.pyx":444
* reference = None,
* start = None,
* end = None, # <<<<<<<<<<<<<<
*/
values[2] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":438
+ /* "pysam/csamtools.pyx":445
* start = None,
* end = None,
* region = None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Fastafile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":434
+/* "pysam/csamtools.pyx":441
* return self._filename
*
* def fetch( self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("fetch", 0);
- __Pyx_TraceCall("fetch", __pyx_f[0], 434);
+ __Pyx_TraceCall("fetch", __pyx_f[0], 441);
__Pyx_INCREF(__pyx_v_start);
__Pyx_INCREF(__pyx_v_end);
__Pyx_INCREF(__pyx_v_region);
- /* "pysam/csamtools.pyx":455
+ /* "pysam/csamtools.pyx":462
* '''
*
* if not self._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":456
+ /* "pysam/csamtools.pyx":463
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* cdef int length
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":461
+ /* "pysam/csamtools.pyx":468
* cdef char * seq
*
* if not region: # <<<<<<<<<<<<<<
* if reference is None: raise ValueError( 'no sequence/region supplied.' )
* if start is None: start = 0
*/
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":462
+ /* "pysam/csamtools.pyx":469
*
* if not region:
* if reference is None: raise ValueError( 'no sequence/region supplied.' ) # <<<<<<<<<<<<<<
*/
__pyx_t_3 = (__pyx_v_reference == Py_None);
if (__pyx_t_3) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":463
+ /* "pysam/csamtools.pyx":470
* if not region:
* if reference is None: raise ValueError( 'no sequence/region supplied.' )
* if start is None: start = 0 # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "pysam/csamtools.pyx":464
+ /* "pysam/csamtools.pyx":471
* if reference is None: raise ValueError( 'no sequence/region supplied.' )
* if start is None: start = 0
* if end is None: end = max_pos -1 # <<<<<<<<<<<<<<
*/
__pyx_t_3 = (__pyx_v_end == Py_None);
if (__pyx_t_3) {
- __pyx_t_2 = PyInt_FromLong((__pyx_v_5pysam_9csamtools_max_pos - 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong((__pyx_v_5pysam_9csamtools_max_pos - 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_end);
__pyx_v_end = __pyx_t_2;
}
__pyx_L7:;
- /* "pysam/csamtools.pyx":466
+ /* "pysam/csamtools.pyx":473
* if end is None: end = max_pos -1
*
* if start > end: raise ValueError( 'invalid region: start (%i) > end (%i)' % (start, end) ) # <<<<<<<<<<<<<<
* if start == end: return b""
* # valid ranges are from 0 to 2^29-1
*/
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_3) {
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_start);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_start);
__Pyx_INCREF(__pyx_v_end);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_end);
__Pyx_GIVEREF(__pyx_v_end);
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L8;
}
__pyx_L8:;
- /* "pysam/csamtools.pyx":467
+ /* "pysam/csamtools.pyx":474
*
* if start > end: raise ValueError( 'invalid region: start (%i) > end (%i)' % (start, end) )
* if start == end: return b"" # <<<<<<<<<<<<<<
* # valid ranges are from 0 to 2^29-1
* if not 0 <= start < max_pos: raise ValueError( 'start out of range (%i)' % start )
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_v_end, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
__Pyx_XDECREF(__pyx_r);
}
__pyx_L9:;
- /* "pysam/csamtools.pyx":469
+ /* "pysam/csamtools.pyx":476
* if start == end: return b""
* # valid ranges are from 0 to 2^29-1
* if not 0 <= start < max_pos: raise ValueError( 'start out of range (%i)' % start ) # <<<<<<<<<<<<<<
* if not 0 <= end < max_pos: raise ValueError( 'end out of range (%i)' % end )
* # note: faidx_fetch_seq has a bug such that out-of-range access
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_start, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_start, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
__Pyx_DECREF(__pyx_t_1);
- __pyx_t_2 = PyInt_FromLong(__pyx_v_5pysam_9csamtools_max_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_5pysam_9csamtools_max_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L10;
}
__pyx_L10:;
- /* "pysam/csamtools.pyx":470
+ /* "pysam/csamtools.pyx":477
* # valid ranges are from 0 to 2^29-1
* if not 0 <= start < max_pos: raise ValueError( 'start out of range (%i)' % start )
* if not 0 <= end < max_pos: raise ValueError( 'end out of range (%i)' % end ) # <<<<<<<<<<<<<<
* # note: faidx_fetch_seq has a bug such that out-of-range access
* # always returns the last residue. Hence do not use faidx_fetch_seq,
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_end, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_end, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
__Pyx_DECREF(__pyx_t_1);
- __pyx_t_2 = PyInt_FromLong(__pyx_v_5pysam_9csamtools_max_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_5pysam_9csamtools_max_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_end, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_end, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L11;
}
__pyx_L11:;
- /* "pysam/csamtools.pyx":479
+ /* "pysam/csamtools.pyx":486
* # end-1,
* # &length)
* region = "%s:%i-%i" % (reference, start+1, end) # <<<<<<<<<<<<<<
* if PY_MAJOR_VERSION >= 3:
* region = region.encode('ascii')
*/
- __pyx_t_1 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_reference);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end);
__Pyx_GIVEREF(__pyx_v_end);
__pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_region);
__pyx_v_region = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":480
+ /* "pysam/csamtools.pyx":487
* # &length)
* region = "%s:%i-%i" % (reference, start+1, end)
* if PY_MAJOR_VERSION >= 3: # <<<<<<<<<<<<<<
__pyx_t_3 = (PY_MAJOR_VERSION >= 3);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":481
- * region = "%s:%i-%i" % (reference, start+1, end)
- * if PY_MAJOR_VERSION >= 3:
- * region = region.encode('ascii') # <<<<<<<<<<<<<<
- * seq = fai_fetch( self.fastafile,
- * region,
+ /* "pysam/csamtools.pyx":488
+ * region = "%s:%i-%i" % (reference, start+1, end)
+ * if PY_MAJOR_VERSION >= 3:
+ * region = region.encode('ascii') # <<<<<<<<<<<<<<
+ * seq = fai_fetch( self.fastafile,
+ * region,
+ */
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_region, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_v_region);
+ __pyx_v_region = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L12;
+ }
+ __pyx_L12:;
+
+ /* "pysam/csamtools.pyx":490
+ * region = region.encode('ascii')
+ * seq = fai_fetch( self.fastafile,
+ * region, # <<<<<<<<<<<<<<
+ * &length )
+ * else:
+ */
+ __pyx_t_5 = PyBytes_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "pysam/csamtools.pyx":491
+ * seq = fai_fetch( self.fastafile,
+ * region,
+ * &length ) # <<<<<<<<<<<<<<
+ * else:
+ * # samtools adds a '\0' at the end
+ */
+ __pyx_v_seq = fai_fetch(__pyx_v_self->fastafile, __pyx_t_5, (&__pyx_v_length));
+ goto __pyx_L4;
+ }
+ /*else*/ {
+
+ /* "pysam/csamtools.pyx":494
+ * else:
+ * # samtools adds a '\0' at the end
+ * seq = fai_fetch( self.fastafile, region, &length ) # <<<<<<<<<<<<<<
+ *
+ * # copy to python
+ */
+ __pyx_t_5 = PyBytes_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_seq = fai_fetch(__pyx_v_self->fastafile, __pyx_t_5, (&__pyx_v_length));
+ }
+ __pyx_L4:;
+
+ /* "pysam/csamtools.pyx":497
+ *
+ * # copy to python
+ * if seq == NULL: # <<<<<<<<<<<<<<
+ * return b""
+ * else:
+ */
+ __pyx_t_3 = (__pyx_v_seq == NULL);
+ if (__pyx_t_3) {
+
+ /* "pysam/csamtools.pyx":498
+ * # copy to python
+ * if seq == NULL:
+ * return b"" # <<<<<<<<<<<<<<
+ * else:
+ * try:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_b_16));
+ __pyx_r = ((PyObject *)__pyx_kp_b_16);
+ goto __pyx_L0;
+ goto __pyx_L13;
+ }
+ /*else*/ {
+
+ /* "pysam/csamtools.pyx":500
+ * return b""
+ * else:
+ * try: # <<<<<<<<<<<<<<
+ * py_seq = seq[:length]
+ * finally:
+ */
+ /*try:*/ {
+
+ /* "pysam/csamtools.pyx":501
+ * else:
+ * try:
+ * py_seq = seq[:length] # <<<<<<<<<<<<<<
+ * finally:
+ * free(seq)
+ */
+ __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_seq + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L15;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+ __pyx_v_py_seq = ((PyObject*)__pyx_t_2);
+ __pyx_t_2 = 0;
+ }
+
+ /* "pysam/csamtools.pyx":503
+ * py_seq = seq[:length]
+ * finally:
+ * free(seq) # <<<<<<<<<<<<<<
+ *
+ * return py_seq
+ */
+ /*finally:*/ {
+ int __pyx_why;
+ PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
+ int __pyx_exc_lineno;
+ __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
+ __pyx_why = 0; goto __pyx_L16;
+ __pyx_L15: {
+ __pyx_why = 4;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
+ __pyx_exc_lineno = __pyx_lineno;
+ goto __pyx_L16;
+ }
+ __pyx_L16:;
+ free(__pyx_v_seq);
+ switch (__pyx_why) {
+ case 4: {
+ __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
+ __pyx_lineno = __pyx_exc_lineno;
+ __pyx_exc_type = 0;
+ __pyx_exc_value = 0;
+ __pyx_exc_tb = 0;
+ goto __pyx_L1_error;
+ }
+ }
+ }
+ }
+ __pyx_L13:;
+
+ /* "pysam/csamtools.pyx":505
+ * free(seq)
+ *
+ * return py_seq # <<<<<<<<<<<<<<
+ *
+ * cdef char * _fetch( self, char * reference, int start, int end, int * length ):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject *)__pyx_v_py_seq));
+ __pyx_r = ((PyObject *)__pyx_v_py_seq);
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pysam.csamtools.Fastafile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_py_seq);
+ __Pyx_XDECREF(__pyx_v_start);
+ __Pyx_XDECREF(__pyx_v_end);
+ __Pyx_XDECREF(__pyx_v_region);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":507
+ * return py_seq
+ *
+ * cdef char * _fetch( self, char * reference, int start, int end, int * length ): # <<<<<<<<<<<<<<
+ * '''fetch sequence for reference, start and end'''
+ *
+ */
+
+static char *__pyx_f_5pysam_9csamtools_9Fastafile__fetch(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, char *__pyx_v_reference, int __pyx_v_start, int __pyx_v_end, int *__pyx_v_length) {
+ char *__pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_fetch", 0);
+ __Pyx_TraceCall("_fetch", __pyx_f[0], 507);
+
+ /* "pysam/csamtools.pyx":514
+ * start,
+ * end-1,
+ * length ) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_r = faidx_fetch_seq(__pyx_v_self->fastafile, __pyx_v_reference, __pyx_v_start, (__pyx_v_end - 1), __pyx_v_length);
+ goto __pyx_L0;
+
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_9csamtools_10FastqProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_9csamtools_10FastqProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
+ __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy___init__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":524
+ *
+ * cdef class FastqProxy:
+ * def __init__(self): pass # <<<<<<<<<<<<<<
+ *
+ * property name:
+ */
+
+static int __pyx_pf_5pysam_9csamtools_10FastqProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 524);
+
+ __pyx_r = 0;
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_4name_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy_4name___get__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":527
+ *
+ * property name:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * return self._delegate.name.s
+ *
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_4name___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 527);
+
+ /* "pysam/csamtools.pyx":528
+ * property name:
+ * def __get__(self):
+ * return self._delegate.name.s # <<<<<<<<<<<<<<
+ *
+ * property sequence:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyBytes_FromString(__pyx_v_self->_delegate->name.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ __pyx_r = ((PyObject *)__pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pysam.csamtools.FastqProxy.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_8sequence_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_8sequence_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy_8sequence___get__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":531
+ *
+ * property sequence:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * return self._delegate.seq.s
+ *
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_8sequence___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 531);
+
+ /* "pysam/csamtools.pyx":532
+ * property sequence:
+ * def __get__(self):
+ * return self._delegate.seq.s # <<<<<<<<<<<<<<
+ *
+ * property comment:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyBytes_FromString(__pyx_v_self->_delegate->seq.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ __pyx_r = ((PyObject *)__pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pysam.csamtools.FastqProxy.sequence.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_7comment_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_7comment_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy_7comment___get__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":535
+ *
+ * property comment:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * if self._delegate.comment.l:
+ * return self._delegate.comment.s
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_7comment___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 535);
+
+ /* "pysam/csamtools.pyx":536
+ * property comment:
+ * def __get__(self):
+ * if self._delegate.comment.l: # <<<<<<<<<<<<<<
+ * return self._delegate.comment.s
+ * else: return None
+ */
+ if (__pyx_v_self->_delegate->comment.l) {
+
+ /* "pysam/csamtools.pyx":537
+ * def __get__(self):
+ * if self._delegate.comment.l:
+ * return self._delegate.comment.s # <<<<<<<<<<<<<<
+ * else: return None
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyBytes_FromString(__pyx_v_self->_delegate->comment.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ __pyx_r = ((PyObject *)__pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ goto __pyx_L3;
+ }
+ /*else*/ {
+
+ /* "pysam/csamtools.pyx":538
+ * if self._delegate.comment.l:
+ * return self._delegate.comment.s
+ * else: return None # <<<<<<<<<<<<<<
+ *
+ * property quality:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+ }
+ __pyx_L3:;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pysam.csamtools.FastqProxy.comment.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_7quality_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_9csamtools_10FastqProxy_7quality_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_10FastqProxy_7quality___get__(((struct __pyx_obj_5pysam_9csamtools_FastqProxy *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":541
+ *
+ * property quality:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * if self._delegate.qual.l:
+ * return self._delegate.qual.s
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_10FastqProxy_7quality___get__(struct __pyx_obj_5pysam_9csamtools_FastqProxy *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 541);
+
+ /* "pysam/csamtools.pyx":542
+ * property quality:
+ * def __get__(self):
+ * if self._delegate.qual.l: # <<<<<<<<<<<<<<
+ * return self._delegate.qual.s
+ * else: return None
+ */
+ if (__pyx_v_self->_delegate->qual.l) {
+
+ /* "pysam/csamtools.pyx":543
+ * def __get__(self):
+ * if self._delegate.qual.l:
+ * return self._delegate.qual.s # <<<<<<<<<<<<<<
+ * else: return None
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyBytes_FromString(__pyx_v_self->_delegate->qual.s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+ __pyx_r = ((PyObject *)__pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ goto __pyx_L3;
+ }
+ /*else*/ {
+
+ /* "pysam/csamtools.pyx":544
+ * if self._delegate.qual.l:
+ * return self._delegate.qual.s
+ * else: return None # <<<<<<<<<<<<<<
+ *
+ * cdef class Fastqfile:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+ }
+ __pyx_L3:;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pysam.csamtools.FastqProxy.quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_5pysam_9csamtools_9Fastqfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_5pysam_9csamtools_9Fastqfile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwargs = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
+ __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
+ if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile___cinit__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":553
+ * '''
+ *
+ * def __cinit__(self, *args, **kwargs ): # <<<<<<<<<<<<<<
+ * # self.fastqfile = NULL
+ * self._filename = NULL
+ */
+
+static int __pyx_pf_5pysam_9csamtools_9Fastqfile___cinit__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 553);
+
+ /* "pysam/csamtools.pyx":555
+ * def __cinit__(self, *args, **kwargs ):
+ * # self.fastqfile = NULL
+ * self._filename = NULL # <<<<<<<<<<<<<<
+ * self._open( *args, **kwargs )
+ *
+ */
+ __pyx_v_self->_filename = NULL;
+
+ /* "pysam/csamtools.pyx":556
+ * # self.fastqfile = NULL
+ * self._filename = NULL
+ * self._open( *args, **kwargs ) # <<<<<<<<<<<<<<
+ *
+ * def _isOpen( self ):
+ */
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+ __pyx_t_3 = ((PyObject *)__pyx_v_kwargs);
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pysam.csamtools.Fastqfile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_9Fastqfile_2_isOpen[] = "Fastqfile._isOpen(self)\nreturn true if samfile has been opened.";
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_3_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_isOpen (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_2_isOpen(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":558
+ * self._open( *args, **kwargs )
+ *
+ * def _isOpen( self ): # <<<<<<<<<<<<<<
+ * '''return true if samfile has been opened.'''
+ * return self._filename != NULL
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_2_isOpen(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_isOpen", 0);
+ __Pyx_TraceCall("_isOpen", __pyx_f[0], 558);
+
+ /* "pysam/csamtools.pyx":560
+ * def _isOpen( self ):
+ * '''return true if samfile has been opened.'''
+ * return self._filename != NULL # <<<<<<<<<<<<<<
+ *
+ * def _open( self,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_filename != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pysam.csamtools.Fastqfile._isOpen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_5_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_9Fastqfile_4_open[] = "Fastqfile._open(self, filename)\nopen an indexed fasta file.\n\n This method expects an indexed fasta file.\n ";
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_5_open(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_open (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_4_open(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":562
+ * return self._filename != NULL
+ *
+ * def _open( self, # <<<<<<<<<<<<<<
+ * filename ):
+ * '''open an indexed fasta file.
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_4_open(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self, PyObject *__pyx_v_filename) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ char *__pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_open", 0);
+ __Pyx_TraceCall("_open", __pyx_f[0], 562);
+ __Pyx_INCREF(__pyx_v_filename);
+
+ /* "pysam/csamtools.pyx":569
+ * '''
+ *
+ * if not os.path.exists( filename ): # <<<<<<<<<<<<<<
+ * raise IOError( "No such file or directory: %s" % filename )
+ *
+ */
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_filename);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename);
+ __Pyx_GIVEREF(__pyx_v_filename);
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (!__pyx_t_4);
+ if (__pyx_t_5) {
+
+ /* "pysam/csamtools.pyx":570
+ *
+ * if not os.path.exists( filename ):
+ * raise IOError( "No such file or directory: %s" % filename ) # <<<<<<<<<<<<<<
+ *
+ * # close a previously opened file
+ */
+ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
+ __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "pysam/csamtools.pyx":574
+ * # close a previously opened file
+ * # if self.fastqfile != NULL: self.close()
+ * if self._filename != NULL: free(self._filename) # <<<<<<<<<<<<<<
+ * filename = _my_encodeFilename(filename)
+ * self._filename = strdup(filename)
+ */
+ __pyx_t_5 = (__pyx_v_self->_filename != NULL);
+ if (__pyx_t_5) {
+ free(__pyx_v_self->_filename);
+ goto __pyx_L4;
+ }
+ __pyx_L4:;
+
+ /* "pysam/csamtools.pyx":575
+ * # if self.fastqfile != NULL: self.close()
+ * if self._filename != NULL: free(self._filename)
+ * filename = _my_encodeFilename(filename) # <<<<<<<<<<<<<<
+ * self._filename = strdup(filename)
+ * self.fastqfile = gzopen( filename, "r" )
+ */
+ __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_9csamtools__my_encodeFilename(__pyx_v_filename)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_v_filename);
+ __pyx_v_filename = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pysam/csamtools.pyx":576
+ * if self._filename != NULL: free(self._filename)
+ * filename = _my_encodeFilename(filename)
+ * self._filename = strdup(filename) # <<<<<<<<<<<<<<
+ * self.fastqfile = gzopen( filename, "r" )
+ * self.entry = kseq_init( self.fastqfile )
+ */
+ __pyx_t_6 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_self->_filename = strdup(__pyx_t_6);
+
+ /* "pysam/csamtools.pyx":577
+ * filename = _my_encodeFilename(filename)
+ * self._filename = strdup(filename)
+ * self.fastqfile = gzopen( filename, "r" ) # <<<<<<<<<<<<<<
+ * self.entry = kseq_init( self.fastqfile )
+ *
+ */
+ __pyx_t_6 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_self->fastqfile = gzopen(__pyx_t_6, __pyx_k__r);
+
+ /* "pysam/csamtools.pyx":578
+ * self._filename = strdup(filename)
+ * self.fastqfile = gzopen( filename, "r" )
+ * self.entry = kseq_init( self.fastqfile ) # <<<<<<<<<<<<<<
+ *
+ * def close( self ):
+ */
+ __pyx_v_self->entry = kseq_init(__pyx_v_self->fastqfile);
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pysam.csamtools.Fastqfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_filename);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_9Fastqfile_6close[] = "Fastqfile.close(self)\nclose file.";
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("close (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_6close(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":580
+ * self.entry = kseq_init( self.fastqfile )
+ *
+ * def close( self ): # <<<<<<<<<<<<<<
+ * '''close file.'''
+ * if self._filename != NULL:
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_6close(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("close", 0);
+ __Pyx_TraceCall("close", __pyx_f[0], 580);
+
+ /* "pysam/csamtools.pyx":582
+ * def close( self ):
+ * '''close file.'''
+ * if self._filename != NULL: # <<<<<<<<<<<<<<
+ * gzclose( self.fastqfile )
+ * free(self._filename)
+ */
+ __pyx_t_1 = (__pyx_v_self->_filename != NULL);
+ if (__pyx_t_1) {
+
+ /* "pysam/csamtools.pyx":583
+ * '''close file.'''
+ * if self._filename != NULL:
+ * gzclose( self.fastqfile ) # <<<<<<<<<<<<<<
+ * free(self._filename)
+ *
+ */
+ gzclose(__pyx_v_self->fastqfile);
+
+ /* "pysam/csamtools.pyx":584
+ * if self._filename != NULL:
+ * gzclose( self.fastqfile )
+ * free(self._filename) # <<<<<<<<<<<<<<
+ *
+ * def __dealloc__(self):
+ */
+ free(__pyx_v_self->_filename);
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static void __pyx_pw_5pysam_9csamtools_9Fastqfile_9__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_5pysam_9csamtools_9Fastqfile_9__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+ __pyx_pf_5pysam_9csamtools_9Fastqfile_8__dealloc__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "pysam/csamtools.pyx":586
+ * free(self._filename)
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * kseq_destroy(self.entry)
+ * self.close()
+ */
+
+static void __pyx_pf_5pysam_9csamtools_9Fastqfile_8__dealloc__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 586);
+
+ /* "pysam/csamtools.pyx":587
+ *
+ * def __dealloc__(self):
+ * kseq_destroy(self.entry) # <<<<<<<<<<<<<<
+ * self.close()
+ *
+ */
+ kseq_destroy(__pyx_v_self->entry);
+
+ /* "pysam/csamtools.pyx":588
+ * def __dealloc__(self):
+ * kseq_destroy(self.entry)
+ * self.close() # <<<<<<<<<<<<<<
+ *
+ * property filename:
+ */
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pysam.csamtools.Fastqfile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_8filename_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_8filename___get__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":592
+ * property filename:
+ * '''number of :term:`filename` associated with this object.'''
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ * return self._filename
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_8filename___get__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 592);
+
+ /* "pysam/csamtools.pyx":593
+ * '''number of :term:`filename` associated with this object.'''
+ * def __get__(self):
+ * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
+ * return self._filename
+ *
+ */
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (!__pyx_t_3);
+ if (__pyx_t_4) {
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "pysam/csamtools.pyx":594
+ * def __get__(self):
+ * if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ * return self._filename # <<<<<<<<<<<<<<
+ *
+ * def __iter__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyBytes_FromString(__pyx_v_self->_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+ __pyx_r = ((PyObject *)__pyx_t_2);
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pysam.csamtools.Fastqfile.filename.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_11__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_11__iter__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_10__iter__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":596
+ * return self._filename
+ *
+ * def __iter__(self): # <<<<<<<<<<<<<<
+ * if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ * return self
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_10__iter__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__iter__", 0);
+ __Pyx_TraceCall("__iter__", __pyx_f[0], 596);
+
+ /* "pysam/csamtools.pyx":597
+ *
+ * def __iter__(self):
+ * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (!__pyx_t_3);
+ if (__pyx_t_4) {
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "pysam/csamtools.pyx":598
+ * def __iter__(self):
+ * if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
+ * return self # <<<<<<<<<<<<<<
+ *
+ * cdef kseq_t * getCurrent( self ):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pysam.csamtools.Fastqfile.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":600
+ * return self
+ *
+ * cdef kseq_t * getCurrent( self ): # <<<<<<<<<<<<<<
+ * return self.entry
+ *
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_region, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_v_region);
- __pyx_v_region = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L12;
- }
- __pyx_L12:;
- /* "pysam/csamtools.pyx":483
- * region = region.encode('ascii')
- * seq = fai_fetch( self.fastafile,
- * region, # <<<<<<<<<<<<<<
- * &length )
- * else:
+static kseq_t *__pyx_f_5pysam_9csamtools_9Fastqfile_getCurrent(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
+ kseq_t *__pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("getCurrent", 0);
+ __Pyx_TraceCall("getCurrent", __pyx_f[0], 600);
+
+ /* "pysam/csamtools.pyx":601
+ *
+ * cdef kseq_t * getCurrent( self ):
+ * return self.entry # <<<<<<<<<<<<<<
+ *
+ * cdef int cnext(self):
*/
- __pyx_t_5 = PyBytes_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_v_self->entry;
+ goto __pyx_L0;
- /* "pysam/csamtools.pyx":484
- * seq = fai_fetch( self.fastafile,
- * region,
- * &length ) # <<<<<<<<<<<<<<
- * else:
- * # samtools adds a '\0' at the end
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":603
+ * return self.entry
+ *
+ * cdef int cnext(self): # <<<<<<<<<<<<<<
+ * '''C version of iterator
+ * '''
*/
- __pyx_v_seq = fai_fetch(__pyx_v_self->fastafile, __pyx_t_5, (&__pyx_v_length));
- goto __pyx_L4;
- }
- /*else*/ {
- /* "pysam/csamtools.pyx":487
- * else:
- * # samtools adds a '\0' at the end
- * seq = fai_fetch( self.fastafile, region, &length ) # <<<<<<<<<<<<<<
+static int __pyx_f_5pysam_9csamtools_9Fastqfile_cnext(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("cnext", 0);
+ __Pyx_TraceCall("cnext", __pyx_f[0], 603);
+
+ /* "pysam/csamtools.pyx":606
+ * '''C version of iterator
+ * '''
+ * return kseq_read(self.entry) # <<<<<<<<<<<<<<
*
- * # copy to python
+ * def __next__(self):
*/
- __pyx_t_5 = PyBytes_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_seq = fai_fetch(__pyx_v_self->fastafile, __pyx_t_5, (&__pyx_v_length));
- }
- __pyx_L4:;
+ __pyx_r = kseq_read(__pyx_v_self->entry);
+ goto __pyx_L0;
+
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_13__next__(PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_9Fastqfile_12__next__[] = "\n python version of next().\n ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_5pysam_9csamtools_9Fastqfile_12__next__;
+#endif
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_13__next__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_12__next__(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "pysam/csamtools.pyx":490
+/* "pysam/csamtools.pyx":608
+ * return kseq_read(self.entry)
*
- * # copy to python
- * if seq == NULL: # <<<<<<<<<<<<<<
- * return b""
+ * def __next__(self): # <<<<<<<<<<<<<<
+ * """
+ * python version of next().
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_12__next__(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
+ int __pyx_v_l;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__next__", 0);
+ __Pyx_TraceCall("__next__", __pyx_f[0], 608);
+
+ /* "pysam/csamtools.pyx":613
+ * """
+ * cdef int l
+ * l = kseq_read( self.entry) # <<<<<<<<<<<<<<
+ * if (l > 0):
+ * return makeFastqProxy( self.entry )
+ */
+ __pyx_v_l = kseq_read(__pyx_v_self->entry);
+
+ /* "pysam/csamtools.pyx":614
+ * cdef int l
+ * l = kseq_read( self.entry)
+ * if (l > 0): # <<<<<<<<<<<<<<
+ * return makeFastqProxy( self.entry )
* else:
*/
- __pyx_t_3 = (__pyx_v_seq == NULL);
- if (__pyx_t_3) {
+ __pyx_t_1 = (__pyx_v_l > 0);
+ if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":491
- * # copy to python
- * if seq == NULL:
- * return b"" # <<<<<<<<<<<<<<
+ /* "pysam/csamtools.pyx":615
+ * l = kseq_read( self.entry)
+ * if (l > 0):
+ * return makeFastqProxy( self.entry ) # <<<<<<<<<<<<<<
* else:
- * try:
+ * raise StopIteration
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(((PyObject *)__pyx_kp_b_16));
- __pyx_r = ((PyObject *)__pyx_kp_b_16);
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeFastqProxy(__pyx_v_self->entry); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
goto __pyx_L0;
- goto __pyx_L13;
+ goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":493
- * return b""
- * else:
- * try: # <<<<<<<<<<<<<<
- * py_seq = seq[:length]
- * finally:
- */
- /*try:*/ {
-
- /* "pysam/csamtools.pyx":494
+ /* "pysam/csamtools.pyx":617
+ * return makeFastqProxy( self.entry )
* else:
- * try:
- * py_seq = seq[:length] # <<<<<<<<<<<<<<
- * finally:
- * free(seq)
- */
- __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_seq + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L15;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_2));
- __pyx_v_py_seq = ((PyObject*)__pyx_t_2);
- __pyx_t_2 = 0;
- }
-
- /* "pysam/csamtools.pyx":496
- * py_seq = seq[:length]
- * finally:
- * free(seq) # <<<<<<<<<<<<<<
+ * raise StopIteration # <<<<<<<<<<<<<<
*
- * return py_seq
+ * def test( self ):
*/
- /*finally:*/ {
- int __pyx_why;
- PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
- int __pyx_exc_lineno;
- __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
- __pyx_why = 0; goto __pyx_L16;
- __pyx_L15: {
- __pyx_why = 4;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
- __pyx_exc_lineno = __pyx_lineno;
- goto __pyx_L16;
- }
- __pyx_L16:;
- free(__pyx_v_seq);
- switch (__pyx_why) {
- case 4: {
- __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
- __pyx_lineno = __pyx_exc_lineno;
- __pyx_exc_type = 0;
- __pyx_exc_value = 0;
- __pyx_exc_tb = 0;
- goto __pyx_L1_error;
- }
- }
- }
+ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_L13:;
-
- /* "pysam/csamtools.pyx":498
- * free(seq)
- *
- * return py_seq # <<<<<<<<<<<<<<
- *
- * cdef char * _fetch( self, char * reference, int start, int end, int * length ):
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(((PyObject *)__pyx_v_py_seq));
- __pyx_r = ((PyObject *)__pyx_v_py_seq);
- goto __pyx_L0;
+ __pyx_L3:;
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("pysam.csamtools.Fastafile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pysam.csamtools.Fastqfile.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
- __Pyx_XDECREF(__pyx_v_py_seq);
- __Pyx_XDECREF(__pyx_v_start);
- __Pyx_XDECREF(__pyx_v_end);
- __Pyx_XDECREF(__pyx_v_region);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_TraceReturn(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":500
- * return py_seq
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_15test(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pysam_9csamtools_9Fastqfile_14test[] = "Fastqfile.test(self)";
+static PyObject *__pyx_pw_5pysam_9csamtools_9Fastqfile_15test(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("test (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_9Fastqfile_14test(((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":619
+ * raise StopIteration
*
- * cdef char * _fetch( self, char * reference, int start, int end, int * length ): # <<<<<<<<<<<<<<
- * '''fetch sequence for reference, start and end'''
+ * def test( self ): # <<<<<<<<<<<<<<
*
+ * cdef int l
*/
-static char *__pyx_f_5pysam_9csamtools_9Fastafile__fetch(struct __pyx_obj_5pysam_9csamtools_Fastafile *__pyx_v_self, char *__pyx_v_reference, int __pyx_v_start, int __pyx_v_end, int *__pyx_v_length) {
- char *__pyx_r;
+static PyObject *__pyx_pf_5pysam_9csamtools_9Fastqfile_14test(struct __pyx_obj_5pysam_9csamtools_Fastqfile *__pyx_v_self) {
+ int __pyx_v_l;
+ PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
+ int __pyx_t_1;
__Pyx_TraceDeclarations
- __Pyx_RefNannySetupContext("_fetch", 0);
- __Pyx_TraceCall("_fetch", __pyx_f[0], 500);
+ __Pyx_RefNannySetupContext("test", 0);
+ __Pyx_TraceCall("test", __pyx_f[0], 619);
- /* "pysam/csamtools.pyx":507
- * start,
- * end-1,
- * length ) # <<<<<<<<<<<<<<
+ /* "pysam/csamtools.pyx":623
+ * cdef int l
+ *
+ * while 1: # <<<<<<<<<<<<<<
+ * l = kseq_read(self.entry)
+ * if l <= 0: break
+ */
+ while (1) {
+ if (!1) break;
+
+ /* "pysam/csamtools.pyx":624
+ *
+ * while 1:
+ * l = kseq_read(self.entry) # <<<<<<<<<<<<<<
+ * if l <= 0: break
+ * printf( "name: %s\n", self.entry.name.s)
+ */
+ __pyx_v_l = kseq_read(__pyx_v_self->entry);
+
+ /* "pysam/csamtools.pyx":625
+ * while 1:
+ * l = kseq_read(self.entry)
+ * if l <= 0: break # <<<<<<<<<<<<<<
+ * printf( "name: %s\n", self.entry.name.s)
+ * if self.entry.comment.l:
+ */
+ __pyx_t_1 = (__pyx_v_l <= 0);
+ if (__pyx_t_1) {
+ goto __pyx_L4_break;
+ goto __pyx_L5;
+ }
+ __pyx_L5:;
+
+ /* "pysam/csamtools.pyx":626
+ * l = kseq_read(self.entry)
+ * if l <= 0: break
+ * printf( "name: %s\n", self.entry.name.s) # <<<<<<<<<<<<<<
+ * if self.entry.comment.l:
+ * printf("comment: %s\n", self.entry.comment.s)
+ */
+ printf(__pyx_k_24, __pyx_v_self->entry->name.s);
+
+ /* "pysam/csamtools.pyx":627
+ * if l <= 0: break
+ * printf( "name: %s\n", self.entry.name.s)
+ * if self.entry.comment.l: # <<<<<<<<<<<<<<
+ * printf("comment: %s\n", self.entry.comment.s)
+ * printf("seq: %s\n", self.entry.seq.s)
+ */
+ if (__pyx_v_self->entry->comment.l) {
+
+ /* "pysam/csamtools.pyx":628
+ * printf( "name: %s\n", self.entry.name.s)
+ * if self.entry.comment.l:
+ * printf("comment: %s\n", self.entry.comment.s) # <<<<<<<<<<<<<<
+ * printf("seq: %s\n", self.entry.seq.s)
+ * if (self.entry.qual.l):
+ */
+ printf(__pyx_k_25, __pyx_v_self->entry->comment.s);
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+
+ /* "pysam/csamtools.pyx":629
+ * if self.entry.comment.l:
+ * printf("comment: %s\n", self.entry.comment.s)
+ * printf("seq: %s\n", self.entry.seq.s) # <<<<<<<<<<<<<<
+ * if (self.entry.qual.l):
+ * printf("qual: %s\n", self.entry.qual.s);
+ */
+ printf(__pyx_k_26, __pyx_v_self->entry->seq.s);
+
+ /* "pysam/csamtools.pyx":630
+ * printf("comment: %s\n", self.entry.comment.s)
+ * printf("seq: %s\n", self.entry.seq.s)
+ * if (self.entry.qual.l): # <<<<<<<<<<<<<<
+ * printf("qual: %s\n", self.entry.qual.s);
+ *
+ */
+ if (__pyx_v_self->entry->qual.l) {
+
+ /* "pysam/csamtools.pyx":631
+ * printf("seq: %s\n", self.entry.seq.s)
+ * if (self.entry.qual.l):
+ * printf("qual: %s\n", self.entry.qual.s); # <<<<<<<<<<<<<<
+ *
+ * printf("return value: %d\n", l);
+ */
+ printf(__pyx_k_27, __pyx_v_self->entry->qual.s);
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+ }
+ __pyx_L4_break:;
+
+ /* "pysam/csamtools.pyx":633
+ * printf("qual: %s\n", self.entry.qual.s);
+ *
+ * printf("return value: %d\n", l); # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------
*/
- __pyx_r = faidx_fetch_seq(__pyx_v_self->fastafile, __pyx_v_reference, __pyx_v_start, (__pyx_v_end - 1), __pyx_v_length);
- goto __pyx_L0;
+ printf(__pyx_k_28, __pyx_v_l);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_TraceReturn(Py_None);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":512
+/* "pysam/csamtools.pyx":638
* #------------------------------------------------------------------------
* #------------------------------------------------------------------------
* cdef int count_callback( bam1_t *alignment, void *f): # <<<<<<<<<<<<<<
long __pyx_t_1;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("count_callback", 0);
- __Pyx_TraceCall("count_callback", __pyx_f[0], 512);
+ __Pyx_TraceCall("count_callback", __pyx_f[0], 638);
- /* "pysam/csamtools.pyx":515
+ /* "pysam/csamtools.pyx":641
* '''callback for bam_fetch - count number of reads.
* '''
* cdef int* counter = (<int*>f) # <<<<<<<<<<<<<<
*/
__pyx_v_counter = ((int *)__pyx_v_f);
- /* "pysam/csamtools.pyx":516
+ /* "pysam/csamtools.pyx":642
* '''
* cdef int* counter = (<int*>f)
* counter[0] += 1; # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":526
+/* "pysam/csamtools.pyx":652
* #------------------------------------------------------------------------
* #------------------------------------------------------------------------
* cdef int mate_callback( bam1_t *alignment, void *f): # <<<<<<<<<<<<<<
int __pyx_t_3;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("mate_callback", 0);
- __Pyx_TraceCall("mate_callback", __pyx_f[0], 526);
+ __Pyx_TraceCall("mate_callback", __pyx_f[0], 652);
- /* "pysam/csamtools.pyx":529
+ /* "pysam/csamtools.pyx":655
* '''callback for bam_fetch = filter mate
* '''
* cdef MateData * d = (<MateData*>f) # <<<<<<<<<<<<<<
*/
__pyx_v_d = ((__pyx_t_5pysam_9csamtools_MateData *)__pyx_v_f);
- /* "pysam/csamtools.pyx":534
+ /* "pysam/csamtools.pyx":660
* # d.flag, alignment.core.flag, alignment.core.flag & d.flag)
*
* if d.mate == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_d->mate == NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":540
+ /* "pysam/csamtools.pyx":666
* # also, make sure that we get the other read by comparing
* # the flags
* if alignment.core.flag & d.flag != 0 and \ # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_alignment->core.flag & __pyx_v_d->flag) != 0);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":541
+ /* "pysam/csamtools.pyx":667
* # the flags
* if alignment.core.flag & d.flag != 0 and \
* strcmp( bam1_qname( alignment ), d.name ) == 0: # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":542
+ /* "pysam/csamtools.pyx":668
* if alignment.core.flag & d.flag != 0 and \
* strcmp( bam1_qname( alignment ), d.name ) == 0:
* d.mate = bam_dup1( alignment ) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":592
+/* "pysam/csamtools.pyx":718
* '''
*
* def __cinit__(self, *args, **kwargs ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_TraceCall("__cinit__", __pyx_f[0], 592);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 718);
- /* "pysam/csamtools.pyx":593
+ /* "pysam/csamtools.pyx":719
*
* def __cinit__(self, *args, **kwargs ):
* self.samfile = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->samfile = NULL;
- /* "pysam/csamtools.pyx":594
+ /* "pysam/csamtools.pyx":720
* def __cinit__(self, *args, **kwargs ):
* self.samfile = NULL
* self._filename = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->_filename = NULL;
- /* "pysam/csamtools.pyx":595
+ /* "pysam/csamtools.pyx":721
* self.samfile = NULL
* self._filename = NULL
* self.isbam = False # <<<<<<<<<<<<<<
*/
__pyx_v_self->isbam = 0;
- /* "pysam/csamtools.pyx":596
+ /* "pysam/csamtools.pyx":722
* self._filename = NULL
* self.isbam = False
* self.isstream = False # <<<<<<<<<<<<<<
*/
__pyx_v_self->isstream = 0;
- /* "pysam/csamtools.pyx":597
+ /* "pysam/csamtools.pyx":723
* self.isbam = False
* self.isstream = False
* self._open( *args, **kwargs ) # <<<<<<<<<<<<<<
*
* # allocate memory for iterator
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_t_3 = ((PyObject *)__pyx_v_kwargs);
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":600
+ /* "pysam/csamtools.pyx":726
*
* # allocate memory for iterator
* self.b = <bam1_t*>calloc(1, sizeof(bam1_t)) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":602
+/* "pysam/csamtools.pyx":728
* self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
*
* def _isOpen( self ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_isOpen", 0);
- __Pyx_TraceCall("_isOpen", __pyx_f[0], 602);
+ __Pyx_TraceCall("_isOpen", __pyx_f[0], 728);
- /* "pysam/csamtools.pyx":604
+ /* "pysam/csamtools.pyx":730
* def _isOpen( self ):
* '''return true if samfile has been opened.'''
* return self.samfile != NULL # <<<<<<<<<<<<<<
* def _hasIndex( self ):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->samfile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->samfile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":606
+/* "pysam/csamtools.pyx":732
* return self.samfile != NULL
*
* def _hasIndex( self ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_hasIndex", 0);
- __Pyx_TraceCall("_hasIndex", __pyx_f[0], 606);
+ __Pyx_TraceCall("_hasIndex", __pyx_f[0], 732);
- /* "pysam/csamtools.pyx":608
+ /* "pysam/csamtools.pyx":734
* def _hasIndex( self ):
* '''return true if samfile has an existing (and opened) index.'''
* return self.index != NULL # <<<<<<<<<<<<<<
* def _open( self,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->index != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->index != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__mode,&__pyx_n_s__template,&__pyx_n_s__referencenames,&__pyx_n_s__referencelengths,&__pyx_n_s__text,&__pyx_n_s__header,&__pyx_n_s__port,&__pyx_n_s__add_sq_text,&__pyx_n_s__check_header,&__pyx_n_s__check_sq,0};
PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
- /* "pysam/csamtools.pyx":612
+ /* "pysam/csamtools.pyx":738
* def _open( self,
* filename,
* mode = None, # <<<<<<<<<<<<<<
*/
values[1] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":613
+ /* "pysam/csamtools.pyx":739
* filename,
* mode = None,
* Samfile template = None, # <<<<<<<<<<<<<<
*/
values[2] = (PyObject *)((struct __pyx_obj_5pysam_9csamtools_Samfile *)Py_None);
- /* "pysam/csamtools.pyx":614
+ /* "pysam/csamtools.pyx":740
* mode = None,
* Samfile template = None,
* referencenames = None, # <<<<<<<<<<<<<<
*/
values[3] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":615
+ /* "pysam/csamtools.pyx":741
* Samfile template = None,
* referencenames = None,
* referencelengths = None, # <<<<<<<<<<<<<<
*/
values[4] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":616
+ /* "pysam/csamtools.pyx":742
* referencenames = None,
* referencelengths = None,
* text = None, # <<<<<<<<<<<<<<
*/
values[5] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":617
+ /* "pysam/csamtools.pyx":743
* referencelengths = None,
* text = None,
* header = None, # <<<<<<<<<<<<<<
*/
values[6] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":618
+ /* "pysam/csamtools.pyx":744
* text = None,
* header = None,
* port = None, # <<<<<<<<<<<<<<
* check_header = True,
*/
values[7] = ((PyObject *)Py_None);
- values[8] = __pyx_k_21;
- values[9] = __pyx_k_22;
- values[10] = __pyx_k_23;
+ values[8] = __pyx_k_29;
+ values[9] = __pyx_k_30;
+ values[10] = __pyx_k_31;
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 11, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 11, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Samfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_template), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "template", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_template), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "template", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_6_open(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_template, __pyx_v_referencenames, __pyx_v_referencelengths, __pyx_v_text, __pyx_v_header, __pyx_v_port, __pyx_v_add_sq_text, __pyx_v_check_header, __pyx_v_check_sq);
goto __pyx_L0;
__pyx_L1_error:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":610
+/* "pysam/csamtools.pyx":736
* return self.index != NULL
*
* def _open( self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_open", 0);
- __Pyx_TraceCall("_open", __pyx_f[0], 610);
+ __Pyx_TraceCall("_open", __pyx_f[0], 736);
__Pyx_INCREF(__pyx_v_filename);
__Pyx_INCREF(__pyx_v_referencenames);
__Pyx_INCREF(__pyx_v_text);
- /* "pysam/csamtools.pyx":630
+ /* "pysam/csamtools.pyx":756
*
* # read mode autodetection
* if mode is None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_mode == Py_None);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":631
+ /* "pysam/csamtools.pyx":757
* # read mode autodetection
* if mode is None:
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_4);
/*try:*/ {
- /* "pysam/csamtools.pyx":632
+ /* "pysam/csamtools.pyx":758
* if mode is None:
* try:
* self._open(filename, 'rb', template=template, # <<<<<<<<<<<<<<
* referencenames=referencenames,
* referencelengths=referencelengths,
*/
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename);
__Pyx_INCREF(((PyObject *)__pyx_n_s__rb));
PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__rb));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__rb));
- __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__template), ((PyObject *)__pyx_v_template)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__template), ((PyObject *)__pyx_v_template)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
- /* "pysam/csamtools.pyx":633
+ /* "pysam/csamtools.pyx":759
* try:
* self._open(filename, 'rb', template=template,
* referencenames=referencenames, # <<<<<<<<<<<<<<
* referencelengths=referencelengths,
* text=text, header=header, port=port,
*/
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__referencenames), __pyx_v_referencenames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__referencenames), __pyx_v_referencenames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
- /* "pysam/csamtools.pyx":634
+ /* "pysam/csamtools.pyx":760
* self._open(filename, 'rb', template=template,
* referencenames=referencenames,
* referencelengths=referencelengths, # <<<<<<<<<<<<<<
* text=text, header=header, port=port,
* check_header=check_header,
*/
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__referencelengths), __pyx_v_referencelengths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__referencelengths), __pyx_v_referencelengths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
- /* "pysam/csamtools.pyx":635
+ /* "pysam/csamtools.pyx":761
* referencenames=referencenames,
* referencelengths=referencelengths,
* text=text, header=header, port=port, # <<<<<<<<<<<<<<
* check_header=check_header,
* check_sq=check_sq)
*/
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__text), __pyx_v_text) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__header), __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__port), __pyx_v_port) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__text), __pyx_v_text) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__header), __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__port), __pyx_v_port) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
- /* "pysam/csamtools.pyx":636
+ /* "pysam/csamtools.pyx":762
* referencelengths=referencelengths,
* text=text, header=header, port=port,
* check_header=check_header, # <<<<<<<<<<<<<<
* check_sq=check_sq)
* return
*/
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__check_header), __pyx_v_check_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__check_header), __pyx_v_check_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
- /* "pysam/csamtools.pyx":637
+ /* "pysam/csamtools.pyx":763
* text=text, header=header, port=port,
* check_header=check_header,
* check_sq=check_sq) # <<<<<<<<<<<<<<
* return
* except ValueError, msg:
*/
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__check_sq), __pyx_v_check_sq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
- __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__check_sq), __pyx_v_check_sq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":638
+ /* "pysam/csamtools.pyx":764
* check_header=check_header,
* check_sq=check_sq)
* return # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":639
+ /* "pysam/csamtools.pyx":765
* check_sq=check_sq)
* return
* except ValueError, msg: # <<<<<<<<<<<<<<
__pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
if (__pyx_t_9) {
__Pyx_AddTraceback("pysam.csamtools.Samfile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_6);
__pyx_L11_try_end:;
}
- /* "pysam/csamtools.pyx":642
+ /* "pysam/csamtools.pyx":768
* pass
*
* self._open(filename, 'r', template=template, # <<<<<<<<<<<<<<
* referencenames=referencenames,
* referencelengths=referencelengths,
*/
- __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___open); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_filename);
__Pyx_INCREF(((PyObject *)__pyx_n_s__r));
PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__r));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
- __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
- if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__template), ((PyObject *)__pyx_v_template)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__template), ((PyObject *)__pyx_v_template)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":643
+ /* "pysam/csamtools.pyx":769
*
* self._open(filename, 'r', template=template,
* referencenames=referencenames, # <<<<<<<<<<<<<<
* referencelengths=referencelengths,
* text=text, header=header, port=port,
*/
- if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__referencenames), __pyx_v_referencenames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__referencenames), __pyx_v_referencenames) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":644
+ /* "pysam/csamtools.pyx":770
* self._open(filename, 'r', template=template,
* referencenames=referencenames,
* referencelengths=referencelengths, # <<<<<<<<<<<<<<
* text=text, header=header, port=port,
* check_header=check_header,
*/
- if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__referencelengths), __pyx_v_referencelengths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__referencelengths), __pyx_v_referencelengths) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":645
+ /* "pysam/csamtools.pyx":771
* referencenames=referencenames,
* referencelengths=referencelengths,
* text=text, header=header, port=port, # <<<<<<<<<<<<<<
* check_header=check_header,
* check_sq=check_sq)
*/
- if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__text), __pyx_v_text) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__header), __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__port), __pyx_v_port) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__text), __pyx_v_text) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__header), __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__port), __pyx_v_port) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":646
+ /* "pysam/csamtools.pyx":772
* referencelengths=referencelengths,
* text=text, header=header, port=port,
* check_header=check_header, # <<<<<<<<<<<<<<
* check_sq=check_sq)
* return
*/
- if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__check_header), __pyx_v_check_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__check_header), __pyx_v_check_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":647
+ /* "pysam/csamtools.pyx":773
* text=text, header=header, port=port,
* check_header=check_header,
* check_sq=check_sq) # <<<<<<<<<<<<<<
* return
*
*/
- if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__check_sq), __pyx_v_check_sq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__check_sq), __pyx_v_check_sq) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "pysam/csamtools.pyx":648
+ /* "pysam/csamtools.pyx":774
* check_header=check_header,
* check_sq=check_sq)
* return # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":650
+ /* "pysam/csamtools.pyx":776
* return
*
* assert mode in ( "r","w","rb","wb", "wh", "wbu", "rU" ), "invalid file opening mode `%s`" % mode # <<<<<<<<<<<<<<
#ifndef CYTHON_WITHOUT_ASSERTIONS
__Pyx_INCREF(__pyx_v_mode);
__pyx_t_5 = __pyx_v_mode;
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (!((int)__pyx_t_1)) {
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_11 = ((int)__pyx_t_10);
} else {
__pyx_t_11 = ((int)__pyx_t_1);
}
if (!__pyx_t_11) {
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__rb), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__rb), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_10 = ((int)__pyx_t_1);
} else {
__pyx_t_10 = __pyx_t_11;
}
if (!__pyx_t_10) {
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__wb), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__wb), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_1 = ((int)__pyx_t_11);
} else {
__pyx_t_1 = __pyx_t_10;
}
if (!__pyx_t_1) {
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__wh), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__wh), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_11 = ((int)__pyx_t_10);
} else {
__pyx_t_11 = __pyx_t_1;
}
if (!__pyx_t_11) {
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__wbu), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__wbu), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_10 = ((int)__pyx_t_1);
} else {
__pyx_t_10 = __pyx_t_11;
}
if (!__pyx_t_10) {
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__rU), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__rU), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_1 = ((int)__pyx_t_11);
} else {
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (unlikely(!__pyx_t_1)) {
- __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_24), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_32), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_5));
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":655
+ /* "pysam/csamtools.pyx":781
*
* # close a previously opened file
* if self.samfile != NULL: self.close() # <<<<<<<<<<<<<<
*/
__pyx_t_1 = (__pyx_v_self->samfile != NULL);
if (__pyx_t_1) {
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__pyx_L14:;
- /* "pysam/csamtools.pyx":656
+ /* "pysam/csamtools.pyx":782
* # close a previously opened file
* if self.samfile != NULL: self.close()
* self.samfile = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->samfile = NULL;
- /* "pysam/csamtools.pyx":659
+ /* "pysam/csamtools.pyx":785
*
* cdef bam_header_t * header_to_write
* header_to_write = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_header_to_write = NULL;
- /* "pysam/csamtools.pyx":661
+ /* "pysam/csamtools.pyx":787
* header_to_write = NULL
*
* if self._filename != NULL: free(self._filename ) # <<<<<<<<<<<<<<
}
__pyx_L15:;
- /* "pysam/csamtools.pyx":662
+ /* "pysam/csamtools.pyx":788
*
* if self._filename != NULL: free(self._filename )
* filename = _my_encodeFilename(filename) # <<<<<<<<<<<<<<
* cdef bytes bmode = mode.encode('ascii')
* #cdef char* cfilename
*/
- __pyx_t_8 = ((PyObject *)__pyx_f_5pysam_9csamtools__my_encodeFilename(__pyx_v_filename)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = ((PyObject *)__pyx_f_5pysam_9csamtools__my_encodeFilename(__pyx_v_filename)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_v_filename);
__pyx_v_filename = __pyx_t_8;
__pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":663
+ /* "pysam/csamtools.pyx":789
* if self._filename != NULL: free(self._filename )
* filename = _my_encodeFilename(filename)
* cdef bytes bmode = mode.encode('ascii') # <<<<<<<<<<<<<<
* #cdef char* cfilename
* #cfilename = filename.encode(_FILENAME_ENCODING)
*/
- __pyx_t_8 = PyObject_GetAttr(__pyx_v_mode, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(__pyx_v_mode, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_bmode = ((PyObject*)__pyx_t_5);
__pyx_t_5 = 0;
- /* "pysam/csamtools.pyx":666
+ /* "pysam/csamtools.pyx":792
* #cdef char* cfilename
* #cfilename = filename.encode(_FILENAME_ENCODING)
* self._filename = strdup(filename) # <<<<<<<<<<<<<<
* self.isstream = strcmp( filename, "-" ) == 0
*
*/
- __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_filename = strdup(__pyx_t_12);
- /* "pysam/csamtools.pyx":667
+ /* "pysam/csamtools.pyx":793
* #cfilename = filename.encode(_FILENAME_ENCODING)
* self._filename = strdup(filename)
* self.isstream = strcmp( filename, "-" ) == 0 # <<<<<<<<<<<<<<
*
* self.isbam = len(mode) > 1 and mode[1] == 'b'
*/
- __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->isstream = (strcmp(__pyx_t_12, __pyx_k_26) == 0);
+ __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_self->isstream = (strcmp(__pyx_t_12, __pyx_k_34) == 0);
- /* "pysam/csamtools.pyx":669
+ /* "pysam/csamtools.pyx":795
* self.isstream = strcmp( filename, "-" ) == 0
*
* self.isbam = len(mode) > 1 and mode[1] == 'b' # <<<<<<<<<<<<<<
*
* self.isremote = strncmp(filename,"http:",5) == 0 or \
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_mode); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyBool_FromLong((__pyx_t_13 > 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_mode); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyBool_FromLong((__pyx_t_13 > 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_mode, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_mode, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__b), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__b), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_8 = __pyx_t_7;
__pyx_t_7 = 0;
__pyx_t_8 = __pyx_t_5;
__pyx_t_5 = 0;
}
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_self->isbam = __pyx_t_9;
- /* "pysam/csamtools.pyx":671
+ /* "pysam/csamtools.pyx":797
* self.isbam = len(mode) > 1 and mode[1] == 'b'
*
* self.isremote = strncmp(filename,"http:",5) == 0 or \ # <<<<<<<<<<<<<<
* strncmp(filename,"ftp:",4) == 0
*
*/
- __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = (strncmp(__pyx_t_12, __pyx_k_27, 5) == 0);
+ __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = (strncmp(__pyx_t_12, __pyx_k_35, 5) == 0);
if (!__pyx_t_1) {
- /* "pysam/csamtools.pyx":672
+ /* "pysam/csamtools.pyx":798
*
* self.isremote = strncmp(filename,"http:",5) == 0 or \
* strncmp(filename,"ftp:",4) == 0 # <<<<<<<<<<<<<<
*
* cdef char * ctext
*/
- __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_10 = (strncmp(__pyx_t_12, __pyx_k_28, 4) == 0);
+ __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = (strncmp(__pyx_t_12, __pyx_k_36, 4) == 0);
__pyx_t_11 = __pyx_t_10;
} else {
__pyx_t_11 = __pyx_t_1;
}
- /* "pysam/csamtools.pyx":671
+ /* "pysam/csamtools.pyx":797
* self.isbam = len(mode) > 1 and mode[1] == 'b'
*
* self.isremote = strncmp(filename,"http:",5) == 0 or \ # <<<<<<<<<<<<<<
*/
__pyx_v_self->isremote = __pyx_t_11;
- /* "pysam/csamtools.pyx":675
+ /* "pysam/csamtools.pyx":801
*
* cdef char * ctext
* ctext = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_ctext = NULL;
- /* "pysam/csamtools.pyx":677
+ /* "pysam/csamtools.pyx":803
* ctext = NULL
*
* if mode[0] == 'w': # <<<<<<<<<<<<<<
* # open file for writing
*
*/
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":681
+ /* "pysam/csamtools.pyx":807
*
* # header structure (used for writing)
* if template: # <<<<<<<<<<<<<<
* # copy header from another file
* header_to_write = template.samfile.header
*/
- __pyx_t_11 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_template)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_template)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":683
+ /* "pysam/csamtools.pyx":809
* if template:
* # copy header from another file
* header_to_write = template.samfile.header # <<<<<<<<<<<<<<
goto __pyx_L17;
}
- /* "pysam/csamtools.pyx":685
+ /* "pysam/csamtools.pyx":811
* header_to_write = template.samfile.header
*
* elif header: # <<<<<<<<<<<<<<
* header_to_write = self._buildHeader( header )
*
*/
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_header); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_header); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":686
+ /* "pysam/csamtools.pyx":812
*
* elif header:
* header_to_write = self._buildHeader( header ) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":690
+ /* "pysam/csamtools.pyx":816
* else:
* # build header from a target names and lengths
* assert referencenames and referencelengths, "either supply options `template`, `header` or both `referencenames` and `referencelengths` for writing" # <<<<<<<<<<<<<<
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_referencenames); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_referencenames); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_11) {
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_referencelengths); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_referencelengths); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_10 = __pyx_t_1;
} else {
__pyx_t_10 = __pyx_t_11;
}
if (unlikely(!__pyx_t_10)) {
- PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_29));
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_37));
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":691
+ /* "pysam/csamtools.pyx":817
* # build header from a target names and lengths
* assert referencenames and referencelengths, "either supply options `template`, `header` or both `referencenames` and `referencelengths` for writing"
* assert len(referencenames) == len(referencelengths), "unequal names and lengths of reference sequences" # <<<<<<<<<<<<<<
* # allocate and fill header
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
- __pyx_t_13 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_15 = PyObject_Length(__pyx_v_referencelengths); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Length(__pyx_v_referencelengths); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (unlikely(!(__pyx_t_13 == __pyx_t_15))) {
- PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_30));
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_38));
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":694
+ /* "pysam/csamtools.pyx":820
*
* # allocate and fill header
* referencenames = [ _force_bytes(ref) for ref in referencenames ] # <<<<<<<<<<<<<<
* header_to_write = bam_header_init()
* header_to_write.n_targets = len(referencenames)
*/
- __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
if (PyList_CheckExact(__pyx_v_referencenames) || PyTuple_CheckExact(__pyx_v_referencenames)) {
__pyx_t_8 = __pyx_v_referencenames; __Pyx_INCREF(__pyx_t_8); __pyx_t_15 = 0;
__pyx_t_16 = NULL;
} else {
- __pyx_t_15 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_referencenames); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_referencenames); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_16 = Py_TYPE(__pyx_t_8)->tp_iternext;
}
if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_8)) {
if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_8)) {
if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_7 = __pyx_t_16(__pyx_t_8);
if (unlikely(!__pyx_t_7)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_XDECREF(__pyx_v_ref);
__pyx_v_ref = __pyx_t_7;
__pyx_t_7 = 0;
- __pyx_t_7 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_ref)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_ref)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- if (unlikely(__Pyx_PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_referencenames = __pyx_t_8;
__pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":695
+ /* "pysam/csamtools.pyx":821
* # allocate and fill header
* referencenames = [ _force_bytes(ref) for ref in referencenames ]
* header_to_write = bam_header_init() # <<<<<<<<<<<<<<
*/
__pyx_v_header_to_write = bam_header_init();
- /* "pysam/csamtools.pyx":696
+ /* "pysam/csamtools.pyx":822
* referencenames = [ _force_bytes(ref) for ref in referencenames ]
* header_to_write = bam_header_init()
* header_to_write.n_targets = len(referencenames) # <<<<<<<<<<<<<<
* n = 0
* for x in referencenames: n += len(x) + 1
*/
- __pyx_t_15 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_header_to_write->n_targets = __pyx_t_15;
- /* "pysam/csamtools.pyx":697
+ /* "pysam/csamtools.pyx":823
* header_to_write = bam_header_init()
* header_to_write.n_targets = len(referencenames)
* n = 0 # <<<<<<<<<<<<<<
__Pyx_INCREF(__pyx_int_0);
__pyx_v_n = __pyx_int_0;
- /* "pysam/csamtools.pyx":698
+ /* "pysam/csamtools.pyx":824
* header_to_write.n_targets = len(referencenames)
* n = 0
* for x in referencenames: n += len(x) + 1 # <<<<<<<<<<<<<<
__pyx_t_8 = __pyx_v_referencenames; __Pyx_INCREF(__pyx_t_8); __pyx_t_15 = 0;
__pyx_t_16 = NULL;
} else {
- __pyx_t_15 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_referencenames); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_referencenames); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_16 = Py_TYPE(__pyx_t_8)->tp_iternext;
}
if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_8)) {
if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_8)) {
if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_5 = __pyx_t_16(__pyx_t_8);
if (unlikely(!__pyx_t_5)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_XDECREF(__pyx_v_x);
__pyx_v_x = __pyx_t_5;
__pyx_t_5 = 0;
- __pyx_t_13 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_13 + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_13 + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_n, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_n, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_v_n);
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":699
+ /* "pysam/csamtools.pyx":825
* n = 0
* for x in referencenames: n += len(x) + 1
* header_to_write.target_name = <char**>calloc(n, sizeof(char*)) # <<<<<<<<<<<<<<
* header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
* for x from 0 <= x < header_to_write.n_targets:
*/
- __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_header_to_write->target_name = ((char **)calloc(__pyx_t_17, (sizeof(char *))));
- /* "pysam/csamtools.pyx":700
+ /* "pysam/csamtools.pyx":826
* for x in referencenames: n += len(x) + 1
* header_to_write.target_name = <char**>calloc(n, sizeof(char*))
* header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t)) # <<<<<<<<<<<<<<
* for x from 0 <= x < header_to_write.n_targets:
* header_to_write.target_len[x] = referencelengths[x]
*/
- __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_header_to_write->target_len = ((uint32_t *)calloc(__pyx_t_17, (sizeof(uint32_t))));
- /* "pysam/csamtools.pyx":701
+ /* "pysam/csamtools.pyx":827
* header_to_write.target_name = <char**>calloc(n, sizeof(char*))
* header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
* for x from 0 <= x < header_to_write.n_targets: # <<<<<<<<<<<<<<
*/
__pyx_t_18 = __pyx_v_header_to_write->n_targets;
for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19++) {
- __pyx_t_8 = PyInt_FromLong(__pyx_t_19); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_t_19); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_v_x);
__pyx_v_x = __pyx_t_8;
__pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":702
+ /* "pysam/csamtools.pyx":828
* header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
* for x from 0 <= x < header_to_write.n_targets:
* header_to_write.target_len[x] = referencelengths[x] # <<<<<<<<<<<<<<
* name = referencenames[x]
* header_to_write.target_name[x] = <char*>calloc(len(name)+1, sizeof(char))
*/
- __pyx_t_8 = PyObject_GetItem(__pyx_v_referencelengths, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(__pyx_v_referencelengths, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_20 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_20 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_20 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_20 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
(__pyx_v_header_to_write->target_len[__pyx_t_15]) = __pyx_t_20;
- /* "pysam/csamtools.pyx":703
+ /* "pysam/csamtools.pyx":829
* for x from 0 <= x < header_to_write.n_targets:
* header_to_write.target_len[x] = referencelengths[x]
* name = referencenames[x] # <<<<<<<<<<<<<<
* header_to_write.target_name[x] = <char*>calloc(len(name)+1, sizeof(char))
* strncpy( header_to_write.target_name[x], name, len(name) )
*/
- __pyx_t_8 = PyObject_GetItem(__pyx_v_referencenames, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(__pyx_v_referencenames, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_v_name);
__pyx_v_name = __pyx_t_8;
__pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":704
+ /* "pysam/csamtools.pyx":830
* header_to_write.target_len[x] = referencelengths[x]
* name = referencenames[x]
* header_to_write.target_name[x] = <char*>calloc(len(name)+1, sizeof(char)) # <<<<<<<<<<<<<<
* strncpy( header_to_write.target_name[x], name, len(name) )
*
*/
- __pyx_t_15 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
(__pyx_v_header_to_write->target_name[__pyx_t_13]) = ((char *)calloc((__pyx_t_15 + 1), (sizeof(char))));
- /* "pysam/csamtools.pyx":705
+ /* "pysam/csamtools.pyx":831
* name = referencenames[x]
* header_to_write.target_name[x] = <char*>calloc(len(name)+1, sizeof(char))
* strncpy( header_to_write.target_name[x], name, len(name) ) # <<<<<<<<<<<<<<
*
* # Optionally, if there is no text, add a SAM compatible header to output
*/
- __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = PyBytes_AsString(__pyx_v_name); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_13 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyBytes_AsString(__pyx_v_name); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
strncpy((__pyx_v_header_to_write->target_name[__pyx_t_15]), __pyx_t_12, __pyx_t_13);
- __pyx_t_19 = __Pyx_PyInt_AsLong(__pyx_v_x); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_19 = __Pyx_PyInt_AsLong(__pyx_v_x); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "pysam/csamtools.pyx":701
+ /* "pysam/csamtools.pyx":827
* header_to_write.target_name = <char**>calloc(n, sizeof(char*))
* header_to_write.target_len = <uint32_t*>calloc(n, sizeof(uint32_t))
* for x from 0 <= x < header_to_write.n_targets: # <<<<<<<<<<<<<<
* header_to_write.target_len[x] = referencelengths[x]
* name = referencenames[x]
*/
- __pyx_t_8 = PyInt_FromLong(__pyx_t_19); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_t_19); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_v_x);
__pyx_v_x = __pyx_t_8;
__pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":709
+ /* "pysam/csamtools.pyx":835
* # Optionally, if there is no text, add a SAM compatible header to output
* # file.
* if text is None and add_sq_text: # <<<<<<<<<<<<<<
*/
__pyx_t_10 = (__pyx_v_text == Py_None);
if (__pyx_t_10) {
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_add_sq_text); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_add_sq_text); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = __pyx_t_11;
} else {
__pyx_t_1 = __pyx_t_10;
}
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":710
+ /* "pysam/csamtools.pyx":836
* # file.
* if text is None and add_sq_text:
* text = [] # <<<<<<<<<<<<<<
* for x from 0 <= x < header_to_write.n_targets:
* text.append( "@SQ\tSN:%s\tLN:%s\n" % (referencenames[x], referencelengths[x] ) )
*/
- __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_v_text);
__pyx_v_text = ((PyObject *)__pyx_t_8);
__pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":711
+ /* "pysam/csamtools.pyx":837
* if text is None and add_sq_text:
* text = []
* for x from 0 <= x < header_to_write.n_targets: # <<<<<<<<<<<<<<
*/
__pyx_t_18 = __pyx_v_header_to_write->n_targets;
for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19++) {
- __pyx_t_8 = PyInt_FromLong(__pyx_t_19); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_t_19); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_v_x);
__pyx_v_x = __pyx_t_8;
__pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":712
+ /* "pysam/csamtools.pyx":838
* text = []
* for x from 0 <= x < header_to_write.n_targets:
* text.append( "@SQ\tSN:%s\tLN:%s\n" % (referencenames[x], referencelengths[x] ) ) # <<<<<<<<<<<<<<
* text = ''.join(text)
*
*/
- __pyx_t_8 = PyObject_GetItem(__pyx_v_referencenames, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(__pyx_v_referencenames, __pyx_v_x); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyObject_GetItem(__pyx_v_referencelengths, __pyx_v_x); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_referencelengths, __pyx_v_x); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_8 = 0;
__pyx_t_7 = 0;
- __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_31), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_39), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_text, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_text, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_19 = __Pyx_PyInt_AsLong(__pyx_v_x); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_19 = __Pyx_PyInt_AsLong(__pyx_v_x); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "pysam/csamtools.pyx":711
+ /* "pysam/csamtools.pyx":837
* if text is None and add_sq_text:
* text = []
* for x from 0 <= x < header_to_write.n_targets: # <<<<<<<<<<<<<<
* text.append( "@SQ\tSN:%s\tLN:%s\n" % (referencenames[x], referencelengths[x] ) )
* text = ''.join(text)
*/
- __pyx_t_5 = PyInt_FromLong(__pyx_t_19); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(__pyx_t_19); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_v_x);
__pyx_v_x = __pyx_t_5;
__pyx_t_5 = 0;
- /* "pysam/csamtools.pyx":713
+ /* "pysam/csamtools.pyx":839
* for x from 0 <= x < header_to_write.n_targets:
* text.append( "@SQ\tSN:%s\tLN:%s\n" % (referencenames[x], referencelengths[x] ) )
* text = ''.join(text) # <<<<<<<<<<<<<<
*
* if text != None:
*/
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_16), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_16), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_text);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_text);
__Pyx_GIVEREF(__pyx_v_text);
- __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
}
__pyx_L24:;
- /* "pysam/csamtools.pyx":715
+ /* "pysam/csamtools.pyx":841
* text = ''.join(text)
*
* if text != None: # <<<<<<<<<<<<<<
* # copy without \0
* text = _force_bytes(text)
*/
- __pyx_t_8 = PyObject_RichCompare(__pyx_v_text, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_text, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":717
+ /* "pysam/csamtools.pyx":843
* if text != None:
* # copy without \0
* text = _force_bytes(text) # <<<<<<<<<<<<<<
* ctext = text
* header_to_write.l_text = strlen(ctext)
*/
- __pyx_t_8 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_text)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_text)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_v_text);
__pyx_v_text = __pyx_t_8;
__pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":718
+ /* "pysam/csamtools.pyx":844
* # copy without \0
* text = _force_bytes(text)
* ctext = text # <<<<<<<<<<<<<<
* header_to_write.l_text = strlen(ctext)
* header_to_write.text = <char*>calloc( strlen(ctext), sizeof(char) )
*/
- __pyx_t_12 = PyBytes_AsString(__pyx_v_text); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyBytes_AsString(__pyx_v_text); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_ctext = __pyx_t_12;
- /* "pysam/csamtools.pyx":719
+ /* "pysam/csamtools.pyx":845
* text = _force_bytes(text)
* ctext = text
* header_to_write.l_text = strlen(ctext) # <<<<<<<<<<<<<<
*/
__pyx_v_header_to_write->l_text = strlen(__pyx_v_ctext);
- /* "pysam/csamtools.pyx":720
+ /* "pysam/csamtools.pyx":846
* ctext = text
* header_to_write.l_text = strlen(ctext)
* header_to_write.text = <char*>calloc( strlen(ctext), sizeof(char) ) # <<<<<<<<<<<<<<
*/
__pyx_v_header_to_write->text = ((char *)calloc(strlen(__pyx_v_ctext), (sizeof(char))));
- /* "pysam/csamtools.pyx":721
+ /* "pysam/csamtools.pyx":847
* header_to_write.l_text = strlen(ctext)
* header_to_write.text = <char*>calloc( strlen(ctext), sizeof(char) )
* memcpy( header_to_write.text, ctext, strlen(ctext) ) # <<<<<<<<<<<<<<
}
__pyx_L27:;
- /* "pysam/csamtools.pyx":723
+ /* "pysam/csamtools.pyx":849
* memcpy( header_to_write.text, ctext, strlen(ctext) )
*
* header_to_write.hash = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_header_to_write->hash = NULL;
- /* "pysam/csamtools.pyx":724
+ /* "pysam/csamtools.pyx":850
*
* header_to_write.hash = NULL
* header_to_write.rg2lib = NULL # <<<<<<<<<<<<<<
}
__pyx_L17:;
- /* "pysam/csamtools.pyx":728
+ /* "pysam/csamtools.pyx":854
* # open file. Header gets written to file at the same time for bam files
* # and sam files (in the latter case, the mode needs to be wh)
* store = StderrStore() # <<<<<<<<<<<<<<
* self.samfile = samopen( filename, bmode, header_to_write )
* store.release()
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_store = __pyx_t_7;
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":729
+ /* "pysam/csamtools.pyx":855
* # and sam files (in the latter case, the mode needs to be wh)
* store = StderrStore()
* self.samfile = samopen( filename, bmode, header_to_write ) # <<<<<<<<<<<<<<
* store.release()
*
*/
- __pyx_t_21 = PyBytes_AsString(__pyx_v_filename); if (unlikely((__pyx_t_21 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_bmode)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = PyBytes_AsString(__pyx_v_filename); if (unlikely((__pyx_t_21 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_bmode)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->samfile = samopen(__pyx_t_21, __pyx_t_12, __pyx_v_header_to_write);
- /* "pysam/csamtools.pyx":730
+ /* "pysam/csamtools.pyx":856
* store = StderrStore()
* self.samfile = samopen( filename, bmode, header_to_write )
* store.release() # <<<<<<<<<<<<<<
*
* # bam_header_destroy takes care of cleaning up of all the members
*/
- __pyx_t_7 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":733
+ /* "pysam/csamtools.pyx":859
*
* # bam_header_destroy takes care of cleaning up of all the members
* if not template and header_to_write != NULL: # <<<<<<<<<<<<<<
* bam_header_destroy( header_to_write )
*
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_template)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_template)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_10 = (!__pyx_t_1);
if (__pyx_t_10) {
__pyx_t_1 = (__pyx_v_header_to_write != NULL);
}
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":734
+ /* "pysam/csamtools.pyx":860
* # bam_header_destroy takes care of cleaning up of all the members
* if not template and header_to_write != NULL:
* bam_header_destroy( header_to_write ) # <<<<<<<<<<<<<<
goto __pyx_L16;
}
- /* "pysam/csamtools.pyx":736
+ /* "pysam/csamtools.pyx":862
* bam_header_destroy( header_to_write )
*
* elif mode[0] == "r": # <<<<<<<<<<<<<<
* # open file for reading
* if strncmp( filename, "-", 1) != 0 and \
*/
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":738
+ /* "pysam/csamtools.pyx":864
* elif mode[0] == "r":
* # open file for reading
* if strncmp( filename, "-", 1) != 0 and \ # <<<<<<<<<<<<<<
* not self.isremote and \
* not os.path.exists( filename ):
*/
- __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_11 = (strncmp(__pyx_t_12, __pyx_k_26, 1) != 0);
+ __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = (strncmp(__pyx_t_12, __pyx_k_34, 1) != 0);
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":739
+ /* "pysam/csamtools.pyx":865
* # open file for reading
* if strncmp( filename, "-", 1) != 0 and \
* not self.isremote and \ # <<<<<<<<<<<<<<
__pyx_t_10 = (!__pyx_v_self->isremote);
if (__pyx_t_10) {
- /* "pysam/csamtools.pyx":740
+ /* "pysam/csamtools.pyx":866
* if strncmp( filename, "-", 1) != 0 and \
* not self.isremote and \
* not os.path.exists( filename ): # <<<<<<<<<<<<<<
* raise IOError( "file `%s` not found" % filename)
*
*/
- __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__path); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__path); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__exists); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__exists); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_filename);
__Pyx_GIVEREF(__pyx_v_filename);
- __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_22 = (!__pyx_t_1);
__pyx_t_1 = __pyx_t_22;
}
if (__pyx_t_10) {
- /* "pysam/csamtools.pyx":741
+ /* "pysam/csamtools.pyx":867
* not self.isremote and \
* not os.path.exists( filename ):
* raise IOError( "file `%s` not found" % filename) # <<<<<<<<<<<<<<
*
* # try to detect errors
*/
- __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_32), __pyx_v_filename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_40), __pyx_v_filename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L29;
}
__pyx_L29:;
- /* "pysam/csamtools.pyx":744
+ /* "pysam/csamtools.pyx":870
*
* # try to detect errors
* self.samfile = samopen( filename, bmode, NULL ) # <<<<<<<<<<<<<<
* if self.samfile == NULL:
* raise ValueError( "could not open file (mode='%s') - is it SAM/BAM format?" % mode)
*/
- __pyx_t_21 = PyBytes_AsString(__pyx_v_filename); if (unlikely((__pyx_t_21 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_bmode)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = PyBytes_AsString(__pyx_v_filename); if (unlikely((__pyx_t_21 == (const char*)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyBytes_AsString(((PyObject *)__pyx_v_bmode)); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->samfile = samopen(__pyx_t_21, __pyx_t_12, NULL);
- /* "pysam/csamtools.pyx":745
+ /* "pysam/csamtools.pyx":871
* # try to detect errors
* self.samfile = samopen( filename, bmode, NULL )
* if self.samfile == NULL: # <<<<<<<<<<<<<<
__pyx_t_10 = (__pyx_v_self->samfile == NULL);
if (__pyx_t_10) {
- /* "pysam/csamtools.pyx":746
+ /* "pysam/csamtools.pyx":872
* self.samfile = samopen( filename, bmode, NULL )
* if self.samfile == NULL:
* raise ValueError( "could not open file (mode='%s') - is it SAM/BAM format?" % mode) # <<<<<<<<<<<<<<
*
* # bam files require a valid header
*/
- __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_33), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_41), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L30;
}
__pyx_L30:;
- /* "pysam/csamtools.pyx":749
+ /* "pysam/csamtools.pyx":875
*
* # bam files require a valid header
* if self.isbam: # <<<<<<<<<<<<<<
*/
if (__pyx_v_self->isbam) {
- /* "pysam/csamtools.pyx":750
+ /* "pysam/csamtools.pyx":876
* # bam files require a valid header
* if self.isbam:
* if self.samfile.header == NULL: # <<<<<<<<<<<<<<
__pyx_t_10 = (__pyx_v_self->samfile->header == NULL);
if (__pyx_t_10) {
- /* "pysam/csamtools.pyx":751
+ /* "pysam/csamtools.pyx":877
* if self.isbam:
* if self.samfile.header == NULL:
* raise ValueError( "file does not have valid header (mode='%s') - is it BAM format?" % mode ) # <<<<<<<<<<<<<<
* else:
* # in sam files it is optional (samfile full of unmapped reads)
*/
- __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_34), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_42), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L32;
}
__pyx_L32:;
}
/*else*/ {
- /* "pysam/csamtools.pyx":754
+ /* "pysam/csamtools.pyx":880
* else:
* # in sam files it is optional (samfile full of unmapped reads)
* if check_header and self.samfile.header == NULL: # <<<<<<<<<<<<<<
* raise ValueError( "file does not have valid header (mode='%s') - is it SAM format?" % mode )
*
*/
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_check_header); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_check_header); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_10) {
__pyx_t_11 = (__pyx_v_self->samfile->header == NULL);
__pyx_t_1 = __pyx_t_11;
}
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":755
+ /* "pysam/csamtools.pyx":881
* # in sam files it is optional (samfile full of unmapped reads)
* if check_header and self.samfile.header == NULL:
* raise ValueError( "file does not have valid header (mode='%s') - is it SAM format?" % mode ) # <<<<<<<<<<<<<<
*
* # disabled for autodetection to work
*/
- __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_35), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_43), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L33;
}
__pyx_L33:;
}
__pyx_L31:;
- /* "pysam/csamtools.pyx":759
+ /* "pysam/csamtools.pyx":885
* # disabled for autodetection to work
* # needs to be disabled so that reading from sam-files without headers works
* if check_sq and self.samfile.header.n_targets == 0: # <<<<<<<<<<<<<<
* raise ValueError( "file header is empty (mode='%s') - is it SAM/BAM format?" % mode)
*
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check_sq); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check_sq); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_t_10 = (__pyx_v_self->samfile->header->n_targets == 0);
__pyx_t_11 = __pyx_t_10;
}
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":760
+ /* "pysam/csamtools.pyx":886
* # needs to be disabled so that reading from sam-files without headers works
* if check_sq and self.samfile.header.n_targets == 0:
* raise ValueError( "file header is empty (mode='%s') - is it SAM/BAM format?" % mode) # <<<<<<<<<<<<<<
*
* if self.samfile == NULL:
*/
- __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_36), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_44), __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L34;
}
__pyx_L34:;
}
__pyx_L16:;
- /* "pysam/csamtools.pyx":762
+ /* "pysam/csamtools.pyx":888
* raise ValueError( "file header is empty (mode='%s') - is it SAM/BAM format?" % mode)
*
* if self.samfile == NULL: # <<<<<<<<<<<<<<
__pyx_t_11 = (__pyx_v_self->samfile == NULL);
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":763
+ /* "pysam/csamtools.pyx":889
*
* if self.samfile == NULL:
* raise IOError("could not open file `%s`" % filename ) # <<<<<<<<<<<<<<
*
* # check for index and open if present
*/
- __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_filename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_filename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L35;
}
__pyx_L35:;
- /* "pysam/csamtools.pyx":766
+ /* "pysam/csamtools.pyx":892
*
* # check for index and open if present
* if mode[0] == "r" and self.isbam: # <<<<<<<<<<<<<<
*
* if not self.isremote:
*/
- __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_11) {
__pyx_t_1 = __pyx_v_self->isbam;
}
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":768
+ /* "pysam/csamtools.pyx":894
* if mode[0] == "r" and self.isbam:
*
* if not self.isremote: # <<<<<<<<<<<<<<
__pyx_t_1 = (!__pyx_v_self->isremote);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":769
+ /* "pysam/csamtools.pyx":895
*
* if not self.isremote:
* if not os.path.exists(filename + b".bai") \ # <<<<<<<<<<<<<<
* and not os.path.exists( filename[:-4] + b".bai"):
* self.index = NULL
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_5 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__exists); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__exists); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyNumber_Add(__pyx_v_filename, ((PyObject *)__pyx_kp_b_37)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Add(__pyx_v_filename, ((PyObject *)__pyx_kp_b_45)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_11 = (!__pyx_t_1);
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":770
+ /* "pysam/csamtools.pyx":896
* if not self.isremote:
* if not os.path.exists(filename + b".bai") \
* and not os.path.exists( filename[:-4] + b".bai"): # <<<<<<<<<<<<<<
* self.index = NULL
* else:
*/
- __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__path); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__path); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__exists); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__exists); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v_filename, 0, -4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v_filename, 0, -4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyNumber_Add(__pyx_t_7, ((PyObject *)__pyx_kp_b_37)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(__pyx_t_7, ((PyObject *)__pyx_kp_b_45)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_10 = (!__pyx_t_1);
__pyx_t_1 = __pyx_t_10;
}
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":771
+ /* "pysam/csamtools.pyx":897
* if not os.path.exists(filename + b".bai") \
* and not os.path.exists( filename[:-4] + b".bai"):
* self.index = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":774
+ /* "pysam/csamtools.pyx":900
* else:
* # returns NULL if there is no index or index could not be opened
* self.index = bam_index_load(filename) # <<<<<<<<<<<<<<
* if self.index == NULL:
* raise IOError("error while opening index `%s` " % filename )
*/
- __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->index = bam_index_load(__pyx_t_12);
- /* "pysam/csamtools.pyx":775
+ /* "pysam/csamtools.pyx":901
* # returns NULL if there is no index or index could not be opened
* self.index = bam_index_load(filename)
* if self.index == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->index == NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":776
+ /* "pysam/csamtools.pyx":902
* self.index = bam_index_load(filename)
* if self.index == NULL:
* raise IOError("error while opening index `%s` " % filename ) # <<<<<<<<<<<<<<
* else:
* self.index = bam_index_load(filename)
*/
- __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_38), __pyx_v_filename); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), __pyx_v_filename); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_8));
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L39;
}
__pyx_L39:;
}
/*else*/ {
- /* "pysam/csamtools.pyx":778
+ /* "pysam/csamtools.pyx":904
* raise IOError("error while opening index `%s` " % filename )
* else:
* self.index = bam_index_load(filename) # <<<<<<<<<<<<<<
* if self.index == NULL:
* raise IOError("error while opening index `%s` " % filename )
*/
- __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->index = bam_index_load(__pyx_t_12);
- /* "pysam/csamtools.pyx":779
+ /* "pysam/csamtools.pyx":905
* else:
* self.index = bam_index_load(filename)
* if self.index == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->index == NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":780
+ /* "pysam/csamtools.pyx":906
* self.index = bam_index_load(filename)
* if self.index == NULL:
* raise IOError("error while opening index `%s` " % filename ) # <<<<<<<<<<<<<<
*
* if not self.isstream:
*/
- __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_38), __pyx_v_filename); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), __pyx_v_filename); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_8));
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L40;
}
__pyx_L40:;
}
__pyx_L37:;
- /* "pysam/csamtools.pyx":782
+ /* "pysam/csamtools.pyx":908
* raise IOError("error while opening index `%s` " % filename )
*
* if not self.isstream: # <<<<<<<<<<<<<<
__pyx_t_1 = (!__pyx_v_self->isstream);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":783
+ /* "pysam/csamtools.pyx":909
*
* if not self.isstream:
* self.start_offset = bam_tell( self.samfile.x.bam ) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":785
+/* "pysam/csamtools.pyx":911
* self.start_offset = bam_tell( self.samfile.x.bam )
*
* def gettid( self, reference ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("gettid", 0);
- __Pyx_TraceCall("gettid", __pyx_f[0], 785);
+ __Pyx_TraceCall("gettid", __pyx_f[0], 911);
__Pyx_INCREF(__pyx_v_reference);
- /* "pysam/csamtools.pyx":791
+ /* "pysam/csamtools.pyx":917
* returns -1 if reference is not known.
* '''
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* reference = _force_bytes(reference)
* return pysam_reference2tid( self.samfile.header, reference )
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":792
+ /* "pysam/csamtools.pyx":918
* '''
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* reference = _force_bytes(reference) # <<<<<<<<<<<<<<
* return pysam_reference2tid( self.samfile.header, reference )
*
*/
- __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_reference)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_reference)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_reference);
__pyx_v_reference = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":793
+ /* "pysam/csamtools.pyx":919
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* reference = _force_bytes(reference)
* return pysam_reference2tid( self.samfile.header, reference ) # <<<<<<<<<<<<<<
* def getrname( self, tid ):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = PyBytes_AsString(__pyx_v_reference); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyInt_FromLong(pysam_reference2tid(__pyx_v_self->samfile->header, __pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyBytes_AsString(__pyx_v_reference); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(pysam_reference2tid(__pyx_v_self->samfile->header, __pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":795
+/* "pysam/csamtools.pyx":921
* return pysam_reference2tid( self.samfile.header, reference )
*
* def getrname( self, tid ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("getrname", 0);
- __Pyx_TraceCall("getrname", __pyx_f[0], 795);
+ __Pyx_TraceCall("getrname", __pyx_f[0], 921);
- /* "pysam/csamtools.pyx":798
+ /* "pysam/csamtools.pyx":924
* '''
* convert numerical :term:`tid` into :term:`reference` name.'''
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not 0 <= tid < self.samfile.header.n_targets:
* raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_40), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":799
+ /* "pysam/csamtools.pyx":925
* convert numerical :term:`tid` into :term:`reference` name.'''
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not 0 <= tid < self.samfile.header.n_targets: # <<<<<<<<<<<<<<
* raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
* return _charptr_to_str(self.samfile.header.target_name[tid])
*/
- __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_tid, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_tid, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
__Pyx_DECREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_tid, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_tid, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":800
+ /* "pysam/csamtools.pyx":926
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not 0 <= tid < self.samfile.header.n_targets:
* raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) ) # <<<<<<<<<<<<<<
* return _charptr_to_str(self.samfile.header.target_name[tid])
*
*/
- __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_tid);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tid);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_41), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":801
+ /* "pysam/csamtools.pyx":927
* if not 0 <= tid < self.samfile.header.n_targets:
* raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
* return _charptr_to_str(self.samfile.header.target_name[tid]) # <<<<<<<<<<<<<<
* cdef char * _getrname( self, int tid ): # TODO unused
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_tid); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __pyx_f_5pysam_9csamtools__charptr_to_str((__pyx_v_self->samfile->header->target_name[__pyx_t_5])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_tid); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools__charptr_to_str((__pyx_v_self->samfile->header->target_name[__pyx_t_5])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":803
+/* "pysam/csamtools.pyx":929
* return _charptr_to_str(self.samfile.header.target_name[tid])
*
* cdef char * _getrname( self, int tid ): # TODO unused # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_getrname", 0);
- __Pyx_TraceCall("_getrname", __pyx_f[0], 803);
+ __Pyx_TraceCall("_getrname", __pyx_f[0], 929);
- /* "pysam/csamtools.pyx":806
+ /* "pysam/csamtools.pyx":932
* '''
* convert numerical :term:`tid` into :term:`reference` name.'''
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not 0 <= tid < self.samfile.header.n_targets:
* raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":807
+ /* "pysam/csamtools.pyx":933
* convert numerical :term:`tid` into :term:`reference` name.'''
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not 0 <= tid < self.samfile.header.n_targets: # <<<<<<<<<<<<<<
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":808
+ /* "pysam/csamtools.pyx":934
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not 0 <= tid < self.samfile.header.n_targets:
* raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) ) # <<<<<<<<<<<<<<
* return self.samfile.header.target_name[tid]
*
*/
- __pyx_t_2 = PyInt_FromLong(__pyx_v_tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_41), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":809
+ /* "pysam/csamtools.pyx":935
* if not 0 <= tid < self.samfile.header.n_targets:
* raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
* return self.samfile.header.target_name[tid] # <<<<<<<<<<<<<<
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,0};
PyObject* values[4] = {0,0,0,0};
- /* "pysam/csamtools.pyx":812
+ /* "pysam/csamtools.pyx":938
*
* def _parseRegion( self,
* reference = None, # <<<<<<<<<<<<<<
*/
values[0] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":813
+ /* "pysam/csamtools.pyx":939
* def _parseRegion( self,
* reference = None,
* start = None, # <<<<<<<<<<<<<<
*/
values[1] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":814
+ /* "pysam/csamtools.pyx":940
* reference = None,
* start = None,
* end = None, # <<<<<<<<<<<<<<
*/
values[2] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":815
+ /* "pysam/csamtools.pyx":941
* start = None,
* end = None,
* region = None ): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parseRegion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parseRegion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_parseRegion", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("_parseRegion", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":811
+/* "pysam/csamtools.pyx":937
* return self.samfile.header.target_name[tid]
*
* def _parseRegion( self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_parseRegion", 0);
- __Pyx_TraceCall("_parseRegion", __pyx_f[0], 811);
+ __Pyx_TraceCall("_parseRegion", __pyx_f[0], 937);
__Pyx_INCREF(__pyx_v_reference);
__Pyx_INCREF(__pyx_v_region);
- /* "pysam/csamtools.pyx":834
+ /* "pysam/csamtools.pyx":960
* cdef long long rend
*
* rtid = -1 # <<<<<<<<<<<<<<
*/
__pyx_v_rtid = -1;
- /* "pysam/csamtools.pyx":835
+ /* "pysam/csamtools.pyx":961
*
* rtid = -1
* rstart = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_rstart = 0;
- /* "pysam/csamtools.pyx":836
+ /* "pysam/csamtools.pyx":962
* rtid = -1
* rstart = 0
* rend = max_pos # <<<<<<<<<<<<<<
*/
__pyx_v_rend = __pyx_v_5pysam_9csamtools_max_pos;
- /* "pysam/csamtools.pyx":837
+ /* "pysam/csamtools.pyx":963
* rstart = 0
* rend = max_pos
* if start != None: # <<<<<<<<<<<<<<
* try:
* rstart = start
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":838
+ /* "pysam/csamtools.pyx":964
* rend = max_pos
* if start != None:
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_5);
/*try:*/ {
- /* "pysam/csamtools.pyx":839
+ /* "pysam/csamtools.pyx":965
* if start != None:
* try:
* rstart = start # <<<<<<<<<<<<<<
* except OverflowError:
* raise ValueError( 'start out of range (%i)' % start )
*/
- __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_v_start); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_v_start); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__pyx_v_rstart = __pyx_t_6;
}
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_L4_error:;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":840
+ /* "pysam/csamtools.pyx":966
* try:
* rstart = start
* except OverflowError: # <<<<<<<<<<<<<<
__pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
if (__pyx_t_7) {
__Pyx_AddTraceback("pysam.csamtools.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_9);
- /* "pysam/csamtools.pyx":841
+ /* "pysam/csamtools.pyx":967
* rstart = start
* except OverflowError:
* raise ValueError( 'start out of range (%i)' % start ) # <<<<<<<<<<<<<<
*
* if end != None:
*/
- __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_10));
- __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_11);
PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_10));
__Pyx_GIVEREF(((PyObject *)__pyx_t_10));
__pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
__Pyx_Raise(__pyx_t_10, 0, 0, 0);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":843
+ /* "pysam/csamtools.pyx":969
* raise ValueError( 'start out of range (%i)' % start )
*
* if end != None: # <<<<<<<<<<<<<<
* try:
* rend = end
*/
- __pyx_t_9 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":844
+ /* "pysam/csamtools.pyx":970
*
* if end != None:
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "pysam/csamtools.pyx":845
+ /* "pysam/csamtools.pyx":971
* if end != None:
* try:
* rend = end # <<<<<<<<<<<<<<
* except OverflowError:
* raise ValueError( 'end out of range (%i)' % end )
*/
- __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_v_end); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
+ __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_v_end); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
__pyx_v_rend = __pyx_t_6;
}
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "pysam/csamtools.pyx":846
+ /* "pysam/csamtools.pyx":972
* try:
* rend = end
* except OverflowError: # <<<<<<<<<<<<<<
__pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
if (__pyx_t_7) {
__Pyx_AddTraceback("pysam.csamtools.Samfile._parseRegion", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+ if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_1);
- /* "pysam/csamtools.pyx":847
+ /* "pysam/csamtools.pyx":973
* rend = end
* except OverflowError:
* raise ValueError( 'end out of range (%i)' % end ) # <<<<<<<<<<<<<<
*
* if region:
*/
- __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), __pyx_v_end); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+ __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), __pyx_v_end); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_10));
- __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
__Pyx_GOTREF(__pyx_t_11);
PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_10));
__Pyx_GIVEREF(((PyObject *)__pyx_t_10));
__pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
__Pyx_Raise(__pyx_t_10, 0, 0, 0);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
__pyx_L14:;
- /* "pysam/csamtools.pyx":849
+ /* "pysam/csamtools.pyx":975
* raise ValueError( 'end out of range (%i)' % end )
*
* if region: # <<<<<<<<<<<<<<
* region = _force_str(region)
* parts = re.split( "[:-]", region )
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":850
+ /* "pysam/csamtools.pyx":976
*
* if region:
* region = _force_str(region) # <<<<<<<<<<<<<<
* parts = re.split( "[:-]", region )
* reference = parts[0]
*/
- __pyx_t_1 = __pyx_f_5pysam_9csamtools__force_str(__pyx_v_region); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_5pysam_9csamtools__force_str(__pyx_v_region); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_v_region);
__pyx_v_region = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":851
+ /* "pysam/csamtools.pyx":977
* if region:
* region = _force_str(region)
* parts = re.split( "[:-]", region ) # <<<<<<<<<<<<<<
* reference = parts[0]
* if len(parts) >= 2: rstart = int(parts[1]) - 1
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_43));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_51));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_51));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_51));
__Pyx_INCREF(__pyx_v_region);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_region);
__Pyx_GIVEREF(__pyx_v_region);
- __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__pyx_v_parts = __pyx_t_9;
__pyx_t_9 = 0;
- /* "pysam/csamtools.pyx":852
+ /* "pysam/csamtools.pyx":978
* region = _force_str(region)
* parts = re.split( "[:-]", region )
* reference = parts[0] # <<<<<<<<<<<<<<
* if len(parts) >= 2: rstart = int(parts[1]) - 1
* if len(parts) >= 3: rend = int(parts[2])
*/
- __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_parts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_parts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_v_reference);
__pyx_v_reference = __pyx_t_9;
__pyx_t_9 = 0;
- /* "pysam/csamtools.pyx":853
+ /* "pysam/csamtools.pyx":979
* parts = re.split( "[:-]", region )
* reference = parts[0]
* if len(parts) >= 2: rstart = int(parts[1]) - 1 # <<<<<<<<<<<<<<
* if len(parts) >= 3: rend = int(parts[2])
*
*/
- __pyx_t_12 = PyObject_Length(__pyx_v_parts); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Length(__pyx_v_parts); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_12 >= 2);
if (__pyx_t_2) {
- __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_parts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_parts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
__Pyx_GIVEREF(__pyx_t_9);
__pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Subtract(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Subtract(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_t_1); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_t_1); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_rstart = __pyx_t_6;
goto __pyx_L26;
}
__pyx_L26:;
- /* "pysam/csamtools.pyx":854
+ /* "pysam/csamtools.pyx":980
* reference = parts[0]
* if len(parts) >= 2: rstart = int(parts[1]) - 1
* if len(parts) >= 3: rend = int(parts[2]) # <<<<<<<<<<<<<<
*
* if not reference: return 0, 0, 0, 0
*/
- __pyx_t_12 = PyObject_Length(__pyx_v_parts); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Length(__pyx_v_parts); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_12 >= 3);
if (__pyx_t_2) {
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_parts, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_parts, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_t_1); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyInt_AsLongLong(__pyx_t_1); if (unlikely((__pyx_t_6 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_rend = __pyx_t_6;
goto __pyx_L27;
}
__pyx_L25:;
- /* "pysam/csamtools.pyx":856
+ /* "pysam/csamtools.pyx":982
* if len(parts) >= 3: rend = int(parts[2])
*
* if not reference: return 0, 0, 0, 0 # <<<<<<<<<<<<<<
*
* rtid = self.gettid( reference )
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_13 = (!__pyx_t_2);
if (__pyx_t_13) {
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(((PyObject *)__pyx_k_tuple_44));
- __pyx_r = ((PyObject *)__pyx_k_tuple_44);
+ __Pyx_INCREF(((PyObject *)__pyx_k_tuple_52));
+ __pyx_r = ((PyObject *)__pyx_k_tuple_52);
goto __pyx_L0;
goto __pyx_L28;
}
__pyx_L28:;
- /* "pysam/csamtools.pyx":858
+ /* "pysam/csamtools.pyx":984
* if not reference: return 0, 0, 0, 0
*
* rtid = self.gettid( reference ) # <<<<<<<<<<<<<<
* if rtid < 0: raise ValueError( "invalid reference `%s`" % reference )
* if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) )
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__gettid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__gettid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_INCREF(__pyx_v_reference);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_reference);
__Pyx_GIVEREF(__pyx_v_reference);
- __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_rtid = __pyx_t_7;
- /* "pysam/csamtools.pyx":859
+ /* "pysam/csamtools.pyx":985
*
* rtid = self.gettid( reference )
* if rtid < 0: raise ValueError( "invalid reference `%s`" % reference ) # <<<<<<<<<<<<<<
*/
__pyx_t_13 = (__pyx_v_rtid < 0);
if (__pyx_t_13) {
- __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_45), __pyx_v_reference); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_53), __pyx_v_reference); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L29;
}
__pyx_L29:;
- /* "pysam/csamtools.pyx":860
+ /* "pysam/csamtools.pyx":986
* rtid = self.gettid( reference )
* if rtid < 0: raise ValueError( "invalid reference `%s`" % reference )
* if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) ) # <<<<<<<<<<<<<<
*/
__pyx_t_13 = (__pyx_v_rstart > __pyx_v_rend);
if (__pyx_t_13) {
- __pyx_t_8 = PyLong_FromLongLong(__pyx_v_rstart); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyLong_FromLongLong(__pyx_v_rstart); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyLong_FromLongLong(__pyx_v_rend); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyLong_FromLongLong(__pyx_v_rend); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_9);
__pyx_t_8 = 0;
__pyx_t_9 = 0;
- __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_54), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_9));
__Pyx_GIVEREF(((PyObject *)__pyx_t_9));
__pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_9, 0, 0, 0);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L30;
}
__pyx_L30:;
- /* "pysam/csamtools.pyx":861
+ /* "pysam/csamtools.pyx":987
* if rtid < 0: raise ValueError( "invalid reference `%s`" % reference )
* if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) )
* if not 0 <= rstart < max_pos: raise ValueError( 'start out of range (%i)' % rstart ) # <<<<<<<<<<<<<<
}
__pyx_t_2 = (!__pyx_t_13);
if (__pyx_t_2) {
- __pyx_t_9 = PyLong_FromLongLong(__pyx_v_rstart); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyLong_FromLongLong(__pyx_v_rstart); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L31;
}
__pyx_L31:;
- /* "pysam/csamtools.pyx":862
+ /* "pysam/csamtools.pyx":988
* if rstart > rend: raise ValueError( 'invalid coordinates: start (%i) > end (%i)' % (rstart, rend) )
* if not 0 <= rstart < max_pos: raise ValueError( 'start out of range (%i)' % rstart )
* if not 0 <= rend <= max_pos: raise ValueError( 'end out of range (%i)' % rend ) # <<<<<<<<<<<<<<
}
__pyx_t_13 = (!__pyx_t_2);
if (__pyx_t_13) {
- __pyx_t_1 = PyLong_FromLongLong(__pyx_v_rend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyLong_FromLongLong(__pyx_v_rend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_9));
__Pyx_GIVEREF(((PyObject *)__pyx_t_9));
__pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_9, 0, 0, 0);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L32;
}
__pyx_L32:;
- /* "pysam/csamtools.pyx":864
+ /* "pysam/csamtools.pyx":990
* if not 0 <= rend <= max_pos: raise ValueError( 'end out of range (%i)' % rend )
*
* return 1, rtid, rstart, rend # <<<<<<<<<<<<<<
* def reset( self ):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_9 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = PyLong_FromLongLong(__pyx_v_rstart); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyLong_FromLongLong(__pyx_v_rstart); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = PyLong_FromLongLong(__pyx_v_rend); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyLong_FromLongLong(__pyx_v_rend); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_INCREF(__pyx_int_1);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_int_1);
return __pyx_r;
}
-/* "pysam/csamtools.pyx":866
+/* "pysam/csamtools.pyx":992
* return 1, rtid, rstart, rend
*
* def reset( self ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("reset", 0);
- __Pyx_TraceCall("reset", __pyx_f[0], 866);
+ __Pyx_TraceCall("reset", __pyx_f[0], 992);
- /* "pysam/csamtools.pyx":868
+ /* "pysam/csamtools.pyx":994
* def reset( self ):
* '''reset file position to beginning of read section.'''
* return self.seek( self.start_offset, 0 ) # <<<<<<<<<<<<<<
* def seek( self, uint64_t offset, int where = 0):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyInt_to_py_int64_t(__pyx_v_self->start_offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_int64_t(__pyx_v_self->start_offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_offset = __Pyx_PyInt_from_py_uint64_t(values[0]); if (unlikely((__pyx_v_offset == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_offset = __Pyx_PyInt_from_py_uint64_t(values[0]); if (unlikely((__pyx_v_offset == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_where = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_where == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_where = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_where == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_where = ((int)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("seek", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("seek", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Samfile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":870
+/* "pysam/csamtools.pyx":996
* return self.seek( self.start_offset, 0 )
*
* def seek( self, uint64_t offset, int where = 0): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("seek", 0);
- __Pyx_TraceCall("seek", __pyx_f[0], 870);
+ __Pyx_TraceCall("seek", __pyx_f[0], 996);
- /* "pysam/csamtools.pyx":875
+ /* "pysam/csamtools.pyx":1001
* '''
*
* if not self._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
* if not self.isbam:
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":876
+ /* "pysam/csamtools.pyx":1002
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam:
* raise NotImplementedError("seek only available in bam files")
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":877
+ /* "pysam/csamtools.pyx":1003
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" )
* if not self.isbam: # <<<<<<<<<<<<<<
__pyx_t_4 = (!__pyx_v_self->isbam);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":878
+ /* "pysam/csamtools.pyx":1004
* raise ValueError( "I/O operation on closed file" )
* if not self.isbam:
* raise NotImplementedError("seek only available in bam files") # <<<<<<<<<<<<<<
* if self.isstream:
* raise OSError("seek no available in streams")
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":879
+ /* "pysam/csamtools.pyx":1005
* if not self.isbam:
* raise NotImplementedError("seek only available in bam files")
* if self.isstream: # <<<<<<<<<<<<<<
*/
if (__pyx_v_self->isstream) {
- /* "pysam/csamtools.pyx":880
+ /* "pysam/csamtools.pyx":1006
* raise NotImplementedError("seek only available in bam files")
* if self.isstream:
* raise OSError("seek no available in streams") # <<<<<<<<<<<<<<
*
* return bam_seek( self.samfile.x.bam, offset, where )
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_OSError, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_OSError, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":882
+ /* "pysam/csamtools.pyx":1008
* raise OSError("seek no available in streams")
*
* return bam_seek( self.samfile.x.bam, offset, where ) # <<<<<<<<<<<<<<
* def tell( self ):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyInt_to_py_int64_t(bam_seek(__pyx_v_self->samfile->x.bam, __pyx_v_offset, __pyx_v_where)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_int64_t(bam_seek(__pyx_v_self->samfile->x.bam, __pyx_v_offset, __pyx_v_where)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":884
+/* "pysam/csamtools.pyx":1010
* return bam_seek( self.samfile.x.bam, offset, where )
*
* def tell( self ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("tell", 0);
- __Pyx_TraceCall("tell", __pyx_f[0], 884);
+ __Pyx_TraceCall("tell", __pyx_f[0], 1010);
- /* "pysam/csamtools.pyx":888
+ /* "pysam/csamtools.pyx":1014
* return current file position
* '''
* if not self._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
* if not self.isbam:
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":889
+ /* "pysam/csamtools.pyx":1015
* '''
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam:
* raise NotImplementedError("seek only available in bam files")
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_60), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":890
+ /* "pysam/csamtools.pyx":1016
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" )
* if not self.isbam: # <<<<<<<<<<<<<<
__pyx_t_4 = (!__pyx_v_self->isbam);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":891
+ /* "pysam/csamtools.pyx":1017
* raise ValueError( "I/O operation on closed file" )
* if not self.isbam:
* raise NotImplementedError("seek only available in bam files") # <<<<<<<<<<<<<<
*
* return bam_tell( self.samfile.x.bam )
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":893
+ /* "pysam/csamtools.pyx":1019
* raise NotImplementedError("seek only available in bam files")
*
* return bam_tell( self.samfile.x.bam ) # <<<<<<<<<<<<<<
* def fetch( self,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyInt_to_py_int64_t(bam_tell(__pyx_v_self->samfile->x.bam)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_int64_t(bam_tell(__pyx_v_self->samfile->x.bam)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,&__pyx_n_s__callback,&__pyx_n_s__until_eof,0};
PyObject* values[6] = {0,0,0,0,0,0};
- /* "pysam/csamtools.pyx":896
+ /* "pysam/csamtools.pyx":1022
*
* def fetch( self,
* reference = None, # <<<<<<<<<<<<<<
*/
values[0] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":897
+ /* "pysam/csamtools.pyx":1023
* def fetch( self,
* reference = None,
* start = None, # <<<<<<<<<<<<<<
*/
values[1] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":898
+ /* "pysam/csamtools.pyx":1024
* reference = None,
* start = None,
* end = None, # <<<<<<<<<<<<<<
*/
values[2] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":899
+ /* "pysam/csamtools.pyx":1025
* start = None,
* end = None,
* region = None, # <<<<<<<<<<<<<<
*/
values[3] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":900
+ /* "pysam/csamtools.pyx":1026
* end = None,
* region = None,
* callback = None, # <<<<<<<<<<<<<<
* '''
*/
values[4] = ((PyObject *)Py_None);
- values[5] = __pyx_k_54;
+ values[5] = __pyx_k_62;
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Samfile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":895
+/* "pysam/csamtools.pyx":1021
* return bam_tell( self.samfile.x.bam )
*
* def fetch( self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("fetch", 0);
- __Pyx_TraceCall("fetch", __pyx_f[0], 895);
+ __Pyx_TraceCall("fetch", __pyx_f[0], 1021);
- /* "pysam/csamtools.pyx":925
+ /* "pysam/csamtools.pyx":1051
* cdef int rtid, rstart, rend, has_coord
*
* if not self._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":926
+ /* "pysam/csamtools.pyx":1052
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":928
+ /* "pysam/csamtools.pyx":1054
* raise ValueError( "I/O operation on closed file" )
*
* has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region ) # <<<<<<<<<<<<<<
*
* if self.isstream: reopen = False
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_reference);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
__Pyx_INCREF(__pyx_v_region);
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
__Pyx_GIVEREF(__pyx_v_region);
- __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
if (unlikely(size != 4)) {
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
Py_ssize_t i;
PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
for (i=0; i < 4; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
{
Py_ssize_t index = -1;
PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
- __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = NULL;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L5_unpacking_done;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L5_unpacking_done:;
}
- __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_has_coord = __pyx_t_10;
__pyx_v_rtid = __pyx_t_11;
__pyx_v_rstart = __pyx_t_12;
__pyx_v_rend = __pyx_t_13;
- /* "pysam/csamtools.pyx":930
+ /* "pysam/csamtools.pyx":1056
* has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
*
* if self.isstream: reopen = False # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":931
+ /* "pysam/csamtools.pyx":1057
*
* if self.isstream: reopen = False
* else: reopen = True # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "pysam/csamtools.pyx":933
+ /* "pysam/csamtools.pyx":1059
* else: reopen = True
*
* if self.isbam: # <<<<<<<<<<<<<<
*/
if (__pyx_v_self->isbam) {
- /* "pysam/csamtools.pyx":934
+ /* "pysam/csamtools.pyx":1060
*
* if self.isbam:
* if not until_eof and not self._hasIndex() and not self.isremote: # <<<<<<<<<<<<<<
* raise ValueError( "fetch called on bamfile without index" )
*
*/
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_14 = (!__pyx_t_4);
if (__pyx_t_14) {
}
if (__pyx_t_14) {
- /* "pysam/csamtools.pyx":935
+ /* "pysam/csamtools.pyx":1061
* if self.isbam:
* if not until_eof and not self._hasIndex() and not self.isremote:
* raise ValueError( "fetch called on bamfile without index" ) # <<<<<<<<<<<<<<
*
* if callback:
*/
- __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L8;
}
__pyx_L8:;
- /* "pysam/csamtools.pyx":937
+ /* "pysam/csamtools.pyx":1063
* raise ValueError( "fetch called on bamfile without index" )
*
* if callback: # <<<<<<<<<<<<<<
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
* if not self._hasIndex(): raise ValueError( "no index available for fetch" )
*/
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_14) {
- /* "pysam/csamtools.pyx":938
+ /* "pysam/csamtools.pyx":1064
*
* if callback:
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" ) # <<<<<<<<<<<<<<
*/
__pyx_t_14 = (!__pyx_v_has_coord);
if (__pyx_t_14) {
- __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L10;
}
__pyx_L10:;
- /* "pysam/csamtools.pyx":939
+ /* "pysam/csamtools.pyx":1065
* if callback:
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
* if not self._hasIndex(): raise ValueError( "no index available for fetch" ) # <<<<<<<<<<<<<<
* return bam_fetch(self.samfile.x.bam,
* self.index,
*/
- __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_3 = (!__pyx_t_14);
if (__pyx_t_3) {
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L11;
}
__pyx_L11:;
- /* "pysam/csamtools.pyx":940
+ /* "pysam/csamtools.pyx":1066
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
* if not self._hasIndex(): raise ValueError( "no index available for fetch" )
* return bam_fetch(self.samfile.x.bam, # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- /* "pysam/csamtools.pyx":946
+ /* "pysam/csamtools.pyx":1072
* rend,
* <void*>callback,
* fetch_callback ) # <<<<<<<<<<<<<<
* else:
* if has_coord:
*/
- __pyx_t_5 = PyInt_FromLong(bam_fetch(__pyx_v_self->samfile->x.bam, __pyx_v_self->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, ((void *)__pyx_v_callback), __pyx_f_5pysam_9csamtools_fetch_callback)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(bam_fetch(__pyx_v_self->samfile->x.bam, __pyx_v_self->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, ((void *)__pyx_v_callback), __pyx_f_5pysam_9csamtools_fetch_callback)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":948
+ /* "pysam/csamtools.pyx":1074
* fetch_callback )
* else:
* if has_coord: # <<<<<<<<<<<<<<
*/
if (__pyx_v_has_coord) {
- /* "pysam/csamtools.pyx":949
+ /* "pysam/csamtools.pyx":1075
* else:
* if has_coord:
* return IteratorRowRegion( self, rtid, rstart, rend, # <<<<<<<<<<<<<<
* else:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__pyx_t_5 = 0;
__pyx_t_7 = 0;
__pyx_t_6 = 0;
- __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
- /* "pysam/csamtools.pyx":950
+ /* "pysam/csamtools.pyx":1076
* if has_coord:
* return IteratorRowRegion( self, rtid, rstart, rend,
* reopen=reopen ) # <<<<<<<<<<<<<<
* else:
* if until_eof:
*/
- __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__reopen), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__reopen), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":952
+ /* "pysam/csamtools.pyx":1078
* reopen=reopen )
* else:
* if until_eof: # <<<<<<<<<<<<<<
* return IteratorRowAll( self, reopen=reopen )
* else:
*/
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":953
+ /* "pysam/csamtools.pyx":1079
* else:
* if until_eof:
* return IteratorRowAll( self, reopen=reopen ) # <<<<<<<<<<<<<<
* # AH: check - reason why no reopen for AllRefs?
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
- __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__reopen), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__reopen), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowAll)), ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowAll)), ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":956
+ /* "pysam/csamtools.pyx":1082
* else:
* # AH: check - reason why no reopen for AllRefs?
* return IteratorRowAllRefs(self ) # , reopen=reopen ) # <<<<<<<<<<<<<<
* if has_coord:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowAllRefs)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowAllRefs)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_r = __pyx_t_6;
}
/*else*/ {
- /* "pysam/csamtools.pyx":958
+ /* "pysam/csamtools.pyx":1084
* return IteratorRowAllRefs(self ) # , reopen=reopen )
* else:
* if has_coord: # <<<<<<<<<<<<<<
*/
if (__pyx_v_has_coord) {
- /* "pysam/csamtools.pyx":959
+ /* "pysam/csamtools.pyx":1085
* else:
* if has_coord:
* raise ValueError ("fetching by region is not available for sam files" ) # <<<<<<<<<<<<<<
*
* if callback:
*/
- __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L14;
}
__pyx_L14:;
- /* "pysam/csamtools.pyx":961
+ /* "pysam/csamtools.pyx":1087
* raise ValueError ("fetching by region is not available for sam files" )
*
* if callback: # <<<<<<<<<<<<<<
* raise NotImplementedError( "callback not implemented yet" )
*
*/
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":962
+ /* "pysam/csamtools.pyx":1088
*
* if callback:
* raise NotImplementedError( "callback not implemented yet" ) # <<<<<<<<<<<<<<
*
* if self.samfile.header == NULL:
*/
- __pyx_t_6 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_73), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L15;
}
__pyx_L15:;
- /* "pysam/csamtools.pyx":964
+ /* "pysam/csamtools.pyx":1090
* raise NotImplementedError( "callback not implemented yet" )
*
* if self.samfile.header == NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_self->samfile->header == NULL);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":965
+ /* "pysam/csamtools.pyx":1091
*
* if self.samfile.header == NULL:
* raise ValueError( "fetch called for samfile without header") # <<<<<<<<<<<<<<
*
* # check if targets are defined
*/
- __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L16;
}
__pyx_L16:;
- /* "pysam/csamtools.pyx":969
+ /* "pysam/csamtools.pyx":1095
* # check if targets are defined
* # give warning, sam_read1 segfaults
* if self.samfile.header.n_targets == 0: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_self->samfile->header->n_targets == 0);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":970
+ /* "pysam/csamtools.pyx":1096
* # give warning, sam_read1 segfaults
* if self.samfile.header.n_targets == 0:
* warnings.warn( "fetch called for samfile without header") # <<<<<<<<<<<<<<
*
* return IteratorRowAll( self, reopen=reopen )
*/
- __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__warnings); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__warnings); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__warn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__warn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__pyx_L17:;
- /* "pysam/csamtools.pyx":972
+ /* "pysam/csamtools.pyx":1098
* warnings.warn( "fetch called for samfile without header")
*
* return IteratorRowAll( self, reopen=reopen ) # <<<<<<<<<<<<<<
* def mate( self,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
- __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowAll)), ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowAll)), ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("mate (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_5pysam_9csamtools_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_5pysam_9csamtools_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_22mate(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_read));
goto __pyx_L0;
__pyx_L1_error:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":974
+/* "pysam/csamtools.pyx":1100
* return IteratorRowAll( self, reopen=reopen )
*
* def mate( self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("mate", 0);
- __Pyx_TraceCall("mate", __pyx_f[0], 974);
+ __Pyx_TraceCall("mate", __pyx_f[0], 1100);
- /* "pysam/csamtools.pyx":987
+ /* "pysam/csamtools.pyx":1113
*
* '''
* cdef uint32_t flag = read._delegate.core.flag # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_read->_delegate->core.flag;
__pyx_v_flag = __pyx_t_1;
- /* "pysam/csamtools.pyx":989
+ /* "pysam/csamtools.pyx":1115
* cdef uint32_t flag = read._delegate.core.flag
*
* if flag & BAM_FPAIRED == 0: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_flag & 1) == 0);
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":990
+ /* "pysam/csamtools.pyx":1116
*
* if flag & BAM_FPAIRED == 0:
* raise ValueError( "read %s: is unpaired" % (read.qname)) # <<<<<<<<<<<<<<
* if flag & BAM_FMUNMAP != 0:
* raise ValueError( "mate %s: is unmapped" % (read.qname))
*/
- __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_read), __pyx_n_s__qname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_read), __pyx_n_s__qname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_69), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_77), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
__Pyx_GIVEREF(((PyObject *)__pyx_t_4));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":991
+ /* "pysam/csamtools.pyx":1117
* if flag & BAM_FPAIRED == 0:
* raise ValueError( "read %s: is unpaired" % (read.qname))
* if flag & BAM_FMUNMAP != 0: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_flag & 8) != 0);
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":992
+ /* "pysam/csamtools.pyx":1118
* raise ValueError( "read %s: is unpaired" % (read.qname))
* if flag & BAM_FMUNMAP != 0:
* raise ValueError( "mate %s: is unmapped" % (read.qname)) # <<<<<<<<<<<<<<
*
* cdef MateData mate_data
*/
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_read), __pyx_n_s__qname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_read), __pyx_n_s__qname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_70), __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_78), __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":996
+ /* "pysam/csamtools.pyx":1122
* cdef MateData mate_data
*
* mate_data.name = <char *>bam1_qname(read._delegate) # <<<<<<<<<<<<<<
*/
__pyx_v_mate_data.name = ((char *)bam1_qname(__pyx_v_read->_delegate));
- /* "pysam/csamtools.pyx":997
+ /* "pysam/csamtools.pyx":1123
*
* mate_data.name = <char *>bam1_qname(read._delegate)
* mate_data.mate = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_mate_data.mate = NULL;
- /* "pysam/csamtools.pyx":999
+ /* "pysam/csamtools.pyx":1125
* mate_data.mate = NULL
* # xor flags to get the other mate
* cdef int x = BAM_FREAD1 + BAM_FREAD2 # <<<<<<<<<<<<<<
*/
__pyx_v_x = 192;
- /* "pysam/csamtools.pyx":1000
+ /* "pysam/csamtools.pyx":1126
* # xor flags to get the other mate
* cdef int x = BAM_FREAD1 + BAM_FREAD2
* mate_data.flag = ( flag ^ x) & x # <<<<<<<<<<<<<<
*/
__pyx_v_mate_data.flag = ((__pyx_v_flag ^ __pyx_v_x) & __pyx_v_x);
- /* "pysam/csamtools.pyx":1008
+ /* "pysam/csamtools.pyx":1134
* read._delegate.core.mpos + 1,
* <void*>&mate_data,
* mate_callback ) # <<<<<<<<<<<<<<
*/
bam_fetch(__pyx_v_self->samfile->x.bam, __pyx_v_self->index, __pyx_v_read->_delegate->core.mtid, __pyx_v_read->_delegate->core.mpos, (__pyx_v_read->_delegate->core.mpos + 1), ((void *)(&__pyx_v_mate_data)), __pyx_f_5pysam_9csamtools_mate_callback);
- /* "pysam/csamtools.pyx":1010
+ /* "pysam/csamtools.pyx":1136
* mate_callback )
*
* if mate_data.mate == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_mate_data.mate == NULL);
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":1011
+ /* "pysam/csamtools.pyx":1137
*
* if mate_data.mate == NULL:
* raise ValueError( "mate not found" ) # <<<<<<<<<<<<<<
*
* cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
*/
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":1013
+ /* "pysam/csamtools.pyx":1139
* raise ValueError( "mate not found" )
*
* cdef AlignedRead dest = AlignedRead.__new__(AlignedRead) # <<<<<<<<<<<<<<
* dest._delegate = mate_data.mate
* return dest
*/
- __pyx_t_3 = __Pyx_tp_new(((PyObject*)__pyx_ptype_5pysam_9csamtools_AlignedRead)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_tp_new(((PyObject*)__pyx_ptype_5pysam_9csamtools_AlignedRead)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5pysam_9csamtools_AlignedRead)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5pysam_9csamtools_AlignedRead)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_dest = ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":1014
+ /* "pysam/csamtools.pyx":1140
*
* cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
* dest._delegate = mate_data.mate # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_mate_data.mate;
__pyx_v_dest->_delegate = __pyx_t_5;
- /* "pysam/csamtools.pyx":1015
+ /* "pysam/csamtools.pyx":1141
* cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
* dest._delegate = mate_data.mate
* return dest # <<<<<<<<<<<<<<
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,&__pyx_n_s__until_eof,0};
PyObject* values[5] = {0,0,0,0,0};
- /* "pysam/csamtools.pyx":1018
+ /* "pysam/csamtools.pyx":1144
*
* def count( self,
* reference = None, # <<<<<<<<<<<<<<
*/
values[0] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":1019
+ /* "pysam/csamtools.pyx":1145
* def count( self,
* reference = None,
* start = None, # <<<<<<<<<<<<<<
*/
values[1] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":1020
+ /* "pysam/csamtools.pyx":1146
* reference = None,
* start = None,
* end = None, # <<<<<<<<<<<<<<
*/
values[2] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":1021
+ /* "pysam/csamtools.pyx":1147
* start = None,
* end = None,
* region = None, # <<<<<<<<<<<<<<
* '''*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)*
*/
values[3] = ((PyObject *)Py_None);
- values[4] = __pyx_k_73;
+ values[4] = __pyx_k_81;
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("count", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("count", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Samfile.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1017
+/* "pysam/csamtools.pyx":1143
* return dest
*
* def count( self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("count", 0);
- __Pyx_TraceCall("count", __pyx_f[0], 1017);
+ __Pyx_TraceCall("count", __pyx_f[0], 1143);
__Pyx_INCREF(__pyx_v_region);
- /* "pysam/csamtools.pyx":1035
+ /* "pysam/csamtools.pyx":1161
* cdef int rend
*
* if not self._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1036
+ /* "pysam/csamtools.pyx":1162
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* region, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_82), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1038
+ /* "pysam/csamtools.pyx":1164
* raise ValueError( "I/O operation on closed file" )
*
* region, rtid, rstart, rend = self._parseRegion( reference, start, end, region ) # <<<<<<<<<<<<<<
*
* cdef int counter
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_reference);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
__Pyx_INCREF(__pyx_v_region);
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
__Pyx_GIVEREF(__pyx_v_region);
- __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
if (unlikely(size != 4)) {
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
Py_ssize_t i;
PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
for (i=0; i < 4; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
{
Py_ssize_t index = -1;
PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
- __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = NULL;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L5_unpacking_done;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L5_unpacking_done:;
}
- __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_v_region);
__pyx_v_region = __pyx_t_1;
__pyx_v_rstart = __pyx_t_11;
__pyx_v_rend = __pyx_t_12;
- /* "pysam/csamtools.pyx":1041
+ /* "pysam/csamtools.pyx":1167
*
* cdef int counter
* counter = 0; # <<<<<<<<<<<<<<
*/
__pyx_v_counter = 0;
- /* "pysam/csamtools.pyx":1043
+ /* "pysam/csamtools.pyx":1169
* counter = 0;
*
* if self.isbam: # <<<<<<<<<<<<<<
*/
if (__pyx_v_self->isbam) {
- /* "pysam/csamtools.pyx":1044
+ /* "pysam/csamtools.pyx":1170
*
* if self.isbam:
* if not until_eof and not self._hasIndex() and not self.isremote: # <<<<<<<<<<<<<<
* raise ValueError( "fetch called on bamfile without index" )
*
*/
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_13 = (!__pyx_t_4);
if (__pyx_t_13) {
}
if (__pyx_t_13) {
- /* "pysam/csamtools.pyx":1045
+ /* "pysam/csamtools.pyx":1171
* if self.isbam:
* if not until_eof and not self._hasIndex() and not self.isremote:
* raise ValueError( "fetch called on bamfile without index" ) # <<<<<<<<<<<<<<
*
* if not region:
*/
- __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L7;
}
__pyx_L7:;
- /* "pysam/csamtools.pyx":1047
+ /* "pysam/csamtools.pyx":1173
* raise ValueError( "fetch called on bamfile without index" )
*
* if not region: # <<<<<<<<<<<<<<
* raise ValueError( "counting functionality requires a region/reference" )
* if not self._hasIndex(): raise ValueError( "no index available for fetch" )
*/
- __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = (!__pyx_t_13);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1048
+ /* "pysam/csamtools.pyx":1174
*
* if not region:
* raise ValueError( "counting functionality requires a region/reference" ) # <<<<<<<<<<<<<<
* if not self._hasIndex(): raise ValueError( "no index available for fetch" )
* bam_fetch(self.samfile.x.bam,
*/
- __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L8;
}
__pyx_L8:;
- /* "pysam/csamtools.pyx":1049
+ /* "pysam/csamtools.pyx":1175
* if not region:
* raise ValueError( "counting functionality requires a region/reference" )
* if not self._hasIndex(): raise ValueError( "no index available for fetch" ) # <<<<<<<<<<<<<<
* bam_fetch(self.samfile.x.bam,
* self.index,
*/
- __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_13 = (!__pyx_t_3);
if (__pyx_t_13) {
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_78), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L9;
}
__pyx_L9:;
- /* "pysam/csamtools.pyx":1056
+ /* "pysam/csamtools.pyx":1182
* rend,
* <void*>&counter,
* count_callback ) # <<<<<<<<<<<<<<
*/
bam_fetch(__pyx_v_self->samfile->x.bam, __pyx_v_self->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, ((void *)(&__pyx_v_counter)), __pyx_f_5pysam_9csamtools_count_callback);
- /* "pysam/csamtools.pyx":1057
+ /* "pysam/csamtools.pyx":1183
* <void*>&counter,
* count_callback )
* return counter # <<<<<<<<<<<<<<
* raise ValueError ("count for a region is not available for sam files" )
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = PyInt_FromLong(__pyx_v_counter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(__pyx_v_counter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1059
+ /* "pysam/csamtools.pyx":1185
* return counter
* else:
* raise ValueError ("count for a region is not available for sam files" ) # <<<<<<<<<<<<<<
*
* def pileup( self,
*/
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L6:;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,&__pyx_n_s__callback,0};
PyObject* values[5] = {0,0,0,0,0};
- /* "pysam/csamtools.pyx":1062
+ /* "pysam/csamtools.pyx":1188
*
* def pileup( self,
* reference = None, # <<<<<<<<<<<<<<
*/
values[0] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":1063
+ /* "pysam/csamtools.pyx":1189
* def pileup( self,
* reference = None,
* start = None, # <<<<<<<<<<<<<<
*/
values[1] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":1064
+ /* "pysam/csamtools.pyx":1190
* reference = None,
* start = None,
* end = None, # <<<<<<<<<<<<<<
*/
values[2] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":1065
+ /* "pysam/csamtools.pyx":1191
* start = None,
* end = None,
* region = None, # <<<<<<<<<<<<<<
*/
values[3] = ((PyObject *)Py_None);
- /* "pysam/csamtools.pyx":1066
+ /* "pysam/csamtools.pyx":1192
* end = None,
* region = None,
* callback = None, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "pileup") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "pileup") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("pileup", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("pileup", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
__Pyx_AddTraceback("pysam.csamtools.Samfile.pileup", __pyx_clineno, __pyx_lineno, __pyx_filename);
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1061
+/* "pysam/csamtools.pyx":1187
* raise ValueError ("count for a region is not available for sam files" )
*
* def pileup( self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("pileup", 0);
- __Pyx_TraceCall("pileup", __pyx_f[0], 1061);
+ __Pyx_TraceCall("pileup", __pyx_f[0], 1187);
- /* "pysam/csamtools.pyx":1117
+ /* "pysam/csamtools.pyx":1243
* cdef bam_plbuf_t *buf
*
* if not self._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1118
+ /* "pysam/csamtools.pyx":1244
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_81), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1120
+ /* "pysam/csamtools.pyx":1246
* raise ValueError( "I/O operation on closed file" )
*
* has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region ) # <<<<<<<<<<<<<<
*
* if self.isbam:
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_reference);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
__Pyx_INCREF(__pyx_v_region);
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
__Pyx_GIVEREF(__pyx_v_region);
- __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
if (unlikely(size != 4)) {
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
Py_ssize_t i;
PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
for (i=0; i < 4; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
{
Py_ssize_t index = -1;
PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7};
- __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = NULL;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L5_unpacking_done;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L5_unpacking_done:;
}
- __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_has_coord = __pyx_t_10;
__pyx_v_rtid = __pyx_t_11;
__pyx_v_rstart = __pyx_t_12;
__pyx_v_rend = __pyx_t_13;
- /* "pysam/csamtools.pyx":1122
+ /* "pysam/csamtools.pyx":1248
* has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
*
* if self.isbam: # <<<<<<<<<<<<<<
*/
if (__pyx_v_self->isbam) {
- /* "pysam/csamtools.pyx":1123
+ /* "pysam/csamtools.pyx":1249
*
* if self.isbam:
* if not self._hasIndex(): raise ValueError( "no index available for pileup" ) # <<<<<<<<<<<<<<
*
* if callback:
*/
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
- __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L7;
}
__pyx_L7:;
- /* "pysam/csamtools.pyx":1125
+ /* "pysam/csamtools.pyx":1251
* if not self._hasIndex(): raise ValueError( "no index available for pileup" )
*
* if callback: # <<<<<<<<<<<<<<
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
*
*/
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1126
+ /* "pysam/csamtools.pyx":1252
*
* if callback:
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" ) # <<<<<<<<<<<<<<
*/
__pyx_t_3 = (!__pyx_v_has_coord);
if (__pyx_t_3) {
- __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_84), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_92), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L9;
}
__pyx_L9:;
- /* "pysam/csamtools.pyx":1128
+ /* "pysam/csamtools.pyx":1254
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
*
* buf = bam_plbuf_init( <bam_pileup_f>pileup_callback, <void*>callback ) # <<<<<<<<<<<<<<
*/
__pyx_v_buf = bam_plbuf_init(((bam_pileup_f)__pyx_f_5pysam_9csamtools_pileup_callback), ((void *)__pyx_v_callback));
- /* "pysam/csamtools.pyx":1131
+ /* "pysam/csamtools.pyx":1257
* bam_fetch(self.samfile.x.bam,
* self.index, rtid, rstart, rend,
* buf, pileup_fetch_callback ) # <<<<<<<<<<<<<<
*/
bam_fetch(__pyx_v_self->samfile->x.bam, __pyx_v_self->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, __pyx_v_buf, __pyx_f_5pysam_9csamtools_pileup_fetch_callback);
- /* "pysam/csamtools.pyx":1134
+ /* "pysam/csamtools.pyx":1260
*
* # finalize pileup
* bam_plbuf_push( NULL, buf) # <<<<<<<<<<<<<<
*/
bam_plbuf_push(NULL, __pyx_v_buf);
- /* "pysam/csamtools.pyx":1135
+ /* "pysam/csamtools.pyx":1261
* # finalize pileup
* bam_plbuf_push( NULL, buf)
* bam_plbuf_destroy(buf) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":1137
+ /* "pysam/csamtools.pyx":1263
* bam_plbuf_destroy(buf)
* else:
* if has_coord: # <<<<<<<<<<<<<<
*/
if (__pyx_v_has_coord) {
- /* "pysam/csamtools.pyx":1138
+ /* "pysam/csamtools.pyx":1264
* else:
* if has_coord:
* return IteratorColumnRegion( self, # <<<<<<<<<<<<<<
* start = rstart,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- /* "pysam/csamtools.pyx":1142
+ /* "pysam/csamtools.pyx":1268
* start = rstart,
* end = rend,
* **kwargs ) # <<<<<<<<<<<<<<
* else:
* return IteratorColumnAllRefs(self, **kwargs )
*/
- __pyx_t_5 = PyDict_Copy(((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyDict_Copy(((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- /* "pysam/csamtools.pyx":1139
+ /* "pysam/csamtools.pyx":1265
* if has_coord:
* return IteratorColumnRegion( self,
* tid = rtid, # <<<<<<<<<<<<<<
* start = rstart,
* end = rend,
*/
- __pyx_t_6 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
if (unlikely(PyDict_GetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__tid)))) {
- __Pyx_RaiseDoubleKeywordsError("function", ((PyObject *)__pyx_n_s__tid)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_RaiseDoubleKeywordsError("function", ((PyObject *)__pyx_n_s__tid)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__tid), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__tid), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "pysam/csamtools.pyx":1140
+ /* "pysam/csamtools.pyx":1266
* return IteratorColumnRegion( self,
* tid = rtid,
* start = rstart, # <<<<<<<<<<<<<<
* end = rend,
* **kwargs )
*/
- __pyx_t_6 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
if (unlikely(PyDict_GetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__start)))) {
- __Pyx_RaiseDoubleKeywordsError("function", ((PyObject *)__pyx_n_s__start)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_RaiseDoubleKeywordsError("function", ((PyObject *)__pyx_n_s__start)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__start), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__start), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "pysam/csamtools.pyx":1141
+ /* "pysam/csamtools.pyx":1267
* tid = rtid,
* start = rstart,
* end = rend, # <<<<<<<<<<<<<<
* **kwargs )
* else:
*/
- __pyx_t_6 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
if (unlikely(PyDict_GetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__end)))) {
- __Pyx_RaiseDoubleKeywordsError("function", ((PyObject *)__pyx_n_s__end)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_RaiseDoubleKeywordsError("function", ((PyObject *)__pyx_n_s__end)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__end), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__end), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorColumnRegion)), ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorColumnRegion)), ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1144
+ /* "pysam/csamtools.pyx":1270
* **kwargs )
* else:
* return IteratorColumnAllRefs(self, **kwargs ) # <<<<<<<<<<<<<<
* else:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
__pyx_t_5 = ((PyObject *)__pyx_v_kwargs);
__Pyx_INCREF(__pyx_t_5);
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorColumnAllRefs)), ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorColumnAllRefs)), ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1147
+ /* "pysam/csamtools.pyx":1273
*
* else:
* raise NotImplementedError( "pileup of samfiles not implemented yet" ) # <<<<<<<<<<<<<<
*
* def close( self ):
*/
- __pyx_t_7 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L6:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1149
+/* "pysam/csamtools.pyx":1275
* raise NotImplementedError( "pileup of samfiles not implemented yet" )
*
* def close( self ): # <<<<<<<<<<<<<<
int __pyx_t_1;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("close", 0);
- __Pyx_TraceCall("close", __pyx_f[0], 1149);
+ __Pyx_TraceCall("close", __pyx_f[0], 1275);
- /* "pysam/csamtools.pyx":1152
+ /* "pysam/csamtools.pyx":1278
* '''
* closes the :class:`pysam.Samfile`.'''
* if self.samfile != NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->samfile != NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1153
+ /* "pysam/csamtools.pyx":1279
* closes the :class:`pysam.Samfile`.'''
* if self.samfile != NULL:
* samclose( self.samfile ) # <<<<<<<<<<<<<<
*/
samclose(__pyx_v_self->samfile);
- /* "pysam/csamtools.pyx":1154
+ /* "pysam/csamtools.pyx":1280
* if self.samfile != NULL:
* samclose( self.samfile )
* bam_index_destroy(self.index); # <<<<<<<<<<<<<<
*/
bam_index_destroy(__pyx_v_self->index);
- /* "pysam/csamtools.pyx":1155
+ /* "pysam/csamtools.pyx":1281
* samclose( self.samfile )
* bam_index_destroy(self.index);
* self.samfile = NULL # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":1157
+/* "pysam/csamtools.pyx":1283
* self.samfile = NULL
*
* def __dealloc__( self ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1157);
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1283);
- /* "pysam/csamtools.pyx":1161
+ /* "pysam/csamtools.pyx":1287
* # note: no doc string
* # note: __del__ is not called.
* self.close() # <<<<<<<<<<<<<<
* bam_destroy1(self.b)
* if self._filename != NULL: free( self._filename )
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1162
+ /* "pysam/csamtools.pyx":1288
* # note: __del__ is not called.
* self.close()
* bam_destroy1(self.b) # <<<<<<<<<<<<<<
*/
bam_destroy1(__pyx_v_self->b);
- /* "pysam/csamtools.pyx":1163
+ /* "pysam/csamtools.pyx":1289
* self.close()
* bam_destroy1(self.b)
* if self._filename != NULL: free( self._filename ) # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":1165
+/* "pysam/csamtools.pyx":1291
* if self._filename != NULL: free( self._filename )
*
* cpdef int write( self, AlignedRead read ) except -1: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("write", 0);
- __Pyx_TraceCall("write", __pyx_f[0], 1165);
+ __Pyx_TraceCall("write", __pyx_f[0], 1291);
/* Check if called by wrapper */
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5pysam_9csamtools_7Samfile_33write)) {
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_read));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_read));
__Pyx_GIVEREF(((PyObject *)__pyx_v_read));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_4;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pysam/csamtools.pyx":1171
+ /* "pysam/csamtools.pyx":1297
* returns the number of bytes written.
* '''
* if not self._isOpen(): # <<<<<<<<<<<<<<
* return 0
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_6 = (!__pyx_t_5);
if (__pyx_t_6) {
- /* "pysam/csamtools.pyx":1172
+ /* "pysam/csamtools.pyx":1298
* '''
* if not self._isOpen():
* return 0 # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1174
+ /* "pysam/csamtools.pyx":1300
* return 0
*
* return samwrite( self.samfile, read._delegate ) # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_5pysam_9csamtools_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_5pysam_9csamtools_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_7Samfile_32write(((struct __pyx_obj_5pysam_9csamtools_Samfile *)__pyx_v_self), ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_read));
goto __pyx_L0;
__pyx_L1_error:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1165
+/* "pysam/csamtools.pyx":1291
* if self._filename != NULL: free( self._filename )
*
* cpdef int write( self, AlignedRead read ) except -1: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("write", 0);
- __Pyx_TraceCall("write", __pyx_f[0], 1165);
+ __Pyx_TraceCall("write", __pyx_f[0], 1291);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *)__pyx_v_self->__pyx_vtab)->write(__pyx_v_self, __pyx_v_read, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_5pysam_9csamtools_Samfile *)__pyx_v_self->__pyx_vtab)->write(__pyx_v_self, __pyx_v_read, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1176
+/* "pysam/csamtools.pyx":1302
* return samwrite( self.samfile, read._delegate )
*
* def __enter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__enter__", 0);
- __Pyx_TraceCall("__enter__", __pyx_f[0], 1176);
+ __Pyx_TraceCall("__enter__", __pyx_f[0], 1302);
- /* "pysam/csamtools.pyx":1177
+ /* "pysam/csamtools.pyx":1303
*
* def __enter__(self):
* return self # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__exc_value)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__traceback)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Samfile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1179
+/* "pysam/csamtools.pyx":1305
* return self
*
* def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__exit__", 0);
- __Pyx_TraceCall("__exit__", __pyx_f[0], 1179);
+ __Pyx_TraceCall("__exit__", __pyx_f[0], 1305);
- /* "pysam/csamtools.pyx":1180
+ /* "pysam/csamtools.pyx":1306
*
* def __exit__(self, exc_type, exc_value, traceback):
* self.close() # <<<<<<<<<<<<<<
* return False
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1181
+ /* "pysam/csamtools.pyx":1307
* def __exit__(self, exc_type, exc_value, traceback):
* self.close()
* return False # <<<<<<<<<<<<<<
* ###############################################################
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1190
+/* "pysam/csamtools.pyx":1316
* property filename:
* '''number of :term:`filename` associated with this object.'''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 1190);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 1316);
- /* "pysam/csamtools.pyx":1191
+ /* "pysam/csamtools.pyx":1317
* '''number of :term:`filename` associated with this object.'''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* return self._filename
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1192
+ /* "pysam/csamtools.pyx":1318
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* return self._filename # <<<<<<<<<<<<<<
* property nreferences:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyBytes_FromString(__pyx_v_self->_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyBytes_FromString(__pyx_v_self->_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_r = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1196
+/* "pysam/csamtools.pyx":1322
* property nreferences:
* '''number of :term:`reference` sequences in the file.'''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 1196);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 1322);
- /* "pysam/csamtools.pyx":1197
+ /* "pysam/csamtools.pyx":1323
* '''number of :term:`reference` sequences in the file.'''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* return self.samfile.header.n_targets
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_96), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1198
+ /* "pysam/csamtools.pyx":1324
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* return self.samfile.header.n_targets # <<<<<<<<<<<<<<
* property references:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->samfile->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1202
+/* "pysam/csamtools.pyx":1328
* property references:
* """tuple with the names of :term:`reference` sequences."""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 1202);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 1328);
- /* "pysam/csamtools.pyx":1203
+ /* "pysam/csamtools.pyx":1329
* """tuple with the names of :term:`reference` sequences."""
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* t = []
* for x from 0 <= x < self.samfile.header.n_targets:
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1204
+ /* "pysam/csamtools.pyx":1330
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* t = [] # <<<<<<<<<<<<<<
* for x from 0 <= x < self.samfile.header.n_targets:
* t.append( _charptr_to_str(self.samfile.header.target_name[x]) )
*/
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_t = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1205
+ /* "pysam/csamtools.pyx":1331
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* t = []
* for x from 0 <= x < self.samfile.header.n_targets: # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_self->samfile->header->n_targets;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":1206
+ /* "pysam/csamtools.pyx":1332
* t = []
* for x from 0 <= x < self.samfile.header.n_targets:
* t.append( _charptr_to_str(self.samfile.header.target_name[x]) ) # <<<<<<<<<<<<<<
* return tuple(t)
*
*/
- __pyx_t_2 = __pyx_f_5pysam_9csamtools__charptr_to_str((__pyx_v_self->samfile->header->target_name[__pyx_v_x])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools__charptr_to_str((__pyx_v_self->samfile->header->target_name[__pyx_v_x])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyList_Append(__pyx_v_t, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_Append(__pyx_v_t, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- /* "pysam/csamtools.pyx":1207
+ /* "pysam/csamtools.pyx":1333
* for x from 0 <= x < self.samfile.header.n_targets:
* t.append( _charptr_to_str(self.samfile.header.target_name[x]) )
* return tuple(t) # <<<<<<<<<<<<<<
* property lengths:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = ((PyObject *)PyList_AsTuple(__pyx_v_t)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)PyList_AsTuple(__pyx_v_t)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_r = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1213
+/* "pysam/csamtools.pyx":1339
* :attr:`pysam.Samfile.references`
* """
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 1213);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 1339);
- /* "pysam/csamtools.pyx":1214
+ /* "pysam/csamtools.pyx":1340
* """
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* t = []
* for x from 0 <= x < self.samfile.header.n_targets:
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_90), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1215
+ /* "pysam/csamtools.pyx":1341
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* t = [] # <<<<<<<<<<<<<<
* for x from 0 <= x < self.samfile.header.n_targets:
* t.append( self.samfile.header.target_len[x] )
*/
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_t = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1216
+ /* "pysam/csamtools.pyx":1342
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* t = []
* for x from 0 <= x < self.samfile.header.n_targets: # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_self->samfile->header->n_targets;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":1217
+ /* "pysam/csamtools.pyx":1343
* t = []
* for x from 0 <= x < self.samfile.header.n_targets:
* t.append( self.samfile.header.target_len[x] ) # <<<<<<<<<<<<<<
* return tuple(t)
*
*/
- __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t((__pyx_v_self->samfile->header->target_len[__pyx_v_x])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t((__pyx_v_self->samfile->header->target_len[__pyx_v_x])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyList_Append(__pyx_v_t, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_Append(__pyx_v_t, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- /* "pysam/csamtools.pyx":1218
+ /* "pysam/csamtools.pyx":1344
* for x from 0 <= x < self.samfile.header.n_targets:
* t.append( self.samfile.header.target_len[x] )
* return tuple(t) # <<<<<<<<<<<<<<
* property mapped:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = ((PyObject *)PyList_AsTuple(__pyx_v_t)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)PyList_AsTuple(__pyx_v_t)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_r = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1223
+/* "pysam/csamtools.pyx":1349
* """total number of mapped reads in file.
* """
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 1223);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 1349);
- /* "pysam/csamtools.pyx":1224
+ /* "pysam/csamtools.pyx":1350
* """
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" )
* if self.index == NULL:
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1225
+ /* "pysam/csamtools.pyx":1351
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" ) # <<<<<<<<<<<<<<
*/
__pyx_t_4 = (!__pyx_v_self->isbam);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_AttributeError, ((PyObject *)__pyx_k_tuple_93), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_AttributeError, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1226
+ /* "pysam/csamtools.pyx":1352
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" )
* if self.index == NULL: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_v_self->index == NULL);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1227
+ /* "pysam/csamtools.pyx":1353
* if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" )
* if self.index == NULL:
* raise ValueError( "mapping information not recorded in index or index not available") # <<<<<<<<<<<<<<
*
* cdef int tid
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":1230
+ /* "pysam/csamtools.pyx":1356
*
* cdef int tid
* cdef uint32_t total = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_total = 0;
- /* "pysam/csamtools.pyx":1231
+ /* "pysam/csamtools.pyx":1357
* cdef int tid
* cdef uint32_t total = 0
* for tid from 0 <= tid < self.samfile.header.n_targets: # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_self->samfile->header->n_targets;
for (__pyx_v_tid = 0; __pyx_v_tid < __pyx_t_5; __pyx_v_tid++) {
- /* "pysam/csamtools.pyx":1232
+ /* "pysam/csamtools.pyx":1358
* cdef uint32_t total = 0
* for tid from 0 <= tid < self.samfile.header.n_targets:
* total += pysam_get_mapped( self.index, tid ) # <<<<<<<<<<<<<<
__pyx_v_total = (__pyx_v_total + pysam_get_mapped(__pyx_v_self->index, __pyx_v_tid));
}
- /* "pysam/csamtools.pyx":1233
+ /* "pysam/csamtools.pyx":1359
* for tid from 0 <= tid < self.samfile.header.n_targets:
* total += pysam_get_mapped( self.index, tid )
* return total # <<<<<<<<<<<<<<
* property unmapped:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_total); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_total); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1238
+/* "pysam/csamtools.pyx":1364
* """total number of unmapped reads in file.
* """
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 1238);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 1364);
- /* "pysam/csamtools.pyx":1239
+ /* "pysam/csamtools.pyx":1365
* """
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam: raise AttributeError( "Samfile.unmapped only available in bam files" )
* cdef int tid
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_96), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1240
+ /* "pysam/csamtools.pyx":1366
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not self.isbam: raise AttributeError( "Samfile.unmapped only available in bam files" ) # <<<<<<<<<<<<<<
*/
__pyx_t_4 = (!__pyx_v_self->isbam);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_AttributeError, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_AttributeError, ((PyObject *)__pyx_k_tuple_106), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1242
+ /* "pysam/csamtools.pyx":1368
* if not self.isbam: raise AttributeError( "Samfile.unmapped only available in bam files" )
* cdef int tid
* cdef uint32_t total = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_total = 0;
- /* "pysam/csamtools.pyx":1243
+ /* "pysam/csamtools.pyx":1369
* cdef int tid
* cdef uint32_t total = 0
* for tid from 0 <= tid < self.samfile.header.n_targets: # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_self->samfile->header->n_targets;
for (__pyx_v_tid = 0; __pyx_v_tid < __pyx_t_5; __pyx_v_tid++) {
- /* "pysam/csamtools.pyx":1244
+ /* "pysam/csamtools.pyx":1370
* cdef uint32_t total = 0
* for tid from 0 <= tid < self.samfile.header.n_targets:
* total += pysam_get_unmapped( self.index, tid ) # <<<<<<<<<<<<<<
__pyx_v_total = (__pyx_v_total + pysam_get_unmapped(__pyx_v_self->index, __pyx_v_tid));
}
- /* "pysam/csamtools.pyx":1246
+ /* "pysam/csamtools.pyx":1372
* total += pysam_get_unmapped( self.index, tid )
* # get unmapped reads without coordinates
* total += pysam_get_unmapped( self.index, -1 ) # <<<<<<<<<<<<<<
*/
__pyx_v_total = (__pyx_v_total + pysam_get_unmapped(__pyx_v_self->index, -1));
- /* "pysam/csamtools.pyx":1247
+ /* "pysam/csamtools.pyx":1373
* # get unmapped reads without coordinates
* total += pysam_get_unmapped( self.index, -1 )
* return total # <<<<<<<<<<<<<<
* property text:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_total); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_total); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1251
+/* "pysam/csamtools.pyx":1377
* property text:
* '''full contents of the :term:`sam file` header as a string.'''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 1251);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 1377);
- /* "pysam/csamtools.pyx":1252
+ /* "pysam/csamtools.pyx":1378
* '''full contents of the :term:`sam file` header as a string.'''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* return from_string_and_size(self.samfile.header.text, self.samfile.header.l_text)
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_107), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1253
+ /* "pysam/csamtools.pyx":1379
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* return from_string_and_size(self.samfile.header.text, self.samfile.header.l_text) # <<<<<<<<<<<<<<
* property header:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_f_5pysam_9csamtools_from_string_and_size(__pyx_v_self->samfile->header->text, __pyx_v_self->samfile->header->l_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_from_string_and_size(__pyx_v_self->samfile->header->text, __pyx_v_self->samfile->header->l_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1259
+/* "pysam/csamtools.pyx":1385
* a two-level dictionary.
* '''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 1259);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 1385);
- /* "pysam/csamtools.pyx":1260
+ /* "pysam/csamtools.pyx":1386
* '''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* result = {}
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_100), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1262
+ /* "pysam/csamtools.pyx":1388
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
*
* result = {} # <<<<<<<<<<<<<<
*
* if self.samfile.header.text != NULL:
*/
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_v_result = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1264
+ /* "pysam/csamtools.pyx":1390
* result = {}
*
* if self.samfile.header.text != NULL: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_v_self->samfile->header->text != NULL);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1266
+ /* "pysam/csamtools.pyx":1392
* if self.samfile.header.text != NULL:
* # convert to python string (note: call self.text to create 0-terminated string)
* t = self.text # <<<<<<<<<<<<<<
* for line in t.split("\n"):
* if not line.strip(): continue
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_t = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1267
+ /* "pysam/csamtools.pyx":1393
* # convert to python string (note: call self.text to create 0-terminated string)
* t = self.text
* for line in t.split("\n"): # <<<<<<<<<<<<<<
* if not line.strip(): continue
* assert line.startswith("@"), "header line without '@': '%s'" % line
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_t, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_t, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_1 = __pyx_t_6(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_line = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1268
+ /* "pysam/csamtools.pyx":1394
* t = self.text
* for line in t.split("\n"):
* if not line.strip(): continue # <<<<<<<<<<<<<<
* assert line.startswith("@"), "header line without '@': '%s'" % line
* fields = line[1:].split("\t")
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
}
__pyx_L7:;
- /* "pysam/csamtools.pyx":1269
+ /* "pysam/csamtools.pyx":1395
* for line in t.split("\n"):
* if not line.strip(): continue
* assert line.startswith("@"), "header line without '@': '%s'" % line # <<<<<<<<<<<<<<
* record = fields[0]
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
- __pyx_t_7 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_111), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (unlikely(!__pyx_t_3)) {
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_104), __pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_112), __pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_1));
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":1270
+ /* "pysam/csamtools.pyx":1396
* if not line.strip(): continue
* assert line.startswith("@"), "header line without '@': '%s'" % line
* fields = line[1:].split("\t") # <<<<<<<<<<<<<<
* record = fields[0]
* assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
*/
- __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_113), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_v_fields);
__pyx_v_fields = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1271
+ /* "pysam/csamtools.pyx":1397
* assert line.startswith("@"), "header line without '@': '%s'" % line
* fields = line[1:].split("\t")
* record = fields[0] # <<<<<<<<<<<<<<
* assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
*
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fields, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fields, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_v_record);
__pyx_v_record = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1272
+ /* "pysam/csamtools.pyx":1398
* fields = line[1:].split("\t")
* record = fields[0]
* assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line) # <<<<<<<<<<<<<<
* # treat comments
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (unlikely(!__pyx_t_3)) {
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_record);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_record);
__Pyx_INCREF(__pyx_v_line);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_line);
__Pyx_GIVEREF(__pyx_v_line);
- __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_106), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_114), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_7));
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":1275
+ /* "pysam/csamtools.pyx":1401
*
* # treat comments
* if record == "CO": # <<<<<<<<<<<<<<
* if record not in result: result[record] = []
* result[record].append( "\t".join( fields[1:] ) )
*/
- __pyx_t_7 = PyObject_RichCompare(__pyx_v_record, ((PyObject *)__pyx_n_s__CO), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_v_record, ((PyObject *)__pyx_n_s__CO), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1276
+ /* "pysam/csamtools.pyx":1402
* # treat comments
* if record == "CO":
* if record not in result: result[record] = [] # <<<<<<<<<<<<<<
* result[record].append( "\t".join( fields[1:] ) )
* continue
*/
- __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_record, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_v_record, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_3) {
- __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
goto __pyx_L9;
}
__pyx_L9:;
- /* "pysam/csamtools.pyx":1277
+ /* "pysam/csamtools.pyx":1403
* if record == "CO":
* if record not in result: result[record] = []
* result[record].append( "\t".join( fields[1:] ) ) # <<<<<<<<<<<<<<
* continue
* # the following is clumsy as generators do not work?
*/
- __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_fields, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_fields, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "pysam/csamtools.pyx":1278
+ /* "pysam/csamtools.pyx":1404
* if record not in result: result[record] = []
* result[record].append( "\t".join( fields[1:] ) )
* continue # <<<<<<<<<<<<<<
}
__pyx_L8:;
- /* "pysam/csamtools.pyx":1280
+ /* "pysam/csamtools.pyx":1406
* continue
* # the following is clumsy as generators do not work?
* x = {} # <<<<<<<<<<<<<<
* for field in fields[1:]:
* if ":" not in field:
*/
- __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
__Pyx_XDECREF(((PyObject *)__pyx_v_x));
__pyx_v_x = ((PyObject*)__pyx_t_9);
__pyx_t_9 = 0;
- /* "pysam/csamtools.pyx":1281
+ /* "pysam/csamtools.pyx":1407
* # the following is clumsy as generators do not work?
* x = {}
* for field in fields[1:]: # <<<<<<<<<<<<<<
* if ":" not in field:
* raise ValueError("malformatted header: no ':' in field" )
*/
- __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_fields, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_fields, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
__pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
__pyx_t_11 = NULL;
} else {
- __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext;
}
if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_8)) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_8)) {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_9 = __pyx_t_11(__pyx_t_8);
if (unlikely(!__pyx_t_9)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_field = __pyx_t_9;
__pyx_t_9 = 0;
- /* "pysam/csamtools.pyx":1282
+ /* "pysam/csamtools.pyx":1408
* x = {}
* for field in fields[1:]:
* if ":" not in field: # <<<<<<<<<<<<<<
* raise ValueError("malformatted header: no ':' in field" )
* key, value = field.split(":",1)
*/
- __pyx_t_3 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_107), __pyx_v_field, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_115), __pyx_v_field, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1283
+ /* "pysam/csamtools.pyx":1409
* for field in fields[1:]:
* if ":" not in field:
* raise ValueError("malformatted header: no ':' in field" ) # <<<<<<<<<<<<<<
* key, value = field.split(":",1)
* # uppercase keys must be valid
*/
- __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_117), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_Raise(__pyx_t_9, 0, 0, 0);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L12;
}
__pyx_L12:;
- /* "pysam/csamtools.pyx":1284
+ /* "pysam/csamtools.pyx":1410
* if ":" not in field:
* raise ValueError("malformatted header: no ':' in field" )
* key, value = field.split(":",1) # <<<<<<<<<<<<<<
* # uppercase keys must be valid
* # lowercase are permitted for user fields
*/
- __pyx_t_9 = PyObject_GetAttr(__pyx_v_field, __pyx_n_s__split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetAttr(__pyx_v_field, __pyx_n_s__split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_110), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_118), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_9);
__Pyx_INCREF(__pyx_t_1);
#else
- __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
#endif
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_12 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
__Pyx_GOTREF(__pyx_t_9);
index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
__Pyx_GOTREF(__pyx_t_1);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_13 = NULL;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
goto __pyx_L14_unpacking_done;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_13 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L14_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_key);
__pyx_v_value = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1287
+ /* "pysam/csamtools.pyx":1413
* # uppercase keys must be valid
* # lowercase are permitted for user fields
* if key in VALID_HEADER_FIELDS[record]: # <<<<<<<<<<<<<<
* x[key] = VALID_HEADER_FIELDS[record][key](value)
* elif not key.isupper():
*/
- __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_1 = PyObject_GetItem(__pyx_t_7, __pyx_v_record); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_7, __pyx_v_record); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1288
+ /* "pysam/csamtools.pyx":1414
* # lowercase are permitted for user fields
* if key in VALID_HEADER_FIELDS[record]:
* x[key] = VALID_HEADER_FIELDS[record][key](value) # <<<<<<<<<<<<<<
* elif not key.isupper():
* x[key] = value
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetItem(__pyx_t_7, __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_7, __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_value);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
- __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- if (PyDict_SetItem(((PyObject *)__pyx_v_x), __pyx_v_key, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(((PyObject *)__pyx_v_x), __pyx_v_key, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L15;
}
- /* "pysam/csamtools.pyx":1289
+ /* "pysam/csamtools.pyx":1415
* if key in VALID_HEADER_FIELDS[record]:
* x[key] = VALID_HEADER_FIELDS[record][key](value)
* elif not key.isupper(): # <<<<<<<<<<<<<<
* x[key] = value
* else:
*/
- __pyx_t_9 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__isupper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__isupper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1290
+ /* "pysam/csamtools.pyx":1416
* x[key] = VALID_HEADER_FIELDS[record][key](value)
* elif not key.isupper():
* x[key] = value # <<<<<<<<<<<<<<
* else:
* raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )
*/
- if (PyDict_SetItem(((PyObject *)__pyx_v_x), __pyx_v_key, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(((PyObject *)__pyx_v_x), __pyx_v_key, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L15;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1292
+ /* "pysam/csamtools.pyx":1418
* x[key] = value
* else:
* raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) ) # <<<<<<<<<<<<<<
*
* if VALID_HEADER_TYPES[record] == dict:
*/
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
__Pyx_INCREF(__pyx_v_record);
PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_record);
__Pyx_GIVEREF(__pyx_v_record);
- __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_111), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_119), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_9));
__Pyx_GIVEREF(((PyObject *)__pyx_t_9));
__pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_Raise(__pyx_t_9, 0, 0, 0);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L15:;
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":1294
+ /* "pysam/csamtools.pyx":1420
* raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) )
*
* if VALID_HEADER_TYPES[record] == dict: # <<<<<<<<<<<<<<
* if record in result:
* raise ValueError( "multiple '%s' lines are not permitted" % record )
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_record); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_record); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)((PyObject*)(&PyDict_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)((PyObject*)(&PyDict_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1295
+ /* "pysam/csamtools.pyx":1421
*
* if VALID_HEADER_TYPES[record] == dict:
* if record in result: # <<<<<<<<<<<<<<
* raise ValueError( "multiple '%s' lines are not permitted" % record )
* result[record] = x
*/
- __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_record, ((PyObject *)__pyx_v_result), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_record, ((PyObject *)__pyx_v_result), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1296
+ /* "pysam/csamtools.pyx":1422
* if VALID_HEADER_TYPES[record] == dict:
* if record in result:
* raise ValueError( "multiple '%s' lines are not permitted" % record ) # <<<<<<<<<<<<<<
* result[record] = x
* elif VALID_HEADER_TYPES[record] == list:
*/
- __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_112), __pyx_v_record); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_120), __pyx_v_record); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L17;
}
__pyx_L17:;
- /* "pysam/csamtools.pyx":1297
+ /* "pysam/csamtools.pyx":1423
* if record in result:
* raise ValueError( "multiple '%s' lines are not permitted" % record )
* result[record] = x # <<<<<<<<<<<<<<
* elif VALID_HEADER_TYPES[record] == list:
* if record not in result: result[record] = []
*/
- if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_v_x)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_v_x)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L16;
}
- /* "pysam/csamtools.pyx":1298
+ /* "pysam/csamtools.pyx":1424
* raise ValueError( "multiple '%s' lines are not permitted" % record )
* result[record] = x
* elif VALID_HEADER_TYPES[record] == list: # <<<<<<<<<<<<<<
* if record not in result: result[record] = []
* result[record].append( x )
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_record); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_record); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)((PyObject*)(&PyList_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)((PyObject*)(&PyList_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1299
+ /* "pysam/csamtools.pyx":1425
* result[record] = x
* elif VALID_HEADER_TYPES[record] == list:
* if record not in result: result[record] = [] # <<<<<<<<<<<<<<
* result[record].append( x )
*
*/
- __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_record, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = (__Pyx_PyDict_Contains(__pyx_v_record, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
- __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
goto __pyx_L18;
}
__pyx_L18:;
- /* "pysam/csamtools.pyx":1300
+ /* "pysam/csamtools.pyx":1426
* elif VALID_HEADER_TYPES[record] == list:
* if record not in result: result[record] = []
* result[record].append( x ) # <<<<<<<<<<<<<<
*
* # if there are no SQ lines in the header, add the reference names
*/
- __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_8, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_8, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1308
+ /* "pysam/csamtools.pyx":1434
* # SQ lines, the SQ information is not part of the textual header and thus
* # are missing from the output. See issue 84.
* if "SQ" not in result: # <<<<<<<<<<<<<<
* sq = []
* for ref, length in zip( self.references, self.lengths ):
*/
- __pyx_t_4 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1309
+ /* "pysam/csamtools.pyx":1435
* # are missing from the output. See issue 84.
* if "SQ" not in result:
* sq = [] # <<<<<<<<<<<<<<
* for ref, length in zip( self.references, self.lengths ):
* sq.append( {'LN': length, 'SN': ref } )
*/
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_sq = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1310
+ /* "pysam/csamtools.pyx":1436
* if "SQ" not in result:
* sq = []
* for ref, length in zip( self.references, self.lengths ): # <<<<<<<<<<<<<<
* sq.append( {'LN': length, 'SN': ref } )
* result["SQ"] = sq
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__references); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__references); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__lengths); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__lengths); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_9);
__pyx_t_2 = 0;
__pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_builtin_zip, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_builtin_zip, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
__pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_6 = Py_TYPE(__pyx_t_8)->tp_iternext;
}
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_8)) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_8)) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_9 = __pyx_t_6(__pyx_t_8);
if (unlikely(!__pyx_t_9)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(__pyx_t_7);
#else
- __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
#endif
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_1 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext;
__Pyx_GOTREF(__pyx_t_2);
index = 1; __pyx_t_7 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L22_unpacking_failed;
__Pyx_GOTREF(__pyx_t_7);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_13 = NULL;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L23_unpacking_done;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_13 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L23_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_ref);
__pyx_v_length = __pyx_t_7;
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":1311
+ /* "pysam/csamtools.pyx":1437
* sq = []
* for ref, length in zip( self.references, self.lengths ):
* sq.append( {'LN': length, 'SN': ref } ) # <<<<<<<<<<<<<<
* result["SQ"] = sq
*
*/
- __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
- if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__LN), __pyx_v_length) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__SN), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_14 = PyList_Append(__pyx_v_sq, ((PyObject *)__pyx_t_9)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__LN), __pyx_v_length) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__SN), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyList_Append(__pyx_v_sq, ((PyObject *)__pyx_t_9)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":1312
+ /* "pysam/csamtools.pyx":1438
* for ref, length in zip( self.references, self.lengths ):
* sq.append( {'LN': length, 'SN': ref } )
* result["SQ"] = sq # <<<<<<<<<<<<<<
*
* return result
*/
- if (PyDict_SetItem(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_v_sq)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_v_sq)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L19;
}
__pyx_L19:;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1314
+ /* "pysam/csamtools.pyx":1440
* result["SQ"] = sq
*
* return result # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__record)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("_buildLine", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("_buildLine", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_buildLine") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_buildLine") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_buildLine", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("_buildLine", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Samfile._buildLine", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1316
+/* "pysam/csamtools.pyx":1442
* return result
*
* def _buildLine( self, fields, record ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_buildLine", 0);
- __Pyx_TraceCall("_buildLine", __pyx_f[0], 1316);
+ __Pyx_TraceCall("_buildLine", __pyx_f[0], 1442);
- /* "pysam/csamtools.pyx":1320
+ /* "pysam/csamtools.pyx":1446
*
* # TODO: add checking for field and sort order
* line = ["@%s" % record ] # <<<<<<<<<<<<<<
* # comment
* if record == "CO":
*/
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_113), __pyx_v_record); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_121), __pyx_v_record); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_v_line = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1322
+ /* "pysam/csamtools.pyx":1448
* line = ["@%s" % record ]
* # comment
* if record == "CO": # <<<<<<<<<<<<<<
* line.append( fields )
* # user tags
*/
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_record, ((PyObject *)__pyx_n_s__CO), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_record, ((PyObject *)__pyx_n_s__CO), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1323
+ /* "pysam/csamtools.pyx":1449
* # comment
* if record == "CO":
* line.append( fields ) # <<<<<<<<<<<<<<
* # user tags
* elif record.islower():
*/
- __pyx_t_4 = PyList_Append(__pyx_v_line, __pyx_v_fields); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_line, __pyx_v_fields); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
- /* "pysam/csamtools.pyx":1325
+ /* "pysam/csamtools.pyx":1451
* line.append( fields )
* # user tags
* elif record.islower(): # <<<<<<<<<<<<<<
* for key in sorted(fields):
* line.append( "%s:%s" % (key, str(fields[key])))
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__islower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_record, __pyx_n_s__islower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1326
+ /* "pysam/csamtools.pyx":1452
* # user tags
* elif record.islower():
* for key in sorted(fields): # <<<<<<<<<<<<<<
* line.append( "%s:%s" % (key, str(fields[key])))
* # defined tags
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_fields);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fields);
__Pyx_GIVEREF(__pyx_v_fields);
- __pyx_t_2 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
__pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_6(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_key = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1327
+ /* "pysam/csamtools.pyx":1453
* elif record.islower():
* for key in sorted(fields):
* line.append( "%s:%s" % (key, str(fields[key]))) # <<<<<<<<<<<<<<
* # defined tags
* else:
*/
- __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_114), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_122), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1331
+ /* "pysam/csamtools.pyx":1457
* else:
* # write fields of the specification
* for key in VALID_HEADER_ORDER[record]: # <<<<<<<<<<<<<<
* if key in fields:
* line.append( "%s:%s" % (key, str(fields[key])))
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_ORDER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_ORDER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
__pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_6(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_key = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1332
+ /* "pysam/csamtools.pyx":1458
* # write fields of the specification
* for key in VALID_HEADER_ORDER[record]:
* if key in fields: # <<<<<<<<<<<<<<
* line.append( "%s:%s" % (key, str(fields[key])))
* # write user fields
*/
- __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_fields, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_fields, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1333
+ /* "pysam/csamtools.pyx":1459
* for key in VALID_HEADER_ORDER[record]:
* if key in fields:
* line.append( "%s:%s" % (key, str(fields[key]))) # <<<<<<<<<<<<<<
* # write user fields
* for key in fields:
*/
- __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_114), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_122), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
goto __pyx_L8;
}
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1335
+ /* "pysam/csamtools.pyx":1461
* line.append( "%s:%s" % (key, str(fields[key])))
* # write user fields
* for key in fields: # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_fields; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_6(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_key = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1336
+ /* "pysam/csamtools.pyx":1462
* # write user fields
* for key in fields:
* if not key.isupper(): # <<<<<<<<<<<<<<
* line.append( "%s:%s" % (key, str(fields[key])))
*
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__isupper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__isupper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_8 = (!__pyx_t_3);
if (__pyx_t_8) {
- /* "pysam/csamtools.pyx":1337
+ /* "pysam/csamtools.pyx":1463
* for key in fields:
* if not key.isupper():
* line.append( "%s:%s" % (key, str(fields[key]))) # <<<<<<<<<<<<<<
*
* return "\t".join( line )
*/
- __pyx_t_7 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_7 = 0;
- __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_114), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_122), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_7)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_7)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
goto __pyx_L11;
}
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1339
+ /* "pysam/csamtools.pyx":1465
* line.append( "%s:%s" % (key, str(fields[key])))
*
* return "\t".join( line ) # <<<<<<<<<<<<<<
* cdef bam_header_t * _buildHeader( self, new_header ):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(((PyObject *)__pyx_v_line));
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_line));
__Pyx_GIVEREF(((PyObject *)__pyx_v_line));
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1341
+/* "pysam/csamtools.pyx":1467
* return "\t".join( line )
*
* cdef bam_header_t * _buildHeader( self, new_header ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_buildHeader", 0);
- __Pyx_TraceCall("_buildHeader", __pyx_f[0], 1341);
+ __Pyx_TraceCall("_buildHeader", __pyx_f[0], 1467);
- /* "pysam/csamtools.pyx":1347
+ /* "pysam/csamtools.pyx":1473
* '''
*
* lines = [] # <<<<<<<<<<<<<<
*
* # check if hash exists
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_lines = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1354
+ /* "pysam/csamtools.pyx":1480
* cdef bam_header_t * dest
*
* dest = bam_header_init() # <<<<<<<<<<<<<<
*/
__pyx_v_dest = bam_header_init();
- /* "pysam/csamtools.pyx":1357
+ /* "pysam/csamtools.pyx":1483
*
* # first: defined tags
* for record in VALID_HEADERS: # <<<<<<<<<<<<<<
* if record in new_header:
* ttype = VALID_HEADER_TYPES[record]
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADERS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADERS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_1 = __pyx_t_4(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_record = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1358
+ /* "pysam/csamtools.pyx":1484
* # first: defined tags
* for record in VALID_HEADERS:
* if record in new_header: # <<<<<<<<<<<<<<
* ttype = VALID_HEADER_TYPES[record]
* data = new_header[record]
*/
- __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_v_new_header, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_v_new_header, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":1359
+ /* "pysam/csamtools.pyx":1485
* for record in VALID_HEADERS:
* if record in new_header:
* ttype = VALID_HEADER_TYPES[record] # <<<<<<<<<<<<<<
* data = new_header[record]
* if type( data ) != type( ttype() ):
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_v_ttype);
__pyx_v_ttype = __pyx_t_6;
__pyx_t_6 = 0;
- /* "pysam/csamtools.pyx":1360
+ /* "pysam/csamtools.pyx":1486
* if record in new_header:
* ttype = VALID_HEADER_TYPES[record]
* data = new_header[record] # <<<<<<<<<<<<<<
* if type( data ) != type( ttype() ):
* raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )
*/
- __pyx_t_6 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_v_data);
__pyx_v_data = __pyx_t_6;
__pyx_t_6 = 0;
- /* "pysam/csamtools.pyx":1361
+ /* "pysam/csamtools.pyx":1487
* ttype = VALID_HEADER_TYPES[record]
* data = new_header[record]
* if type( data ) != type( ttype() ): # <<<<<<<<<<<<<<
* raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )
* if type( data ) is dict:
*/
- __pyx_t_6 = PyObject_Call(__pyx_v_ttype, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_v_ttype, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_data)), ((PyObject *)Py_TYPE(__pyx_t_6)), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_data)), ((PyObject *)Py_TYPE(__pyx_t_6)), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":1362
+ /* "pysam/csamtools.pyx":1488
* data = new_header[record]
* if type( data ) != type( ttype() ):
* raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) ) # <<<<<<<<<<<<<<
* if type( data ) is dict:
* lines.append( self._buildLine( data, record ) )
*/
- __pyx_t_1 = PyObject_Call(__pyx_v_ttype, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_v_ttype, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_record);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_record);
PyTuple_SET_ITEM(__pyx_t_6, 2, ((PyObject *)Py_TYPE(__pyx_t_1)));
__Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_1)));
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_115), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_123), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
- /* "pysam/csamtools.pyx":1363
+ /* "pysam/csamtools.pyx":1489
* if type( data ) != type( ttype() ):
* raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )
* if type( data ) is dict: # <<<<<<<<<<<<<<
__pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_data)) == ((PyObject *)((PyObject*)(&PyDict_Type))));
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":1364
+ /* "pysam/csamtools.pyx":1490
* raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) )
* if type( data ) is dict:
* lines.append( self._buildLine( data, record ) ) # <<<<<<<<<<<<<<
* else:
* for fields in new_header[record]:
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_data);
__Pyx_INCREF(__pyx_v_record);
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_record);
__Pyx_GIVEREF(__pyx_v_record);
- __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L7;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1366
+ /* "pysam/csamtools.pyx":1492
* lines.append( self._buildLine( data, record ) )
* else:
* for fields in new_header[record]: # <<<<<<<<<<<<<<
* lines.append( self._buildLine( fields, record ) )
*
*/
- __pyx_t_7 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
__pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
__pyx_t_10 = NULL;
} else {
- __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext;
}
if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_6)) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_6)) {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_7 = __pyx_t_10(__pyx_t_6);
if (unlikely(!__pyx_t_7)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_fields = __pyx_t_7;
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":1367
+ /* "pysam/csamtools.pyx":1493
* else:
* for fields in new_header[record]:
* lines.append( self._buildLine( fields, record ) ) # <<<<<<<<<<<<<<
*
* # then: user tags (lower case), sorted alphabetically
*/
- __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_fields);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fields);
__Pyx_INCREF(__pyx_v_record);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_record);
__Pyx_GIVEREF(__pyx_v_record);
- __pyx_t_11 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_11); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_11); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1370
+ /* "pysam/csamtools.pyx":1496
*
* # then: user tags (lower case), sorted alphabetically
* for record, data in sorted(new_header.items()): # <<<<<<<<<<<<<<
* if record in VALID_HEADERS: continue
* if type( data ) is dict:
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_new_header, __pyx_n_s__items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_new_header, __pyx_n_s__items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
__pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_6 = __pyx_t_4(__pyx_t_2);
if (unlikely(!__pyx_t_6)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(__pyx_t_1);
#else
- __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
#endif
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext;
__Pyx_GOTREF(__pyx_t_11);
index = 1; __pyx_t_1 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed;
__Pyx_GOTREF(__pyx_t_1);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_12 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L13_unpacking_done;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_12 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L13_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_record);
__pyx_v_data = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1371
+ /* "pysam/csamtools.pyx":1497
* # then: user tags (lower case), sorted alphabetically
* for record, data in sorted(new_header.items()):
* if record in VALID_HEADERS: continue # <<<<<<<<<<<<<<
* if type( data ) is dict:
* lines.append( self._buildLine( data, record ) )
*/
- __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADERS); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADERS); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_record, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_5) {
goto __pyx_L10_continue;
}
__pyx_L14:;
- /* "pysam/csamtools.pyx":1372
+ /* "pysam/csamtools.pyx":1498
* for record, data in sorted(new_header.items()):
* if record in VALID_HEADERS: continue
* if type( data ) is dict: # <<<<<<<<<<<<<<
__pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_data)) == ((PyObject *)((PyObject*)(&PyDict_Type))));
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":1373
+ /* "pysam/csamtools.pyx":1499
* if record in VALID_HEADERS: continue
* if type( data ) is dict:
* lines.append( self._buildLine( data, record ) ) # <<<<<<<<<<<<<<
* else:
* for fields in new_header[record]:
*/
- __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
__Pyx_INCREF(__pyx_v_record);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_record);
__Pyx_GIVEREF(__pyx_v_record);
- __pyx_t_11 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_11); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_11); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
goto __pyx_L15;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1375
+ /* "pysam/csamtools.pyx":1501
* lines.append( self._buildLine( data, record ) )
* else:
* for fields in new_header[record]: # <<<<<<<<<<<<<<
* lines.append( self._buildLine( fields, record ) )
*
*/
- __pyx_t_11 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetItem(__pyx_v_new_header, __pyx_v_record); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
if (PyList_CheckExact(__pyx_t_11) || PyTuple_CheckExact(__pyx_t_11)) {
__pyx_t_1 = __pyx_t_11; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
__pyx_t_10 = NULL;
} else {
- __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_11 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_11 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_11 = __pyx_t_10(__pyx_t_1);
if (unlikely(!__pyx_t_11)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_fields = __pyx_t_11;
__pyx_t_11 = 0;
- /* "pysam/csamtools.pyx":1376
+ /* "pysam/csamtools.pyx":1502
* else:
* for fields in new_header[record]:
* lines.append( self._buildLine( fields, record ) ) # <<<<<<<<<<<<<<
*
* text = "\n".join(lines) + "\n"
*/
- __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___buildLine); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_fields);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_fields);
__Pyx_INCREF(__pyx_v_record);
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_record);
__Pyx_GIVEREF(__pyx_v_record);
- __pyx_t_7 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_Append(__pyx_v_lines, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1378
+ /* "pysam/csamtools.pyx":1504
* lines.append( self._buildLine( fields, record ) )
*
* text = "\n".join(lines) + "\n" # <<<<<<<<<<<<<<
* if dest.text != NULL: free( dest.text )
* dest.text = <char*>calloc( len(text), sizeof(char))
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_lines));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_lines));
__Pyx_GIVEREF(((PyObject *)__pyx_v_lines));
- __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Add(__pyx_t_7, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_t_7, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_text = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1379
+ /* "pysam/csamtools.pyx":1505
*
* text = "\n".join(lines) + "\n"
* if dest.text != NULL: free( dest.text ) # <<<<<<<<<<<<<<
}
__pyx_L18:;
- /* "pysam/csamtools.pyx":1380
+ /* "pysam/csamtools.pyx":1506
* text = "\n".join(lines) + "\n"
* if dest.text != NULL: free( dest.text )
* dest.text = <char*>calloc( len(text), sizeof(char)) # <<<<<<<<<<<<<<
* dest.l_text = len(text)
* cdef bytes btext = text.encode('ascii')
*/
- __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_dest->text = ((char *)calloc(__pyx_t_3, (sizeof(char))));
- /* "pysam/csamtools.pyx":1381
+ /* "pysam/csamtools.pyx":1507
* if dest.text != NULL: free( dest.text )
* dest.text = <char*>calloc( len(text), sizeof(char))
* dest.l_text = len(text) # <<<<<<<<<<<<<<
* cdef bytes btext = text.encode('ascii')
* strncpy( dest.text, btext, dest.l_text )
*/
- __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_dest->l_text = __pyx_t_3;
- /* "pysam/csamtools.pyx":1382
+ /* "pysam/csamtools.pyx":1508
* dest.text = <char*>calloc( len(text), sizeof(char))
* dest.l_text = len(text)
* cdef bytes btext = text.encode('ascii') # <<<<<<<<<<<<<<
* strncpy( dest.text, btext, dest.l_text )
*
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_text, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_text, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_116), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_124), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_btext = ((PyObject*)__pyx_t_7);
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":1383
+ /* "pysam/csamtools.pyx":1509
* dest.l_text = len(text)
* cdef bytes btext = text.encode('ascii')
* strncpy( dest.text, btext, dest.l_text ) # <<<<<<<<<<<<<<
*
* cdef bytes bseqname
*/
- __pyx_t_13 = PyBytes_AsString(((PyObject *)__pyx_v_btext)); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyBytes_AsString(((PyObject *)__pyx_v_btext)); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
strncpy(__pyx_v_dest->text, __pyx_t_13, __pyx_v_dest->l_text);
- /* "pysam/csamtools.pyx":1387
+ /* "pysam/csamtools.pyx":1513
* cdef bytes bseqname
* # collect targets
* if "SQ" in new_header: # <<<<<<<<<<<<<<
* seqs = []
* for fields in new_header["SQ"]:
*/
- __pyx_t_5 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__SQ), __pyx_v_new_header, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__SQ), __pyx_v_new_header, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":1388
+ /* "pysam/csamtools.pyx":1514
* # collect targets
* if "SQ" in new_header:
* seqs = [] # <<<<<<<<<<<<<<
* for fields in new_header["SQ"]:
* try:
*/
- __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__pyx_v_seqs = ((PyObject*)__pyx_t_7);
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":1389
+ /* "pysam/csamtools.pyx":1515
* if "SQ" in new_header:
* seqs = []
* for fields in new_header["SQ"]: # <<<<<<<<<<<<<<
* try:
* seqs.append( (fields["SN"], fields["LN"] ) )
*/
- __pyx_t_7 = PyObject_GetItem(__pyx_v_new_header, ((PyObject *)__pyx_n_s__SQ)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_new_header, ((PyObject *)__pyx_n_s__SQ)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
__pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_7 = __pyx_t_4(__pyx_t_1);
if (unlikely(!__pyx_t_7)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_fields = __pyx_t_7;
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":1390
+ /* "pysam/csamtools.pyx":1516
* seqs = []
* for fields in new_header["SQ"]:
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_16);
/*try:*/ {
- /* "pysam/csamtools.pyx":1391
+ /* "pysam/csamtools.pyx":1517
* for fields in new_header["SQ"]:
* try:
* seqs.append( (fields["SN"], fields["LN"] ) ) # <<<<<<<<<<<<<<
* except KeyError:
* raise KeyError( "incomplete sequence information in '%s'" % str(fields))
*/
- __pyx_t_7 = PyObject_GetItem(__pyx_v_fields, ((PyObject *)__pyx_n_s__SN)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_fields, ((PyObject *)__pyx_n_s__SN)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, ((PyObject *)__pyx_n_s__LN)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_fields, ((PyObject *)__pyx_n_s__LN)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
__Pyx_GOTREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_7 = 0;
__pyx_t_2 = 0;
- __pyx_t_8 = PyList_Append(__pyx_v_seqs, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+ __pyx_t_8 = PyList_Append(__pyx_v_seqs, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
}
__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "pysam/csamtools.pyx":1392
+ /* "pysam/csamtools.pyx":1518
* try:
* seqs.append( (fields["SN"], fields["LN"] ) )
* except KeyError: # <<<<<<<<<<<<<<
__pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
if (__pyx_t_17) {
__Pyx_AddTraceback("pysam.csamtools.Samfile._buildHeader", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_7);
- /* "pysam/csamtools.pyx":1393
+ /* "pysam/csamtools.pyx":1519
* seqs.append( (fields["SN"], fields["LN"] ) )
* except KeyError:
* raise KeyError( "incomplete sequence information in '%s'" % str(fields)) # <<<<<<<<<<<<<<
*
* dest.n_targets = len(seqs)
*/
- __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_v_fields);
PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_fields);
__Pyx_GIVEREF(__pyx_v_fields);
- __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+ __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
- __pyx_t_11 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_117), __pyx_t_18); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+ __pyx_t_11 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_125), __pyx_t_18); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_11));
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+ __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
__Pyx_GOTREF(__pyx_t_18);
PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_t_11));
__Pyx_GIVEREF(((PyObject *)__pyx_t_11));
__pyx_t_11 = 0;
- __pyx_t_11 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+ __pyx_t_11 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
__Pyx_Raise(__pyx_t_11, 0, 0, 0);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1395
+ /* "pysam/csamtools.pyx":1521
* raise KeyError( "incomplete sequence information in '%s'" % str(fields))
*
* dest.n_targets = len(seqs) # <<<<<<<<<<<<<<
* dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )
* dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
*/
- __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_seqs)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_seqs)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_dest->n_targets = __pyx_t_3;
- /* "pysam/csamtools.pyx":1396
+ /* "pysam/csamtools.pyx":1522
*
* dest.n_targets = len(seqs)
* dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) ) # <<<<<<<<<<<<<<
*/
__pyx_v_dest->target_name = ((char **)calloc(__pyx_v_dest->n_targets, (sizeof(char *))));
- /* "pysam/csamtools.pyx":1397
+ /* "pysam/csamtools.pyx":1523
* dest.n_targets = len(seqs)
* dest.target_name = <char**>calloc( dest.n_targets, sizeof(char*) )
* dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) ) # <<<<<<<<<<<<<<
*/
__pyx_v_dest->target_len = ((uint32_t *)calloc(__pyx_v_dest->n_targets, (sizeof(uint32_t))));
- /* "pysam/csamtools.pyx":1399
+ /* "pysam/csamtools.pyx":1525
* dest.target_len = <uint32_t*>calloc( dest.n_targets, sizeof(uint32_t) )
*
* for x from 0 <= x < dest.n_targets: # <<<<<<<<<<<<<<
__pyx_t_19 = __pyx_v_dest->n_targets;
for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_19; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":1400
+ /* "pysam/csamtools.pyx":1526
*
* for x from 0 <= x < dest.n_targets:
* seqname, seqlen = seqs[x] # <<<<<<<<<<<<<<
* dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
* bseqname = seqname.encode('ascii')
*/
- __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_seqs), __pyx_v_x, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_seqs), __pyx_v_x, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(__pyx_t_2);
#else
- __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
#endif
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext;
__Pyx_GOTREF(__pyx_t_7);
index = 1; __pyx_t_2 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L34_unpacking_failed;
__Pyx_GOTREF(__pyx_t_2);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_12 = NULL;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L35_unpacking_done;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_12 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L35_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_seqname);
__pyx_v_seqlen = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1401
+ /* "pysam/csamtools.pyx":1527
* for x from 0 <= x < dest.n_targets:
* seqname, seqlen = seqs[x]
* dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) ) # <<<<<<<<<<<<<<
* bseqname = seqname.encode('ascii')
* strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
*/
- __pyx_t_3 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
(__pyx_v_dest->target_name[__pyx_v_x]) = ((char *)calloc((__pyx_t_3 + 1), (sizeof(char))));
- /* "pysam/csamtools.pyx":1402
+ /* "pysam/csamtools.pyx":1528
* seqname, seqlen = seqs[x]
* dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
* bseqname = seqname.encode('ascii') # <<<<<<<<<<<<<<
* strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
* dest.target_len[x] = seqlen
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_seqname, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_seqname, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_118), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_126), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_XDECREF(((PyObject *)__pyx_v_bseqname));
__pyx_v_bseqname = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1403
+ /* "pysam/csamtools.pyx":1529
* dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
* bseqname = seqname.encode('ascii')
* strncpy( dest.target_name[x], bseqname, len(seqname) + 1 ) # <<<<<<<<<<<<<<
* dest.target_len[x] = seqlen
*
*/
- __pyx_t_13 = PyBytes_AsString(((PyObject *)__pyx_v_bseqname)); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyBytes_AsString(((PyObject *)__pyx_v_bseqname)); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
strncpy((__pyx_v_dest->target_name[__pyx_v_x]), __pyx_t_13, (__pyx_t_3 + 1));
- /* "pysam/csamtools.pyx":1404
+ /* "pysam/csamtools.pyx":1530
* bseqname = seqname.encode('ascii')
* strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
* dest.target_len[x] = seqlen # <<<<<<<<<<<<<<
*
* return dest
*/
- __pyx_t_20 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_seqlen); if (unlikely((__pyx_t_20 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_20 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_seqlen); if (unlikely((__pyx_t_20 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
(__pyx_v_dest->target_len[__pyx_v_x]) = __pyx_t_20;
}
goto __pyx_L19;
}
__pyx_L19:;
- /* "pysam/csamtools.pyx":1406
+ /* "pysam/csamtools.pyx":1532
* dest.target_len[x] = seqlen
*
* return dest # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1416
+/* "pysam/csamtools.pyx":1542
* ## Possible solutions: deprecate or open new file handle
* ###############################################################
* def __iter__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- __Pyx_TraceCall("__iter__", __pyx_f[0], 1416);
+ __Pyx_TraceCall("__iter__", __pyx_f[0], 1542);
- /* "pysam/csamtools.pyx":1417
+ /* "pysam/csamtools.pyx":1543
* ###############################################################
* def __iter__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam and self.samfile.header.n_targets == 0:
* raise NotImplementedError( "can not iterate over samfile without header")
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_119), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_127), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1418
+ /* "pysam/csamtools.pyx":1544
* def __iter__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not self.isbam and self.samfile.header.n_targets == 0: # <<<<<<<<<<<<<<
}
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":1419
+ /* "pysam/csamtools.pyx":1545
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not self.isbam and self.samfile.header.n_targets == 0:
* raise NotImplementedError( "can not iterate over samfile without header") # <<<<<<<<<<<<<<
* return self
*
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_121), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_129), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1420
+ /* "pysam/csamtools.pyx":1546
* if not self.isbam and self.samfile.header.n_targets == 0:
* raise NotImplementedError( "can not iterate over samfile without header")
* return self # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1422
+/* "pysam/csamtools.pyx":1548
* return self
*
* cdef bam1_t * getCurrent( self ): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("getCurrent", 0);
- __Pyx_TraceCall("getCurrent", __pyx_f[0], 1422);
+ __Pyx_TraceCall("getCurrent", __pyx_f[0], 1548);
- /* "pysam/csamtools.pyx":1423
+ /* "pysam/csamtools.pyx":1549
*
* cdef bam1_t * getCurrent( self ):
* return self.b # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1425
+/* "pysam/csamtools.pyx":1551
* return self.b
*
* cdef int cnext(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("cnext", 0);
- __Pyx_TraceCall("cnext", __pyx_f[0], 1425);
+ __Pyx_TraceCall("cnext", __pyx_f[0], 1551);
- /* "pysam/csamtools.pyx":1430
+ /* "pysam/csamtools.pyx":1556
* '''
* cdef int ret
* return samread(self.samfile, self.b) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1432
+/* "pysam/csamtools.pyx":1558
* return samread(self.samfile, self.b)
*
* def __next__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__next__", 0);
- __Pyx_TraceCall("__next__", __pyx_f[0], 1432);
+ __Pyx_TraceCall("__next__", __pyx_f[0], 1558);
- /* "pysam/csamtools.pyx":1437
+ /* "pysam/csamtools.pyx":1563
* """
* cdef int ret
* ret = samread(self.samfile, self.b) # <<<<<<<<<<<<<<
*/
__pyx_v_ret = samread(__pyx_v_self->samfile, __pyx_v_self->b);
- /* "pysam/csamtools.pyx":1438
+ /* "pysam/csamtools.pyx":1564
* cdef int ret
* ret = samread(self.samfile, self.b)
* if (ret > 0): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_ret > 0);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1439
+ /* "pysam/csamtools.pyx":1565
* ret = samread(self.samfile, self.b)
* if (ret > 0):
* return makeAlignedRead( self.b ) # <<<<<<<<<<<<<<
* raise StopIteration
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1441
+ /* "pysam/csamtools.pyx":1567
* return makeAlignedRead( self.b )
* else:
* raise StopIteration # <<<<<<<<<<<<<<
* ##-------------------------------------------------------------------
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tid)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__beg)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
}
__pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
- __pyx_v_tid = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_beg = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_beg == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_end = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_tid = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_beg = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_beg == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_end = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[4]) {
- __pyx_v_reopen = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_reopen = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "pysam/csamtools.pyx":1486
+ /* "pysam/csamtools.pyx":1622
* """
*
* def __cinit__(self, Samfile samfile, int tid, int beg, int end, int reopen = True ): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.IteratorRowRegion.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_17IteratorRowRegion___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_v_self), __pyx_v_samfile, __pyx_v_tid, __pyx_v_beg, __pyx_v_end, __pyx_v_reopen);
goto __pyx_L0;
__pyx_L1_error:;
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_TraceCall("__cinit__", __pyx_f[0], 1486);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 1622);
- /* "pysam/csamtools.pyx":1488
+ /* "pysam/csamtools.pyx":1624
* def __cinit__(self, Samfile samfile, int tid, int beg, int end, int reopen = True ):
*
* if not samfile._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1489
+ /* "pysam/csamtools.pyx":1625
*
* if not samfile._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* if not samfile._hasIndex():
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_122), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_130), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1491
+ /* "pysam/csamtools.pyx":1627
* raise ValueError( "I/O operation on closed file" )
*
* if not samfile._hasIndex(): # <<<<<<<<<<<<<<
* raise ValueError( "no index available for iteration" )
*
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1492
+ /* "pysam/csamtools.pyx":1628
*
* if not samfile._hasIndex():
* raise ValueError( "no index available for iteration" ) # <<<<<<<<<<<<<<
*
* # makes sure that samfile stays alive as long as the
*/
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_124), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_132), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1496
+ /* "pysam/csamtools.pyx":1632
* # makes sure that samfile stays alive as long as the
* # iterator is alive
* self.samfile = samfile # <<<<<<<<<<<<<<
__Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
__pyx_v_self->samfile = __pyx_v_samfile;
- /* "pysam/csamtools.pyx":1498
+ /* "pysam/csamtools.pyx":1634
* self.samfile = samfile
*
* if samfile.isbam: mode = b"rb" # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":1499
+ /* "pysam/csamtools.pyx":1635
*
* if samfile.isbam: mode = b"rb"
* else: mode = b"r" # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":1503
+ /* "pysam/csamtools.pyx":1639
* # reopen the file - note that this makes the iterator
* # slow and causes pileup to slow down significantly.
* if reopen: # <<<<<<<<<<<<<<
*/
if (__pyx_v_reopen) {
- /* "pysam/csamtools.pyx":1504
+ /* "pysam/csamtools.pyx":1640
* # slow and causes pileup to slow down significantly.
* if reopen:
* store = StderrStore() # <<<<<<<<<<<<<<
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release()
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_store = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1505
+ /* "pysam/csamtools.pyx":1641
* if reopen:
* store = StderrStore()
* self.fp = samopen( samfile._filename, mode, NULL ) # <<<<<<<<<<<<<<
* store.release()
* assert self.fp != NULL
*/
- __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->fp = samopen(__pyx_v_samfile->_filename, __pyx_t_5, NULL);
- /* "pysam/csamtools.pyx":1506
+ /* "pysam/csamtools.pyx":1642
* store = StderrStore()
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release() # <<<<<<<<<<<<<<
* assert self.fp != NULL
* self.owns_samfile = True
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1507
+ /* "pysam/csamtools.pyx":1643
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release()
* assert self.fp != NULL # <<<<<<<<<<<<<<
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!(__pyx_v_self->fp != NULL))) {
PyErr_SetNone(PyExc_AssertionError);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":1508
+ /* "pysam/csamtools.pyx":1644
* store.release()
* assert self.fp != NULL
* self.owns_samfile = True # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":1510
+ /* "pysam/csamtools.pyx":1646
* self.owns_samfile = True
* else:
* self.fp = self.samfile.samfile # <<<<<<<<<<<<<<
__pyx_t_6 = __pyx_v_self->samfile->samfile;
__pyx_v_self->fp = __pyx_t_6;
- /* "pysam/csamtools.pyx":1511
+ /* "pysam/csamtools.pyx":1647
* else:
* self.fp = self.samfile.samfile
* self.owns_samfile = False # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "pysam/csamtools.pyx":1513
+ /* "pysam/csamtools.pyx":1649
* self.owns_samfile = False
*
* self.retval = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_self->retval = 0;
- /* "pysam/csamtools.pyx":1515
+ /* "pysam/csamtools.pyx":1651
* self.retval = 0
*
* self.iter = bam_iter_query(self.samfile.index, # <<<<<<<<<<<<<<
*/
__pyx_v_self->iter = bam_iter_query(__pyx_v_self->samfile->index, __pyx_v_tid, __pyx_v_beg, __pyx_v_end);
- /* "pysam/csamtools.pyx":1519
+ /* "pysam/csamtools.pyx":1655
* beg,
* end)
* self.b = bam_init1() # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1521
+/* "pysam/csamtools.pyx":1657
* self.b = bam_init1()
*
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- __Pyx_TraceCall("__iter__", __pyx_f[0], 1521);
+ __Pyx_TraceCall("__iter__", __pyx_f[0], 1657);
- /* "pysam/csamtools.pyx":1522
+ /* "pysam/csamtools.pyx":1658
*
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1524
+/* "pysam/csamtools.pyx":1660
* return self
*
* cdef bam1_t * getCurrent( self ): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("getCurrent", 0);
- __Pyx_TraceCall("getCurrent", __pyx_f[0], 1524);
+ __Pyx_TraceCall("getCurrent", __pyx_f[0], 1660);
- /* "pysam/csamtools.pyx":1525
+ /* "pysam/csamtools.pyx":1661
*
* cdef bam1_t * getCurrent( self ):
* return self.b # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1527
+/* "pysam/csamtools.pyx":1663
* return self.b
*
* cdef int cnext(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("cnext", 0);
- __Pyx_TraceCall("cnext", __pyx_f[0], 1527);
+ __Pyx_TraceCall("cnext", __pyx_f[0], 1663);
- /* "pysam/csamtools.pyx":1529
+ /* "pysam/csamtools.pyx":1665
* cdef int cnext(self):
* '''cversion of iterator. Used by IteratorColumn'''
* self.retval = bam_iter_read( self.fp.x.bam, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1533
+/* "pysam/csamtools.pyx":1669
* self.b)
*
* def __next__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__next__", 0);
- __Pyx_TraceCall("__next__", __pyx_f[0], 1533);
+ __Pyx_TraceCall("__next__", __pyx_f[0], 1669);
- /* "pysam/csamtools.pyx":1536
+ /* "pysam/csamtools.pyx":1672
* """python version of next().
* """
* self.cnext() # <<<<<<<<<<<<<<
*/
((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion *)__pyx_v_self->__pyx_vtab)->cnext(__pyx_v_self);
- /* "pysam/csamtools.pyx":1537
+ /* "pysam/csamtools.pyx":1673
* """
* self.cnext()
* if self.retval < 0: raise StopIteration # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->retval < 0);
if (__pyx_t_1) {
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1538
+ /* "pysam/csamtools.pyx":1674
* self.cnext()
* if self.retval < 0: raise StopIteration
* return makeAlignedRead( self.b ) # <<<<<<<<<<<<<<
* def __dealloc__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":1540
+/* "pysam/csamtools.pyx":1676
* return makeAlignedRead( self.b )
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1540);
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1676);
- /* "pysam/csamtools.pyx":1541
+ /* "pysam/csamtools.pyx":1677
*
* def __dealloc__(self):
* bam_destroy1(self.b) # <<<<<<<<<<<<<<
*/
bam_destroy1(__pyx_v_self->b);
- /* "pysam/csamtools.pyx":1542
+ /* "pysam/csamtools.pyx":1678
* def __dealloc__(self):
* bam_destroy1(self.b)
* bam_iter_destroy( self.iter ) # <<<<<<<<<<<<<<
*/
bam_iter_destroy(__pyx_v_self->iter);
- /* "pysam/csamtools.pyx":1543
+ /* "pysam/csamtools.pyx":1679
* bam_destroy1(self.b)
* bam_iter_destroy( self.iter )
* if self.owns_samfile: samclose( self.fp ) # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
if (values[1]) {
- __pyx_v_reopen = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_reopen = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "pysam/csamtools.pyx":1555
+ /* "pysam/csamtools.pyx":1697
* """
*
* def __cinit__(self, Samfile samfile, int reopen = True ): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.IteratorRowAll.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorRowAll___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *)__pyx_v_self), __pyx_v_samfile, __pyx_v_reopen);
goto __pyx_L0;
__pyx_L1_error:;
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_TraceCall("__cinit__", __pyx_f[0], 1555);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 1697);
- /* "pysam/csamtools.pyx":1557
+ /* "pysam/csamtools.pyx":1699
* def __cinit__(self, Samfile samfile, int reopen = True ):
*
* if not samfile._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1558
+ /* "pysam/csamtools.pyx":1700
*
* if not samfile._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* if samfile.isbam: mode = b"rb"
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_125), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_133), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1560
+ /* "pysam/csamtools.pyx":1702
* raise ValueError( "I/O operation on closed file" )
*
* if samfile.isbam: mode = b"rb" # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":1561
+ /* "pysam/csamtools.pyx":1703
*
* if samfile.isbam: mode = b"rb"
* else: mode = b"r" # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1564
+ /* "pysam/csamtools.pyx":1706
*
* # reopen the file to avoid iterator conflict
* if reopen: # <<<<<<<<<<<<<<
*/
if (__pyx_v_reopen) {
- /* "pysam/csamtools.pyx":1565
+ /* "pysam/csamtools.pyx":1707
* # reopen the file to avoid iterator conflict
* if reopen:
* store = StderrStore() # <<<<<<<<<<<<<<
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release()
*/
- __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_store = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1566
+ /* "pysam/csamtools.pyx":1708
* if reopen:
* store = StderrStore()
* self.fp = samopen( samfile._filename, mode, NULL ) # <<<<<<<<<<<<<<
* store.release()
* assert self.fp != NULL
*/
- __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->fp = samopen(__pyx_v_samfile->_filename, __pyx_t_5, NULL);
- /* "pysam/csamtools.pyx":1567
+ /* "pysam/csamtools.pyx":1709
* store = StderrStore()
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release() # <<<<<<<<<<<<<<
* assert self.fp != NULL
* self.owns_samfile = True
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1568
+ /* "pysam/csamtools.pyx":1710
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release()
* assert self.fp != NULL # <<<<<<<<<<<<<<
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!(__pyx_v_self->fp != NULL))) {
PyErr_SetNone(PyExc_AssertionError);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":1569
+ /* "pysam/csamtools.pyx":1711
* store.release()
* assert self.fp != NULL
* self.owns_samfile = True # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":1571
+ /* "pysam/csamtools.pyx":1713
* self.owns_samfile = True
* else:
* self.fp = samfile.samfile # <<<<<<<<<<<<<<
__pyx_t_6 = __pyx_v_samfile->samfile;
__pyx_v_self->fp = __pyx_t_6;
- /* "pysam/csamtools.pyx":1572
+ /* "pysam/csamtools.pyx":1714
* else:
* self.fp = samfile.samfile
* self.owns_samfile = False # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":1575
+ /* "pysam/csamtools.pyx":1717
*
* # allocate memory for alignment
* self.b = <bam1_t*>calloc(1, sizeof(bam1_t)) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1577
+/* "pysam/csamtools.pyx":1719
* self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
*
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- __Pyx_TraceCall("__iter__", __pyx_f[0], 1577);
+ __Pyx_TraceCall("__iter__", __pyx_f[0], 1719);
- /* "pysam/csamtools.pyx":1578
+ /* "pysam/csamtools.pyx":1720
*
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1580
+/* "pysam/csamtools.pyx":1722
* return self
*
* cdef bam1_t * getCurrent( self ): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("getCurrent", 0);
- __Pyx_TraceCall("getCurrent", __pyx_f[0], 1580);
+ __Pyx_TraceCall("getCurrent", __pyx_f[0], 1722);
- /* "pysam/csamtools.pyx":1581
+ /* "pysam/csamtools.pyx":1723
*
* cdef bam1_t * getCurrent( self ):
* return self.b # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1583
+/* "pysam/csamtools.pyx":1725
* return self.b
*
* cdef int cnext(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("cnext", 0);
- __Pyx_TraceCall("cnext", __pyx_f[0], 1583);
+ __Pyx_TraceCall("cnext", __pyx_f[0], 1725);
- /* "pysam/csamtools.pyx":1585
+ /* "pysam/csamtools.pyx":1727
* cdef int cnext(self):
* '''cversion of iterator. Used by IteratorColumn'''
* return samread(self.fp, self.b) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1587
+/* "pysam/csamtools.pyx":1729
* return samread(self.fp, self.b)
*
* def __next__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__next__", 0);
- __Pyx_TraceCall("__next__", __pyx_f[0], 1587);
+ __Pyx_TraceCall("__next__", __pyx_f[0], 1729);
- /* "pysam/csamtools.pyx":1593
+ /* "pysam/csamtools.pyx":1735
* """
* cdef int ret
* ret = samread(self.fp, self.b) # <<<<<<<<<<<<<<
*/
__pyx_v_ret = samread(__pyx_v_self->fp, __pyx_v_self->b);
- /* "pysam/csamtools.pyx":1594
+ /* "pysam/csamtools.pyx":1736
* cdef int ret
* ret = samread(self.fp, self.b)
* if (ret > 0): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_ret > 0);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1595
+ /* "pysam/csamtools.pyx":1737
* ret = samread(self.fp, self.b)
* if (ret > 0):
* return makeAlignedRead( self.b ) # <<<<<<<<<<<<<<
* raise StopIteration
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1597
+ /* "pysam/csamtools.pyx":1739
* return makeAlignedRead( self.b )
* else:
* raise StopIteration # <<<<<<<<<<<<<<
* def __dealloc__(self):
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":1599
+/* "pysam/csamtools.pyx":1741
* raise StopIteration
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1599);
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1741);
- /* "pysam/csamtools.pyx":1600
+ /* "pysam/csamtools.pyx":1742
*
* def __dealloc__(self):
* bam_destroy1(self.b) # <<<<<<<<<<<<<<
*/
bam_destroy1(__pyx_v_self->b);
- /* "pysam/csamtools.pyx":1601
+ /* "pysam/csamtools.pyx":1743
* def __dealloc__(self):
* bam_destroy1(self.b)
* if self.owns_samfile: samclose( self.fp ) # <<<<<<<<<<<<<<
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.IteratorRowAllRefs.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_18IteratorRowAllRefs___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowAllRefs *)__pyx_v_self), __pyx_v_samfile);
goto __pyx_L0;
__pyx_L1_error:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1607
+/* "pysam/csamtools.pyx":1753
* """
*
* def __cinit__(self, Samfile samfile): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_TraceCall("__cinit__", __pyx_f[0], 1607);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 1753);
- /* "pysam/csamtools.pyx":1608
+ /* "pysam/csamtools.pyx":1754
*
* def __cinit__(self, Samfile samfile):
* assert samfile._isOpen() # <<<<<<<<<<<<<<
* self.samfile = samfile
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (unlikely(!__pyx_t_3)) {
PyErr_SetNone(PyExc_AssertionError);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":1609
+ /* "pysam/csamtools.pyx":1755
* def __cinit__(self, Samfile samfile):
* assert samfile._isOpen()
* if not samfile._hasIndex(): raise ValueError("no index available for fetch") # <<<<<<<<<<<<<<
* self.samfile = samfile
* self.tid = -1
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_126), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_134), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1610
+ /* "pysam/csamtools.pyx":1756
* assert samfile._isOpen()
* if not samfile._hasIndex(): raise ValueError("no index available for fetch")
* self.samfile = samfile # <<<<<<<<<<<<<<
__Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
__pyx_v_self->samfile = __pyx_v_samfile;
- /* "pysam/csamtools.pyx":1611
+ /* "pysam/csamtools.pyx":1757
* if not samfile._hasIndex(): raise ValueError("no index available for fetch")
* self.samfile = samfile
* self.tid = -1 # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1613
+/* "pysam/csamtools.pyx":1759
* self.tid = -1
*
* def nextiter(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("nextiter", 0);
- __Pyx_TraceCall("nextiter", __pyx_f[0], 1613);
+ __Pyx_TraceCall("nextiter", __pyx_f[0], 1759);
- /* "pysam/csamtools.pyx":1614
+ /* "pysam/csamtools.pyx":1760
*
* def nextiter(self):
* self.rowiter = IteratorRowRegion(self.samfile, self.tid, 0, 1<<29) # <<<<<<<<<<<<<<
*
* def __iter__(self):
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->samfile));
PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_536870912);
__Pyx_GIVEREF(__pyx_int_536870912);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_GIVEREF(__pyx_t_1);
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1616
+/* "pysam/csamtools.pyx":1762
* self.rowiter = IteratorRowRegion(self.samfile, self.tid, 0, 1<<29)
*
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- __Pyx_TraceCall("__iter__", __pyx_f[0], 1616);
+ __Pyx_TraceCall("__iter__", __pyx_f[0], 1762);
- /* "pysam/csamtools.pyx":1617
+ /* "pysam/csamtools.pyx":1763
*
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1619
+/* "pysam/csamtools.pyx":1765
* return self
*
* def __next__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__next__", 0);
- __Pyx_TraceCall("__next__", __pyx_f[0], 1619);
+ __Pyx_TraceCall("__next__", __pyx_f[0], 1765);
- /* "pysam/csamtools.pyx":1625
+ /* "pysam/csamtools.pyx":1771
* """
* # Create an initial iterator
* if self.tid==-1: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->tid == -1);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1626
+ /* "pysam/csamtools.pyx":1772
* # Create an initial iterator
* if self.tid==-1:
* if not self.samfile.nreferences: # <<<<<<<<<<<<<<
* raise StopIteration
* self.tid = 0
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self->samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self->samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_3 = (!__pyx_t_1);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1627
+ /* "pysam/csamtools.pyx":1773
* if self.tid==-1:
* if not self.samfile.nreferences:
* raise StopIteration # <<<<<<<<<<<<<<
* self.nextiter()
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1628
+ /* "pysam/csamtools.pyx":1774
* if not self.samfile.nreferences:
* raise StopIteration
* self.tid = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_self->tid = 0;
- /* "pysam/csamtools.pyx":1629
+ /* "pysam/csamtools.pyx":1775
* raise StopIteration
* self.tid = 0
* self.nextiter() # <<<<<<<<<<<<<<
*
* while 1:
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nextiter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nextiter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1631
+ /* "pysam/csamtools.pyx":1777
* self.nextiter()
*
* while 1: # <<<<<<<<<<<<<<
while (1) {
if (!1) break;
- /* "pysam/csamtools.pyx":1632
+ /* "pysam/csamtools.pyx":1778
*
* while 1:
* self.rowiter.cnext() # <<<<<<<<<<<<<<
*/
((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowRegion *)__pyx_v_self->rowiter->__pyx_vtab)->cnext(__pyx_v_self->rowiter);
- /* "pysam/csamtools.pyx":1635
+ /* "pysam/csamtools.pyx":1781
*
* # If current iterator is not exhausted, return aligned read
* if self.rowiter.retval>0: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_self->rowiter->retval > 0);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1636
+ /* "pysam/csamtools.pyx":1782
* # If current iterator is not exhausted, return aligned read
* if self.rowiter.retval>0:
* return makeAlignedRead(self.rowiter.b) # <<<<<<<<<<<<<<
* self.tid += 1
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->rowiter->b); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->rowiter->b); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
}
__pyx_L7:;
- /* "pysam/csamtools.pyx":1638
+ /* "pysam/csamtools.pyx":1784
* return makeAlignedRead(self.rowiter.b)
*
* self.tid += 1 # <<<<<<<<<<<<<<
*/
__pyx_v_self->tid = (__pyx_v_self->tid + 1);
- /* "pysam/csamtools.pyx":1641
+ /* "pysam/csamtools.pyx":1787
*
* # Otherwise, proceed to next reference or stop
* if self.tid<self.samfile.nreferences: # <<<<<<<<<<<<<<
* self.nextiter()
* else:
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self->samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self->samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1642
+ /* "pysam/csamtools.pyx":1788
* # Otherwise, proceed to next reference or stop
* if self.tid<self.samfile.nreferences:
* self.nextiter() # <<<<<<<<<<<<<<
* else:
* raise StopIteration
*/
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nextiter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__nextiter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1644
+ /* "pysam/csamtools.pyx":1790
* self.nextiter()
* else:
* raise StopIteration # <<<<<<<<<<<<<<
* cdef class IteratorRowSelection(IteratorRow):
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L8:;
}
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__positions)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
__pyx_v_positions = values[1];
if (values[2]) {
- __pyx_v_reopen = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_reopen = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "pysam/csamtools.pyx":1652
+ /* "pysam/csamtools.pyx":1802
* """
*
* def __cinit__(self, Samfile samfile, positions, int reopen = True ): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.IteratorRowSelection.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_20IteratorRowSelection___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *)__pyx_v_self), __pyx_v_samfile, __pyx_v_positions, __pyx_v_reopen);
goto __pyx_L0;
__pyx_L1_error:;
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_TraceCall("__cinit__", __pyx_f[0], 1652);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 1802);
- /* "pysam/csamtools.pyx":1654
+ /* "pysam/csamtools.pyx":1804
* def __cinit__(self, Samfile samfile, positions, int reopen = True ):
*
* if not samfile._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = (!__pyx_t_3);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":1655
+ /* "pysam/csamtools.pyx":1805
*
* if not samfile._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* if not samfile._isOpen():
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_127), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_135), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1657
+ /* "pysam/csamtools.pyx":1807
* raise ValueError( "I/O operation on closed file" )
*
* if not samfile._isOpen(): # <<<<<<<<<<<<<<
* raise ValueError( "I/O operation on closed file" )
*
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = (!__pyx_t_4);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1658
+ /* "pysam/csamtools.pyx":1808
*
* if not samfile._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* assert samfile.isbam, "can only use this iterator on bam files"
*/
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_128), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_136), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1660
+ /* "pysam/csamtools.pyx":1810
* raise ValueError( "I/O operation on closed file" )
*
* assert samfile.isbam, "can only use this iterator on bam files" # <<<<<<<<<<<<<<
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!__pyx_v_samfile->isbam)) {
- PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_129));
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_137));
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":1661
+ /* "pysam/csamtools.pyx":1811
*
* assert samfile.isbam, "can only use this iterator on bam files"
* mode = b"rb" # <<<<<<<<<<<<<<
__Pyx_INCREF(((PyObject *)__pyx_n_b__rb));
__pyx_v_mode = __pyx_n_b__rb;
- /* "pysam/csamtools.pyx":1664
+ /* "pysam/csamtools.pyx":1814
*
* # reopen the file to avoid iterator conflict
* if reopen: # <<<<<<<<<<<<<<
*/
if (__pyx_v_reopen) {
- /* "pysam/csamtools.pyx":1665
+ /* "pysam/csamtools.pyx":1815
* # reopen the file to avoid iterator conflict
* if reopen:
* store = StderrStore() # <<<<<<<<<<<<<<
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release()
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_store = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1666
+ /* "pysam/csamtools.pyx":1816
* if reopen:
* store = StderrStore()
* self.fp = samopen( samfile._filename, mode, NULL ) # <<<<<<<<<<<<<<
* store.release()
* assert self.fp != NULL
*/
- __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->fp = samopen(__pyx_v_samfile->_filename, __pyx_t_5, NULL);
- /* "pysam/csamtools.pyx":1667
+ /* "pysam/csamtools.pyx":1817
* store = StderrStore()
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release() # <<<<<<<<<<<<<<
* assert self.fp != NULL
* self.owns_samfile = True
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1668
+ /* "pysam/csamtools.pyx":1818
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release()
* assert self.fp != NULL # <<<<<<<<<<<<<<
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!(__pyx_v_self->fp != NULL))) {
PyErr_SetNone(PyExc_AssertionError);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":1669
+ /* "pysam/csamtools.pyx":1819
* store.release()
* assert self.fp != NULL
* self.owns_samfile = True # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":1671
+ /* "pysam/csamtools.pyx":1821
* self.owns_samfile = True
* else:
* self.fp = samfile.samfile # <<<<<<<<<<<<<<
__pyx_t_6 = __pyx_v_samfile->samfile;
__pyx_v_self->fp = __pyx_t_6;
- /* "pysam/csamtools.pyx":1672
+ /* "pysam/csamtools.pyx":1822
* else:
* self.fp = samfile.samfile
* self.owns_samfile = False # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":1675
+ /* "pysam/csamtools.pyx":1825
*
* # allocate memory for alignment
* self.b = <bam1_t*>calloc(1, sizeof(bam1_t)) # <<<<<<<<<<<<<<
*/
__pyx_v_self->b = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
- /* "pysam/csamtools.pyx":1677
+ /* "pysam/csamtools.pyx":1827
* self.b = <bam1_t*>calloc(1, sizeof(bam1_t))
*
* self.positions = positions # <<<<<<<<<<<<<<
__Pyx_DECREF(__pyx_v_self->positions);
__pyx_v_self->positions = __pyx_v_positions;
- /* "pysam/csamtools.pyx":1678
+ /* "pysam/csamtools.pyx":1828
*
* self.positions = positions
* self.current_pos = 0 # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1680
+/* "pysam/csamtools.pyx":1830
* self.current_pos = 0
*
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- __Pyx_TraceCall("__iter__", __pyx_f[0], 1680);
+ __Pyx_TraceCall("__iter__", __pyx_f[0], 1830);
- /* "pysam/csamtools.pyx":1681
+ /* "pysam/csamtools.pyx":1831
*
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1683
+/* "pysam/csamtools.pyx":1833
* return self
*
* cdef bam1_t * getCurrent( self ): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("getCurrent", 0);
- __Pyx_TraceCall("getCurrent", __pyx_f[0], 1683);
+ __Pyx_TraceCall("getCurrent", __pyx_f[0], 1833);
- /* "pysam/csamtools.pyx":1684
+ /* "pysam/csamtools.pyx":1834
*
* cdef bam1_t * getCurrent( self ):
* return self.b # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1686
+/* "pysam/csamtools.pyx":1836
* return self.b
*
* cdef int cnext(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("cnext", 0);
- __Pyx_TraceCall("cnext", __pyx_f[0], 1686);
+ __Pyx_TraceCall("cnext", __pyx_f[0], 1836);
- /* "pysam/csamtools.pyx":1690
+ /* "pysam/csamtools.pyx":1840
*
* # end iteration if out of positions
* if self.current_pos >= len(self.positions): return -1 # <<<<<<<<<<<<<<
*/
__pyx_t_1 = __pyx_v_self->positions;
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = (__pyx_v_self->current_pos >= __pyx_t_2);
if (__pyx_t_3) {
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1692
+ /* "pysam/csamtools.pyx":1842
* if self.current_pos >= len(self.positions): return -1
*
* bam_seek( self.fp.x.bam, self.positions[self.current_pos], 0 ) # <<<<<<<<<<<<<<
* self.current_pos += 1
* return samread(self.fp, self.b)
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->positions, __pyx_v_self->current_pos, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->positions, __pyx_v_self->current_pos, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyInt_from_py_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyInt_from_py_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
bam_seek(__pyx_v_self->fp->x.bam, __pyx_t_4, 0);
- /* "pysam/csamtools.pyx":1693
+ /* "pysam/csamtools.pyx":1843
*
* bam_seek( self.fp.x.bam, self.positions[self.current_pos], 0 )
* self.current_pos += 1 # <<<<<<<<<<<<<<
*/
__pyx_v_self->current_pos = (__pyx_v_self->current_pos + 1);
- /* "pysam/csamtools.pyx":1694
+ /* "pysam/csamtools.pyx":1844
* bam_seek( self.fp.x.bam, self.positions[self.current_pos], 0 )
* self.current_pos += 1
* return samread(self.fp, self.b) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1696
+/* "pysam/csamtools.pyx":1846
* return samread(self.fp, self.b)
*
* def __next__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__next__", 0);
- __Pyx_TraceCall("__next__", __pyx_f[0], 1696);
+ __Pyx_TraceCall("__next__", __pyx_f[0], 1846);
- /* "pysam/csamtools.pyx":1702
+ /* "pysam/csamtools.pyx":1852
* """
*
* cdef int ret = self.cnext() # <<<<<<<<<<<<<<
*/
__pyx_v_ret = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorRowSelection *)__pyx_v_self->__pyx_vtab)->cnext(__pyx_v_self);
- /* "pysam/csamtools.pyx":1703
+ /* "pysam/csamtools.pyx":1853
*
* cdef int ret = self.cnext()
* if (ret > 0): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_ret > 0);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1704
+ /* "pysam/csamtools.pyx":1854
* cdef int ret = self.cnext()
* if (ret > 0):
* return makeAlignedRead( self.b ) # <<<<<<<<<<<<<<
* raise StopIteration
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_makeAlignedRead(__pyx_v_self->b); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":1706
+ /* "pysam/csamtools.pyx":1856
* return makeAlignedRead( self.b )
* else:
* raise StopIteration # <<<<<<<<<<<<<<
* def __dealloc__(self):
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":1708
+/* "pysam/csamtools.pyx":1858
* raise StopIteration
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1708);
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1858);
- /* "pysam/csamtools.pyx":1709
+ /* "pysam/csamtools.pyx":1859
*
* def __dealloc__(self):
* bam_destroy1(self.b) # <<<<<<<<<<<<<<
*/
bam_destroy1(__pyx_v_self->b);
- /* "pysam/csamtools.pyx":1710
+ /* "pysam/csamtools.pyx":1860
* def __dealloc__(self):
* bam_destroy1(self.b)
* if self.owns_samfile: samclose( self.fp ) # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":1715
+/* "pysam/csamtools.pyx":1865
* ##-------------------------------------------------------------------
* ##-------------------------------------------------------------------
* cdef int __advance_all( void * data, bam1_t * b ): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__advance_all", 0);
- __Pyx_TraceCall("__advance_all", __pyx_f[0], 1715);
+ __Pyx_TraceCall("__advance_all", __pyx_f[0], 1865);
- /* "pysam/csamtools.pyx":1719
+ /* "pysam/csamtools.pyx":1869
* '''
* cdef __iterdata * d
* d = <__iterdata*>data # <<<<<<<<<<<<<<
*/
__pyx_v_d = ((__pyx_t_5pysam_9csamtools___iterdata *)__pyx_v_data);
- /* "pysam/csamtools.pyx":1720
+ /* "pysam/csamtools.pyx":1870
* cdef __iterdata * d
* d = <__iterdata*>data
* return bam_iter_read( d.samfile.x.bam, d.iter, b ) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1722
+/* "pysam/csamtools.pyx":1872
* return bam_iter_read( d.samfile.x.bam, d.iter, b )
*
* cdef int __advance_snpcalls( void * data, bam1_t * b ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__advance_snpcalls", 0);
- __Pyx_TraceCall("__advance_snpcalls", __pyx_f[0], 1722);
+ __Pyx_TraceCall("__advance_snpcalls", __pyx_f[0], 1872);
- /* "pysam/csamtools.pyx":1727
+ /* "pysam/csamtools.pyx":1877
* '''
* cdef __iterdata * d
* d = <__iterdata*>data # <<<<<<<<<<<<<<
*/
__pyx_v_d = ((__pyx_t_5pysam_9csamtools___iterdata *)__pyx_v_data);
- /* "pysam/csamtools.pyx":1729
+ /* "pysam/csamtools.pyx":1879
* d = <__iterdata*>data
*
* cdef int ret = bam_iter_read( d.samfile.x.bam, d.iter, b ) # <<<<<<<<<<<<<<
*/
__pyx_v_ret = bam_iter_read(__pyx_v_d->samfile->x.bam, __pyx_v_d->iter, __pyx_v_b);
- /* "pysam/csamtools.pyx":1730
+ /* "pysam/csamtools.pyx":1880
*
* cdef int ret = bam_iter_read( d.samfile.x.bam, d.iter, b )
* cdef int skip = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_skip = 0;
- /* "pysam/csamtools.pyx":1732
+ /* "pysam/csamtools.pyx":1882
* cdef int skip = 0
* cdef int q
* cdef int is_cns = 1 # <<<<<<<<<<<<<<
*/
__pyx_v_is_cns = 1;
- /* "pysam/csamtools.pyx":1733
+ /* "pysam/csamtools.pyx":1883
* cdef int q
* cdef int is_cns = 1
* cdef int is_nobaq = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_is_nobaq = 0;
- /* "pysam/csamtools.pyx":1734
+ /* "pysam/csamtools.pyx":1884
* cdef int is_cns = 1
* cdef int is_nobaq = 0
* cdef int capQ_thres = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_capQ_thres = 0;
- /* "pysam/csamtools.pyx":1737
+ /* "pysam/csamtools.pyx":1887
*
* # reload sequence
* if d.fastafile != NULL and b.core.tid != d.tid: # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1738
+ /* "pysam/csamtools.pyx":1888
* # reload sequence
* if d.fastafile != NULL and b.core.tid != d.tid:
* if d.seq != NULL: free(d.seq) # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1739
+ /* "pysam/csamtools.pyx":1889
* if d.fastafile != NULL and b.core.tid != d.tid:
* if d.seq != NULL: free(d.seq)
* d.tid = b.core.tid # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_b->core.tid;
__pyx_v_d->tid = __pyx_t_4;
- /* "pysam/csamtools.pyx":1740
+ /* "pysam/csamtools.pyx":1890
* if d.seq != NULL: free(d.seq)
* d.tid = b.core.tid
* d.seq = faidx_fetch_seq(d.fastafile, # <<<<<<<<<<<<<<
*/
__pyx_v_d->seq = faidx_fetch_seq(__pyx_v_d->fastafile, (__pyx_v_d->samfile->header->target_name[__pyx_v_d->tid]), 0, __pyx_v_5pysam_9csamtools_max_pos, (&__pyx_v_d->seq_len));
- /* "pysam/csamtools.pyx":1744
+ /* "pysam/csamtools.pyx":1894
* 0, max_pos,
* &d.seq_len)
* if d.seq == NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_d->seq == NULL);
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":1746
+ /* "pysam/csamtools.pyx":1896
* if d.seq == NULL:
* raise ValueError( "reference sequence for '%s' (tid=%i) not found" % \
* (d.samfile.header.target_name[d.tid], # <<<<<<<<<<<<<<
* d.tid))
*
*/
- __pyx_t_5 = PyBytes_FromString((__pyx_v_d->samfile->header->target_name[__pyx_v_d->tid])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyBytes_FromString((__pyx_v_d->samfile->header->target_name[__pyx_v_d->tid])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- /* "pysam/csamtools.pyx":1747
+ /* "pysam/csamtools.pyx":1897
* raise ValueError( "reference sequence for '%s' (tid=%i) not found" % \
* (d.samfile.header.target_name[d.tid],
* d.tid)) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_6 = PyInt_FromLong(__pyx_v_d->tid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_d->tid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_5 = 0;
__pyx_t_6 = 0;
- __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_130), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_138), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6));
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1750
+ /* "pysam/csamtools.pyx":1900
*
*
* while ret >= 0: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_ret >= 0);
if (!__pyx_t_3) break;
- /* "pysam/csamtools.pyx":1752
+ /* "pysam/csamtools.pyx":1902
* while ret >= 0:
*
* skip = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_skip = 0;
- /* "pysam/csamtools.pyx":1755
+ /* "pysam/csamtools.pyx":1905
*
* # realign read - changes base qualities
* if d.seq != NULL and is_cns and not is_nobaq: bam_prob_realn( b, d.seq ) # <<<<<<<<<<<<<<
}
__pyx_L8:;
- /* "pysam/csamtools.pyx":1757
+ /* "pysam/csamtools.pyx":1907
* if d.seq != NULL and is_cns and not is_nobaq: bam_prob_realn( b, d.seq )
*
* if d.seq != NULL and capQ_thres > 10: # <<<<<<<<<<<<<<
}
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":1758
+ /* "pysam/csamtools.pyx":1908
*
* if d.seq != NULL and capQ_thres > 10:
* q = bam_cap_mapQ(b, d.seq, capQ_thres) # <<<<<<<<<<<<<<
*/
__pyx_v_q = bam_cap_mapQ(__pyx_v_b, __pyx_v_d->seq, __pyx_v_capQ_thres);
- /* "pysam/csamtools.pyx":1759
+ /* "pysam/csamtools.pyx":1909
* if d.seq != NULL and capQ_thres > 10:
* q = bam_cap_mapQ(b, d.seq, capQ_thres)
* if q < 0: skip = 1 # <<<<<<<<<<<<<<
goto __pyx_L10;
}
- /* "pysam/csamtools.pyx":1760
+ /* "pysam/csamtools.pyx":1910
* q = bam_cap_mapQ(b, d.seq, capQ_thres)
* if q < 0: skip = 1
* elif b.core.qual > q: b.core.qual = q # <<<<<<<<<<<<<<
}
__pyx_L9:;
- /* "pysam/csamtools.pyx":1761
+ /* "pysam/csamtools.pyx":1911
* if q < 0: skip = 1
* elif b.core.qual > q: b.core.qual = q
* if b.core.flag & BAM_FUNMAP: skip = 1 # <<<<<<<<<<<<<<
goto __pyx_L11;
}
- /* "pysam/csamtools.pyx":1762
+ /* "pysam/csamtools.pyx":1912
* elif b.core.qual > q: b.core.qual = q
* if b.core.flag & BAM_FUNMAP: skip = 1
* elif b.core.flag & 1 and not b.core.flag & 2: skip = 1 # <<<<<<<<<<<<<<
}
__pyx_L11:;
- /* "pysam/csamtools.pyx":1764
+ /* "pysam/csamtools.pyx":1914
* elif b.core.flag & 1 and not b.core.flag & 2: skip = 1
*
* if not skip: break # <<<<<<<<<<<<<<
}
__pyx_L12:;
- /* "pysam/csamtools.pyx":1767
+ /* "pysam/csamtools.pyx":1917
* # additional filters
*
* ret = bam_iter_read( d.samfile.x.bam, d.iter, b ) # <<<<<<<<<<<<<<
}
__pyx_L7_break:;
- /* "pysam/csamtools.pyx":1769
+ /* "pysam/csamtools.pyx":1919
* ret = bam_iter_read( d.samfile.x.bam, d.iter, b )
*
* return ret # <<<<<<<<<<<<<<
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
__Pyx_AddTraceback("pysam.csamtools.IteratorColumn.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorColumn___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_samfile, __pyx_v_kwargs);
goto __pyx_L0;
__pyx_L1_error:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1818
+/* "pysam/csamtools.pyx":1968
* '''
*
* def __cinit__( self, Samfile samfile, **kwargs ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_TraceCall("__cinit__", __pyx_f[0], 1818);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 1968);
- /* "pysam/csamtools.pyx":1819
+ /* "pysam/csamtools.pyx":1969
*
* def __cinit__( self, Samfile samfile, **kwargs ):
* self.samfile = samfile # <<<<<<<<<<<<<<
__Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
__pyx_v_self->samfile = __pyx_v_samfile;
- /* "pysam/csamtools.pyx":1820
+ /* "pysam/csamtools.pyx":1970
* def __cinit__( self, Samfile samfile, **kwargs ):
* self.samfile = samfile
* self.mask = kwargs.get("mask", BAM_DEF_MASK ) # <<<<<<<<<<<<<<
* self.fastafile = kwargs.get( "fastafile", None )
* self.stepper = kwargs.get( "stepper", None )
*/
- __pyx_t_1 = PyInt_FromLong(BAM_DEF_MASK); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(BAM_DEF_MASK); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__mask), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__mask), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_self->mask = __pyx_t_3;
- /* "pysam/csamtools.pyx":1821
+ /* "pysam/csamtools.pyx":1971
* self.samfile = samfile
* self.mask = kwargs.get("mask", BAM_DEF_MASK )
* self.fastafile = kwargs.get( "fastafile", None ) # <<<<<<<<<<<<<<
* self.stepper = kwargs.get( "stepper", None )
* self.max_depth = kwargs.get( "max_depth", 8000 )
*/
- __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__fastafile), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__fastafile), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5pysam_9csamtools_Fastafile))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5pysam_9csamtools_Fastafile))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->fastafile);
__Pyx_DECREF(((PyObject *)__pyx_v_self->fastafile));
__pyx_v_self->fastafile = ((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1822
+ /* "pysam/csamtools.pyx":1972
* self.mask = kwargs.get("mask", BAM_DEF_MASK )
* self.fastafile = kwargs.get( "fastafile", None )
* self.stepper = kwargs.get( "stepper", None ) # <<<<<<<<<<<<<<
* self.max_depth = kwargs.get( "max_depth", 8000 )
* self.iterdata.seq = NULL
*/
- __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__stepper), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__stepper), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->stepper);
__pyx_v_self->stepper = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":1823
+ /* "pysam/csamtools.pyx":1973
* self.fastafile = kwargs.get( "fastafile", None )
* self.stepper = kwargs.get( "stepper", None )
* self.max_depth = kwargs.get( "max_depth", 8000 ) # <<<<<<<<<<<<<<
* self.iterdata.seq = NULL
* self.tid = 0
*/
- __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__max_depth), __pyx_int_8000); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__max_depth), __pyx_int_8000); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_self->max_depth = __pyx_t_3;
- /* "pysam/csamtools.pyx":1824
+ /* "pysam/csamtools.pyx":1974
* self.stepper = kwargs.get( "stepper", None )
* self.max_depth = kwargs.get( "max_depth", 8000 )
* self.iterdata.seq = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->iterdata.seq = NULL;
- /* "pysam/csamtools.pyx":1825
+ /* "pysam/csamtools.pyx":1975
* self.max_depth = kwargs.get( "max_depth", 8000 )
* self.iterdata.seq = NULL
* self.tid = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_self->tid = 0;
- /* "pysam/csamtools.pyx":1826
+ /* "pysam/csamtools.pyx":1976
* self.iterdata.seq = NULL
* self.tid = 0
* self.pos = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_self->pos = 0;
- /* "pysam/csamtools.pyx":1827
+ /* "pysam/csamtools.pyx":1977
* self.tid = 0
* self.pos = 0
* self.n_plp = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_self->n_plp = 0;
- /* "pysam/csamtools.pyx":1828
+ /* "pysam/csamtools.pyx":1978
* self.pos = 0
* self.n_plp = 0
* self.plp = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->plp = NULL;
- /* "pysam/csamtools.pyx":1829
+ /* "pysam/csamtools.pyx":1979
* self.n_plp = 0
* self.plp = NULL
* self.pileup_iter = <bam_plp_t>NULL # <<<<<<<<<<<<<<
*
- *
+ * def __iter__(self):
*/
__pyx_v_self->pileup_iter = NULL;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1832
- *
+/* "pysam/csamtools.pyx":1981
+ * self.pileup_iter = <bam_plp_t>NULL
*
* def __iter__(self): # <<<<<<<<<<<<<<
* return self
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- __Pyx_TraceCall("__iter__", __pyx_f[0], 1832);
+ __Pyx_TraceCall("__iter__", __pyx_f[0], 1981);
- /* "pysam/csamtools.pyx":1833
+ /* "pysam/csamtools.pyx":1982
*
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1835
+/* "pysam/csamtools.pyx":1984
* return self
*
* cdef int cnext(self): # <<<<<<<<<<<<<<
* '''perform next iteration.
- *
+ * '''
*/
static int __pyx_f_5pysam_9csamtools_14IteratorColumn_cnext(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("cnext", 0);
- __Pyx_TraceCall("cnext", __pyx_f[0], 1835);
+ __Pyx_TraceCall("cnext", __pyx_f[0], 1984);
- /* "pysam/csamtools.pyx":1841
- * It has been re-implemented to permit for filtering.
+ /* "pysam/csamtools.pyx":1987
+ * '''perform next iteration.
* '''
* self.plp = bam_plp_auto( self.pileup_iter, # <<<<<<<<<<<<<<
* &self.tid,
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1846
+/* "pysam/csamtools.pyx":1992
* &self.n_plp )
*
* cdef char * getSequence( self ): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("getSequence", 0);
- __Pyx_TraceCall("getSequence", __pyx_f[0], 1846);
+ __Pyx_TraceCall("getSequence", __pyx_f[0], 1992);
- /* "pysam/csamtools.pyx":1849
+ /* "pysam/csamtools.pyx":1995
* '''return current reference sequence underlying the iterator.
* '''
* return self.iterdata.seq # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1853
+/* "pysam/csamtools.pyx":1999
* property seq_len:
* '''current sequence length.'''
* def __get__(self): return self.iterdata.seq_len # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 1853);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 1999);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->iterdata.seq_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->iterdata.seq_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("addReference (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fastafile), __pyx_ptype_5pysam_9csamtools_Fastafile, 1, "fastafile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fastafile), __pyx_ptype_5pysam_9csamtools_Fastafile, 1, "fastafile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_14IteratorColumn_4addReference(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), ((struct __pyx_obj_5pysam_9csamtools_Fastafile *)__pyx_v_fastafile));
goto __pyx_L0;
__pyx_L1_error:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1855
+/* "pysam/csamtools.pyx":2001
* def __get__(self): return self.iterdata.seq_len
*
* def addReference( self, Fastafile fastafile ): # <<<<<<<<<<<<<<
faidx_t *__pyx_t_2;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("addReference", 0);
- __Pyx_TraceCall("addReference", __pyx_f[0], 1855);
+ __Pyx_TraceCall("addReference", __pyx_f[0], 2001);
- /* "pysam/csamtools.pyx":1858
+ /* "pysam/csamtools.pyx":2004
* '''
* add reference sequences in *fastafile* to iterator.'''
* self.fastafile = fastafile # <<<<<<<<<<<<<<
__Pyx_DECREF(((PyObject *)__pyx_v_self->fastafile));
__pyx_v_self->fastafile = __pyx_v_fastafile;
- /* "pysam/csamtools.pyx":1859
+ /* "pysam/csamtools.pyx":2005
* add reference sequences in *fastafile* to iterator.'''
* self.fastafile = fastafile
* if self.iterdata.seq != NULL: free(self.iterdata.seq) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1860
+ /* "pysam/csamtools.pyx":2006
* self.fastafile = fastafile
* if self.iterdata.seq != NULL: free(self.iterdata.seq)
* self.iterdata.tid = -1 # <<<<<<<<<<<<<<
*/
__pyx_v_self->iterdata.tid = -1;
- /* "pysam/csamtools.pyx":1861
+ /* "pysam/csamtools.pyx":2007
* if self.iterdata.seq != NULL: free(self.iterdata.seq)
* self.iterdata.tid = -1
* self.iterdata.fastafile = self.fastafile.fastafile # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1863
+/* "pysam/csamtools.pyx":2009
* self.iterdata.fastafile = self.fastafile.fastafile
*
* def hasReference( self ): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("hasReference", 0);
- __Pyx_TraceCall("hasReference", __pyx_f[0], 1863);
+ __Pyx_TraceCall("hasReference", __pyx_f[0], 2009);
- /* "pysam/csamtools.pyx":1866
+ /* "pysam/csamtools.pyx":2012
* '''
* return true if iterator is associated with a reference'''
* return self.fastafile # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1868
+/* "pysam/csamtools.pyx":2014
* return self.fastafile
*
* cdef setMask( self, mask ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("setMask", 0);
- __Pyx_TraceCall("setMask", __pyx_f[0], 1868);
+ __Pyx_TraceCall("setMask", __pyx_f[0], 2014);
- /* "pysam/csamtools.pyx":1873
+ /* "pysam/csamtools.pyx":2019
* reads with bits set in *mask* will be skipped.
* '''
* self.mask = mask # <<<<<<<<<<<<<<
* bam_plp_set_mask( self.pileup_iter, self.mask )
*
*/
- __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_mask); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_mask); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->mask = __pyx_t_1;
- /* "pysam/csamtools.pyx":1874
+ /* "pysam/csamtools.pyx":2020
* '''
* self.mask = mask
* bam_plp_set_mask( self.pileup_iter, self.mask ) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1876
+/* "pysam/csamtools.pyx":2022
* bam_plp_set_mask( self.pileup_iter, self.mask )
*
* cdef setupIteratorData( self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("setupIteratorData", 0);
- __Pyx_TraceCall("setupIteratorData", __pyx_f[0], 1876);
+ __Pyx_TraceCall("setupIteratorData", __pyx_f[0], 2022);
if (__pyx_optional_args) {
if (__pyx_optional_args->__pyx_n > 0) {
__pyx_v_reopen = __pyx_optional_args->reopen;
}
}
- /* "pysam/csamtools.pyx":1883
+ /* "pysam/csamtools.pyx":2029
* '''setup the iterator structure'''
*
* self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen ) # <<<<<<<<<<<<<<
* self.iterdata.samfile = self.samfile.samfile
* self.iterdata.iter = self.iter.iter
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_start); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_end); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyInt_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self->samfile));
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__Pyx_GIVEREF(__pyx_t_4);
__pyx_v_self->iter = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":1884
+ /* "pysam/csamtools.pyx":2030
*
* self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen )
* self.iterdata.samfile = self.samfile.samfile # <<<<<<<<<<<<<<
__pyx_t_6 = __pyx_v_self->samfile->samfile;
__pyx_v_self->iterdata.samfile = __pyx_t_6;
- /* "pysam/csamtools.pyx":1885
+ /* "pysam/csamtools.pyx":2031
* self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen )
* self.iterdata.samfile = self.samfile.samfile
* self.iterdata.iter = self.iter.iter # <<<<<<<<<<<<<<
__pyx_t_7 = __pyx_v_self->iter->iter;
__pyx_v_self->iterdata.iter = __pyx_t_7;
- /* "pysam/csamtools.pyx":1886
+ /* "pysam/csamtools.pyx":2032
* self.iterdata.samfile = self.samfile.samfile
* self.iterdata.iter = self.iter.iter
* self.iterdata.seq = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->iterdata.seq = NULL;
- /* "pysam/csamtools.pyx":1887
+ /* "pysam/csamtools.pyx":2033
* self.iterdata.iter = self.iter.iter
* self.iterdata.seq = NULL
* self.iterdata.tid = -1 # <<<<<<<<<<<<<<
*/
__pyx_v_self->iterdata.tid = -1;
- /* "pysam/csamtools.pyx":1889
+ /* "pysam/csamtools.pyx":2035
* self.iterdata.tid = -1
*
* if self.fastafile != None: # <<<<<<<<<<<<<<
* self.iterdata.fastafile = self.fastafile.fastafile
* else:
*/
- __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_self->fastafile), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_self->fastafile), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_8) {
- /* "pysam/csamtools.pyx":1890
+ /* "pysam/csamtools.pyx":2036
*
* if self.fastafile != None:
* self.iterdata.fastafile = self.fastafile.fastafile # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":1892
+ /* "pysam/csamtools.pyx":2038
* self.iterdata.fastafile = self.fastafile.fastafile
* else:
* self.iterdata.fastafile = NULL # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1894
+ /* "pysam/csamtools.pyx":2040
* self.iterdata.fastafile = NULL
*
* if self.stepper == None or self.stepper == "all": # <<<<<<<<<<<<<<
* self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata )
* elif self.stepper == "samtools":
*/
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_8) {
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, ((PyObject *)__pyx_n_s__all), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, ((PyObject *)__pyx_n_s__all), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_11 = __pyx_t_10;
} else {
}
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":1895
+ /* "pysam/csamtools.pyx":2041
*
* if self.stepper == None or self.stepper == "all":
* self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata ) # <<<<<<<<<<<<<<
goto __pyx_L4;
}
- /* "pysam/csamtools.pyx":1896
+ /* "pysam/csamtools.pyx":2042
* if self.stepper == None or self.stepper == "all":
* self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata )
* elif self.stepper == "samtools": # <<<<<<<<<<<<<<
* self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata )
* else:
*/
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, ((PyObject *)__pyx_n_s__samtools), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->stepper, ((PyObject *)__pyx_n_s__samtools), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":1897
+ /* "pysam/csamtools.pyx":2043
* self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata )
* elif self.stepper == "samtools":
* self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata ) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":1899
+ /* "pysam/csamtools.pyx":2045
* self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata )
* else:
* raise ValueError( "unknown stepper option `%s` in IteratorColumn" % self.stepper) # <<<<<<<<<<<<<<
*
* if self.max_depth:
*/
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_131), __pyx_v_self->stepper); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_139), __pyx_v_self->stepper); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
__Pyx_GIVEREF(((PyObject *)__pyx_t_4));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1901
+ /* "pysam/csamtools.pyx":2047
* raise ValueError( "unknown stepper option `%s` in IteratorColumn" % self.stepper)
*
* if self.max_depth: # <<<<<<<<<<<<<<
*/
if (__pyx_v_self->max_depth) {
- /* "pysam/csamtools.pyx":1902
+ /* "pysam/csamtools.pyx":2048
*
* if self.max_depth:
* bam_plp_set_maxcnt( self.pileup_iter, self.max_depth ) # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":1904
+ /* "pysam/csamtools.pyx":2050
* bam_plp_set_maxcnt( self.pileup_iter, self.max_depth )
*
* bam_plp_set_mask( self.pileup_iter, self.mask ) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1906
+/* "pysam/csamtools.pyx":2052
* bam_plp_set_mask( self.pileup_iter, self.mask )
*
* cdef reset( self, tid, start, end ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("reset", 0);
- __Pyx_TraceCall("reset", __pyx_f[0], 1906);
+ __Pyx_TraceCall("reset", __pyx_f[0], 2052);
- /* "pysam/csamtools.pyx":1912
+ /* "pysam/csamtools.pyx":2058
* having to incur the full set-up costs.
* '''
* self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 ) # <<<<<<<<<<<<<<
* self.iterdata.iter = self.iter.iter
*
*/
- __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->samfile));
__Pyx_INCREF(__pyx_v_end);
PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_end);
__Pyx_GIVEREF(__pyx_v_end);
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
- if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_v_self->iter = ((struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":1913
+ /* "pysam/csamtools.pyx":2059
* '''
* self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 )
* self.iterdata.iter = self.iter.iter # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_self->iter->iter;
__pyx_v_self->iterdata.iter = __pyx_t_4;
- /* "pysam/csamtools.pyx":1916
+ /* "pysam/csamtools.pyx":2062
*
* # invalidate sequence if different tid
* if self.tid != tid: # <<<<<<<<<<<<<<
* if self.iterdata.seq != NULL: free( self.iterdata.seq )
* self.iterdata.seq = NULL
*/
- __pyx_t_3 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_tid, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_tid, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":1917
+ /* "pysam/csamtools.pyx":2063
* # invalidate sequence if different tid
* if self.tid != tid:
* if self.iterdata.seq != NULL: free( self.iterdata.seq ) # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":1918
+ /* "pysam/csamtools.pyx":2064
* if self.tid != tid:
* if self.iterdata.seq != NULL: free( self.iterdata.seq )
* self.iterdata.seq = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->iterdata.seq = NULL;
- /* "pysam/csamtools.pyx":1919
+ /* "pysam/csamtools.pyx":2065
* if self.iterdata.seq != NULL: free( self.iterdata.seq )
* self.iterdata.seq = NULL
* self.iterdata.tid = -1 # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1922
+ /* "pysam/csamtools.pyx":2068
*
* # self.pileup_iter = bam_plp_init( &__advancepileup, &self.iterdata )
* bam_plp_reset(self.pileup_iter) # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":1924
+/* "pysam/csamtools.pyx":2070
* bam_plp_reset(self.pileup_iter)
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
- * # reset in order to avoid memory leak messages for iterators that have
- * # not been fully consumed
+ * # reset in order to avoid memory leak messages for iterators
+ * # that have not been fully consumed
*/
static void __pyx_pf_5pysam_9csamtools_14IteratorColumn_8__dealloc__(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *__pyx_v_self) {
int __pyx_t_1;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1924);
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 2070);
- /* "pysam/csamtools.pyx":1927
- * # reset in order to avoid memory leak messages for iterators that have
- * # not been fully consumed
+ /* "pysam/csamtools.pyx":2073
+ * # reset in order to avoid memory leak messages for iterators
+ * # that have not been fully consumed
* if self.pileup_iter != <bam_plp_t>NULL: # <<<<<<<<<<<<<<
* bam_plp_reset(self.pileup_iter)
* bam_plp_destroy(self.pileup_iter)
__pyx_t_1 = (__pyx_v_self->pileup_iter != NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1928
- * # not been fully consumed
+ /* "pysam/csamtools.pyx":2074
+ * # that have not been fully consumed
* if self.pileup_iter != <bam_plp_t>NULL:
* bam_plp_reset(self.pileup_iter) # <<<<<<<<<<<<<<
* bam_plp_destroy(self.pileup_iter)
*/
bam_plp_reset(__pyx_v_self->pileup_iter);
- /* "pysam/csamtools.pyx":1929
+ /* "pysam/csamtools.pyx":2075
* if self.pileup_iter != <bam_plp_t>NULL:
* bam_plp_reset(self.pileup_iter)
* bam_plp_destroy(self.pileup_iter) # <<<<<<<<<<<<<<
* self.pileup_iter = <bam_plp_t>NULL
- *
+ * self.plp = <const_bam_pileup1_t_ptr>NULL
*/
bam_plp_destroy(__pyx_v_self->pileup_iter);
- /* "pysam/csamtools.pyx":1930
+ /* "pysam/csamtools.pyx":2076
* bam_plp_reset(self.pileup_iter)
* bam_plp_destroy(self.pileup_iter)
* self.pileup_iter = <bam_plp_t>NULL # <<<<<<<<<<<<<<
+ * self.plp = <const_bam_pileup1_t_ptr>NULL
*
- * if self.iterdata.seq != NULL:
*/
__pyx_v_self->pileup_iter = NULL;
+
+ /* "pysam/csamtools.pyx":2077
+ * bam_plp_destroy(self.pileup_iter)
+ * self.pileup_iter = <bam_plp_t>NULL
+ * self.plp = <const_bam_pileup1_t_ptr>NULL # <<<<<<<<<<<<<<
+ *
+ * if self.iterdata.seq != NULL:
+ */
+ __pyx_v_self->plp = ((const bam_pileup1_t *)NULL);
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1932
- * self.pileup_iter = <bam_plp_t>NULL
+ /* "pysam/csamtools.pyx":2079
+ * self.plp = <const_bam_pileup1_t_ptr>NULL
*
* if self.iterdata.seq != NULL: # <<<<<<<<<<<<<<
* free(self.iterdata.seq)
__pyx_t_1 = (__pyx_v_self->iterdata.seq != NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1933
+ /* "pysam/csamtools.pyx":2080
*
* if self.iterdata.seq != NULL:
* free(self.iterdata.seq) # <<<<<<<<<<<<<<
*/
free(__pyx_v_self->iterdata.seq);
- /* "pysam/csamtools.pyx":1934
+ /* "pysam/csamtools.pyx":2081
* if self.iterdata.seq != NULL:
* free(self.iterdata.seq)
* self.iterdata.seq = NULL # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
if (values[1]) {
- __pyx_v_tid = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_tid = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_tid = ((int)0);
}
if (values[2]) {
- __pyx_v_start = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_start = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_start = ((int)0);
}
if (values[3]) {
- __pyx_v_end = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_end = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- __pyx_v_end = __pyx_k_132;
+ __pyx_v_end = __pyx_k_140;
}
if (values[4]) {
- __pyx_v_truncate = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_truncate == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_truncate = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_truncate == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "pysam/csamtools.pyx":1943
+ /* "pysam/csamtools.pyx":2090
* int start = 0,
* int end = max_pos,
* int truncate = False, # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
__Pyx_AddTraceback("pysam.csamtools.IteratorColumnRegion.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_20IteratorColumnRegion___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumnRegion *)__pyx_v_self), __pyx_v_samfile, __pyx_v_tid, __pyx_v_start, __pyx_v_end, __pyx_v_truncate, __pyx_v_kwargs);
goto __pyx_L0;
__pyx_L1_error:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1939
+/* "pysam/csamtools.pyx":2086
* '''iterates over a region only.
* '''
* def __cinit__(self, Samfile samfile, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_TraceCall("__cinit__", __pyx_f[0], 1939);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 2086);
- /* "pysam/csamtools.pyx":1947
+ /* "pysam/csamtools.pyx":2094
*
* # initialize iterator
* self.setupIteratorData( tid, start, end, 1 ) # <<<<<<<<<<<<<<
*/
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.reopen = 1;
- __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_tid, __pyx_v_start, __pyx_v_end, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_tid, __pyx_v_start, __pyx_v_end, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":1948
+ /* "pysam/csamtools.pyx":2095
* # initialize iterator
* self.setupIteratorData( tid, start, end, 1 )
* self.start = start # <<<<<<<<<<<<<<
*/
__pyx_v_self->start = __pyx_v_start;
- /* "pysam/csamtools.pyx":1949
+ /* "pysam/csamtools.pyx":2096
* self.setupIteratorData( tid, start, end, 1 )
* self.start = start
* self.end = end # <<<<<<<<<<<<<<
*/
__pyx_v_self->end = __pyx_v_end;
- /* "pysam/csamtools.pyx":1950
+ /* "pysam/csamtools.pyx":2097
* self.start = start
* self.end = end
* self.truncate = truncate # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1952
+/* "pysam/csamtools.pyx":2099
* self.truncate = truncate
*
* def __next__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__next__", 0);
- __Pyx_TraceCall("__next__", __pyx_f[0], 1952);
+ __Pyx_TraceCall("__next__", __pyx_f[0], 2099);
- /* "pysam/csamtools.pyx":1956
+ /* "pysam/csamtools.pyx":2103
* """
*
* while 1: # <<<<<<<<<<<<<<
while (1) {
if (!1) break;
- /* "pysam/csamtools.pyx":1957
+ /* "pysam/csamtools.pyx":2104
*
* while 1:
* self.cnext() # <<<<<<<<<<<<<<
*/
((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnRegion *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.cnext(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self));
- /* "pysam/csamtools.pyx":1958
+ /* "pysam/csamtools.pyx":2105
* while 1:
* self.cnext()
* if self.n_plp < 0: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->__pyx_base.n_plp < 0);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1959
+ /* "pysam/csamtools.pyx":2106
* self.cnext()
* if self.n_plp < 0:
* raise ValueError("error during iteration" ) # <<<<<<<<<<<<<<
*
* if self.plp == NULL:
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_134), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_142), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":1961
+ /* "pysam/csamtools.pyx":2108
* raise ValueError("error during iteration" )
*
* if self.plp == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->__pyx_base.plp == NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1962
+ /* "pysam/csamtools.pyx":2109
*
* if self.plp == NULL:
* raise StopIteration # <<<<<<<<<<<<<<
* if self.truncate:
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
- /* "pysam/csamtools.pyx":1964
+ /* "pysam/csamtools.pyx":2111
* raise StopIteration
*
* if self.truncate: # <<<<<<<<<<<<<<
*/
if (__pyx_v_self->truncate) {
- /* "pysam/csamtools.pyx":1965
+ /* "pysam/csamtools.pyx":2112
*
* if self.truncate:
* if self.start > self.pos: continue # <<<<<<<<<<<<<<
}
__pyx_L8:;
- /* "pysam/csamtools.pyx":1966
+ /* "pysam/csamtools.pyx":2113
* if self.truncate:
* if self.start > self.pos: continue
* if self.pos >= self.end: raise StopIteration # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->__pyx_base.pos >= __pyx_v_self->end);
if (__pyx_t_1) {
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L9;
}
__pyx_L9:;
}
__pyx_L7:;
- /* "pysam/csamtools.pyx":1968
+ /* "pysam/csamtools.pyx":2115
* if self.pos >= self.end: raise StopIteration
*
* return makePileupProxy( &self.plp, # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- /* "pysam/csamtools.pyx":1971
+ /* "pysam/csamtools.pyx":2118
* self.tid,
* self.pos,
* self.n_plp ) # <<<<<<<<<<<<<<
*
* cdef class IteratorColumnAllRefs(IteratorColumn):
*/
- __pyx_t_2 = __pyx_f_5pysam_9csamtools_makePileupProxy((&__pyx_v_self->__pyx_base.plp), __pyx_v_self->__pyx_base.tid, __pyx_v_self->__pyx_base.pos, __pyx_v_self->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_makePileupProxy((&__pyx_v_self->__pyx_base.plp), __pyx_v_self->__pyx_base.tid, __pyx_v_self->__pyx_base.pos, __pyx_v_self->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
__Pyx_AddTraceback("pysam.csamtools.IteratorColumnAllRefs.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_21IteratorColumnAllRefs___cinit__(((struct __pyx_obj_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self), __pyx_v_samfile, __pyx_v_kwargs);
goto __pyx_L0;
__pyx_L1_error:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1977
+/* "pysam/csamtools.pyx":2124
* """
*
* def __cinit__(self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_TraceCall("__cinit__", __pyx_f[0], 1977);
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 2124);
- /* "pysam/csamtools.pyx":1982
+ /* "pysam/csamtools.pyx":2129
*
* # no iteration over empty files
* if not samfile.nreferences: raise StopIteration # <<<<<<<<<<<<<<
*
* # initialize iterator
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = (!__pyx_t_2);
if (__pyx_t_3) {
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":1985
+ /* "pysam/csamtools.pyx":2132
*
* # initialize iterator
* self.setupIteratorData( self.tid, 0, max_pos, 1 ) # <<<<<<<<<<<<<<
*/
__pyx_t_4.__pyx_n = 1;
__pyx_t_4.reopen = 1;
- __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_self->__pyx_base.tid, 0, __pyx_v_5pysam_9csamtools_max_pos, &__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_self->__pyx_base.tid, 0, __pyx_v_5pysam_9csamtools_max_pos, &__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":1987
+/* "pysam/csamtools.pyx":2134
* self.setupIteratorData( self.tid, 0, max_pos, 1 )
*
* def __next__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__next__", 0);
- __Pyx_TraceCall("__next__", __pyx_f[0], 1987);
+ __Pyx_TraceCall("__next__", __pyx_f[0], 2134);
- /* "pysam/csamtools.pyx":1991
+ /* "pysam/csamtools.pyx":2138
* """
*
* while 1: # <<<<<<<<<<<<<<
while (1) {
if (!1) break;
- /* "pysam/csamtools.pyx":1992
+ /* "pysam/csamtools.pyx":2139
*
* while 1:
* self.cnext() # <<<<<<<<<<<<<<
*/
((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.cnext(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self));
- /* "pysam/csamtools.pyx":1994
+ /* "pysam/csamtools.pyx":2141
* self.cnext()
*
* if self.n_plp < 0: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->__pyx_base.n_plp < 0);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1995
+ /* "pysam/csamtools.pyx":2142
*
* if self.n_plp < 0:
* raise ValueError("error during iteration" ) # <<<<<<<<<<<<<<
*
* # return result, if within same reference
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_135), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_143), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":1998
+ /* "pysam/csamtools.pyx":2145
*
* # return result, if within same reference
* if self.plp != NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->__pyx_base.plp != NULL);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":1999
+ /* "pysam/csamtools.pyx":2146
* # return result, if within same reference
* if self.plp != NULL:
* return makePileupProxy( &self.plp, # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- /* "pysam/csamtools.pyx":2002
+ /* "pysam/csamtools.pyx":2149
* self.tid,
* self.pos,
* self.n_plp ) # <<<<<<<<<<<<<<
*
* # otherwise, proceed to next reference or stop
*/
- __pyx_t_2 = __pyx_f_5pysam_9csamtools_makePileupProxy((&__pyx_v_self->__pyx_base.plp), __pyx_v_self->__pyx_base.tid, __pyx_v_self->__pyx_base.pos, __pyx_v_self->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_makePileupProxy((&__pyx_v_self->__pyx_base.plp), __pyx_v_self->__pyx_base.tid, __pyx_v_self->__pyx_base.pos, __pyx_v_self->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
}
__pyx_L6:;
- /* "pysam/csamtools.pyx":2005
+ /* "pysam/csamtools.pyx":2152
*
* # otherwise, proceed to next reference or stop
* self.tid += 1 # <<<<<<<<<<<<<<
*/
__pyx_v_self->__pyx_base.tid = (__pyx_v_self->__pyx_base.tid + 1);
- /* "pysam/csamtools.pyx":2006
+ /* "pysam/csamtools.pyx":2153
* # otherwise, proceed to next reference or stop
* self.tid += 1
* if self.tid < self.samfile.nreferences: # <<<<<<<<<<<<<<
* self.setupIteratorData( self.tid, 0, max_pos, 0 )
* else:
*/
- __pyx_t_2 = PyInt_FromLong(__pyx_v_self->__pyx_base.tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_self->__pyx_base.tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self->__pyx_base.samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self->__pyx_base.samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":2007
+ /* "pysam/csamtools.pyx":2154
* self.tid += 1
* if self.tid < self.samfile.nreferences:
* self.setupIteratorData( self.tid, 0, max_pos, 0 ) # <<<<<<<<<<<<<<
*/
__pyx_t_5.__pyx_n = 1;
__pyx_t_5.reopen = 0;
- __pyx_t_4 = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_self->__pyx_base.tid, 0, __pyx_v_5pysam_9csamtools_max_pos, &__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_5pysam_9csamtools_IteratorColumnAllRefs *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.setupIteratorData(((struct __pyx_obj_5pysam_9csamtools_IteratorColumn *)__pyx_v_self), __pyx_v_self->__pyx_base.tid, 0, __pyx_v_5pysam_9csamtools_max_pos, &__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L7;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2009
+ /* "pysam/csamtools.pyx":2156
* self.setupIteratorData( self.tid, 0, max_pos, 0 )
* else:
* raise StopIteration # <<<<<<<<<<<<<<
* ##-------------------------------------------------------------------
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L7:;
}
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2014
+/* "pysam/csamtools.pyx":2161
* ##-------------------------------------------------------------------
* ##-------------------------------------------------------------------
* cdef inline int32_t query_start(bam1_t *src) except -1: # <<<<<<<<<<<<<<
int __pyx_t_4;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("query_start", 0);
- __Pyx_TraceCall("query_start", __pyx_f[0], 2014);
+ __Pyx_TraceCall("query_start", __pyx_f[0], 2161);
- /* "pysam/csamtools.pyx":2017
+ /* "pysam/csamtools.pyx":2164
* cdef uint32_t * cigar_p, op
* cdef uint32_t k
* cdef uint32_t start_offset = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_start_offset = 0;
- /* "pysam/csamtools.pyx":2019
+ /* "pysam/csamtools.pyx":2166
* cdef uint32_t start_offset = 0
*
* if src.core.n_cigar: # <<<<<<<<<<<<<<
*/
if (__pyx_v_src->core.n_cigar) {
- /* "pysam/csamtools.pyx":2020
+ /* "pysam/csamtools.pyx":2167
*
* if src.core.n_cigar:
* cigar_p = bam1_cigar(src); # <<<<<<<<<<<<<<
*/
__pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
- /* "pysam/csamtools.pyx":2021
+ /* "pysam/csamtools.pyx":2168
* if src.core.n_cigar:
* cigar_p = bam1_cigar(src);
* for k from 0 <= k < src.core.n_cigar: # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_src->core.n_cigar;
for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_1; __pyx_v_k++) {
- /* "pysam/csamtools.pyx":2022
+ /* "pysam/csamtools.pyx":2169
* cigar_p = bam1_cigar(src);
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<<
*/
__pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
- /* "pysam/csamtools.pyx":2027
+ /* "pysam/csamtools.pyx":2174
* PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
* return -1
* elif op==BAM_CSOFT_CLIP: # <<<<<<<<<<<<<<
*/
switch (__pyx_v_op) {
- /* "pysam/csamtools.pyx":2023
+ /* "pysam/csamtools.pyx":2170
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK
* if op==BAM_CHARD_CLIP: # <<<<<<<<<<<<<<
*/
case 5:
- /* "pysam/csamtools.pyx":2024
+ /* "pysam/csamtools.pyx":2171
* op = cigar_p[k] & BAM_CIGAR_MASK
* if op==BAM_CHARD_CLIP:
* if start_offset!=0 and start_offset!=src.core.l_qseq: # <<<<<<<<<<<<<<
}
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":2025
+ /* "pysam/csamtools.pyx":2172
* if op==BAM_CHARD_CLIP:
* if start_offset!=0 and start_offset!=src.core.l_qseq:
* PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') # <<<<<<<<<<<<<<
* return -1
* elif op==BAM_CSOFT_CLIP:
*/
- PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_136);
+ PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_144);
- /* "pysam/csamtools.pyx":2026
+ /* "pysam/csamtools.pyx":2173
* if start_offset!=0 and start_offset!=src.core.l_qseq:
* PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
* return -1 # <<<<<<<<<<<<<<
__pyx_L6:;
break;
- /* "pysam/csamtools.pyx":2027
+ /* "pysam/csamtools.pyx":2174
* PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
* return -1
* elif op==BAM_CSOFT_CLIP: # <<<<<<<<<<<<<<
*/
case 4:
- /* "pysam/csamtools.pyx":2028
+ /* "pysam/csamtools.pyx":2175
* return -1
* elif op==BAM_CSOFT_CLIP:
* start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<<
break;
default:
- /* "pysam/csamtools.pyx":2030
+ /* "pysam/csamtools.pyx":2177
* start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT
* else:
* break # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2032
+ /* "pysam/csamtools.pyx":2179
* break
*
* return start_offset # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2037
+/* "pysam/csamtools.pyx":2184
* ##-------------------------------------------------------------------
* ##-------------------------------------------------------------------
* cdef inline int32_t query_end(bam1_t *src) except -1: # <<<<<<<<<<<<<<
int __pyx_t_4;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("query_end", 0);
- __Pyx_TraceCall("query_end", __pyx_f[0], 2037);
+ __Pyx_TraceCall("query_end", __pyx_f[0], 2184);
- /* "pysam/csamtools.pyx":2040
+ /* "pysam/csamtools.pyx":2187
* cdef uint32_t * cigar_p, op
* cdef uint32_t k
* cdef uint32_t end_offset = src.core.l_qseq # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_src->core.l_qseq;
__pyx_v_end_offset = __pyx_t_1;
- /* "pysam/csamtools.pyx":2042
+ /* "pysam/csamtools.pyx":2189
* cdef uint32_t end_offset = src.core.l_qseq
*
* if src.core.n_cigar>1: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_src->core.n_cigar > 1);
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2043
+ /* "pysam/csamtools.pyx":2190
*
* if src.core.n_cigar>1:
* cigar_p = bam1_cigar(src); # <<<<<<<<<<<<<<
*/
__pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
- /* "pysam/csamtools.pyx":2044
+ /* "pysam/csamtools.pyx":2191
* if src.core.n_cigar>1:
* cigar_p = bam1_cigar(src);
* for k from src.core.n_cigar > k >= 1: # <<<<<<<<<<<<<<
*/
for (__pyx_v_k = __pyx_v_src->core.n_cigar-1; __pyx_v_k >= 1; __pyx_v_k--) {
- /* "pysam/csamtools.pyx":2045
+ /* "pysam/csamtools.pyx":2192
* cigar_p = bam1_cigar(src);
* for k from src.core.n_cigar > k >= 1:
* op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<<
*/
__pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
- /* "pysam/csamtools.pyx":2050
+ /* "pysam/csamtools.pyx":2197
* PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
* return -1
* elif op==BAM_CSOFT_CLIP: # <<<<<<<<<<<<<<
*/
switch (__pyx_v_op) {
- /* "pysam/csamtools.pyx":2046
+ /* "pysam/csamtools.pyx":2193
* for k from src.core.n_cigar > k >= 1:
* op = cigar_p[k] & BAM_CIGAR_MASK
* if op==BAM_CHARD_CLIP: # <<<<<<<<<<<<<<
*/
case 5:
- /* "pysam/csamtools.pyx":2047
+ /* "pysam/csamtools.pyx":2194
* op = cigar_p[k] & BAM_CIGAR_MASK
* if op==BAM_CHARD_CLIP:
* if end_offset!=0 and end_offset!=src.core.l_qseq: # <<<<<<<<<<<<<<
}
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":2048
+ /* "pysam/csamtools.pyx":2195
* if op==BAM_CHARD_CLIP:
* if end_offset!=0 and end_offset!=src.core.l_qseq:
* PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') # <<<<<<<<<<<<<<
* return -1
* elif op==BAM_CSOFT_CLIP:
*/
- PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_136);
+ PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_144);
- /* "pysam/csamtools.pyx":2049
+ /* "pysam/csamtools.pyx":2196
* if end_offset!=0 and end_offset!=src.core.l_qseq:
* PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
* return -1 # <<<<<<<<<<<<<<
__pyx_L6:;
break;
- /* "pysam/csamtools.pyx":2050
+ /* "pysam/csamtools.pyx":2197
* PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string')
* return -1
* elif op==BAM_CSOFT_CLIP: # <<<<<<<<<<<<<<
*/
case 4:
- /* "pysam/csamtools.pyx":2051
+ /* "pysam/csamtools.pyx":2198
* return -1
* elif op==BAM_CSOFT_CLIP:
* end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<<
break;
default:
- /* "pysam/csamtools.pyx":2053
+ /* "pysam/csamtools.pyx":2200
* end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT
* else:
* break # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2055
+ /* "pysam/csamtools.pyx":2202
* break
*
* if end_offset==0: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_v_end_offset == 0);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":2056
+ /* "pysam/csamtools.pyx":2203
*
* if end_offset==0:
* end_offset = src.core.l_qseq # <<<<<<<<<<<<<<
}
__pyx_L7:;
- /* "pysam/csamtools.pyx":2058
+ /* "pysam/csamtools.pyx":2205
* end_offset = src.core.l_qseq
*
* return end_offset # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2061
+/* "pysam/csamtools.pyx":2208
*
*
* cdef inline object get_seq_range(bam1_t *src, uint32_t start, uint32_t end): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("get_seq_range", 0);
- __Pyx_TraceCall("get_seq_range", __pyx_f[0], 2061);
+ __Pyx_TraceCall("get_seq_range", __pyx_f[0], 2208);
- /* "pysam/csamtools.pyx":2066
+ /* "pysam/csamtools.pyx":2213
* cdef char * s
*
* if not src.core.l_qseq: # <<<<<<<<<<<<<<
__pyx_t_1 = (!__pyx_v_src->core.l_qseq);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":2067
+ /* "pysam/csamtools.pyx":2214
*
* if not src.core.l_qseq:
* return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2069
+ /* "pysam/csamtools.pyx":2216
* return None
*
* seq = PyBytes_FromStringAndSize(NULL, end - start) # <<<<<<<<<<<<<<
* s = <char*>seq
* p = bam1_seq(src)
*/
- __pyx_t_2 = ((PyObject *)PyBytes_FromStringAndSize(NULL, (__pyx_v_end - __pyx_v_start))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)PyBytes_FromStringAndSize(NULL, (__pyx_v_end - __pyx_v_start))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_seq = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":2070
+ /* "pysam/csamtools.pyx":2217
*
* seq = PyBytes_FromStringAndSize(NULL, end - start)
* s = <char*>seq # <<<<<<<<<<<<<<
* p = bam1_seq(src)
*
*/
- __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_seq)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_seq)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_s = ((char *)__pyx_t_3);
- /* "pysam/csamtools.pyx":2071
+ /* "pysam/csamtools.pyx":2218
* seq = PyBytes_FromStringAndSize(NULL, end - start)
* s = <char*>seq
* p = bam1_seq(src) # <<<<<<<<<<<<<<
*/
__pyx_v_p = bam1_seq(__pyx_v_src);
- /* "pysam/csamtools.pyx":2073
+ /* "pysam/csamtools.pyx":2220
* p = bam1_seq(src)
*
* for k from start <= k < end: # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_end;
for (__pyx_v_k = __pyx_v_start; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
- /* "pysam/csamtools.pyx":2076
+ /* "pysam/csamtools.pyx":2223
* # equivalent to bam_nt16_rev_table[bam1_seqi(s, i)] (see bam.c)
* # note: do not use string literal as it will be a python string
* s[k-start] = bam_nt16_rev_table[p[k/2] >> 4 * (1 - k%2) & 0xf] # <<<<<<<<<<<<<<
(__pyx_v_s[(__pyx_v_k - __pyx_v_start)]) = (__pyx_v_5pysam_9csamtools_bam_nt16_rev_table[(((__pyx_v_p[__Pyx_div_long(__pyx_v_k, 2)]) >> (4 * (1 - __Pyx_mod_long(__pyx_v_k, 2)))) & 0xf)]);
}
- /* "pysam/csamtools.pyx":2078
+ /* "pysam/csamtools.pyx":2225
* s[k-start] = bam_nt16_rev_table[p[k/2] >> 4 * (1 - k%2) & 0xf]
*
* return seq # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2081
+/* "pysam/csamtools.pyx":2228
*
*
* cdef inline object get_qual_range(bam1_t *src, uint32_t start, uint32_t end): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("get_qual_range", 0);
- __Pyx_TraceCall("get_qual_range", __pyx_f[0], 2081);
+ __Pyx_TraceCall("get_qual_range", __pyx_f[0], 2228);
- /* "pysam/csamtools.pyx":2086
+ /* "pysam/csamtools.pyx":2233
* cdef char * q
*
* p = bam1_qual(src) # <<<<<<<<<<<<<<
*/
__pyx_v_p = bam1_qual(__pyx_v_src);
- /* "pysam/csamtools.pyx":2087
+ /* "pysam/csamtools.pyx":2234
*
* p = bam1_qual(src)
* if p[0] == 0xff: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_p[0]) == 0xff);
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":2088
+ /* "pysam/csamtools.pyx":2235
* p = bam1_qual(src)
* if p[0] == 0xff:
* return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2090
+ /* "pysam/csamtools.pyx":2237
* return None
*
* qual = PyBytes_FromStringAndSize(NULL, end - start) # <<<<<<<<<<<<<<
* q = <char*>qual
*
*/
- __pyx_t_2 = ((PyObject *)PyBytes_FromStringAndSize(NULL, (__pyx_v_end - __pyx_v_start))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)PyBytes_FromStringAndSize(NULL, (__pyx_v_end - __pyx_v_start))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_qual = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":2091
+ /* "pysam/csamtools.pyx":2238
*
* qual = PyBytes_FromStringAndSize(NULL, end - start)
* q = <char*>qual # <<<<<<<<<<<<<<
*
* for k from start <= k < end:
*/
- __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_qual)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_qual)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_q = ((char *)__pyx_t_3);
- /* "pysam/csamtools.pyx":2093
+ /* "pysam/csamtools.pyx":2240
* q = <char*>qual
*
* for k from start <= k < end: # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_end;
for (__pyx_v_k = __pyx_v_start; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
- /* "pysam/csamtools.pyx":2095
+ /* "pysam/csamtools.pyx":2242
* for k from start <= k < end:
* ## equivalent to t[i] + 33 (see bam.c)
* q[k-start] = p[k] + 33 # <<<<<<<<<<<<<<
(__pyx_v_q[(__pyx_v_k - __pyx_v_start)]) = ((__pyx_v_p[__pyx_v_k]) + 33);
}
- /* "pysam/csamtools.pyx":2097
+ /* "pysam/csamtools.pyx":2244
* q[k-start] = p[k] + 33
*
* return qual # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2129
+/* "pysam/csamtools.pyx":2276
*
* # Now only called when instances are created from Python
* def __init__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- __Pyx_TraceCall("__init__", __pyx_f[0], 2129);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 2276);
- /* "pysam/csamtools.pyx":2131
+ /* "pysam/csamtools.pyx":2278
* def __init__(self):
* # see bam_init1
* self._delegate = <bam1_t*>calloc( 1, sizeof( bam1_t) ) # <<<<<<<<<<<<<<
*/
__pyx_v_self->_delegate = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
- /* "pysam/csamtools.pyx":2135
+ /* "pysam/csamtools.pyx":2282
* # If size is 0, calloc does not return a pointer that can be passed to free()
* # so allocate 40 bytes for a new read
* self._delegate.m_data = 40 # <<<<<<<<<<<<<<
*/
__pyx_v_self->_delegate->m_data = 40;
- /* "pysam/csamtools.pyx":2136
+ /* "pysam/csamtools.pyx":2283
* # so allocate 40 bytes for a new read
* self._delegate.m_data = 40
* self._delegate.data = <uint8_t *>calloc( self._delegate.m_data, 1 ) # <<<<<<<<<<<<<<
*/
__pyx_v_self->_delegate->data = ((uint8_t *)calloc(__pyx_v_self->_delegate->m_data, 1));
- /* "pysam/csamtools.pyx":2137
+ /* "pysam/csamtools.pyx":2284
* self._delegate.m_data = 40
* self._delegate.data = <uint8_t *>calloc( self._delegate.m_data, 1 )
* self._delegate.data_len = 0 # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":2139
+/* "pysam/csamtools.pyx":2286
* self._delegate.data_len = 0
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- __Pyx_TraceCall("__dealloc__", __pyx_f[0], 2139);
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 2286);
- /* "pysam/csamtools.pyx":2140
+ /* "pysam/csamtools.pyx":2287
*
* def __dealloc__(self):
* bam_destroy1(self._delegate) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2142
+/* "pysam/csamtools.pyx":2289
* bam_destroy1(self._delegate)
*
* def __str__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__str__", 0);
- __Pyx_TraceCall("__str__", __pyx_f[0], 2142);
+ __Pyx_TraceCall("__str__", __pyx_f[0], 2289);
- /* "pysam/csamtools.pyx":2154
+ /* "pysam/csamtools.pyx":2301
* # sam-parsing is done in sam.c/bam_format1_core which
* # requires a valid header.
* if sys.version_info[0] < 3: # <<<<<<<<<<<<<<
* seq = self.seq
* qual = self.qual
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":2155
+ /* "pysam/csamtools.pyx":2302
* # requires a valid header.
* if sys.version_info[0] < 3:
* seq = self.seq # <<<<<<<<<<<<<<
* qual = self.qual
* else:
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_seq = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":2156
+ /* "pysam/csamtools.pyx":2303
* if sys.version_info[0] < 3:
* seq = self.seq
* qual = self.qual # <<<<<<<<<<<<<<
* else:
* seq = self.seq.decode('ascii')
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_qual = __pyx_t_2;
__pyx_t_2 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2158
+ /* "pysam/csamtools.pyx":2305
* qual = self.qual
* else:
* seq = self.seq.decode('ascii') # <<<<<<<<<<<<<<
* qual = self.qual.decode('ascii')
* return "\t".join(map(str, (self.qname,
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_137), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_145), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_seq = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":2159
+ /* "pysam/csamtools.pyx":2306
* else:
* seq = self.seq.decode('ascii')
* qual = self.qual.decode('ascii') # <<<<<<<<<<<<<<
* return "\t".join(map(str, (self.qname,
* self.flag,
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qual); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_138), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_146), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_qual = __pyx_t_2;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2160
+ /* "pysam/csamtools.pyx":2307
* seq = self.seq.decode('ascii')
* qual = self.qual.decode('ascii')
* return "\t".join(map(str, (self.qname, # <<<<<<<<<<<<<<
* self.rname,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "pysam/csamtools.pyx":2161
+ /* "pysam/csamtools.pyx":2308
* qual = self.qual.decode('ascii')
* return "\t".join(map(str, (self.qname,
* self.flag, # <<<<<<<<<<<<<<
* self.rname,
* self.pos,
*/
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- /* "pysam/csamtools.pyx":2162
+ /* "pysam/csamtools.pyx":2309
* return "\t".join(map(str, (self.qname,
* self.flag,
* self.rname, # <<<<<<<<<<<<<<
* self.pos,
* self.mapq,
*/
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__rname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__rname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- /* "pysam/csamtools.pyx":2163
+ /* "pysam/csamtools.pyx":2310
* self.flag,
* self.rname,
* self.pos, # <<<<<<<<<<<<<<
* self.mapq,
* self.cigar,
*/
- __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- /* "pysam/csamtools.pyx":2164
+ /* "pysam/csamtools.pyx":2311
* self.rname,
* self.pos,
* self.mapq, # <<<<<<<<<<<<<<
* self.cigar,
* self.mrnm,
*/
- __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mapq); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mapq); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- /* "pysam/csamtools.pyx":2165
+ /* "pysam/csamtools.pyx":2312
* self.pos,
* self.mapq,
* self.cigar, # <<<<<<<<<<<<<<
* self.mrnm,
* self.mpos,
*/
- __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- /* "pysam/csamtools.pyx":2166
+ /* "pysam/csamtools.pyx":2313
* self.mapq,
* self.cigar,
* self.mrnm, # <<<<<<<<<<<<<<
* self.mpos,
* self.rlen,
*/
- __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mrnm); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mrnm); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- /* "pysam/csamtools.pyx":2167
+ /* "pysam/csamtools.pyx":2314
* self.cigar,
* self.mrnm,
* self.mpos, # <<<<<<<<<<<<<<
* self.rlen,
* seq,
*/
- __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mpos); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mpos); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- /* "pysam/csamtools.pyx":2168
+ /* "pysam/csamtools.pyx":2315
* self.mrnm,
* self.mpos,
* self.rlen, # <<<<<<<<<<<<<<
* seq,
* qual,
*/
- __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__rlen); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__rlen); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- /* "pysam/csamtools.pyx":2171
+ /* "pysam/csamtools.pyx":2318
* seq,
* qual,
* self.tags ))) # <<<<<<<<<<<<<<
*
* def compare(self, AlignedRead other):
*/
- __pyx_t_12 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tags); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tags); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_13 = PyTuple_New(12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyTuple_New(12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_10 = 0;
__pyx_t_11 = 0;
__pyx_t_12 = 0;
- __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_t_13));
__Pyx_GIVEREF(((PyObject *)__pyx_t_13));
__pyx_t_13 = 0;
- __pyx_t_13 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
- __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13);
__Pyx_GIVEREF(__pyx_t_13);
__pyx_t_13 = 0;
- __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("compare (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_9csamtools_AlignedRead, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5pysam_9csamtools_AlignedRead, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_6compare(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self), ((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_other));
goto __pyx_L0;
__pyx_L1_error:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2173
+/* "pysam/csamtools.pyx":2320
* self.tags )))
*
* def compare(self, AlignedRead other): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("compare", 0);
- __Pyx_TraceCall("compare", __pyx_f[0], 2173);
+ __Pyx_TraceCall("compare", __pyx_f[0], 2320);
- /* "pysam/csamtools.pyx":2179
+ /* "pysam/csamtools.pyx":2326
* cdef bam1_t *t, *o
*
* t = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_t = __pyx_t_1;
- /* "pysam/csamtools.pyx":2180
+ /* "pysam/csamtools.pyx":2327
*
* t = self._delegate
* o = other._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_other->_delegate;
__pyx_v_o = __pyx_t_1;
- /* "pysam/csamtools.pyx":2192
+ /* "pysam/csamtools.pyx":2339
*
* # Fast-path test for object identity
* if t==o: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_t == __pyx_v_o);
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2193
+ /* "pysam/csamtools.pyx":2340
* # Fast-path test for object identity
* if t==o:
* return 0 # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2195
+ /* "pysam/csamtools.pyx":2342
* return 0
*
* retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t)) # <<<<<<<<<<<<<<
*/
__pyx_v_retval = memcmp((&__pyx_v_t->core), (&__pyx_v_o->core), (sizeof(bam1_core_t)));
- /* "pysam/csamtools.pyx":2197
+ /* "pysam/csamtools.pyx":2344
* retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t))
*
* if retval: return retval # <<<<<<<<<<<<<<
*/
if (__pyx_v_retval) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":2198
+ /* "pysam/csamtools.pyx":2345
*
* if retval: return retval
* retval = (t.data_len > o.data_len) - (t.data_len < o.data_len) # cmp(t.data_len, o.data_len) # <<<<<<<<<<<<<<
*/
__pyx_v_retval = ((__pyx_v_t->data_len > __pyx_v_o->data_len) - (__pyx_v_t->data_len < __pyx_v_o->data_len));
- /* "pysam/csamtools.pyx":2199
+ /* "pysam/csamtools.pyx":2346
* if retval: return retval
* retval = (t.data_len > o.data_len) - (t.data_len < o.data_len) # cmp(t.data_len, o.data_len)
* if retval: return retval # <<<<<<<<<<<<<<
*/
if (__pyx_v_retval) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":2200
+ /* "pysam/csamtools.pyx":2347
* retval = (t.data_len > o.data_len) - (t.data_len < o.data_len) # cmp(t.data_len, o.data_len)
* if retval: return retval
* return memcmp(t.data, o.data, t.data_len) # <<<<<<<<<<<<<<
* # Disabled so long as __cmp__ is a special method
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyInt_FromLong(memcmp(__pyx_v_t->data, __pyx_v_o->data, __pyx_v_t->data_len)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(memcmp(__pyx_v_t->data, __pyx_v_o->data, __pyx_v_t->data_len)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2203
+/* "pysam/csamtools.pyx":2350
*
* # Disabled so long as __cmp__ is a special method
* def __hash__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__hash__", 0);
- __Pyx_TraceCall("__hash__", __pyx_f[0], 2203);
+ __Pyx_TraceCall("__hash__", __pyx_f[0], 2350);
- /* "pysam/csamtools.pyx":2204
+ /* "pysam/csamtools.pyx":2351
* # Disabled so long as __cmp__ is a special method
* def __hash__(self):
* return _Py_HashPointer(<void *>self) # <<<<<<<<<<<<<<
*
- * property qname:
+ * #######################################################################
*/
__pyx_r = _Py_HashPointer(((void *)__pyx_v_self));
goto __pyx_L0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2208
+/* "pysam/csamtools.pyx":2359
* property qname:
* """the query name (None if not present)"""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2208);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2359);
- /* "pysam/csamtools.pyx":2210
+ /* "pysam/csamtools.pyx":2361
* def __get__(self):
* cdef bam1_t * src
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2211
+ /* "pysam/csamtools.pyx":2362
* cdef bam1_t * src
* src = self._delegate
* if src.core.l_qname == 0: return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2212
+ /* "pysam/csamtools.pyx":2363
* src = self._delegate
* if src.core.l_qname == 0: return None
* return _charptr_to_str(<char *>bam1_qname( src )) # <<<<<<<<<<<<<<
* def __set__(self, qname ):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = __pyx_f_5pysam_9csamtools__charptr_to_str(((char *)bam1_qname(__pyx_v_src))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_5pysam_9csamtools__charptr_to_str(((char *)bam1_qname(__pyx_v_src))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2214
+/* "pysam/csamtools.pyx":2365
* return _charptr_to_str(<char *>bam1_qname( src ))
*
* def __set__(self, qname ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2214);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2365);
__Pyx_INCREF(__pyx_v_qname);
- /* "pysam/csamtools.pyx":2215
+ /* "pysam/csamtools.pyx":2366
*
* def __set__(self, qname ):
* if qname == None or len(qname) == 0: return # <<<<<<<<<<<<<<
* qname = _force_bytes(qname)
* cdef bam1_t * src
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_qname, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_qname, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_2) {
- __pyx_t_3 = PyObject_Length(__pyx_v_qname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_qname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = (__pyx_t_3 == 0);
__pyx_t_5 = __pyx_t_4;
} else {
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2216
+ /* "pysam/csamtools.pyx":2367
* def __set__(self, qname ):
* if qname == None or len(qname) == 0: return
* qname = _force_bytes(qname) # <<<<<<<<<<<<<<
* cdef bam1_t * src
* cdef int l
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_qname)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_qname)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_v_qname);
__pyx_v_qname = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":2221
+ /* "pysam/csamtools.pyx":2372
* cdef char * p
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_6 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_6;
- /* "pysam/csamtools.pyx":2222
+ /* "pysam/csamtools.pyx":2373
*
* src = self._delegate
* p = bam1_qname( src ) # <<<<<<<<<<<<<<
*/
__pyx_v_p = bam1_qname(__pyx_v_src);
- /* "pysam/csamtools.pyx":2225
+ /* "pysam/csamtools.pyx":2376
*
* # the qname is \0 terminated
* l = len(qname) + 1 # <<<<<<<<<<<<<<
* pysam_bam_update( src,
* src.core.l_qname,
*/
- __pyx_t_3 = PyObject_Length(__pyx_v_qname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_qname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_l = (__pyx_t_3 + 1);
- /* "pysam/csamtools.pyx":2229
+ /* "pysam/csamtools.pyx":2380
* src.core.l_qname,
* l,
* <uint8_t*>p ) # <<<<<<<<<<<<<<
*/
pysam_bam_update(__pyx_v_src, __pyx_v_src->core.l_qname, __pyx_v_l, ((uint8_t *)__pyx_v_p));
- /* "pysam/csamtools.pyx":2231
+ /* "pysam/csamtools.pyx":2382
* <uint8_t*>p )
*
* src.core.l_qname = l # <<<<<<<<<<<<<<
*/
__pyx_v_src->core.l_qname = __pyx_v_l;
- /* "pysam/csamtools.pyx":2235
+ /* "pysam/csamtools.pyx":2386
* # re-acquire pointer to location in memory
* # as it might have moved
* p = bam1_qname(src) # <<<<<<<<<<<<<<
*/
__pyx_v_p = bam1_qname(__pyx_v_src);
- /* "pysam/csamtools.pyx":2237
+ /* "pysam/csamtools.pyx":2388
* p = bam1_qname(src)
*
* strncpy( p, qname, l ) # <<<<<<<<<<<<<<
*
* property cigar:
*/
- __pyx_t_7 = PyBytes_AsString(__pyx_v_qname); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyBytes_AsString(__pyx_v_qname); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
strncpy(__pyx_v_p, __pyx_t_7, __pyx_v_l);
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2272
+/* "pysam/csamtools.pyx":2423
*
* """
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2272);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2423);
- /* "pysam/csamtools.pyx":2278
+ /* "pysam/csamtools.pyx":2429
* cdef int k
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2279
+ /* "pysam/csamtools.pyx":2430
*
* src = self._delegate
* if src.core.n_cigar == 0: return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2281
+ /* "pysam/csamtools.pyx":2432
* if src.core.n_cigar == 0: return None
*
* cigar = [] # <<<<<<<<<<<<<<
* cigar_p = bam1_cigar(src);
* for k from 0 <= k < src.core.n_cigar:
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_cigar = ((PyObject *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2282
+ /* "pysam/csamtools.pyx":2433
*
* cigar = []
* cigar_p = bam1_cigar(src); # <<<<<<<<<<<<<<
*/
__pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
- /* "pysam/csamtools.pyx":2283
+ /* "pysam/csamtools.pyx":2434
* cigar = []
* cigar_p = bam1_cigar(src);
* for k from 0 <= k < src.core.n_cigar: # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_src->core.n_cigar;
for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
- /* "pysam/csamtools.pyx":2284
+ /* "pysam/csamtools.pyx":2435
* cigar_p = bam1_cigar(src);
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<<
* l = cigar_p[k] >> BAM_CIGAR_SHIFT
* cigar.append((op, l))
*/
- __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) & 15)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) & 15)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_op);
__pyx_v_op = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2285
+ /* "pysam/csamtools.pyx":2436
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK
* l = cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<<
* cigar.append((op, l))
* return cigar
*/
- __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_l);
__pyx_v_l = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2286
+ /* "pysam/csamtools.pyx":2437
* op = cigar_p[k] & BAM_CIGAR_MASK
* l = cigar_p[k] >> BAM_CIGAR_SHIFT
* cigar.append((op, l)) # <<<<<<<<<<<<<<
* return cigar
*
*/
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_op);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_op);
__Pyx_INCREF(__pyx_v_l);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_l);
__Pyx_GIVEREF(__pyx_v_l);
- __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_cigar, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_cigar, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
- /* "pysam/csamtools.pyx":2287
+ /* "pysam/csamtools.pyx":2438
* l = cigar_p[k] >> BAM_CIGAR_SHIFT
* cigar.append((op, l))
* return cigar # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2289
+/* "pysam/csamtools.pyx":2440
* return cigar
*
* def __set__(self, values ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2289);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2440);
- /* "pysam/csamtools.pyx":2290
+ /* "pysam/csamtools.pyx":2441
*
* def __set__(self, values ):
* if values == None or len(values) == 0: return # <<<<<<<<<<<<<<
* cdef uint32_t * p
* cdef bam1_t * src
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_values, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_values, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_2) {
- __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = (__pyx_t_3 == 0);
__pyx_t_5 = __pyx_t_4;
} else {
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2296
+ /* "pysam/csamtools.pyx":2447
* cdef int k
*
* k = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_k = 0;
- /* "pysam/csamtools.pyx":2298
+ /* "pysam/csamtools.pyx":2449
* k = 0
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_6 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_6;
- /* "pysam/csamtools.pyx":2301
+ /* "pysam/csamtools.pyx":2452
*
* # get location of cigar string
* p = bam1_cigar(src) # <<<<<<<<<<<<<<
*/
__pyx_v_p = bam1_cigar(__pyx_v_src);
- /* "pysam/csamtools.pyx":2306
+ /* "pysam/csamtools.pyx":2457
* pysam_bam_update( src,
* src.core.n_cigar * 4,
* len(values) * 4, # <<<<<<<<<<<<<<
* <uint8_t*>p )
*
*/
- __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":2307
+ /* "pysam/csamtools.pyx":2458
* src.core.n_cigar * 4,
* len(values) * 4,
* <uint8_t*>p ) # <<<<<<<<<<<<<<
*/
pysam_bam_update(__pyx_v_src, (__pyx_v_src->core.n_cigar * 4), (__pyx_t_3 * 4), ((uint8_t *)__pyx_v_p));
- /* "pysam/csamtools.pyx":2310
+ /* "pysam/csamtools.pyx":2461
*
* # length is number of cigar operations, not bytes
* src.core.n_cigar = len(values) # <<<<<<<<<<<<<<
*
* # re-acquire pointer to location in memory
*/
- __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_src->core.n_cigar = __pyx_t_3;
- /* "pysam/csamtools.pyx":2314
+ /* "pysam/csamtools.pyx":2465
* # re-acquire pointer to location in memory
* # as it might have moved
* p = bam1_cigar(src) # <<<<<<<<<<<<<<
*/
__pyx_v_p = bam1_cigar(__pyx_v_src);
- /* "pysam/csamtools.pyx":2317
+ /* "pysam/csamtools.pyx":2468
*
* # insert cigar operations
* for op, l in values: # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
__pyx_t_7 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_8 = __pyx_t_7(__pyx_t_1);
if (unlikely(!__pyx_t_8)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_9);
__Pyx_INCREF(__pyx_t_10);
#else
- __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
#endif
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
__Pyx_GOTREF(__pyx_t_9);
index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed;
__Pyx_GOTREF(__pyx_t_10);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_12 = NULL;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
goto __pyx_L7_unpacking_done;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_12 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L7_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_op);
__pyx_v_l = __pyx_t_10;
__pyx_t_10 = 0;
- /* "pysam/csamtools.pyx":2318
+ /* "pysam/csamtools.pyx":2469
* # insert cigar operations
* for op, l in values:
* p[k] = l << BAM_CIGAR_SHIFT | op # <<<<<<<<<<<<<<
* k += 1
*
*/
- __pyx_t_8 = PyNumber_Lshift(__pyx_v_l, __pyx_int_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Lshift(__pyx_v_l, __pyx_int_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = PyNumber_Or(__pyx_t_8, __pyx_v_op); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyNumber_Or(__pyx_t_8, __pyx_v_op); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_13 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_10); if (unlikely((__pyx_t_13 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_10); if (unlikely((__pyx_t_13 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
(__pyx_v_p[__pyx_v_k]) = __pyx_t_13;
- /* "pysam/csamtools.pyx":2319
+ /* "pysam/csamtools.pyx":2470
* for op, l in values:
* p[k] = l << BAM_CIGAR_SHIFT | op
* k += 1 # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":2322
+ /* "pysam/csamtools.pyx":2473
*
* ## setting the cigar string also updates the "bin" attribute
* src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, p)) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2338
+/* "pysam/csamtools.pyx":2489
* Returns the empty string if not present.
* '''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2338);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2489);
- /* "pysam/csamtools.pyx":2339
+ /* "pysam/csamtools.pyx":2490
* '''
* def __get__(self):
* c = self.cigar # <<<<<<<<<<<<<<
* if c == None: return ""
* # reverse order
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_c = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":2340
+ /* "pysam/csamtools.pyx":2491
* def __get__(self):
* c = self.cigar
* if c == None: return "" # <<<<<<<<<<<<<<
* # reverse order
* else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_c, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_c, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
__Pyx_XDECREF(__pyx_r);
}
/*else*/ {
- /* "pysam/csamtools.pyx":2342
+ /* "pysam/csamtools.pyx":2493
* if c == None: return ""
* # reverse order
* else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c]) # <<<<<<<<<<<<<<
* def __set__(self, cigar):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_16), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_16), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyList_CheckExact(__pyx_v_c) || PyTuple_CheckExact(__pyx_v_c)) {
__pyx_t_4 = __pyx_v_c; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_c); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_c); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_7 = __pyx_t_6(__pyx_t_4);
if (unlikely(!__pyx_t_7)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(__pyx_t_9);
#else
- __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
#endif
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
__Pyx_GOTREF(__pyx_t_8);
index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed;
__Pyx_GOTREF(__pyx_t_9);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_11 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L7_unpacking_done;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_11 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L7_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_x);
__Pyx_XDECREF(__pyx_v_y);
__pyx_v_y = __pyx_t_9;
__pyx_t_9 = 0;
- __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = PyInt_FromLong((__pyx_v_5pysam_9csamtools_CODE2CIGAR[__pyx_t_12])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong((__pyx_v_5pysam_9csamtools_CODE2CIGAR[__pyx_t_12])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_INCREF(__pyx_v_y);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_y);
PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_7 = 0;
- __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_139), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_147), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_t_3));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2344
+/* "pysam/csamtools.pyx":2495
* else: return "".join([ "%i%c" % (y,CODE2CIGAR[x]) for x,y in c])
*
* def __set__(self, cigar): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2344);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2495);
- /* "pysam/csamtools.pyx":2345
+ /* "pysam/csamtools.pyx":2496
*
* def __set__(self, cigar):
* if cigar == None or len(cigar) == 0: self.cigar = [] # <<<<<<<<<<<<<<
* parts = CIGAR_REGEX.findall( cigar )
* # reverse order
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_cigar, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_cigar, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_2) {
- __pyx_t_3 = PyObject_Length(__pyx_v_cigar); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_cigar); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = (__pyx_t_3 == 0);
__pyx_t_5 = __pyx_t_4;
} else {
__pyx_t_5 = __pyx_t_2;
}
if (__pyx_t_5) {
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2346
+ /* "pysam/csamtools.pyx":2497
* def __set__(self, cigar):
* if cigar == None or len(cigar) == 0: self.cigar = []
* parts = CIGAR_REGEX.findall( cigar ) # <<<<<<<<<<<<<<
* # reverse order
* self.cigar = [ (CIGAR2CODE[ord(y)], int(x)) for x,y in parts ]
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__CIGAR_REGEX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__CIGAR_REGEX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__findall); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__findall); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_cigar);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cigar);
__Pyx_GIVEREF(__pyx_v_cigar);
- __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__pyx_v_parts = __pyx_t_7;
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2348
+ /* "pysam/csamtools.pyx":2499
* parts = CIGAR_REGEX.findall( cigar )
* # reverse order
* self.cigar = [ (CIGAR2CODE[ord(y)], int(x)) for x,y in parts ] # <<<<<<<<<<<<<<
*
* property seq:
*/
- __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
if (PyList_CheckExact(__pyx_v_parts) || PyTuple_CheckExact(__pyx_v_parts)) {
__pyx_t_1 = __pyx_v_parts; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
__pyx_t_8 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_parts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_parts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_6 = __pyx_t_8(__pyx_t_1);
if (unlikely(!__pyx_t_6)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_9);
__Pyx_INCREF(__pyx_t_10);
#else
- __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
#endif
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
__Pyx_GOTREF(__pyx_t_9);
index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed;
__Pyx_GOTREF(__pyx_t_10);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_12 = NULL;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
goto __pyx_L7_unpacking_done;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_12 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L7_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_x);
__Pyx_XDECREF(__pyx_v_y);
__pyx_v_y = __pyx_t_10;
__pyx_t_10 = 0;
- __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CIGAR2CODE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CIGAR2CODE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_INCREF(__pyx_v_y);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_y);
__Pyx_GIVEREF(__pyx_v_y);
- __pyx_t_9 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_builtin_ord, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_GetItem(__pyx_t_6, __pyx_t_9); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetItem(__pyx_t_6, __pyx_t_9); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_x);
__Pyx_GIVEREF(__pyx_v_x);
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_10 = 0;
__pyx_t_6 = 0;
- if (unlikely(__Pyx_PyList_Append(__pyx_t_7, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_PyList_Append(__pyx_t_7, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = ((PyObject *)__pyx_t_7);
__Pyx_INCREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cigar, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2354
+/* "pysam/csamtools.pyx":2518
*
- * In Python 3, this property is of type bytes and assigning a unicode string to it consisting of ASCII characters only will work, but is inefficient."""
+ * """
* def __get__(self): # <<<<<<<<<<<<<<
* cdef bam1_t * src
* cdef char * s
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2354);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2518);
- /* "pysam/csamtools.pyx":2357
+ /* "pysam/csamtools.pyx":2521
* cdef bam1_t * src
* cdef char * s
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2359
+ /* "pysam/csamtools.pyx":2523
* src = self._delegate
*
* if src.core.l_qseq == 0: return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2361
+ /* "pysam/csamtools.pyx":2525
* if src.core.l_qseq == 0: return None
*
* return get_seq_range(src, 0, src.core.l_qseq) # <<<<<<<<<<<<<<
* def __set__(self,seq):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = __pyx_f_5pysam_9csamtools_get_seq_range(__pyx_v_src, 0, __pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_5pysam_9csamtools_get_seq_range(__pyx_v_src, 0, __pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2363
+/* "pysam/csamtools.pyx":2527
* return get_seq_range(src, 0, src.core.l_qseq)
*
* def __set__(self,seq): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ bam1_t *__pyx_t_4;
int __pyx_t_5;
- bam1_t *__pyx_t_6;
- int __pyx_t_7;
- char *__pyx_t_8;
- long __pyx_t_9;
+ char *__pyx_t_6;
+ long __pyx_t_7;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2363);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2527);
__Pyx_INCREF(__pyx_v_seq);
- /* "pysam/csamtools.pyx":2367
- * # if no quality information is present, the first byte says 0xff.
+ /* "pysam/csamtools.pyx":2535
+ * cdef int l, k, nbytes_new, nbytes_old
*
- * if seq == None or len(seq) == 0: return # <<<<<<<<<<<<<<
- * seq = _force_bytes(seq)
- * cdef bam1_t * src
+ * if seq == None: # <<<<<<<<<<<<<<
+ * l = 0
+ * else:
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_seq, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_seq, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!__pyx_t_2) {
- __pyx_t_3 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = (__pyx_t_3 == 0);
- __pyx_t_5 = __pyx_t_4;
- } else {
- __pyx_t_5 = __pyx_t_2;
- }
- if (__pyx_t_5) {
- __pyx_r = 0;
- goto __pyx_L0;
+ if (__pyx_t_2) {
+
+ /* "pysam/csamtools.pyx":2536
+ *
+ * if seq == None:
+ * l = 0 # <<<<<<<<<<<<<<
+ * else:
+ * l = len(seq)
+ */
+ __pyx_v_l = 0;
goto __pyx_L3;
}
- __pyx_L3:;
+ /*else*/ {
- /* "pysam/csamtools.pyx":2368
+ /* "pysam/csamtools.pyx":2538
+ * l = 0
+ * else:
+ * l = len(seq) # <<<<<<<<<<<<<<
+ * seq = _force_bytes(seq)
*
- * if seq == None or len(seq) == 0: return
- * seq = _force_bytes(seq) # <<<<<<<<<<<<<<
- * cdef bam1_t * src
- * cdef uint8_t * p
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_seq)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_v_seq);
- __pyx_v_seq = __pyx_t_1;
- __pyx_t_1 = 0;
+ __pyx_t_3 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_l = __pyx_t_3;
- /* "pysam/csamtools.pyx":2374
- * cdef int l, k, nbytes_new, nbytes_old
- *
- * src = self._delegate # <<<<<<<<<<<<<<
+ /* "pysam/csamtools.pyx":2539
+ * else:
+ * l = len(seq)
+ * seq = _force_bytes(seq) # <<<<<<<<<<<<<<
*
- * l = len(seq)
+ * src = self._delegate
*/
- __pyx_t_6 = __pyx_v_self->_delegate;
- __pyx_v_src = __pyx_t_6;
+ __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_seq)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_v_seq);
+ __pyx_v_seq = __pyx_t_1;
+ __pyx_t_1 = 0;
+ }
+ __pyx_L3:;
- /* "pysam/csamtools.pyx":2376
- * src = self._delegate
+ /* "pysam/csamtools.pyx":2541
+ * seq = _force_bytes(seq)
*
- * l = len(seq) # <<<<<<<<<<<<<<
+ * src = self._delegate # <<<<<<<<<<<<<<
*
* # as the sequence is stored in half-bytes, the total length (sequence
*/
- __pyx_t_3 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_l = __pyx_t_3;
+ __pyx_t_4 = __pyx_v_self->_delegate;
+ __pyx_v_src = __pyx_t_4;
- /* "pysam/csamtools.pyx":2380
+ /* "pysam/csamtools.pyx":2545
* # as the sequence is stored in half-bytes, the total length (sequence
* # plus quality scores) is (l+1)/2 + l
* nbytes_new = (l+1)/2 + l # <<<<<<<<<<<<<<
* nbytes_old = (src.core.l_qseq+1)/2 + src.core.l_qseq
- * # acquire pointer to location in memory
+ *
*/
__pyx_v_nbytes_new = (__Pyx_div_long((__pyx_v_l + 1), 2) + __pyx_v_l);
- /* "pysam/csamtools.pyx":2381
+ /* "pysam/csamtools.pyx":2546
* # plus quality scores) is (l+1)/2 + l
* nbytes_new = (l+1)/2 + l
* nbytes_old = (src.core.l_qseq+1)/2 + src.core.l_qseq # <<<<<<<<<<<<<<
+ *
* # acquire pointer to location in memory
- * p = bam1_seq( src )
*/
__pyx_v_nbytes_old = (__Pyx_div_long((__pyx_v_src->core.l_qseq + 1), 2) + __pyx_v_src->core.l_qseq);
- /* "pysam/csamtools.pyx":2383
- * nbytes_old = (src.core.l_qseq+1)/2 + src.core.l_qseq
+ /* "pysam/csamtools.pyx":2549
+ *
* # acquire pointer to location in memory
* p = bam1_seq( src ) # <<<<<<<<<<<<<<
* src.core.l_qseq = l
*/
__pyx_v_p = bam1_seq(__pyx_v_src);
- /* "pysam/csamtools.pyx":2384
+ /* "pysam/csamtools.pyx":2550
* # acquire pointer to location in memory
* p = bam1_seq( src )
* src.core.l_qseq = l # <<<<<<<<<<<<<<
*
- * pysam_bam_update( src,
+ * # change length of data field
*/
__pyx_v_src->core.l_qseq = __pyx_v_l;
- /* "pysam/csamtools.pyx":2389
+ /* "pysam/csamtools.pyx":2556
* nbytes_old,
* nbytes_new,
* p) # <<<<<<<<<<<<<<
- * # re-acquire pointer to location in memory
- * # as it might have moved
+ *
+ * if l > 0:
*/
pysam_bam_update(__pyx_v_src, __pyx_v_nbytes_old, __pyx_v_nbytes_new, __pyx_v_p);
- /* "pysam/csamtools.pyx":2392
- * # re-acquire pointer to location in memory
- * # as it might have moved
- * p = bam1_seq( src ) # <<<<<<<<<<<<<<
- * for k from 0 <= k < nbytes_new: p[k] = 0
- * # convert to C string
+ /* "pysam/csamtools.pyx":2558
+ * p)
+ *
+ * if l > 0: # <<<<<<<<<<<<<<
+ * # re-acquire pointer to location in memory
+ * # as it might have moved
*/
- __pyx_v_p = bam1_seq(__pyx_v_src);
+ __pyx_t_2 = (__pyx_v_l > 0);
+ if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2393
- * # as it might have moved
- * p = bam1_seq( src )
- * for k from 0 <= k < nbytes_new: p[k] = 0 # <<<<<<<<<<<<<<
- * # convert to C string
- * s = seq
+ /* "pysam/csamtools.pyx":2561
+ * # re-acquire pointer to location in memory
+ * # as it might have moved
+ * p = bam1_seq( src ) # <<<<<<<<<<<<<<
+ * for k from 0 <= k < nbytes_new: p[k] = 0
+ * # convert to C string
*/
- __pyx_t_7 = __pyx_v_nbytes_new;
- for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_7; __pyx_v_k++) {
- (__pyx_v_p[__pyx_v_k]) = 0;
- }
+ __pyx_v_p = bam1_seq(__pyx_v_src);
- /* "pysam/csamtools.pyx":2395
- * for k from 0 <= k < nbytes_new: p[k] = 0
- * # convert to C string
- * s = seq # <<<<<<<<<<<<<<
- * for k from 0 <= k < l:
- * p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2)
+ /* "pysam/csamtools.pyx":2562
+ * # as it might have moved
+ * p = bam1_seq( src )
+ * for k from 0 <= k < nbytes_new: p[k] = 0 # <<<<<<<<<<<<<<
+ * # convert to C string
+ * s = seq
*/
- __pyx_t_8 = PyBytes_AsString(__pyx_v_seq); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_s = __pyx_t_8;
+ __pyx_t_5 = __pyx_v_nbytes_new;
+ for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
+ (__pyx_v_p[__pyx_v_k]) = 0;
+ }
- /* "pysam/csamtools.pyx":2396
- * # convert to C string
- * s = seq
- * for k from 0 <= k < l: # <<<<<<<<<<<<<<
- * p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2)
+ /* "pysam/csamtools.pyx":2564
+ * for k from 0 <= k < nbytes_new: p[k] = 0
+ * # convert to C string
+ * s = seq # <<<<<<<<<<<<<<
+ * for k from 0 <= k < l:
+ * p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2)
+ */
+ __pyx_t_6 = PyBytes_AsString(__pyx_v_seq); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_s = __pyx_t_6;
+
+ /* "pysam/csamtools.pyx":2565
+ * # convert to C string
+ * s = seq
+ * for k from 0 <= k < l: # <<<<<<<<<<<<<<
+ * p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2)
*
*/
- __pyx_t_7 = __pyx_v_l;
- for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_7; __pyx_v_k++) {
+ __pyx_t_5 = __pyx_v_l;
+ for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
- /* "pysam/csamtools.pyx":2397
- * s = seq
- * for k from 0 <= k < l:
- * p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2) # <<<<<<<<<<<<<<
+ /* "pysam/csamtools.pyx":2566
+ * s = seq
+ * for k from 0 <= k < l:
+ * p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2) # <<<<<<<<<<<<<<
*
- * # erase qualities
+ * # erase qualities
*/
- __pyx_t_9 = __Pyx_div_long(__pyx_v_k, 2);
- (__pyx_v_p[__pyx_t_9]) = ((__pyx_v_p[__pyx_t_9]) | (pysam_translate_sequence((__pyx_v_s[__pyx_v_k])) << (4 * (1 - __Pyx_mod_long(__pyx_v_k, 2)))));
- }
+ __pyx_t_7 = __Pyx_div_long(__pyx_v_k, 2);
+ (__pyx_v_p[__pyx_t_7]) = ((__pyx_v_p[__pyx_t_7]) | (pysam_translate_sequence((__pyx_v_s[__pyx_v_k])) << (4 * (1 - __Pyx_mod_long(__pyx_v_k, 2)))));
+ }
- /* "pysam/csamtools.pyx":2400
+ /* "pysam/csamtools.pyx":2569
*
- * # erase qualities
- * p = bam1_qual( src ) # <<<<<<<<<<<<<<
- * p[0] = 0xff
+ * # erase qualities
+ * p = bam1_qual( src ) # <<<<<<<<<<<<<<
+ * p[0] = 0xff
*
*/
- __pyx_v_p = bam1_qual(__pyx_v_src);
+ __pyx_v_p = bam1_qual(__pyx_v_src);
- /* "pysam/csamtools.pyx":2401
- * # erase qualities
- * p = bam1_qual( src )
- * p[0] = 0xff # <<<<<<<<<<<<<<
- *
+ /* "pysam/csamtools.pyx":2570
+ * # erase qualities
+ * p = bam1_qual( src )
+ * p[0] = 0xff # <<<<<<<<<<<<<<
*
+ * property qual:
*/
- (__pyx_v_p[0]) = 0xff;
+ (__pyx_v_p[0]) = 0xff;
+ goto __pyx_L4;
+ }
+ __pyx_L4:;
__pyx_r = 0;
goto __pyx_L0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2408
- *
- * In Python 3, this property is of type bytes and assigning a unicode string to it consisting of ASCII characters only will work, but is inefficient."""
+/* "pysam/csamtools.pyx":2587
+ * quality scores and the sequence are not the same.
+ * """
* def __get__(self): # <<<<<<<<<<<<<<
*
* cdef bam1_t * src
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2408);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2587);
- /* "pysam/csamtools.pyx":2413
+ /* "pysam/csamtools.pyx":2592
* cdef char * q
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2415
+ /* "pysam/csamtools.pyx":2594
* src = self._delegate
*
* if src.core.l_qseq == 0: return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2417
+ /* "pysam/csamtools.pyx":2596
* if src.core.l_qseq == 0: return None
*
* return get_qual_range(src, 0, src.core.l_qseq) # <<<<<<<<<<<<<<
* def __set__(self,qual):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = __pyx_f_5pysam_9csamtools_get_qual_range(__pyx_v_src, 0, __pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_5pysam_9csamtools_get_qual_range(__pyx_v_src, 0, __pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2419
+/* "pysam/csamtools.pyx":2598
* return get_qual_range(src, 0, src.core.l_qseq)
*
* def __set__(self,qual): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2419);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2598);
__Pyx_INCREF(__pyx_v_qual);
- /* "pysam/csamtools.pyx":2426
+ /* "pysam/csamtools.pyx":2605
* cdef int k
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2427
+ /* "pysam/csamtools.pyx":2606
*
* src = self._delegate
* p = bam1_qual( src ) # <<<<<<<<<<<<<<
*/
__pyx_v_p = bam1_qual(__pyx_v_src);
- /* "pysam/csamtools.pyx":2428
+ /* "pysam/csamtools.pyx":2607
* src = self._delegate
* p = bam1_qual( src )
* if qual == None or len(qual) == 0: # <<<<<<<<<<<<<<
* # if absent - set to 0xff
* p[0] = 0xff
*/
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_qual, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_qual, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (!__pyx_t_3) {
- __pyx_t_4 = PyObject_Length(__pyx_v_qual); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Length(__pyx_v_qual); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = (__pyx_t_4 == 0);
__pyx_t_6 = __pyx_t_5;
} else {
}
if (__pyx_t_6) {
- /* "pysam/csamtools.pyx":2430
+ /* "pysam/csamtools.pyx":2609
* if qual == None or len(qual) == 0:
* # if absent - set to 0xff
* p[0] = 0xff # <<<<<<<<<<<<<<
*/
(__pyx_v_p[0]) = 0xff;
- /* "pysam/csamtools.pyx":2431
+ /* "pysam/csamtools.pyx":2610
* # if absent - set to 0xff
* p[0] = 0xff
* return # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2432
+ /* "pysam/csamtools.pyx":2611
* p[0] = 0xff
* return
* qual = _force_bytes(qual) # <<<<<<<<<<<<<<
* cdef int l
* # convert to C string
*/
- __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_qual)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_qual)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_qual);
__pyx_v_qual = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":2435
+ /* "pysam/csamtools.pyx":2614
* cdef int l
* # convert to C string
* q = qual # <<<<<<<<<<<<<<
* l = len(qual)
* if src.core.l_qseq != l:
*/
- __pyx_t_7 = PyBytes_AsString(__pyx_v_qual); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyBytes_AsString(__pyx_v_qual); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_q = __pyx_t_7;
- /* "pysam/csamtools.pyx":2436
+ /* "pysam/csamtools.pyx":2615
* # convert to C string
* q = qual
* l = len(qual) # <<<<<<<<<<<<<<
* if src.core.l_qseq != l:
* raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
*/
- __pyx_t_4 = PyObject_Length(__pyx_v_qual); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Length(__pyx_v_qual); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_l = __pyx_t_4;
- /* "pysam/csamtools.pyx":2437
+ /* "pysam/csamtools.pyx":2616
* q = qual
* l = len(qual)
* if src.core.l_qseq != l: # <<<<<<<<<<<<<<
__pyx_t_6 = (__pyx_v_src->core.l_qseq != __pyx_v_l);
if (__pyx_t_6) {
- /* "pysam/csamtools.pyx":2438
+ /* "pysam/csamtools.pyx":2617
* l = len(qual)
* if src.core.l_qseq != l:
* raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq)) # <<<<<<<<<<<<<<
* assert src.core.l_qseq == l
* for k from 0 <= k < l:
*/
- __pyx_t_2 = PyInt_FromLong(__pyx_v_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_l); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = __Pyx_PyInt_to_py_int32_t(__pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyInt_to_py_int32_t(__pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_2 = 0;
__pyx_t_8 = 0;
- __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_140), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_148), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":2439
+ /* "pysam/csamtools.pyx":2618
* if src.core.l_qseq != l:
* raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
* assert src.core.l_qseq == l # <<<<<<<<<<<<<<
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!(__pyx_v_src->core.l_qseq == __pyx_v_l))) {
PyErr_SetNone(PyExc_AssertionError);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":2440
+ /* "pysam/csamtools.pyx":2619
* raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq))
* assert src.core.l_qseq == l
* for k from 0 <= k < l: # <<<<<<<<<<<<<<
__pyx_t_10 = __pyx_v_l;
for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_10; __pyx_v_k++) {
- /* "pysam/csamtools.pyx":2441
+ /* "pysam/csamtools.pyx":2620
* assert src.core.l_qseq == l
* for k from 0 <= k < l:
* p[k] = <uint8_t>q[k] - 33 # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2455
+/* "pysam/csamtools.pyx":2634
* were not considered for alignment may have been retained."""
*
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2455);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2634);
- /* "pysam/csamtools.pyx":2460
+ /* "pysam/csamtools.pyx":2639
* cdef char * s
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2462
+ /* "pysam/csamtools.pyx":2641
* src = self._delegate
*
* if src.core.l_qseq == 0: return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2464
+ /* "pysam/csamtools.pyx":2643
* if src.core.l_qseq == 0: return None
*
* start = query_start(src) # <<<<<<<<<<<<<<
* end = query_end(src)
*
*/
- __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_start = __pyx_t_3;
- /* "pysam/csamtools.pyx":2465
+ /* "pysam/csamtools.pyx":2644
*
* start = query_start(src)
* end = query_end(src) # <<<<<<<<<<<<<<
*
* return get_seq_range(src, start, end)
*/
- __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_end = __pyx_t_3;
- /* "pysam/csamtools.pyx":2467
+ /* "pysam/csamtools.pyx":2646
* end = query_end(src)
*
* return get_seq_range(src, start, end) # <<<<<<<<<<<<<<
* property qqual:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __pyx_f_5pysam_9csamtools_get_seq_range(__pyx_v_src, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_f_5pysam_9csamtools_get_seq_range(__pyx_v_src, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2473
+/* "pysam/csamtools.pyx":2652
*
* In Python 3, this property is of type bytes."""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2473);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2652);
- /* "pysam/csamtools.pyx":2477
+ /* "pysam/csamtools.pyx":2656
* cdef uint32_t start, end
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2479
+ /* "pysam/csamtools.pyx":2658
* src = self._delegate
*
* if src.core.l_qseq == 0: return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2481
+ /* "pysam/csamtools.pyx":2660
* if src.core.l_qseq == 0: return None
*
* start = query_start(src) # <<<<<<<<<<<<<<
* end = query_end(src)
*
*/
- __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_start = __pyx_t_3;
- /* "pysam/csamtools.pyx":2482
+ /* "pysam/csamtools.pyx":2661
*
* start = query_start(src)
* end = query_end(src) # <<<<<<<<<<<<<<
*
* return get_qual_range(src, start, end)
*/
- __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_end = __pyx_t_3;
- /* "pysam/csamtools.pyx":2484
+ /* "pysam/csamtools.pyx":2663
* end = query_end(src)
*
* return get_qual_range(src, start, end) # <<<<<<<<<<<<<<
* property qstart:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __pyx_f_5pysam_9csamtools_get_qual_range(__pyx_v_src, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_f_5pysam_9csamtools_get_qual_range(__pyx_v_src, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2488
+/* "pysam/csamtools.pyx":2667
* property qstart:
* """start index of the aligned query portion of the sequence (0-based, inclusive)"""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2488);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2667);
- /* "pysam/csamtools.pyx":2489
+ /* "pysam/csamtools.pyx":2668
* """start index of the aligned query portion of the sequence (0-based, inclusive)"""
* def __get__(self):
* return query_start(self._delegate) # <<<<<<<<<<<<<<
* property qend:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_self->_delegate); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_self->_delegate); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2493
+/* "pysam/csamtools.pyx":2672
* property qend:
* """end index of the aligned query portion of the sequence (0-based, exclusive)"""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2493);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2672);
- /* "pysam/csamtools.pyx":2494
+ /* "pysam/csamtools.pyx":2673
* """end index of the aligned query portion of the sequence (0-based, exclusive)"""
* def __get__(self):
* return query_end(self._delegate) # <<<<<<<<<<<<<<
* property qlen:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_self->_delegate); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_self->_delegate); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2498
+/* "pysam/csamtools.pyx":2677
* property qlen:
* """Length of the aligned query sequence"""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2498);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2677);
- /* "pysam/csamtools.pyx":2500
+ /* "pysam/csamtools.pyx":2679
* def __get__(self):
* cdef bam1_t * src
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2501
+ /* "pysam/csamtools.pyx":2680
* cdef bam1_t * src
* src = self._delegate
* return query_end(src)-query_start(src) # <<<<<<<<<<<<<<
* property tags:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = PyInt_FromLong((__pyx_t_2 - __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_5pysam_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_5pysam_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong((__pyx_t_2 - __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2518
+/* "pysam/csamtools.pyx":2697
* multiple times.
* """
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2518);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2697);
- /* "pysam/csamtools.pyx":2527
+ /* "pysam/csamtools.pyx":2706
* cdef int32_t nvalues
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2528
+ /* "pysam/csamtools.pyx":2707
*
* src = self._delegate
* if src.l_aux == 0: return [] # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_src->l_aux == 0);
if (__pyx_t_2) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((PyObject *)__pyx_t_3);
__pyx_t_3 = 0;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2529
+ /* "pysam/csamtools.pyx":2708
* src = self._delegate
* if src.l_aux == 0: return []
* s = bam1_aux( src ) # <<<<<<<<<<<<<<
*/
__pyx_v_s = bam1_aux(__pyx_v_src);
- /* "pysam/csamtools.pyx":2530
+ /* "pysam/csamtools.pyx":2709
* if src.l_aux == 0: return []
* s = bam1_aux( src )
* result = [] # <<<<<<<<<<<<<<
* auxtag[2] = 0
* while s < (src.data + src.data_len):
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_result = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2531
+ /* "pysam/csamtools.pyx":2710
* s = bam1_aux( src )
* result = []
* auxtag[2] = 0 # <<<<<<<<<<<<<<
*/
(__pyx_v_auxtag[2]) = 0;
- /* "pysam/csamtools.pyx":2532
+ /* "pysam/csamtools.pyx":2711
* result = []
* auxtag[2] = 0
* while s < (src.data + src.data_len): # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_s < (__pyx_v_src->data + __pyx_v_src->data_len));
if (!__pyx_t_2) break;
- /* "pysam/csamtools.pyx":2534
+ /* "pysam/csamtools.pyx":2713
* while s < (src.data + src.data_len):
* # get tag
* auxtag[0] = s[0] # <<<<<<<<<<<<<<
*/
(__pyx_v_auxtag[0]) = (__pyx_v_s[0]);
- /* "pysam/csamtools.pyx":2535
+ /* "pysam/csamtools.pyx":2714
* # get tag
* auxtag[0] = s[0]
* auxtag[1] = s[1] # <<<<<<<<<<<<<<
*/
(__pyx_v_auxtag[1]) = (__pyx_v_s[1]);
- /* "pysam/csamtools.pyx":2536
+ /* "pysam/csamtools.pyx":2715
* auxtag[0] = s[0]
* auxtag[1] = s[1]
* s += 2 # <<<<<<<<<<<<<<
*/
__pyx_v_s = (__pyx_v_s + 2);
- /* "pysam/csamtools.pyx":2537
+ /* "pysam/csamtools.pyx":2716
* auxtag[1] = s[1]
* s += 2
* auxtype = s[0] # <<<<<<<<<<<<<<
*/
__pyx_v_auxtype = (__pyx_v_s[0]);
- /* "pysam/csamtools.pyx":2538
+ /* "pysam/csamtools.pyx":2717
* s += 2
* auxtype = s[0]
* if auxtype in ('c', 'C'): # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_t_6;
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2539
+ /* "pysam/csamtools.pyx":2718
* auxtype = s[0]
* if auxtype in ('c', 'C'):
* value = <int>bam_aux2i(s) # <<<<<<<<<<<<<<
* s += 1
* elif auxtype in ('s', 'S'):
*/
- __pyx_t_3 = PyInt_FromLong(((int)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((int)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_value);
__pyx_v_value = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2540
+ /* "pysam/csamtools.pyx":2719
* if auxtype in ('c', 'C'):
* value = <int>bam_aux2i(s)
* s += 1 # <<<<<<<<<<<<<<
goto __pyx_L6;
}
- /* "pysam/csamtools.pyx":2541
+ /* "pysam/csamtools.pyx":2720
* value = <int>bam_aux2i(s)
* s += 1
* elif auxtype in ('s', 'S'): # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_t_5;
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2542
+ /* "pysam/csamtools.pyx":2721
* s += 1
* elif auxtype in ('s', 'S'):
* value = <int>bam_aux2i(s) # <<<<<<<<<<<<<<
* s += 2
* elif auxtype in ('i', 'I'):
*/
- __pyx_t_3 = PyInt_FromLong(((int)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((int)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_value);
__pyx_v_value = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2543
+ /* "pysam/csamtools.pyx":2722
* elif auxtype in ('s', 'S'):
* value = <int>bam_aux2i(s)
* s += 2 # <<<<<<<<<<<<<<
goto __pyx_L6;
}
- /* "pysam/csamtools.pyx":2544
+ /* "pysam/csamtools.pyx":2723
* value = <int>bam_aux2i(s)
* s += 2
* elif auxtype in ('i', 'I'): # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_t_6;
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2545
+ /* "pysam/csamtools.pyx":2724
* s += 2
* elif auxtype in ('i', 'I'):
* value = <int32_t>bam_aux2i(s) # <<<<<<<<<<<<<<
* s += 4
* elif auxtype == 'f':
*/
- __pyx_t_3 = __Pyx_PyInt_to_py_int32_t(((int32_t)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_to_py_int32_t(((int32_t)bam_aux2i(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_value);
__pyx_v_value = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2546
+ /* "pysam/csamtools.pyx":2725
* elif auxtype in ('i', 'I'):
* value = <int32_t>bam_aux2i(s)
* s += 4 # <<<<<<<<<<<<<<
goto __pyx_L6;
}
- /* "pysam/csamtools.pyx":2547
+ /* "pysam/csamtools.pyx":2726
* value = <int32_t>bam_aux2i(s)
* s += 4
* elif auxtype == 'f': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'f');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2548
+ /* "pysam/csamtools.pyx":2727
* s += 4
* elif auxtype == 'f':
* value = <float>bam_aux2f(s) # <<<<<<<<<<<<<<
* s += 4
* elif auxtype == 'd':
*/
- __pyx_t_3 = PyFloat_FromDouble(((float)bam_aux2f(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyFloat_FromDouble(((float)bam_aux2f(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_value);
__pyx_v_value = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2549
+ /* "pysam/csamtools.pyx":2728
* elif auxtype == 'f':
* value = <float>bam_aux2f(s)
* s += 4 # <<<<<<<<<<<<<<
goto __pyx_L6;
}
- /* "pysam/csamtools.pyx":2550
+ /* "pysam/csamtools.pyx":2729
* value = <float>bam_aux2f(s)
* s += 4
* elif auxtype == 'd': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'd');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2551
+ /* "pysam/csamtools.pyx":2730
* s += 4
* elif auxtype == 'd':
* value = <double>bam_aux2d(s) # <<<<<<<<<<<<<<
* s += 8
* elif auxtype == 'A':
*/
- __pyx_t_3 = PyFloat_FromDouble(((double)bam_aux2d(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyFloat_FromDouble(((double)bam_aux2d(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_value);
__pyx_v_value = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2552
+ /* "pysam/csamtools.pyx":2731
* elif auxtype == 'd':
* value = <double>bam_aux2d(s)
* s += 8 # <<<<<<<<<<<<<<
goto __pyx_L6;
}
- /* "pysam/csamtools.pyx":2553
+ /* "pysam/csamtools.pyx":2732
* value = <double>bam_aux2d(s)
* s += 8
* elif auxtype == 'A': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'A');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2554
+ /* "pysam/csamtools.pyx":2733
* s += 8
* elif auxtype == 'A':
* value = "%c" % <char>bam_aux2A(s) # <<<<<<<<<<<<<<
* s += 1
* elif auxtype in ('Z', 'H'):
*/
- __pyx_t_3 = PyInt_FromLong(((char)bam_aux2A(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((char)bam_aux2A(__pyx_v_s))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_141), __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_149), __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_v_value);
__pyx_v_value = ((PyObject *)__pyx_t_7);
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2555
+ /* "pysam/csamtools.pyx":2734
* elif auxtype == 'A':
* value = "%c" % <char>bam_aux2A(s)
* s += 1 # <<<<<<<<<<<<<<
goto __pyx_L6;
}
- /* "pysam/csamtools.pyx":2556
+ /* "pysam/csamtools.pyx":2735
* value = "%c" % <char>bam_aux2A(s)
* s += 1
* elif auxtype in ('Z', 'H'): # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_t_5;
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2557
+ /* "pysam/csamtools.pyx":2736
* s += 1
* elif auxtype in ('Z', 'H'):
* value = _charptr_to_str(<char*>bam_aux2Z(s)) # <<<<<<<<<<<<<<
* # +1 for NULL terminated string
* s += len(value) + 1
*/
- __pyx_t_7 = __pyx_f_5pysam_9csamtools__charptr_to_str(((char *)bam_aux2Z(__pyx_v_s))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __pyx_f_5pysam_9csamtools__charptr_to_str(((char *)bam_aux2Z(__pyx_v_s))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_v_value);
__pyx_v_value = __pyx_t_7;
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2559
+ /* "pysam/csamtools.pyx":2738
* value = _charptr_to_str(<char*>bam_aux2Z(s))
* # +1 for NULL terminated string
* s += len(value) + 1 # <<<<<<<<<<<<<<
* elif auxtype == 'B':
* s += 1
*/
- __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_s = (__pyx_v_s + (__pyx_t_8 + 1));
goto __pyx_L6;
}
- /* "pysam/csamtools.pyx":2560
+ /* "pysam/csamtools.pyx":2739
* # +1 for NULL terminated string
* s += len(value) + 1
* elif auxtype == 'B': # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_auxtype == 'B');
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2561
+ /* "pysam/csamtools.pyx":2740
* s += len(value) + 1
* elif auxtype == 'B':
* s += 1 # <<<<<<<<<<<<<<
*/
__pyx_v_s = (__pyx_v_s + 1);
- /* "pysam/csamtools.pyx":2562
+ /* "pysam/csamtools.pyx":2741
* elif auxtype == 'B':
* s += 1
* byte_size, nvalues, value = convertBinaryTagToList( s ) # <<<<<<<<<<<<<<
* # 5 for 1 char and 1 int
* s += 5 + ( nvalues * byte_size) - 1
*/
- __pyx_t_7 = __pyx_f_5pysam_9csamtools_convertBinaryTagToList(__pyx_v_s); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __pyx_f_5pysam_9csamtools_convertBinaryTagToList(__pyx_v_s); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
PyObject* sequence = __pyx_t_7;
if (unlikely(size != 3)) {
if (size > 3) __Pyx_RaiseTooManyValuesError(3);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_9);
__Pyx_INCREF(__pyx_t_10);
#else
- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
#endif
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
__Pyx_GOTREF(__pyx_t_9);
index = 2; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L7_unpacking_failed;
__Pyx_GOTREF(__pyx_t_10);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_12 = NULL;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
goto __pyx_L8_unpacking_done;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_12 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L8_unpacking_done:;
}
- __pyx_t_13 = __Pyx_PyInt_from_py_uint8_t(__pyx_t_3); if (unlikely((__pyx_t_13 == (uint8_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyInt_from_py_uint8_t(__pyx_t_3); if (unlikely((__pyx_t_13 == (uint8_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_14 = __Pyx_PyInt_from_py_int32_t(__pyx_t_9); if (unlikely((__pyx_t_14 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyInt_from_py_int32_t(__pyx_t_9); if (unlikely((__pyx_t_14 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_byte_size = __pyx_t_13;
__pyx_v_nvalues = __pyx_t_14;
__pyx_v_value = __pyx_t_10;
__pyx_t_10 = 0;
- /* "pysam/csamtools.pyx":2564
+ /* "pysam/csamtools.pyx":2743
* byte_size, nvalues, value = convertBinaryTagToList( s )
* # 5 for 1 char and 1 int
* s += 5 + ( nvalues * byte_size) - 1 # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "pysam/csamtools.pyx":2566
+ /* "pysam/csamtools.pyx":2745
* s += 5 + ( nvalues * byte_size) - 1
*
* s += 1 # <<<<<<<<<<<<<<
*/
__pyx_v_s = (__pyx_v_s + 1);
- /* "pysam/csamtools.pyx":2568
+ /* "pysam/csamtools.pyx":2747
* s += 1
*
* result.append( (_charptr_to_str(auxtag), value) ) # <<<<<<<<<<<<<<
*
* return result
*/
- __pyx_t_7 = __pyx_f_5pysam_9csamtools__charptr_to_str(__pyx_v_auxtag); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __pyx_f_5pysam_9csamtools__charptr_to_str(__pyx_v_auxtag); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- if (unlikely(!__pyx_v_value)) { __Pyx_RaiseUnboundLocalError("value"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_v_value)) { __Pyx_RaiseUnboundLocalError("value"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
__pyx_t_7 = 0;
- __pyx_t_15 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_10)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_10)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
}
- /* "pysam/csamtools.pyx":2570
+ /* "pysam/csamtools.pyx":2749
* result.append( (_charptr_to_str(auxtag), value) )
*
* return result # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2572
+/* "pysam/csamtools.pyx":2751
* return result
*
* def __set__(self, tags): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2572);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2751);
- /* "pysam/csamtools.pyx":2578
+ /* "pysam/csamtools.pyx":2757
* cdef char * temp
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2580
+ /* "pysam/csamtools.pyx":2759
* src = self._delegate
*
* fmts, args = ["<"], [] # <<<<<<<<<<<<<<
*
* if tags != None:
*/
- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_142));
- PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_142));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_142));
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_150));
+ PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_150));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_150));
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_fmts = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
__pyx_v_args = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2582
+ /* "pysam/csamtools.pyx":2761
* fmts, args = ["<"], []
*
* if tags != None: # <<<<<<<<<<<<<<
*
* # map samtools code to python.struct code and byte size
*/
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_tags, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_tags, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":2585
+ /* "pysam/csamtools.pyx":2764
*
* # map samtools code to python.struct code and byte size
* for pytag, value in tags: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_tags; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_tags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_tags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_6(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(__pyx_t_8);
#else
- __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
#endif
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
__Pyx_GOTREF(__pyx_t_7);
index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
__Pyx_GOTREF(__pyx_t_8);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_10 = NULL;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L7_unpacking_done;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_10 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L7_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_pytag);
__pyx_v_value = __pyx_t_8;
__pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":2586
+ /* "pysam/csamtools.pyx":2765
* # map samtools code to python.struct code and byte size
* for pytag, value in tags:
* if not type(pytag) is bytes: # <<<<<<<<<<<<<<
__pyx_t_11 = (!__pyx_t_4);
if (__pyx_t_11) {
- /* "pysam/csamtools.pyx":2587
+ /* "pysam/csamtools.pyx":2766
* for pytag, value in tags:
* if not type(pytag) is bytes:
* pytag = pytag.encode('ascii') # <<<<<<<<<<<<<<
* t = type(value)
*
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytag, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytag, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_143), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_151), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_pytag);
}
__pyx_L8:;
- /* "pysam/csamtools.pyx":2588
+ /* "pysam/csamtools.pyx":2767
* if not type(pytag) is bytes:
* pytag = pytag.encode('ascii')
* t = type(value) # <<<<<<<<<<<<<<
__Pyx_XDECREF(((PyObject *)__pyx_v_t));
__pyx_v_t = ((PyObject*)((PyObject *)Py_TYPE(__pyx_v_value)));
- /* "pysam/csamtools.pyx":2590
+ /* "pysam/csamtools.pyx":2769
* t = type(value)
*
* if t is tuple or t is list: # <<<<<<<<<<<<<<
}
if (__pyx_t_12) {
- /* "pysam/csamtools.pyx":2592
+ /* "pysam/csamtools.pyx":2771
* if t is tuple or t is list:
* # binary tags - treat separately
* pytype = 'B' # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_v_pytype);
__pyx_v_pytype = ((PyObject *)__pyx_n_s__B);
- /* "pysam/csamtools.pyx":2594
+ /* "pysam/csamtools.pyx":2773
* pytype = 'B'
* # get data type - first value determines type
* if type(value[0]) is float: # <<<<<<<<<<<<<<
* datafmt, datatype = "f", "f"
* else:
*/
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_value, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_value, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_12 = (((PyObject *)Py_TYPE(__pyx_t_8)) == ((PyObject *)((PyObject*)(&PyFloat_Type))));
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_12) {
- /* "pysam/csamtools.pyx":2595
+ /* "pysam/csamtools.pyx":2774
* # get data type - first value determines type
* if type(value[0]) is float:
* datafmt, datatype = "f", "f" # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":2597
+ /* "pysam/csamtools.pyx":2776
* datafmt, datatype = "f", "f"
* else:
* mi, ma = min(value), max(value) # <<<<<<<<<<<<<<
* absmax = max( abs(mi), abs(ma) )
* # signed ints
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_value);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
- __pyx_t_8 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_value);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
- __pyx_t_7 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_v_mi);
__pyx_v_ma = __pyx_t_7;
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2598
+ /* "pysam/csamtools.pyx":2777
* else:
* mi, ma = min(value), max(value)
* absmax = max( abs(mi), abs(ma) ) # <<<<<<<<<<<<<<
* # signed ints
* if mi < 0:
*/
- __pyx_t_7 = PyNumber_Absolute(__pyx_v_ma); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Absolute(__pyx_v_ma); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyNumber_Absolute(__pyx_v_mi); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Absolute(__pyx_v_mi); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_12) {
__Pyx_INCREF(__pyx_t_7);
__pyx_v_absmax = __pyx_t_7;
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2600
+ /* "pysam/csamtools.pyx":2779
* absmax = max( abs(mi), abs(ma) )
* # signed ints
* if mi < 0: # <<<<<<<<<<<<<<
* if mi >= -127: datafmt, datatype = "b", 'c'
* elif mi >= -32767: datafmt, datatype = "h", 's'
*/
- __pyx_t_7 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_12) {
- /* "pysam/csamtools.pyx":2601
+ /* "pysam/csamtools.pyx":2780
* # signed ints
* if mi < 0:
* if mi >= -127: datafmt, datatype = "b", 'c' # <<<<<<<<<<<<<<
* elif mi >= -32767: datafmt, datatype = "h", 's'
* elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
*/
- __pyx_t_7 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_12) {
__pyx_t_7 = ((PyObject *)__pyx_n_s__b);
goto __pyx_L12;
}
- /* "pysam/csamtools.pyx":2602
+ /* "pysam/csamtools.pyx":2781
* if mi < 0:
* if mi >= -127: datafmt, datatype = "b", 'c'
* elif mi >= -32767: datafmt, datatype = "h", 's' # <<<<<<<<<<<<<<
* elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
* else: datafmt, datatype = "i", 'i'
*/
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_mi, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_12) {
__pyx_t_2 = ((PyObject *)__pyx_n_s__h);
goto __pyx_L12;
}
- /* "pysam/csamtools.pyx":2603
+ /* "pysam/csamtools.pyx":2782
* if mi >= -127: datafmt, datatype = "b", 'c'
* elif mi >= -32767: datafmt, datatype = "h", 's'
* elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value ) # <<<<<<<<<<<<<<
* else: datafmt, datatype = "i", 'i'
*
*/
- __pyx_t_7 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_12) {
- __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_144), __pyx_v_value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_152), __pyx_v_value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_7));
__Pyx_GIVEREF(((PyObject *)__pyx_t_7));
__pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L12;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2604
+ /* "pysam/csamtools.pyx":2783
* elif mi >= -32767: datafmt, datatype = "h", 's'
* elif absmax < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
* else: datafmt, datatype = "i", 'i' # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":2608
+ /* "pysam/csamtools.pyx":2787
* # unsigned ints
* else:
* if absmax <= 255: datafmt, datatype = "B", 'C' # <<<<<<<<<<<<<<
* elif absmax <= 65535: datafmt, datatype = "H", 'S'
* elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
*/
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_12) {
__pyx_t_2 = ((PyObject *)__pyx_n_s__B);
goto __pyx_L13;
}
- /* "pysam/csamtools.pyx":2609
+ /* "pysam/csamtools.pyx":2788
* else:
* if absmax <= 255: datafmt, datatype = "B", 'C'
* elif absmax <= 65535: datafmt, datatype = "H", 'S' # <<<<<<<<<<<<<<
* elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
* else: datafmt, datatype = "I", 'I'
*/
- __pyx_t_7 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_12) {
__pyx_t_7 = ((PyObject *)__pyx_n_s__H);
goto __pyx_L13;
}
- /* "pysam/csamtools.pyx":2610
+ /* "pysam/csamtools.pyx":2789
* if absmax <= 255: datafmt, datatype = "B", 'C'
* elif absmax <= 65535: datafmt, datatype = "H", 'S'
* elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value ) # <<<<<<<<<<<<<<
* else: datafmt, datatype = "I", 'I'
*
*/
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_absmax, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_12) {
- __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_144), __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_152), __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_2));
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L13;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2611
+ /* "pysam/csamtools.pyx":2790
* elif absmax <= 65535: datafmt, datatype = "H", 'S'
* elif absmax > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
* else: datafmt, datatype = "I", 'I' # <<<<<<<<<<<<<<
}
__pyx_L10:;
- /* "pysam/csamtools.pyx":2613
+ /* "pysam/csamtools.pyx":2792
* else: datafmt, datatype = "I", 'I'
*
* datafmt = "2sccI%i%s" % (len(value), datafmt) # <<<<<<<<<<<<<<
* args.extend( [pytag[:2],
* pytype.encode('ascii'),
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_datafmt);
__Pyx_GIVEREF(__pyx_v_datafmt);
__pyx_t_7 = 0;
- __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_145), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_153), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_datafmt);
__pyx_v_datafmt = ((PyObject *)__pyx_t_7);
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2614
+ /* "pysam/csamtools.pyx":2793
*
* datafmt = "2sccI%i%s" % (len(value), datafmt)
* args.extend( [pytag[:2], # <<<<<<<<<<<<<<
* pytype.encode('ascii'),
* datatype.encode('ascii'),
*/
- __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_args), __pyx_n_s__extend); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_args), __pyx_n_s__extend); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- /* "pysam/csamtools.pyx":2617
+ /* "pysam/csamtools.pyx":2796
* pytype.encode('ascii'),
* datatype.encode('ascii'),
* len(value)] + list(value) ) # <<<<<<<<<<<<<<
* fmts.append( datafmt )
* continue
*/
- __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_pytag, 0, 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_pytag, 0, 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- /* "pysam/csamtools.pyx":2615
+ /* "pysam/csamtools.pyx":2794
* datafmt = "2sccI%i%s" % (len(value), datafmt)
* args.extend( [pytag[:2],
* pytype.encode('ascii'), # <<<<<<<<<<<<<<
* datatype.encode('ascii'),
* len(value)] + list(value) )
*/
- __pyx_t_8 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_146), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_154), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":2616
+ /* "pysam/csamtools.pyx":2795
* args.extend( [pytag[:2],
* pytype.encode('ascii'),
* datatype.encode('ascii'), # <<<<<<<<<<<<<<
* len(value)] + list(value) )
* fmts.append( datafmt )
*/
- __pyx_t_8 = PyObject_GetAttr(__pyx_v_datatype, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(__pyx_v_datatype, __pyx_n_s__encode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_14 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_147), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_155), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":2617
+ /* "pysam/csamtools.pyx":2796
* pytype.encode('ascii'),
* datatype.encode('ascii'),
* len(value)] + list(value) ) # <<<<<<<<<<<<<<
* fmts.append( datafmt )
* continue
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_15 = PyList_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyList_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_9 = 0;
__pyx_t_14 = 0;
__pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_value);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
- __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_t_15), __pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_t_15), __pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_t_8));
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":2618
+ /* "pysam/csamtools.pyx":2797
* datatype.encode('ascii'),
* len(value)] + list(value) )
* fmts.append( datafmt ) # <<<<<<<<<<<<<<
* continue
*
*/
- __pyx_t_16 = PyList_Append(__pyx_v_fmts, __pyx_v_datafmt); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyList_Append(__pyx_v_fmts, __pyx_v_datafmt); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":2619
+ /* "pysam/csamtools.pyx":2798
* len(value)] + list(value) )
* fmts.append( datafmt )
* continue # <<<<<<<<<<<<<<
}
__pyx_L9:;
- /* "pysam/csamtools.pyx":2621
+ /* "pysam/csamtools.pyx":2800
* continue
*
* if t is float: # <<<<<<<<<<<<<<
__pyx_t_12 = (__pyx_v_t == ((PyObject*)(&PyFloat_Type)));
if (__pyx_t_12) {
- /* "pysam/csamtools.pyx":2622
+ /* "pysam/csamtools.pyx":2801
*
* if t is float:
* fmt, pytype = "2scf", 'f' # <<<<<<<<<<<<<<
goto __pyx_L14;
}
- /* "pysam/csamtools.pyx":2623
+ /* "pysam/csamtools.pyx":2802
* if t is float:
* fmt, pytype = "2scf", 'f'
* elif t is int: # <<<<<<<<<<<<<<
__pyx_t_12 = (__pyx_v_t == ((PyObject*)(&PyInt_Type)));
if (__pyx_t_12) {
- /* "pysam/csamtools.pyx":2625
+ /* "pysam/csamtools.pyx":2804
* elif t is int:
* # negative values
* if value < 0: # <<<<<<<<<<<<<<
* if value >= -127: fmt, pytype = "2scb", 'c'
* elif value >= -32767: fmt, pytype = "2sch", 's'
*/
- __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_12) {
- /* "pysam/csamtools.pyx":2626
+ /* "pysam/csamtools.pyx":2805
* # negative values
* if value < 0:
* if value >= -127: fmt, pytype = "2scb", 'c' # <<<<<<<<<<<<<<
* elif value >= -32767: fmt, pytype = "2sch", 's'
* elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
*/
- __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_127, Py_GE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_12) {
__pyx_t_14 = ((PyObject *)__pyx_kp_s__2scb);
goto __pyx_L16;
}
- /* "pysam/csamtools.pyx":2627
+ /* "pysam/csamtools.pyx":2806
* if value < 0:
* if value >= -127: fmt, pytype = "2scb", 'c'
* elif value >= -32767: fmt, pytype = "2sch", 's' # <<<<<<<<<<<<<<
* elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
* else: fmt, pytype = "2sci", 'i'
*/
- __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_32767, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_12) {
__pyx_t_8 = ((PyObject *)__pyx_kp_s__2sch);
goto __pyx_L16;
}
- /* "pysam/csamtools.pyx":2628
+ /* "pysam/csamtools.pyx":2807
* if value >= -127: fmt, pytype = "2scb", 'c'
* elif value >= -32767: fmt, pytype = "2sch", 's'
* elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value ) # <<<<<<<<<<<<<<
* else: fmt, pytype = "2sci", 'i'
* # positive values
*/
- __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_neg_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_12) {
- __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_144), __pyx_v_value); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_152), __pyx_v_value); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_14));
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_14));
__Pyx_GIVEREF(((PyObject *)__pyx_t_14));
__pyx_t_14 = 0;
- __pyx_t_14 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_14, 0, 0, 0);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L16;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2629
+ /* "pysam/csamtools.pyx":2808
* elif value >= -32767: fmt, pytype = "2sch", 's'
* elif value < -2147483648: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
* else: fmt, pytype = "2sci", 'i' # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":2632
+ /* "pysam/csamtools.pyx":2811
* # positive values
* else:
* if value <= 255: fmt, pytype = "2scB", 'C' # <<<<<<<<<<<<<<
* elif value <= 65535: fmt, pytype = "2scH", 'S'
* elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
*/
- __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_int_255, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_12) {
__pyx_t_8 = ((PyObject *)__pyx_kp_s__2scB);
goto __pyx_L17;
}
- /* "pysam/csamtools.pyx":2633
+ /* "pysam/csamtools.pyx":2812
* else:
* if value <= 255: fmt, pytype = "2scB", 'C'
* elif value <= 65535: fmt, pytype = "2scH", 'S' # <<<<<<<<<<<<<<
* elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
* else: fmt, pytype = "2scI", 'I'
*/
- __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_RichCompare(__pyx_v_value, __pyx_int_65535, Py_LE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_12) {
__pyx_t_14 = ((PyObject *)__pyx_kp_s__2scH);
goto __pyx_L17;
}
- /* "pysam/csamtools.pyx":2634
+ /* "pysam/csamtools.pyx":2813
* if value <= 255: fmt, pytype = "2scB", 'C'
* elif value <= 65535: fmt, pytype = "2scH", 'S'
* elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value ) # <<<<<<<<<<<<<<
* else: fmt, pytype = "2scI", 'I'
* else:
*/
- __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_value, __pyx_int_4294967295, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_12) {
- __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_144), __pyx_v_value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_152), __pyx_v_value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
- __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_t_8));
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L17;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2635
+ /* "pysam/csamtools.pyx":2814
* elif value <= 65535: fmt, pytype = "2scH", 'S'
* elif value > 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value )
* else: fmt, pytype = "2scI", 'I' # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":2638
+ /* "pysam/csamtools.pyx":2817
* else:
* # Note: hex strings (H) are not supported yet
* if t is not bytes: # <<<<<<<<<<<<<<
__pyx_t_12 = (__pyx_v_t != ((PyObject*)(&PyBytes_Type)));
if (__pyx_t_12) {
- /* "pysam/csamtools.pyx":2639
+ /* "pysam/csamtools.pyx":2818
* # Note: hex strings (H) are not supported yet
* if t is not bytes:
* value = value.encode('ascii') # <<<<<<<<<<<<<<
* if len(value) == 1:
* fmt, pytype = "2scc", 'A'
*/
- __pyx_t_14 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__encode); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__encode); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_8 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_k_tuple_148), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_k_tuple_156), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_v_value);
}
__pyx_L18:;
- /* "pysam/csamtools.pyx":2640
+ /* "pysam/csamtools.pyx":2819
* if t is not bytes:
* value = value.encode('ascii')
* if len(value) == 1: # <<<<<<<<<<<<<<
* fmt, pytype = "2scc", 'A'
* else:
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_12 = (__pyx_t_13 == 1);
if (__pyx_t_12) {
- /* "pysam/csamtools.pyx":2641
+ /* "pysam/csamtools.pyx":2820
* value = value.encode('ascii')
* if len(value) == 1:
* fmt, pytype = "2scc", 'A' # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":2643
+ /* "pysam/csamtools.pyx":2822
* fmt, pytype = "2scc", 'A'
* else:
* fmt, pytype = "2sc%is" % (len(value)+1), 'Z' # <<<<<<<<<<<<<<
*
* args.extend( [pytag[:2],
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_14 = PyInt_FromSsize_t((__pyx_t_13 + 1)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyInt_FromSsize_t((__pyx_t_13 + 1)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_149), __pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_157), __pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__pyx_t_14 = ((PyObject *)__pyx_n_s__Z);
}
__pyx_L14:;
- /* "pysam/csamtools.pyx":2645
+ /* "pysam/csamtools.pyx":2824
* fmt, pytype = "2sc%is" % (len(value)+1), 'Z'
*
* args.extend( [pytag[:2], # <<<<<<<<<<<<<<
* pytype.encode('ascii'),
* value ] )
*/
- __pyx_t_14 = PyObject_GetAttr(((PyObject *)__pyx_v_args), __pyx_n_s__extend); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_GetAttr(((PyObject *)__pyx_v_args), __pyx_n_s__extend); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_pytag, 0, 2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_pytag, 0, 2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- /* "pysam/csamtools.pyx":2646
+ /* "pysam/csamtools.pyx":2825
*
* args.extend( [pytag[:2],
* pytype.encode('ascii'), # <<<<<<<<<<<<<<
* value ] )
*
*/
- __pyx_t_7 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__encode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_s__encode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_15 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_150), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_158), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2647
+ /* "pysam/csamtools.pyx":2826
* args.extend( [pytag[:2],
* pytype.encode('ascii'),
* value ] ) # <<<<<<<<<<<<<<
*
* fmts.append( fmt )
*/
- __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_v_value);
__pyx_t_8 = 0;
__pyx_t_15 = 0;
- __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_t_7));
__Pyx_GIVEREF(((PyObject *)__pyx_t_7));
__pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2649
+ /* "pysam/csamtools.pyx":2828
* value ] )
*
* fmts.append( fmt ) # <<<<<<<<<<<<<<
*
* fmt = "".join(fmts)
*/
- __pyx_t_16 = PyList_Append(__pyx_v_fmts, __pyx_v_fmt); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyList_Append(__pyx_v_fmts, __pyx_v_fmt); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L4_continue:;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2651
+ /* "pysam/csamtools.pyx":2830
* fmts.append( fmt )
*
* fmt = "".join(fmts) # <<<<<<<<<<<<<<
* total_size = struct.calcsize(fmt)
* buffer = ctypes.create_string_buffer(total_size)
*/
- __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_16), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_16), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(((PyObject *)__pyx_v_fmts));
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_fmts));
__Pyx_GIVEREF(((PyObject *)__pyx_v_fmts));
- __pyx_t_15 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__pyx_v_fmt = __pyx_t_15;
__pyx_t_15 = 0;
- /* "pysam/csamtools.pyx":2652
+ /* "pysam/csamtools.pyx":2831
*
* fmt = "".join(fmts)
* total_size = struct.calcsize(fmt) # <<<<<<<<<<<<<<
* buffer = ctypes.create_string_buffer(total_size)
* struct.pack_into( fmt,
*/
- __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__struct); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__struct); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_7 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__calcsize); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__calcsize); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(__pyx_v_fmt);
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_fmt);
__Pyx_GIVEREF(__pyx_v_fmt);
- __pyx_t_3 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
__pyx_v_total_size = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2653
+ /* "pysam/csamtools.pyx":2832
* fmt = "".join(fmts)
* total_size = struct.calcsize(fmt)
* buffer = ctypes.create_string_buffer(total_size) # <<<<<<<<<<<<<<
* struct.pack_into( fmt,
* buffer,
*/
- __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_15 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s_151); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s_159); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_total_size);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_total_size);
__Pyx_GIVEREF(__pyx_v_total_size);
- __pyx_t_7 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__pyx_v_buffer = __pyx_t_7;
__pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2654
+ /* "pysam/csamtools.pyx":2833
* total_size = struct.calcsize(fmt)
* buffer = ctypes.create_string_buffer(total_size)
* struct.pack_into( fmt, # <<<<<<<<<<<<<<
* buffer,
* 0,
*/
- __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__struct); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__struct); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__pack_into); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__pack_into); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "pysam/csamtools.pyx":2655
+ /* "pysam/csamtools.pyx":2834
* buffer = ctypes.create_string_buffer(total_size)
* struct.pack_into( fmt,
* buffer, # <<<<<<<<<<<<<<
* 0,
* *args )
*/
- __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_fmt);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_fmt);
PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
- /* "pysam/csamtools.pyx":2657
+ /* "pysam/csamtools.pyx":2836
* buffer,
* 0,
* *args ) # <<<<<<<<<<<<<<
*
* # delete the old data and allocate new space.
*/
- __pyx_t_15 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PySequence_Tuple(((PyObject *)__pyx_v_args)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_15));
- __pyx_t_14 = PyNumber_Add(((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyNumber_Add(((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_14));
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
- __pyx_t_15 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2664
+ /* "pysam/csamtools.pyx":2843
* pysam_bam_update( src,
* src.l_aux,
* total_size, # <<<<<<<<<<<<<<
* bam1_aux( src ) )
*
*/
- if (unlikely(!__pyx_v_total_size)) { __Pyx_RaiseUnboundLocalError("total_size"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_total_size); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_v_total_size)) { __Pyx_RaiseUnboundLocalError("total_size"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_total_size); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":2665
+ /* "pysam/csamtools.pyx":2844
* src.l_aux,
* total_size,
* bam1_aux( src ) ) # <<<<<<<<<<<<<<
*/
pysam_bam_update(__pyx_v_src, __pyx_v_src->l_aux, __pyx_t_17, bam1_aux(__pyx_v_src));
- /* "pysam/csamtools.pyx":2667
+ /* "pysam/csamtools.pyx":2846
* bam1_aux( src ) )
*
* src.l_aux = total_size # <<<<<<<<<<<<<<
*
* # copy data only if there is any
*/
- __pyx_t_18 = __Pyx_PyInt_AsInt(__pyx_v_total_size); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyInt_AsInt(__pyx_v_total_size); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_src->l_aux = __pyx_t_18;
- /* "pysam/csamtools.pyx":2670
+ /* "pysam/csamtools.pyx":2849
*
* # copy data only if there is any
* if total_size != 0: # <<<<<<<<<<<<<<
*
* # get location of new data
*/
- __pyx_t_15 = PyObject_RichCompare(__pyx_v_total_size, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_RichCompare(__pyx_v_total_size, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (__pyx_t_12) {
- /* "pysam/csamtools.pyx":2673
+ /* "pysam/csamtools.pyx":2852
*
* # get location of new data
* s = bam1_aux( src ) # <<<<<<<<<<<<<<
*/
__pyx_v_s = bam1_aux(__pyx_v_src);
- /* "pysam/csamtools.pyx":2676
+ /* "pysam/csamtools.pyx":2855
*
* # check if there is direct path from buffer.raw to tmp
* p = buffer.raw # <<<<<<<<<<<<<<
* # create handle to make sure buffer stays alive long
* # enough for memcpy, see issue 129
*/
- if (unlikely(!__pyx_v_buffer)) { __Pyx_RaiseUnboundLocalError("buffer"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_15 = PyObject_GetAttr(__pyx_v_buffer, __pyx_n_s__raw); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_v_buffer)) { __Pyx_RaiseUnboundLocalError("buffer"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_15 = PyObject_GetAttr(__pyx_v_buffer, __pyx_n_s__raw); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__pyx_v_p = __pyx_t_15;
__pyx_t_15 = 0;
- /* "pysam/csamtools.pyx":2679
+ /* "pysam/csamtools.pyx":2858
* # create handle to make sure buffer stays alive long
* # enough for memcpy, see issue 129
* temp = p # <<<<<<<<<<<<<<
* memcpy( s, temp, total_size )
*
*/
- __pyx_t_19 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_19 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_temp = __pyx_t_19;
- /* "pysam/csamtools.pyx":2680
+ /* "pysam/csamtools.pyx":2859
* # enough for memcpy, see issue 129
* temp = p
* memcpy( s, temp, total_size ) # <<<<<<<<<<<<<<
*
* property flag:
*/
- __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_total_size); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = __Pyx_PyInt_AsSize_t(__pyx_v_total_size); if (unlikely((__pyx_t_17 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
memcpy(__pyx_v_s, __pyx_v_temp, __pyx_t_17);
goto __pyx_L20;
}
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2684
+/* "pysam/csamtools.pyx":2863
* property flag:
* """properties flag"""
* def __get__(self): return self._delegate.core.flag # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2684);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2863);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_delegate->core.flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_delegate->core.flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2685
+/* "pysam/csamtools.pyx":2864
* """properties flag"""
* def __get__(self): return self._delegate.core.flag
* def __set__(self, flag): self._delegate.core.flag = flag # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2685);
- __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_flag); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2864);
+ __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_flag); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.flag = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2703
+/* "pysam/csamtools.pyx":2882
*
* """
* def __get__(self): return self._delegate.core.tid # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2703);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2882);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2704
+/* "pysam/csamtools.pyx":2883
* """
* def __get__(self): return self._delegate.core.tid
* def __set__(self, tid): self._delegate.core.tid = tid # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2704);
- __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_tid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2883);
+ __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_tid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.tid = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2717
+/* "pysam/csamtools.pyx":2896
*
* """
* def __get__(self): return self._delegate.core.tid # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2717);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2896);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2718
+/* "pysam/csamtools.pyx":2897
* """
* def __get__(self): return self._delegate.core.tid
* def __set__(self, tid): self._delegate.core.tid = tid # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2718);
- __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_tid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2897);
+ __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_tid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.tid = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2722
+/* "pysam/csamtools.pyx":2901
* property pos:
* """0-based leftmost coordinate"""
* def __get__(self): return self._delegate.core.pos # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2722);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2901);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2723
+/* "pysam/csamtools.pyx":2902
* """0-based leftmost coordinate"""
* def __get__(self): return self._delegate.core.pos
* def __set__(self, pos): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2723);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2902);
- /* "pysam/csamtools.pyx":2726
+ /* "pysam/csamtools.pyx":2905
* ## setting the cigar string also updates the "bin" attribute
* cdef bam1_t * src
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2727
+ /* "pysam/csamtools.pyx":2906
* cdef bam1_t * src
* src = self._delegate
* if src.core.n_cigar: # <<<<<<<<<<<<<<
*/
if (__pyx_v_src->core.n_cigar) {
- /* "pysam/csamtools.pyx":2728
+ /* "pysam/csamtools.pyx":2907
* src = self._delegate
* if src.core.n_cigar:
* src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, bam1_cigar(src)) ) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":2730
+ /* "pysam/csamtools.pyx":2909
* src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, bam1_cigar(src)) )
* else:
* src.core.bin = bam_reg2bin( src.core.pos, src.core.pos + 1) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2731
+ /* "pysam/csamtools.pyx":2910
* else:
* src.core.bin = bam_reg2bin( src.core.pos, src.core.pos + 1)
* self._delegate.core.pos = pos # <<<<<<<<<<<<<<
* property bin:
* """properties bin"""
*/
- __pyx_t_2 = __Pyx_PyInt_from_py_int32_t(__pyx_v_pos); if (unlikely((__pyx_t_2 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_from_py_int32_t(__pyx_v_pos); if (unlikely((__pyx_t_2 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.pos = __pyx_t_2;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2734
+/* "pysam/csamtools.pyx":2913
* property bin:
* """properties bin"""
* def __get__(self): return self._delegate.core.bin # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2734);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2913);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_delegate->core.bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_delegate->core.bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2735
+/* "pysam/csamtools.pyx":2914
* """properties bin"""
* def __get__(self): return self._delegate.core.bin
* def __set__(self, bin): self._delegate.core.bin = bin # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2735);
- __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_bin); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2914);
+ __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_bin); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.bin = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2738
+/* "pysam/csamtools.pyx":2917
* property rlen:
* '''length of the read (read only). Returns 0 if not given.'''
* def __get__(self): return self._delegate.core.l_qseq # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2738);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2917);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.l_qseq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.l_qseq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2744
+/* "pysam/csamtools.pyx":2923
* aend points to one past the last aligned residue.
* Returns None if not available.'''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2744);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2923);
- /* "pysam/csamtools.pyx":2746
+ /* "pysam/csamtools.pyx":2925
* def __get__(self):
* cdef bam1_t * src
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2747
+ /* "pysam/csamtools.pyx":2926
* cdef bam1_t * src
* src = self._delegate
* if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0: # <<<<<<<<<<<<<<
* return None
* return bam_calend(&src.core, bam1_cigar(src))
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_And(__pyx_t_2, __pyx_int_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_And(__pyx_t_2, __pyx_int_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (!__pyx_t_4) {
__pyx_t_5 = (__pyx_v_src->core.n_cigar == 0);
}
if (__pyx_t_6) {
- /* "pysam/csamtools.pyx":2748
+ /* "pysam/csamtools.pyx":2927
* src = self._delegate
* if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
* return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2749
+ /* "pysam/csamtools.pyx":2928
* if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
* return None
* return bam_calend(&src.core, bam1_cigar(src)) # <<<<<<<<<<<<<<
* property alen:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(bam_calend((&__pyx_v_src->core), bam1_cigar(__pyx_v_src))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(bam_calend((&__pyx_v_src->core), bam1_cigar(__pyx_v_src))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2754
+/* "pysam/csamtools.pyx":2933
* '''aligned length of the read on the reference genome. Returns None if
* not available.'''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2754);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2933);
- /* "pysam/csamtools.pyx":2756
+ /* "pysam/csamtools.pyx":2935
* def __get__(self):
* cdef bam1_t * src
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2757
+ /* "pysam/csamtools.pyx":2936
* cdef bam1_t * src
* src = self._delegate
* if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0: # <<<<<<<<<<<<<<
* return None
* return bam_calend(&src.core,
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_And(__pyx_t_2, __pyx_int_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_And(__pyx_t_2, __pyx_int_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (!__pyx_t_4) {
__pyx_t_5 = (__pyx_v_src->core.n_cigar == 0);
}
if (__pyx_t_6) {
- /* "pysam/csamtools.pyx":2758
+ /* "pysam/csamtools.pyx":2937
* src = self._delegate
* if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
* return None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2759
+ /* "pysam/csamtools.pyx":2938
* if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0:
* return None
* return bam_calend(&src.core, # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- /* "pysam/csamtools.pyx":2761
+ /* "pysam/csamtools.pyx":2940
* return bam_calend(&src.core,
* bam1_cigar(src)) - \
* self._delegate.core.pos # <<<<<<<<<<<<<<
*
* property mapq:
*/
- __pyx_t_3 = PyInt_FromLong((bam_calend((&__pyx_v_src->core), bam1_cigar(__pyx_v_src)) - __pyx_v_self->_delegate->core.pos)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong((bam_calend((&__pyx_v_src->core), bam1_cigar(__pyx_v_src)) - __pyx_v_self->_delegate->core.pos)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2765
+/* "pysam/csamtools.pyx":2944
* property mapq:
* """mapping quality"""
* def __get__(self): return self._delegate.core.qual # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2765);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2944);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_delegate->core.qual); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_delegate->core.qual); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2766
+/* "pysam/csamtools.pyx":2945
* """mapping quality"""
* def __get__(self): return self._delegate.core.qual
* def __set__(self, qual): self._delegate.core.qual = qual # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2766);
- __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_qual); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2945);
+ __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_qual); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.qual = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2772
+/* "pysam/csamtools.pyx":2951
* deprecated, use RNEXT instead.
* """
* def __get__(self): return self._delegate.core.mtid # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2772);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2951);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mtid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mtid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2773
+/* "pysam/csamtools.pyx":2952
* """
* def __get__(self): return self._delegate.core.mtid
* def __set__(self, mtid): self._delegate.core.mtid = mtid # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2773);
- __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mtid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2952);
+ __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mtid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.mtid = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2776
+/* "pysam/csamtools.pyx":2955
* property rnext:
* """the :term:`reference` id of the mate """
* def __get__(self): return self._delegate.core.mtid # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2776);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2955);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mtid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mtid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2777
+/* "pysam/csamtools.pyx":2956
* """the :term:`reference` id of the mate """
* def __get__(self): return self._delegate.core.mtid
* def __set__(self, mtid): self._delegate.core.mtid = mtid # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2777);
- __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mtid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2956);
+ __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mtid); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.mtid = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2781
+/* "pysam/csamtools.pyx":2960
* """the position of the mate
* deprecated, use PNEXT instead."""
* def __get__(self): return self._delegate.core.mpos # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2781);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2960);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2782
+/* "pysam/csamtools.pyx":2961
* deprecated, use PNEXT instead."""
* def __get__(self): return self._delegate.core.mpos
* def __set__(self, mpos): self._delegate.core.mpos = mpos # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2782);
- __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mpos); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2961);
+ __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mpos); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.mpos = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2785
+/* "pysam/csamtools.pyx":2964
* property pnext:
* """the position of the mate"""
* def __get__(self): return self._delegate.core.mpos # <<<<<<<<<<<<<<
* def __set__(self, mpos): self._delegate.core.mpos = mpos
- * property isize:
+ * #######################################################################
*/
static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_5pnext___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2785);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2964);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.mpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2786
+/* "pysam/csamtools.pyx":2965
* """the position of the mate"""
* def __get__(self): return self._delegate.core.mpos
* def __set__(self, mpos): self._delegate.core.mpos = mpos # <<<<<<<<<<<<<<
- * property isize:
- * """the insert size
+ * #######################################################################
+ * #######################################################################
*/
static int __pyx_pf_5pysam_9csamtools_11AlignedRead_5pnext_2__set__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self, PyObject *__pyx_v_mpos) {
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2786);
- __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mpos); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2965);
+ __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_mpos); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.mpos = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2790
+/* "pysam/csamtools.pyx":2973
* """the insert size
* deprecated: use tlen instead"""
* def __get__(self): return self._delegate.core.isize # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2790);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2973);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.isize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.isize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2791
+/* "pysam/csamtools.pyx":2974
* deprecated: use tlen instead"""
* def __get__(self): return self._delegate.core.isize
* def __set__(self, isize): self._delegate.core.isize = isize # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2791);
- __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_isize); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2974);
+ __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_isize); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.isize = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2794
+/* "pysam/csamtools.pyx":2977
* property tlen:
* """the insert size"""
* def __get__(self): return self._delegate.core.isize # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2794);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2977);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.isize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_delegate->core.isize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2795
+/* "pysam/csamtools.pyx":2978
* """the insert size"""
* def __get__(self): return self._delegate.core.isize
* def __set__(self, isize): self._delegate.core.isize = isize # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2795);
- __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_isize); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2978);
+ __pyx_t_1 = __Pyx_PyInt_from_py_int32_t(__pyx_v_isize); if (unlikely((__pyx_t_1 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->_delegate->core.isize = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2798
+/* "pysam/csamtools.pyx":2981
* property is_paired:
* """true if read is paired in sequencing"""
* def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2798);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2981);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->_delegate->core.flag & 1) != 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->_delegate->core.flag & 1) != 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2799
+/* "pysam/csamtools.pyx":2982
* """true if read is paired in sequencing"""
* def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2799);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2982);
- /* "pysam/csamtools.pyx":2800
+ /* "pysam/csamtools.pyx":2983
* def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FPAIRED # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FPAIRED
* property is_proper_pair:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 1);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2801
+ /* "pysam/csamtools.pyx":2984
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FPAIRED
* else: self._delegate.core.flag &= ~BAM_FPAIRED # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2804
+/* "pysam/csamtools.pyx":2987
* property is_proper_pair:
* """true if read is mapped in a proper pair"""
* def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2804);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2987);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2805
+/* "pysam/csamtools.pyx":2988
* """true if read is mapped in a proper pair"""
* def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2805);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2988);
- /* "pysam/csamtools.pyx":2806
+ /* "pysam/csamtools.pyx":2989
* def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FPROPER_PAIR # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FPROPER_PAIR
* property is_unmapped:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 2);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2807
+ /* "pysam/csamtools.pyx":2990
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FPROPER_PAIR
* else: self._delegate.core.flag &= ~BAM_FPROPER_PAIR # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2810
+/* "pysam/csamtools.pyx":2993
* property is_unmapped:
* """true if read itself is unmapped"""
* def __get__(self): return (self.flag & BAM_FUNMAP) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2810);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2993);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2811
+/* "pysam/csamtools.pyx":2994
* """true if read itself is unmapped"""
* def __get__(self): return (self.flag & BAM_FUNMAP) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2811);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 2994);
- /* "pysam/csamtools.pyx":2812
+ /* "pysam/csamtools.pyx":2995
* def __get__(self): return (self.flag & BAM_FUNMAP) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FUNMAP # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FUNMAP
* property mate_is_unmapped:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 4);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2813
+ /* "pysam/csamtools.pyx":2996
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FUNMAP
* else: self._delegate.core.flag &= ~BAM_FUNMAP # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2816
+/* "pysam/csamtools.pyx":2999
* property mate_is_unmapped:
* """true if the mate is unmapped"""
* def __get__(self): return (self.flag & BAM_FMUNMAP) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2816);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 2999);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2817
+/* "pysam/csamtools.pyx":3000
* """true if the mate is unmapped"""
* def __get__(self): return (self.flag & BAM_FMUNMAP) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2817);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 3000);
- /* "pysam/csamtools.pyx":2818
+ /* "pysam/csamtools.pyx":3001
* def __get__(self): return (self.flag & BAM_FMUNMAP) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FMUNMAP # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FMUNMAP
* property is_reverse:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 8);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2819
+ /* "pysam/csamtools.pyx":3002
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FMUNMAP
* else: self._delegate.core.flag &= ~BAM_FMUNMAP # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2822
+/* "pysam/csamtools.pyx":3005
* property is_reverse:
* """true if read is mapped to reverse strand"""
* def __get__(self): return (self.flag & BAM_FREVERSE) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2822);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3005);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2823
+/* "pysam/csamtools.pyx":3006
* """true if read is mapped to reverse strand"""
* def __get__(self): return (self.flag & BAM_FREVERSE) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2823);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 3006);
- /* "pysam/csamtools.pyx":2824
+ /* "pysam/csamtools.pyx":3007
* def __get__(self): return (self.flag & BAM_FREVERSE) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FREVERSE # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FREVERSE
* property mate_is_reverse:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 16);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2825
+ /* "pysam/csamtools.pyx":3008
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FREVERSE
* else: self._delegate.core.flag &= ~BAM_FREVERSE # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2828
+/* "pysam/csamtools.pyx":3011
* property mate_is_reverse:
* """true is read is mapped to reverse strand"""
* def __get__(self): return (self.flag & BAM_FMREVERSE) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2828);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3011);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2829
+/* "pysam/csamtools.pyx":3012
* """true is read is mapped to reverse strand"""
* def __get__(self): return (self.flag & BAM_FMREVERSE) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2829);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 3012);
- /* "pysam/csamtools.pyx":2830
+ /* "pysam/csamtools.pyx":3013
* def __get__(self): return (self.flag & BAM_FMREVERSE) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FMREVERSE # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FMREVERSE
* property is_read1:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 32);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2831
+ /* "pysam/csamtools.pyx":3014
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FMREVERSE
* else: self._delegate.core.flag &= ~BAM_FMREVERSE # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2834
+/* "pysam/csamtools.pyx":3017
* property is_read1:
* """true if this is read1"""
* def __get__(self): return (self.flag & BAM_FREAD1) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2834);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3017);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2835
+/* "pysam/csamtools.pyx":3018
* """true if this is read1"""
* def __get__(self): return (self.flag & BAM_FREAD1) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2835);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 3018);
- /* "pysam/csamtools.pyx":2836
+ /* "pysam/csamtools.pyx":3019
* def __get__(self): return (self.flag & BAM_FREAD1) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FREAD1 # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FREAD1
* property is_read2:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 64);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2837
+ /* "pysam/csamtools.pyx":3020
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FREAD1
* else: self._delegate.core.flag &= ~BAM_FREAD1 # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2840
+/* "pysam/csamtools.pyx":3023
* property is_read2:
* """true if this is read2"""
* def __get__(self): return (self.flag & BAM_FREAD2) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2840);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3023);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_128); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_128); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2841
+/* "pysam/csamtools.pyx":3024
* """true if this is read2"""
* def __get__(self): return (self.flag & BAM_FREAD2) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2841);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 3024);
- /* "pysam/csamtools.pyx":2842
+ /* "pysam/csamtools.pyx":3025
* def __get__(self): return (self.flag & BAM_FREAD2) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FREAD2 # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FREAD2
* property is_secondary:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 128);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2843
+ /* "pysam/csamtools.pyx":3026
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FREAD2
* else: self._delegate.core.flag &= ~BAM_FREAD2 # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2846
+/* "pysam/csamtools.pyx":3029
* property is_secondary:
* """true if not primary alignment"""
* def __get__(self): return (self.flag & BAM_FSECONDARY) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2846);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3029);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_256); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_256); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2847
+/* "pysam/csamtools.pyx":3030
* """true if not primary alignment"""
* def __get__(self): return (self.flag & BAM_FSECONDARY) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2847);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 3030);
- /* "pysam/csamtools.pyx":2848
+ /* "pysam/csamtools.pyx":3031
* def __get__(self): return (self.flag & BAM_FSECONDARY) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FSECONDARY # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FSECONDARY
* property is_qcfail:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 256);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2849
+ /* "pysam/csamtools.pyx":3032
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FSECONDARY
* else: self._delegate.core.flag &= ~BAM_FSECONDARY # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2852
+/* "pysam/csamtools.pyx":3035
* property is_qcfail:
* """true if QC failure"""
* def __get__(self): return (self.flag & BAM_FQCFAIL) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2852);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3035);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_512); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_512); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2853
+/* "pysam/csamtools.pyx":3036
* """true if QC failure"""
* def __get__(self): return (self.flag & BAM_FQCFAIL) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2853);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 3036);
- /* "pysam/csamtools.pyx":2854
+ /* "pysam/csamtools.pyx":3037
* def __get__(self): return (self.flag & BAM_FQCFAIL) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FQCFAIL # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FQCFAIL
* property is_duplicate:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 512);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2855
+ /* "pysam/csamtools.pyx":3038
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FQCFAIL
* else: self._delegate.core.flag &= ~BAM_FQCFAIL # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2858
+/* "pysam/csamtools.pyx":3041
* property is_duplicate:
* """true if optical or PCR duplicate"""
* def __get__(self): return (self.flag & BAM_FDUP) != 0 # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2858);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3041);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__flag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_1024); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_int_1024); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2859
+/* "pysam/csamtools.pyx":3042
* """true if optical or PCR duplicate"""
* def __get__(self): return (self.flag & BAM_FDUP) != 0
* def __set__(self,val): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 2859);
+ __Pyx_TraceCall("__set__", __pyx_f[0], 3042);
- /* "pysam/csamtools.pyx":2860
+ /* "pysam/csamtools.pyx":3043
* def __get__(self): return (self.flag & BAM_FDUP) != 0
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FDUP # <<<<<<<<<<<<<<
* else: self._delegate.core.flag &= ~BAM_FDUP
- * property positions:
+ *
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag | 1024);
goto __pyx_L3;
}
/*else*/ {
- /* "pysam/csamtools.pyx":2861
+ /* "pysam/csamtools.pyx":3044
* def __set__(self,val):
* if val: self._delegate.core.flag |= BAM_FDUP
* else: self._delegate.core.flag &= ~BAM_FDUP # <<<<<<<<<<<<<<
- * property positions:
- * """a list of reference positions that this read aligns to."""
+ *
+ * #######################################################################
*/
__pyx_v_self->_delegate->core.flag = (__pyx_v_self->_delegate->core.flag & (~1024));
}
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2864
+/* "pysam/csamtools.pyx":3052
* property positions:
* """a list of reference positions that this read aligns to."""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2864);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3052);
- /* "pysam/csamtools.pyx":2870
+ /* "pysam/csamtools.pyx":3058
* cdef bam1_t * src
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2871
+ /* "pysam/csamtools.pyx":3059
*
* src = self._delegate
* if src.core.n_cigar == 0: return [] # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_src->core.n_cigar == 0);
if (__pyx_t_2) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((PyObject *)__pyx_t_3);
__pyx_t_3 = 0;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2873
+ /* "pysam/csamtools.pyx":3061
* if src.core.n_cigar == 0: return []
*
* result = [] # <<<<<<<<<<<<<<
* pos = src.core.pos
* cigar_p = bam1_cigar(src)
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_result = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2874
+ /* "pysam/csamtools.pyx":3062
*
* result = []
* pos = src.core.pos # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_src->core.pos;
__pyx_v_pos = __pyx_t_4;
- /* "pysam/csamtools.pyx":2875
+ /* "pysam/csamtools.pyx":3063
* result = []
* pos = src.core.pos
* cigar_p = bam1_cigar(src) # <<<<<<<<<<<<<<
*/
__pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
- /* "pysam/csamtools.pyx":2877
+ /* "pysam/csamtools.pyx":3065
* cigar_p = bam1_cigar(src)
*
* for k from 0 <= k < src.core.n_cigar: # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_src->core.n_cigar;
for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
- /* "pysam/csamtools.pyx":2878
+ /* "pysam/csamtools.pyx":3066
*
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<<
*/
__pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
- /* "pysam/csamtools.pyx":2879
+ /* "pysam/csamtools.pyx":3067
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK
* l = cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<<
* if op == BAM_CMATCH:
* for i from pos <= i < pos + l:
*/
- __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_l);
__pyx_v_l = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2880
+ /* "pysam/csamtools.pyx":3068
* op = cigar_p[k] & BAM_CIGAR_MASK
* l = cigar_p[k] >> BAM_CIGAR_SHIFT
* if op == BAM_CMATCH: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_op == 0);
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2881
+ /* "pysam/csamtools.pyx":3069
* l = cigar_p[k] >> BAM_CIGAR_SHIFT
* if op == BAM_CMATCH:
* for i from pos <= i < pos + l: # <<<<<<<<<<<<<<
* result.append( i )
*
*/
- __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
- /* "pysam/csamtools.pyx":2882
+ /* "pysam/csamtools.pyx":3070
* if op == BAM_CMATCH:
* for i from pos <= i < pos + l:
* result.append( i ) # <<<<<<<<<<<<<<
*
* if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
*/
- __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_8 = PyList_Append(__pyx_v_result, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_Append(__pyx_v_result, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
goto __pyx_L6;
}
__pyx_L6:;
- /* "pysam/csamtools.pyx":2884
+ /* "pysam/csamtools.pyx":3072
* result.append( i )
*
* if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP: # <<<<<<<<<<<<<<
case 2:
case 3:
- /* "pysam/csamtools.pyx":2885
+ /* "pysam/csamtools.pyx":3073
*
* if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
* pos += l # <<<<<<<<<<<<<<
*
* return result
*/
- __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_pos = __pyx_t_7;
break;
}
}
- /* "pysam/csamtools.pyx":2887
+ /* "pysam/csamtools.pyx":3075
* pos += l
*
* return result # <<<<<<<<<<<<<<
*
- * property aligned_pairs:
+ * property inferred_length:
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject *)__pyx_v_result));
return __pyx_r;
}
+/* Python wrapper */
+static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_15inferred_length_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_15inferred_length_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pysam_9csamtools_11AlignedRead_15inferred_length___get__(((struct __pyx_obj_5pysam_9csamtools_AlignedRead *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pysam/csamtools.pyx":3082
+ * Returns 0 if CIGAR string is not present.
+ * """
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * cdef uint32_t k, qpos
+ * cdef int op
+ */
+
+static PyObject *__pyx_pf_5pysam_9csamtools_11AlignedRead_15inferred_length___get__(struct __pyx_obj_5pysam_9csamtools_AlignedRead *__pyx_v_self) {
+ uint32_t __pyx_v_k;
+ uint32_t __pyx_v_qpos;
+ int __pyx_v_op;
+ uint32_t *__pyx_v_cigar_p;
+ bam1_t *__pyx_v_src;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ bam1_t *__pyx_t_1;
+ int __pyx_t_2;
+ uint32_t __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3082);
+
+ /* "pysam/csamtools.pyx":3088
+ * cdef bam1_t * src
+ *
+ * src = self._delegate # <<<<<<<<<<<<<<
+ * if src.core.n_cigar == 0: return 0
+ *
+ */
+ __pyx_t_1 = __pyx_v_self->_delegate;
+ __pyx_v_src = __pyx_t_1;
+
+ /* "pysam/csamtools.pyx":3089
+ *
+ * src = self._delegate
+ * if src.core.n_cigar == 0: return 0 # <<<<<<<<<<<<<<
+ *
+ * qpos = 0
+ */
+ __pyx_t_2 = (__pyx_v_src->core.n_cigar == 0);
+ if (__pyx_t_2) {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+ goto __pyx_L3;
+ }
+ __pyx_L3:;
+
+ /* "pysam/csamtools.pyx":3091
+ * if src.core.n_cigar == 0: return 0
+ *
+ * qpos = 0 # <<<<<<<<<<<<<<
+ * cigar_p = bam1_cigar(src)
+ *
+ */
+ __pyx_v_qpos = 0;
+
+ /* "pysam/csamtools.pyx":3092
+ *
+ * qpos = 0
+ * cigar_p = bam1_cigar(src) # <<<<<<<<<<<<<<
+ *
+ * for k from 0 <= k < src.core.n_cigar:
+ */
+ __pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
+
+ /* "pysam/csamtools.pyx":3094
+ * cigar_p = bam1_cigar(src)
+ *
+ * for k from 0 <= k < src.core.n_cigar: # <<<<<<<<<<<<<<
+ * op = cigar_p[k] & BAM_CIGAR_MASK
+ *
+ */
+ __pyx_t_3 = __pyx_v_src->core.n_cigar;
+ for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) {
+
+ /* "pysam/csamtools.pyx":3095
+ *
+ * for k from 0 <= k < src.core.n_cigar:
+ * op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<<
+ *
+ * if op == BAM_CMATCH or op == BAM_CINS or op == BAM_CSOFT_CLIP:
+ */
+ __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
+
+ /* "pysam/csamtools.pyx":3097
+ * op = cigar_p[k] & BAM_CIGAR_MASK
+ *
+ * if op == BAM_CMATCH or op == BAM_CINS or op == BAM_CSOFT_CLIP: # <<<<<<<<<<<<<<
+ * qpos += cigar_p[k] >> BAM_CIGAR_SHIFT
+ *
+ */
+ switch (__pyx_v_op) {
+ case 0:
+ case 1:
+ case 4:
+
+ /* "pysam/csamtools.pyx":3098
+ *
+ * if op == BAM_CMATCH or op == BAM_CINS or op == BAM_CSOFT_CLIP:
+ * qpos += cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<<
+ *
+ * return qpos
+ */
+ __pyx_v_qpos = (__pyx_v_qpos + ((__pyx_v_cigar_p[__pyx_v_k]) >> 4));
+ break;
+ }
+ }
+
+ /* "pysam/csamtools.pyx":3100
+ * qpos += cigar_p[k] >> BAM_CIGAR_SHIFT
+ *
+ * return qpos # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pysam.csamtools.AlignedRead.inferred_length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
/* Python wrapper */
static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_13aligned_pairs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pysam_9csamtools_11AlignedRead_13aligned_pairs_1__get__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2894
+/* "pysam/csamtools.pyx":3108
* Unaligned position are marked by None.
* """
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 2894);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3108);
- /* "pysam/csamtools.pyx":2900
+ /* "pysam/csamtools.pyx":3114
* cdef bam1_t * src
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2901
+ /* "pysam/csamtools.pyx":3115
*
* src = self._delegate
* if src.core.n_cigar == 0: return [] # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_src->core.n_cigar == 0);
if (__pyx_t_2) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((PyObject *)__pyx_t_3);
__pyx_t_3 = 0;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2903
+ /* "pysam/csamtools.pyx":3117
* if src.core.n_cigar == 0: return []
*
* result = [] # <<<<<<<<<<<<<<
* pos = src.core.pos
* qpos = 0
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_result = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2904
+ /* "pysam/csamtools.pyx":3118
*
* result = []
* pos = src.core.pos # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_src->core.pos;
__pyx_v_pos = __pyx_t_4;
- /* "pysam/csamtools.pyx":2905
+ /* "pysam/csamtools.pyx":3119
* result = []
* pos = src.core.pos
* qpos = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_qpos = 0;
- /* "pysam/csamtools.pyx":2906
+ /* "pysam/csamtools.pyx":3120
* pos = src.core.pos
* qpos = 0
* cigar_p = bam1_cigar(src) # <<<<<<<<<<<<<<
*/
__pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
- /* "pysam/csamtools.pyx":2908
+ /* "pysam/csamtools.pyx":3122
* cigar_p = bam1_cigar(src)
*
* for k from 0 <= k < src.core.n_cigar: # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_src->core.n_cigar;
for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
- /* "pysam/csamtools.pyx":2909
+ /* "pysam/csamtools.pyx":3123
*
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<<
*/
__pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
- /* "pysam/csamtools.pyx":2910
+ /* "pysam/csamtools.pyx":3124
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK
* l = cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<<
*
* if op == BAM_CMATCH:
*/
- __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_l);
__pyx_v_l = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2923
+ /* "pysam/csamtools.pyx":3137
* qpos += 1
*
* elif op == BAM_CDEL or op == BAM_CREF_SKIP: # <<<<<<<<<<<<<<
*/
switch (__pyx_v_op) {
- /* "pysam/csamtools.pyx":2912
+ /* "pysam/csamtools.pyx":3126
* l = cigar_p[k] >> BAM_CIGAR_SHIFT
*
* if op == BAM_CMATCH: # <<<<<<<<<<<<<<
*/
case 0:
- /* "pysam/csamtools.pyx":2913
+ /* "pysam/csamtools.pyx":3127
*
* if op == BAM_CMATCH:
* for i from pos <= i < pos + l: # <<<<<<<<<<<<<<
* result.append( (qpos, i) )
* qpos += 1
*/
- __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
- /* "pysam/csamtools.pyx":2914
+ /* "pysam/csamtools.pyx":3128
* if op == BAM_CMATCH:
* for i from pos <= i < pos + l:
* result.append( (qpos, i) ) # <<<<<<<<<<<<<<
* qpos += 1
* pos += l
*/
- __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_6 = 0;
__pyx_t_3 = 0;
- __pyx_t_9 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- /* "pysam/csamtools.pyx":2915
+ /* "pysam/csamtools.pyx":3129
* for i from pos <= i < pos + l:
* result.append( (qpos, i) )
* qpos += 1 # <<<<<<<<<<<<<<
__pyx_v_qpos = (__pyx_v_qpos + 1);
}
- /* "pysam/csamtools.pyx":2916
+ /* "pysam/csamtools.pyx":3130
* result.append( (qpos, i) )
* qpos += 1
* pos += l # <<<<<<<<<<<<<<
*
* elif op == BAM_CINS:
*/
- __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_pos = __pyx_t_7;
break;
- /* "pysam/csamtools.pyx":2918
+ /* "pysam/csamtools.pyx":3132
* pos += l
*
* elif op == BAM_CINS: # <<<<<<<<<<<<<<
*/
case 1:
- /* "pysam/csamtools.pyx":2919
+ /* "pysam/csamtools.pyx":3133
*
* elif op == BAM_CINS:
* for i from pos <= i < pos + l: # <<<<<<<<<<<<<<
* result.append( (qpos, None) )
* qpos += 1
*/
- __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
- /* "pysam/csamtools.pyx":2920
+ /* "pysam/csamtools.pyx":3134
* elif op == BAM_CINS:
* for i from pos <= i < pos + l:
* result.append( (qpos, None) ) # <<<<<<<<<<<<<<
* qpos += 1
*
*/
- __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_qpos); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_8 = 0;
- __pyx_t_9 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":2921
+ /* "pysam/csamtools.pyx":3135
* for i from pos <= i < pos + l:
* result.append( (qpos, None) )
* qpos += 1 # <<<<<<<<<<<<<<
}
break;
- /* "pysam/csamtools.pyx":2923
+ /* "pysam/csamtools.pyx":3137
* qpos += 1
*
* elif op == BAM_CDEL or op == BAM_CREF_SKIP: # <<<<<<<<<<<<<<
case 2:
case 3:
- /* "pysam/csamtools.pyx":2924
+ /* "pysam/csamtools.pyx":3138
*
* elif op == BAM_CDEL or op == BAM_CREF_SKIP:
* for i from pos <= i < pos + l: # <<<<<<<<<<<<<<
* result.append( (None, i) )
* pos += l
*/
- __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
for (__pyx_v_i = __pyx_v_pos; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
- /* "pysam/csamtools.pyx":2925
+ /* "pysam/csamtools.pyx":3139
* elif op == BAM_CDEL or op == BAM_CREF_SKIP:
* for i from pos <= i < pos + l:
* result.append( (None, i) ) # <<<<<<<<<<<<<<
* pos += l
*
*/
- __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_9 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
}
- /* "pysam/csamtools.pyx":2926
+ /* "pysam/csamtools.pyx":3140
* for i from pos <= i < pos + l:
* result.append( (None, i) )
* pos += l # <<<<<<<<<<<<<<
*
* return result
*/
- __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_v_l); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_pos = __pyx_t_7;
break;
}
}
- /* "pysam/csamtools.pyx":2928
+ /* "pysam/csamtools.pyx":3142
* pos += l
*
* return result # <<<<<<<<<<<<<<
*
- *
+ * #######################################################################
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject *)__pyx_v_result));
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("overlap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("overlap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlap") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlap") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
- __pyx_v_start = __Pyx_PyInt_from_py_uint32_t(values[0]); if (unlikely((__pyx_v_start == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_end = __Pyx_PyInt_from_py_uint32_t(values[1]); if (unlikely((__pyx_v_end == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_start = __Pyx_PyInt_from_py_uint32_t(values[0]); if (unlikely((__pyx_v_start == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_end = __Pyx_PyInt_from_py_uint32_t(values[1]); if (unlikely((__pyx_v_end == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("overlap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("overlap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.AlignedRead.overlap", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2931
- *
- *
+/* "pysam/csamtools.pyx":3148
+ * ##
+ * #######################################################################
* def overlap( self, uint32_t start, uint32_t end ): # <<<<<<<<<<<<<<
* """return number of aligned bases of read overlapping the interval *start* and *end*
* on the reference sequence.
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("overlap", 0);
- __Pyx_TraceCall("overlap", __pyx_f[0], 2931);
+ __Pyx_TraceCall("overlap", __pyx_f[0], 3148);
- /* "pysam/csamtools.pyx":2940
+ /* "pysam/csamtools.pyx":3157
* cdef bam1_t * src
*
* overlap = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_overlap = 0;
- /* "pysam/csamtools.pyx":2942
+ /* "pysam/csamtools.pyx":3159
* overlap = 0
*
* src = self._delegate # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_self->_delegate;
__pyx_v_src = __pyx_t_1;
- /* "pysam/csamtools.pyx":2943
+ /* "pysam/csamtools.pyx":3160
*
* src = self._delegate
* if src.core.n_cigar == 0: return 0 # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2944
+ /* "pysam/csamtools.pyx":3161
* src = self._delegate
* if src.core.n_cigar == 0: return 0
* pos = src.core.pos # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_src->core.pos;
__pyx_v_pos = __pyx_t_3;
- /* "pysam/csamtools.pyx":2945
+ /* "pysam/csamtools.pyx":3162
* if src.core.n_cigar == 0: return 0
* pos = src.core.pos
* o = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_o = 0;
- /* "pysam/csamtools.pyx":2947
+ /* "pysam/csamtools.pyx":3164
* o = 0
*
* cigar_p = bam1_cigar(src) # <<<<<<<<<<<<<<
*/
__pyx_v_cigar_p = bam1_cigar(__pyx_v_src);
- /* "pysam/csamtools.pyx":2948
+ /* "pysam/csamtools.pyx":3165
*
* cigar_p = bam1_cigar(src)
* for k from 0 <= k < src.core.n_cigar: # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_src->core.n_cigar;
for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_4; __pyx_v_k++) {
- /* "pysam/csamtools.pyx":2949
+ /* "pysam/csamtools.pyx":3166
* cigar_p = bam1_cigar(src)
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<<
*/
__pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15);
- /* "pysam/csamtools.pyx":2950
+ /* "pysam/csamtools.pyx":3167
* for k from 0 <= k < src.core.n_cigar:
* op = cigar_p[k] & BAM_CIGAR_MASK
* l = cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<<
*
* if op == BAM_CMATCH:
*/
- __pyx_t_5 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_v_l);
__pyx_v_l = __pyx_t_5;
__pyx_t_5 = 0;
- /* "pysam/csamtools.pyx":2952
+ /* "pysam/csamtools.pyx":3169
* l = cigar_p[k] >> BAM_CIGAR_SHIFT
*
* if op == BAM_CMATCH: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_op == 0);
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":2953
+ /* "pysam/csamtools.pyx":3170
*
* if op == BAM_CMATCH:
* o = min( pos + l, end) - max( pos, start ) # <<<<<<<<<<<<<<
*
*/
__pyx_t_6 = __pyx_v_end;
- __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_v_l); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_v_l); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_2) {
- __pyx_t_9 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__pyx_t_5 = __pyx_t_9;
__pyx_t_9 = 0;
} else {
__pyx_t_11 = __pyx_t_10;
}
- __pyx_t_7 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_9 = PyNumber_Subtract(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyNumber_Subtract(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_o = __pyx_t_12;
- /* "pysam/csamtools.pyx":2954
+ /* "pysam/csamtools.pyx":3171
* if op == BAM_CMATCH:
* o = min( pos + l, end) - max( pos, start )
* if o > 0: overlap += o # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "pysam/csamtools.pyx":2956
+ /* "pysam/csamtools.pyx":3173
* if o > 0: overlap += o
*
* if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP: # <<<<<<<<<<<<<<
case 2:
case 3:
- /* "pysam/csamtools.pyx":2957
+ /* "pysam/csamtools.pyx":3174
*
* if op == BAM_CMATCH or op == BAM_CDEL or op == BAM_CREF_SKIP:
* pos += l # <<<<<<<<<<<<<<
*
* return overlap
*/
- __pyx_t_9 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_pos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_v_l); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_v_l); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_11 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_7); if (unlikely((__pyx_t_11 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_7); if (unlikely((__pyx_t_11 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_pos = __pyx_t_11;
break;
}
}
- /* "pysam/csamtools.pyx":2959
+ /* "pysam/csamtools.pyx":3176
* pos += l
*
* return overlap # <<<<<<<<<<<<<<
* def opt(self, tag):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_7 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_overlap); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_overlap); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2961
+/* "pysam/csamtools.pyx":3178
* return overlap
*
* def opt(self, tag): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("opt", 0);
- __Pyx_TraceCall("opt", __pyx_f[0], 2961);
+ __Pyx_TraceCall("opt", __pyx_f[0], 3178);
- /* "pysam/csamtools.pyx":2966
+ /* "pysam/csamtools.pyx":3183
* cdef uint8_t * v
* cdef int nvalues
* btag = _force_bytes(tag) # <<<<<<<<<<<<<<
* v = bam_aux_get(self._delegate, btag)
* if v == NULL: raise KeyError( "tag '%s' not present" % tag )
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_tag)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_bytes(__pyx_v_tag)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_btag = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":2967
+ /* "pysam/csamtools.pyx":3184
* cdef int nvalues
* btag = _force_bytes(tag)
* v = bam_aux_get(self._delegate, btag) # <<<<<<<<<<<<<<
* if v == NULL: raise KeyError( "tag '%s' not present" % tag )
* auxtype = chr(v[0])
*/
- __pyx_t_2 = PyBytes_AsString(((PyObject *)__pyx_v_btag)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyBytes_AsString(((PyObject *)__pyx_v_btag)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_v = bam_aux_get(__pyx_v_self->_delegate, __pyx_t_2);
- /* "pysam/csamtools.pyx":2968
+ /* "pysam/csamtools.pyx":3185
* btag = _force_bytes(tag)
* v = bam_aux_get(self._delegate, btag)
* if v == NULL: raise KeyError( "tag '%s' not present" % tag ) # <<<<<<<<<<<<<<
*/
__pyx_t_3 = (__pyx_v_v == NULL);
if (__pyx_t_3) {
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_152), __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_160), __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":2969
+ /* "pysam/csamtools.pyx":3186
* v = bam_aux_get(self._delegate, btag)
* if v == NULL: raise KeyError( "tag '%s' not present" % tag )
* auxtype = chr(v[0]) # <<<<<<<<<<<<<<
* if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
* return <int>bam_aux2i(v)
*/
- __pyx_t_1 = __Pyx_PyInt_to_py_uint8_t((__pyx_v_v[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint8_t((__pyx_v_v[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_chr, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_chr, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__pyx_v_auxtype = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":2970
+ /* "pysam/csamtools.pyx":3187
* if v == NULL: raise KeyError( "tag '%s' not present" % tag )
* auxtype = chr(v[0])
* if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S': # <<<<<<<<<<<<<<
* return <int>bam_aux2i(v)
* elif auxtype == 'i' or auxtype == 'I':
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__c), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__c), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_3) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__C), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__C), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_5) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__s), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__s), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_6) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__S), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__S), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_8 = __pyx_t_7;
} else {
}
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":2971
+ /* "pysam/csamtools.pyx":3188
* auxtype = chr(v[0])
* if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
* return <int>bam_aux2i(v) # <<<<<<<<<<<<<<
* return <int32_t>bam_aux2i(v)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(((int)bam_aux2i(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(((int)bam_aux2i(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L4;
}
- /* "pysam/csamtools.pyx":2972
+ /* "pysam/csamtools.pyx":3189
* if auxtype == 'c' or auxtype == 'C' or auxtype == 's' or auxtype == 'S':
* return <int>bam_aux2i(v)
* elif auxtype == 'i' or auxtype == 'I': # <<<<<<<<<<<<<<
* return <int32_t>bam_aux2i(v)
* elif auxtype == 'f' or auxtype == 'F':
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__i), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__i), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_5) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__I), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__I), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_6 = __pyx_t_3;
} else {
}
if (__pyx_t_6) {
- /* "pysam/csamtools.pyx":2973
+ /* "pysam/csamtools.pyx":3190
* return <int>bam_aux2i(v)
* elif auxtype == 'i' or auxtype == 'I':
* return <int32_t>bam_aux2i(v) # <<<<<<<<<<<<<<
* return <float>bam_aux2f(v)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(((int32_t)bam_aux2i(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(((int32_t)bam_aux2i(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L4;
}
- /* "pysam/csamtools.pyx":2974
+ /* "pysam/csamtools.pyx":3191
* elif auxtype == 'i' or auxtype == 'I':
* return <int32_t>bam_aux2i(v)
* elif auxtype == 'f' or auxtype == 'F': # <<<<<<<<<<<<<<
* return <float>bam_aux2f(v)
* elif auxtype == 'd' or auxtype == 'D':
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__f), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__f), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_6) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__F), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__F), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = __pyx_t_5;
} else {
}
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":2975
+ /* "pysam/csamtools.pyx":3192
* return <int32_t>bam_aux2i(v)
* elif auxtype == 'f' or auxtype == 'F':
* return <float>bam_aux2f(v) # <<<<<<<<<<<<<<
* return <double>bam_aux2d(v)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyFloat_FromDouble(((float)bam_aux2f(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyFloat_FromDouble(((float)bam_aux2f(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L4;
}
- /* "pysam/csamtools.pyx":2976
+ /* "pysam/csamtools.pyx":3193
* elif auxtype == 'f' or auxtype == 'F':
* return <float>bam_aux2f(v)
* elif auxtype == 'd' or auxtype == 'D': # <<<<<<<<<<<<<<
* return <double>bam_aux2d(v)
* elif auxtype == 'A':
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__d), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__d), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_3) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__D), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__D), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_5 = __pyx_t_6;
} else {
}
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":2977
+ /* "pysam/csamtools.pyx":3194
* return <float>bam_aux2f(v)
* elif auxtype == 'd' or auxtype == 'D':
* return <double>bam_aux2d(v) # <<<<<<<<<<<<<<
* # there might a more efficient way
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyFloat_FromDouble(((double)bam_aux2d(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyFloat_FromDouble(((double)bam_aux2d(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L4;
}
- /* "pysam/csamtools.pyx":2978
+ /* "pysam/csamtools.pyx":3195
* elif auxtype == 'd' or auxtype == 'D':
* return <double>bam_aux2d(v)
* elif auxtype == 'A': # <<<<<<<<<<<<<<
* # there might a more efficient way
* # to convert a char into a string
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__A), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__A), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":2981
+ /* "pysam/csamtools.pyx":3198
* # there might a more efficient way
* # to convert a char into a string
* return '%c' % <char>bam_aux2A(v) # <<<<<<<<<<<<<<
* return _charptr_to_str(<char*>bam_aux2Z(v))
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(((char)bam_aux2A(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(((char)bam_aux2A(__pyx_v_v))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_141), __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_149), __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = ((PyObject *)__pyx_t_4);
goto __pyx_L4;
}
- /* "pysam/csamtools.pyx":2982
+ /* "pysam/csamtools.pyx":3199
* # to convert a char into a string
* return '%c' % <char>bam_aux2A(v)
* elif auxtype == 'Z': # <<<<<<<<<<<<<<
* return _charptr_to_str(<char*>bam_aux2Z(v))
* elif auxtype == 'B':
*/
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__Z), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__Z), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":2983
+ /* "pysam/csamtools.pyx":3200
* return '%c' % <char>bam_aux2A(v)
* elif auxtype == 'Z':
* return _charptr_to_str(<char*>bam_aux2Z(v)) # <<<<<<<<<<<<<<
* bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __pyx_f_5pysam_9csamtools__charptr_to_str(((char *)bam_aux2Z(__pyx_v_v))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_f_5pysam_9csamtools__charptr_to_str(((char *)bam_aux2Z(__pyx_v_v))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L4;
}
- /* "pysam/csamtools.pyx":2984
+ /* "pysam/csamtools.pyx":3201
* elif auxtype == 'Z':
* return _charptr_to_str(<char*>bam_aux2Z(v))
* elif auxtype == 'B': # <<<<<<<<<<<<<<
* bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
* return values
*/
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__B), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_auxtype, ((PyObject *)__pyx_n_s__B), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":2985
+ /* "pysam/csamtools.pyx":3202
* return _charptr_to_str(<char*>bam_aux2Z(v))
* elif auxtype == 'B':
* bytesize, nvalues, values = convertBinaryTagToList( v + 1 ) # <<<<<<<<<<<<<<
* return values
* else:
*/
- __pyx_t_4 = __pyx_f_5pysam_9csamtools_convertBinaryTagToList((__pyx_v_v + 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_f_5pysam_9csamtools_convertBinaryTagToList((__pyx_v_v + 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
PyObject* sequence = __pyx_t_4;
if (unlikely(size != 3)) {
if (size > 3) __Pyx_RaiseTooManyValuesError(3);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_9);
__Pyx_INCREF(__pyx_t_10);
#else
- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
#endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
__Pyx_GOTREF(__pyx_t_9);
index = 2; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_10);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_12 = NULL;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
goto __pyx_L6_unpacking_done;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_12 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L6_unpacking_done:;
}
- __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_bytesize = __pyx_t_1;
__pyx_t_1 = 0;
__pyx_v_values = __pyx_t_10;
__pyx_t_10 = 0;
- /* "pysam/csamtools.pyx":2986
+ /* "pysam/csamtools.pyx":3203
* elif auxtype == 'B':
* bytesize, nvalues, values = convertBinaryTagToList( v + 1 )
* return values # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":2988
+ /* "pysam/csamtools.pyx":3205
* return values
* else:
* raise ValueError("unknown auxilliary type '%s'" % auxtype) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_153), __pyx_v_auxtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_161), __pyx_v_auxtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_4));
__Pyx_GIVEREF(((PyObject *)__pyx_t_4));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L4:;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":2991
+/* "pysam/csamtools.pyx":3208
*
*
* def fancy_str (self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("fancy_str", 0);
- __Pyx_TraceCall("fancy_str", __pyx_f[0], 2991);
+ __Pyx_TraceCall("fancy_str", __pyx_f[0], 3208);
- /* "pysam/csamtools.pyx":2994
+ /* "pysam/csamtools.pyx":3211
* """returns list of fieldnames/values in pretty format for debugging
* """
* ret_string = [] # <<<<<<<<<<<<<<
* field_names = {
* "tid": "Contig index",
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_ret_string = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":2995
+ /* "pysam/csamtools.pyx":3212
* """
* ret_string = []
* field_names = { # <<<<<<<<<<<<<<
* "tid": "Contig index",
* "pos": "Mapped position on contig",
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__tid), ((PyObject *)__pyx_kp_s_154)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_kp_s_155)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mtid), ((PyObject *)__pyx_kp_s_156)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mpos), ((PyObject *)__pyx_kp_s_157)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__isize), ((PyObject *)__pyx_kp_s_158)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__flag), ((PyObject *)__pyx_kp_s_159)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_cigar), ((PyObject *)__pyx_kp_s_160)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cigar), ((PyObject *)__pyx_kp_s_161)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), ((PyObject *)__pyx_kp_s_162)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bin), ((PyObject *)__pyx_kp_s_163)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qname), ((PyObject *)__pyx_kp_s_164)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qname), ((PyObject *)__pyx_kp_s_165)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qseq), ((PyObject *)__pyx_kp_s_166)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qseq), ((PyObject *)__pyx_kp_s_167)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bqual), ((PyObject *)__pyx_kp_s_168)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_aux), ((PyObject *)__pyx_kp_s_169)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__m_data), ((PyObject *)__pyx_kp_s_170)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__data_len), ((PyObject *)__pyx_kp_s_171)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__tid), ((PyObject *)__pyx_kp_s_162)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_kp_s_163)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mtid), ((PyObject *)__pyx_kp_s_164)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mpos), ((PyObject *)__pyx_kp_s_165)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__isize), ((PyObject *)__pyx_kp_s_166)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__flag), ((PyObject *)__pyx_kp_s_167)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_cigar), ((PyObject *)__pyx_kp_s_168)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cigar), ((PyObject *)__pyx_kp_s_169)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), ((PyObject *)__pyx_kp_s_170)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bin), ((PyObject *)__pyx_kp_s_171)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qname), ((PyObject *)__pyx_kp_s_172)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qname), ((PyObject *)__pyx_kp_s_173)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qseq), ((PyObject *)__pyx_kp_s_174)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qseq), ((PyObject *)__pyx_kp_s_175)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bqual), ((PyObject *)__pyx_kp_s_176)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_aux), ((PyObject *)__pyx_kp_s_177)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__m_data), ((PyObject *)__pyx_kp_s_178)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__data_len), ((PyObject *)__pyx_kp_s_179)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_field_names = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3015
+ /* "pysam/csamtools.pyx":3232
* "data_len": "Current data length",
* }
* fields_names_in_order = ["tid", "pos", "mtid", "mpos", "isize", "flag", # <<<<<<<<<<<<<<
* "n_cigar", "cigar", "qual", "bin", "l_qname", "qname",
* "l_qseq", "qseq", "bqual", "l_aux", "m_data", "data_len"]
*/
- __pyx_t_1 = PyList_New(18); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(18); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_n_s__tid));
PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__tid));
__pyx_v_fields_names_in_order = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3019
+ /* "pysam/csamtools.pyx":3236
* "l_qseq", "qseq", "bqual", "l_aux", "m_data", "data_len"]
*
* for f in fields_names_in_order: # <<<<<<<<<<<<<<
for (;;) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
__Pyx_XDECREF(__pyx_v_f);
__pyx_v_f = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3020
+ /* "pysam/csamtools.pyx":3237
*
* for f in fields_names_in_order:
* if not f in self.__dict__: # <<<<<<<<<<<<<<
* continue
* ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f)))
*/
- __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____dict__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____dict__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_f, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_5 = (!__pyx_t_4);
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":3021
+ /* "pysam/csamtools.pyx":3238
* for f in fields_names_in_order:
* if not f in self.__dict__:
* continue # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":3022
+ /* "pysam/csamtools.pyx":3239
* if not f in self.__dict__:
* continue
* ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f))) # <<<<<<<<<<<<<<
*
* for f in self.__dict__:
*/
- __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_field_names), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_field_names), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_s_173), __pyx_v_f); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_s_181), __pyx_v_f); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_174)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_182)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____getattribute__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____getattribute__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f);
__Pyx_GIVEREF(__pyx_v_f);
- __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
__pyx_t_7 = 0;
__pyx_t_9 = 0;
- __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_172), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_180), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_10 = PyList_Append(__pyx_v_ret_string, ((PyObject *)__pyx_t_9)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyList_Append(__pyx_v_ret_string, ((PyObject *)__pyx_t_9)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
__pyx_L3_continue:;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3024
+ /* "pysam/csamtools.pyx":3241
* ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f)))
*
* for f in self.__dict__: # <<<<<<<<<<<<<<
* if not f in field_names:
* ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f)))
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____dict__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____dict__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
__pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_2 = 0;
__pyx_t_11 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext;
}
if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_9)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_9)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_9)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_1 = __pyx_t_11(__pyx_t_9);
if (unlikely(!__pyx_t_1)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__pyx_v_f = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3025
+ /* "pysam/csamtools.pyx":3242
*
* for f in self.__dict__:
* if not f in field_names: # <<<<<<<<<<<<<<
* ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f)))
* return ret_string
*/
- __pyx_t_5 = (__Pyx_PyDict_Contains(__pyx_v_f, ((PyObject *)__pyx_v_field_names), Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = (__Pyx_PyDict_Contains(__pyx_v_f, ((PyObject *)__pyx_v_field_names), Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = (!__pyx_t_5);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":3026
+ /* "pysam/csamtools.pyx":3243
* for f in self.__dict__:
* if not f in field_names:
* ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f))) # <<<<<<<<<<<<<<
* return ret_string
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____getattribute__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____getattribute__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f);
__Pyx_GIVEREF(__pyx_v_f);
- __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_7 = 0;
- __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_172), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_180), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_10 = PyList_Append(__pyx_v_ret_string, ((PyObject *)__pyx_t_7)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyList_Append(__pyx_v_ret_string, ((PyObject *)__pyx_t_7)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
goto __pyx_L8;
}
}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "pysam/csamtools.pyx":3027
+ /* "pysam/csamtools.pyx":3244
* if not f in field_names:
* ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f)))
* return ret_string # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3046
+/* "pysam/csamtools.pyx":3263
* will change.
* '''
* def __init__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- __Pyx_TraceCall("__init__", __pyx_f[0], 3046);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 3263);
- /* "pysam/csamtools.pyx":3047
+ /* "pysam/csamtools.pyx":3264
* '''
* def __init__(self):
* raise TypeError("This class cannot be instantiated from Python") # <<<<<<<<<<<<<<
*
* def __str__(self):
*/
- __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_176), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_184), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = 0;
goto __pyx_L0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3049
+/* "pysam/csamtools.pyx":3266
* raise TypeError("This class cannot be instantiated from Python")
*
* def __str__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__str__", 0);
- __Pyx_TraceCall("__str__", __pyx_f[0], 3049);
+ __Pyx_TraceCall("__str__", __pyx_f[0], 3266);
- /* "pysam/csamtools.pyx":3050
+ /* "pysam/csamtools.pyx":3267
*
* def __str__(self):
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- /* "pysam/csamtools.pyx":3051
+ /* "pysam/csamtools.pyx":3268
* def __str__(self):
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
* "\n" +\ # <<<<<<<<<<<<<<
* "\n".join( map(str, self.pileups) )
*
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "pysam/csamtools.pyx":3050
+ /* "pysam/csamtools.pyx":3267
*
* def __str__(self):
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ # <<<<<<<<<<<<<<
* "\n" +\
* "\n".join( map(str, self.pileups) )
*/
- __pyx_t_2 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyInt_FromLong(__pyx_v_self->pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_self->pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_5));
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "pysam/csamtools.pyx":3052
+ /* "pysam/csamtools.pyx":3269
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
* "\n" +\
* "\n".join( map(str, self.pileups) ) # <<<<<<<<<<<<<<
*
* property tid:
*/
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pileups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pileups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3056
+/* "pysam/csamtools.pyx":3273
* property tid:
* '''the chromosome ID as is defined in the header'''
* def __get__(self): return self.tid # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3056);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3273);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3060
+/* "pysam/csamtools.pyx":3277
* property n:
* '''number of reads mapping to this column.'''
* def __get__(self): return self.n_pu # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3060);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3277);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->n_pu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->n_pu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3061
+/* "pysam/csamtools.pyx":3278
* '''number of reads mapping to this column.'''
* def __get__(self): return self.n_pu
* def __set__(self, n): self.n_pu = n # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_TraceCall("__set__", __pyx_f[0], 3061);
- __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_n); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_TraceCall("__set__", __pyx_f[0], 3278);
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_n); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->n_pu = __pyx_t_1;
__pyx_r = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3064
+/* "pysam/csamtools.pyx":3281
*
* property pos:
* def __get__(self): return self.pos # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3064);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3281);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3068
+/* "pysam/csamtools.pyx":3285
* property pileups:
* '''list of reads (:class:`pysam.PileupRead`) aligned to this column'''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_t_2;
int __pyx_t_3;
int __pyx_t_4;
+ int __pyx_t_5;
+ int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3068);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3285);
- /* "pysam/csamtools.pyx":3070
+ /* "pysam/csamtools.pyx":3287
* def __get__(self):
* cdef int x
* pileups = [] # <<<<<<<<<<<<<<
*
- * if self.plp[0] == NULL:
+ * if self.plp == NULL or self.plp[0] == NULL:
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_pileups = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3072
+ /* "pysam/csamtools.pyx":3289
* pileups = []
*
- * if self.plp[0] == NULL: # <<<<<<<<<<<<<<
+ * if self.plp == NULL or self.plp[0] == NULL: # <<<<<<<<<<<<<<
* raise ValueError("PileupProxy accessed after iterator finished")
*
*/
- __pyx_t_2 = ((__pyx_v_self->plp[0]) == NULL);
- if (__pyx_t_2) {
+ __pyx_t_2 = (__pyx_v_self->plp == NULL);
+ if (!__pyx_t_2) {
+ __pyx_t_3 = ((__pyx_v_self->plp[0]) == NULL);
+ __pyx_t_4 = __pyx_t_3;
+ } else {
+ __pyx_t_4 = __pyx_t_2;
+ }
+ if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":3073
+ /* "pysam/csamtools.pyx":3290
*
- * if self.plp[0] == NULL:
+ * if self.plp == NULL or self.plp[0] == NULL:
* raise ValueError("PileupProxy accessed after iterator finished") # <<<<<<<<<<<<<<
*
* # warning: there could be problems if self.n and self.buf are
*/
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_178), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_186), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":3077
+ /* "pysam/csamtools.pyx":3294
* # warning: there could be problems if self.n and self.buf are
* # out of sync.
* for x from 0 <= x < self.n_pu: # <<<<<<<<<<<<<<
* pileups.append( makePileupRead( &(self.plp[0][x])) )
* return pileups
*/
- __pyx_t_3 = __pyx_v_self->n_pu;
- for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
+ __pyx_t_5 = __pyx_v_self->n_pu;
+ for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) {
- /* "pysam/csamtools.pyx":3078
+ /* "pysam/csamtools.pyx":3295
* # out of sync.
* for x from 0 <= x < self.n_pu:
* pileups.append( makePileupRead( &(self.plp[0][x])) ) # <<<<<<<<<<<<<<
* return pileups
*
*/
- __pyx_t_1 = __pyx_f_5pysam_9csamtools_makePileupRead((&((__pyx_v_self->plp[0])[__pyx_v_x]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_5pysam_9csamtools_makePileupRead((&((__pyx_v_self->plp[0])[__pyx_v_x]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyList_Append(__pyx_v_pileups, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_Append(__pyx_v_pileups, __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pysam/csamtools.pyx":3079
+ /* "pysam/csamtools.pyx":3296
* for x from 0 <= x < self.n_pu:
* pileups.append( makePileupRead( &(self.plp[0][x])) )
* return pileups # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3085
+/* "pysam/csamtools.pyx":3302
* '''
*
* def __init__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- __Pyx_TraceCall("__init__", __pyx_f[0], 3085);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 3302);
- /* "pysam/csamtools.pyx":3086
+ /* "pysam/csamtools.pyx":3303
*
* def __init__(self):
* raise TypeError("This class cannot be instantiated from Python") # <<<<<<<<<<<<<<
*
* def __str__(self):
*/
- __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_179), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_187), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = 0;
goto __pyx_L0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3088
+/* "pysam/csamtools.pyx":3305
* raise TypeError("This class cannot be instantiated from Python")
*
* def __str__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__str__", 0);
- __Pyx_TraceCall("__str__", __pyx_f[0], 3088);
+ __Pyx_TraceCall("__str__", __pyx_f[0], 3305);
- /* "pysam/csamtools.pyx":3089
+ /* "pysam/csamtools.pyx":3306
*
* def __str__(self):
* return "\t".join( map(str, (self.alignment, self.qpos, self.indel, self.level, self.is_del, self.is_head, self.is_tail ) ) ) # <<<<<<<<<<<<<<
* property alignment:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__alignment); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__alignment); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qpos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__qpos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__indel); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__indel); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__level); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__level); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_del); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_del); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_head); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_head); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_tail); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_tail); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyTuple_New(7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_6 = 0;
__pyx_t_7 = 0;
__pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_t_9));
__Pyx_GIVEREF(((PyObject *)__pyx_t_9));
__pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
__Pyx_GIVEREF(__pyx_t_9);
__pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3093
+/* "pysam/csamtools.pyx":3310
* property alignment:
* """a :class:`pysam.AlignedRead` object of the aligned read"""
* def __get__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3093);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3310);
- /* "pysam/csamtools.pyx":3094
+ /* "pysam/csamtools.pyx":3311
* """a :class:`pysam.AlignedRead` object of the aligned read"""
* def __get__(self):
* return self._alignment # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3097
+/* "pysam/csamtools.pyx":3314
* property qpos:
* """position of the read base at the pileup site, 0-based"""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3097);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3314);
- /* "pysam/csamtools.pyx":3098
+ /* "pysam/csamtools.pyx":3315
* """position of the read base at the pileup site, 0-based"""
* def __get__(self):
* return self._qpos # <<<<<<<<<<<<<<
* """indel length; 0 for no indel, positive for ins and negative for del"""
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_qpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(__pyx_v_self->_qpos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3101
+/* "pysam/csamtools.pyx":3318
* property indel:
* """indel length; 0 for no indel, positive for ins and negative for del"""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3101);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3318);
- /* "pysam/csamtools.pyx":3102
+ /* "pysam/csamtools.pyx":3319
* """indel length; 0 for no indel, positive for ins and negative for del"""
* def __get__(self):
* return self._indel # <<<<<<<<<<<<<<
* """1 iff the base on the padded read is a deletion"""
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_indel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3105
+/* "pysam/csamtools.pyx":3322
* property is_del:
* """1 iff the base on the padded read is a deletion"""
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3105);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3322);
- /* "pysam/csamtools.pyx":3106
+ /* "pysam/csamtools.pyx":3323
* """1 iff the base on the padded read is a deletion"""
* def __get__(self):
* return self._is_del # <<<<<<<<<<<<<<
* def __get__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_is_del); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_is_del); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3108
+/* "pysam/csamtools.pyx":3325
* return self._is_del
* property is_head:
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3108);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3325);
- /* "pysam/csamtools.pyx":3109
+ /* "pysam/csamtools.pyx":3326
* property is_head:
* def __get__(self):
* return self._is_head # <<<<<<<<<<<<<<
* def __get__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_is_head); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_is_head); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3111
+/* "pysam/csamtools.pyx":3328
* return self._is_head
* property is_tail:
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3111);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3328);
- /* "pysam/csamtools.pyx":3112
+ /* "pysam/csamtools.pyx":3329
* property is_tail:
* def __get__(self):
* return self._is_tail # <<<<<<<<<<<<<<
* def __get__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_is_tail); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->_is_tail); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3114
+/* "pysam/csamtools.pyx":3331
* return self._is_tail
* property level:
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3114);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3331);
- /* "pysam/csamtools.pyx":3115
+ /* "pysam/csamtools.pyx":3332
* property level:
* def __get__(self):
* return self._level # <<<<<<<<<<<<<<
* class Outs:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_level); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_level); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Outs.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3119
+/* "pysam/csamtools.pyx":3336
* class Outs:
* '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
* def __init__(self, id = 1): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- __Pyx_TraceCall("__init__", __pyx_f[0], 3119);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 3336);
- /* "pysam/csamtools.pyx":3120
+ /* "pysam/csamtools.pyx":3337
* '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
* def __init__(self, id = 1):
* self.streams = [] # <<<<<<<<<<<<<<
* self.id = id
*
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__streams, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__streams, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3121
+ /* "pysam/csamtools.pyx":3338
* def __init__(self, id = 1):
* self.streams = []
* self.id = id # <<<<<<<<<<<<<<
*
* def setdevice(self, filename):
*/
- if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__id, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__id, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("setdevice", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3123; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("setdevice", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3340; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setdevice") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3123; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setdevice") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3340; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("setdevice", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3123; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("setdevice", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3340; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Outs.setdevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3123
+/* "pysam/csamtools.pyx":3340
* self.id = id
*
* def setdevice(self, filename): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("setdevice", 0);
- __Pyx_TraceCall("setdevice", __pyx_f[0], 3123);
+ __Pyx_TraceCall("setdevice", __pyx_f[0], 3340);
- /* "pysam/csamtools.pyx":3125
+ /* "pysam/csamtools.pyx":3342
* def setdevice(self, filename):
* '''open an existing file, like "/dev/null"'''
* fd = os.open(filename, os.O_WRONLY) # <<<<<<<<<<<<<<
* self.setfd(fd)
*
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_WRONLY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_WRONLY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__pyx_v_fd = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3126
+ /* "pysam/csamtools.pyx":3343
* '''open an existing file, like "/dev/null"'''
* fd = os.open(filename, os.O_WRONLY)
* self.setfd(fd) # <<<<<<<<<<<<<<
*
* def setfile(self, filename):
*/
- __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__setfd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__setfd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_fd);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fd);
__Pyx_GIVEREF(__pyx_v_fd);
- __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("setfile", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("setfile", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfile") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfile") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("setfile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("setfile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Outs.setfile", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3128
+/* "pysam/csamtools.pyx":3345
* self.setfd(fd)
*
* def setfile(self, filename): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("setfile", 0);
- __Pyx_TraceCall("setfile", __pyx_f[0], 3128);
+ __Pyx_TraceCall("setfile", __pyx_f[0], 3345);
- /* "pysam/csamtools.pyx":3130
+ /* "pysam/csamtools.pyx":3347
* def setfile(self, filename):
* '''open a new file.'''
* fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660); # <<<<<<<<<<<<<<
* self.setfd(fd)
*
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_WRONLY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_WRONLY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_CREAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_CREAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_0660);
__Pyx_GIVEREF(__pyx_int_0660);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__pyx_v_fd = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3131
+ /* "pysam/csamtools.pyx":3348
* '''open a new file.'''
* fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660);
* self.setfd(fd) # <<<<<<<<<<<<<<
*
* def setfd(self, fd):
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__setfd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__setfd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_fd);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fd);
__Pyx_GIVEREF(__pyx_v_fd);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fd)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("setfd", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("setfd", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("setfd", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("setfd", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.Outs.setfd", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3133
+/* "pysam/csamtools.pyx":3350
* self.setfd(fd)
*
* def setfd(self, fd): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("setfd", 0);
- __Pyx_TraceCall("setfd", __pyx_f[0], 3133);
+ __Pyx_TraceCall("setfd", __pyx_f[0], 3350);
- /* "pysam/csamtools.pyx":3134
+ /* "pysam/csamtools.pyx":3351
*
* def setfd(self, fd):
* ofd = os.dup(self.id) # Save old stream on new unit. # <<<<<<<<<<<<<<
* self.streams.append(ofd)
* sys.stdout.flush() # Buffered data goes to old stream.
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__dup); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__dup); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__pyx_v_ofd = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3135
+ /* "pysam/csamtools.pyx":3352
* def setfd(self, fd):
* ofd = os.dup(self.id) # Save old stream on new unit.
* self.streams.append(ofd) # <<<<<<<<<<<<<<
* sys.stdout.flush() # Buffered data goes to old stream.
* sys.stderr.flush() # Buffered data goes to old stream.
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_ofd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_ofd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3136
+ /* "pysam/csamtools.pyx":3353
* ofd = os.dup(self.id) # Save old stream on new unit.
* self.streams.append(ofd)
* sys.stdout.flush() # Buffered data goes to old stream. # <<<<<<<<<<<<<<
* sys.stderr.flush() # Buffered data goes to old stream.
* os.dup2(fd, self.id) # Open unit 1 on new stream.
*/
- __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stdout); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stdout); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__flush); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__flush); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3137
+ /* "pysam/csamtools.pyx":3354
* self.streams.append(ofd)
* sys.stdout.flush() # Buffered data goes to old stream.
* sys.stderr.flush() # Buffered data goes to old stream. # <<<<<<<<<<<<<<
* os.dup2(fd, self.id) # Open unit 1 on new stream.
* os.close(fd) # Close other unit (look out, caller.)
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__stderr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__stderr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__flush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__flush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3138
+ /* "pysam/csamtools.pyx":3355
* sys.stdout.flush() # Buffered data goes to old stream.
* sys.stderr.flush() # Buffered data goes to old stream.
* os.dup2(fd, self.id) # Open unit 1 on new stream. # <<<<<<<<<<<<<<
* os.close(fd) # Close other unit (look out, caller.)
*
*/
- __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__dup2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__dup2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_fd);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fd);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3139
+ /* "pysam/csamtools.pyx":3356
* sys.stderr.flush() # Buffered data goes to old stream.
* os.dup2(fd, self.id) # Open unit 1 on new stream.
* os.close(fd) # Close other unit (look out, caller.) # <<<<<<<<<<<<<<
*
* def restore(self):
*/
- __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_fd);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fd);
__Pyx_GIVEREF(__pyx_v_fd);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3141
+/* "pysam/csamtools.pyx":3358
* os.close(fd) # Close other unit (look out, caller.)
*
* def restore(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("restore", 0);
- __Pyx_TraceCall("restore", __pyx_f[0], 3141);
+ __Pyx_TraceCall("restore", __pyx_f[0], 3358);
- /* "pysam/csamtools.pyx":3143
+ /* "pysam/csamtools.pyx":3360
* def restore(self):
* '''restore previous output stream'''
* if self.streams: # <<<<<<<<<<<<<<
* # the following was not sufficient, hence flush both stderr and stdout
* # os.fsync( self.id )
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":3146
+ /* "pysam/csamtools.pyx":3363
* # the following was not sufficient, hence flush both stderr and stdout
* # os.fsync( self.id )
* sys.stdout.flush() # <<<<<<<<<<<<<<
* sys.stderr.flush()
* os.dup2(self.streams[-1], self.id)
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__stdout); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__stdout); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__flush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__flush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3147
+ /* "pysam/csamtools.pyx":3364
* # os.fsync( self.id )
* sys.stdout.flush()
* sys.stderr.flush() # <<<<<<<<<<<<<<
* os.dup2(self.streams[-1], self.id)
* os.close(self.streams[-1])
*/
- __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stderr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stderr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__flush); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__flush); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3148
+ /* "pysam/csamtools.pyx":3365
* sys.stdout.flush()
* sys.stderr.flush()
* os.dup2(self.streams[-1], self.id) # <<<<<<<<<<<<<<
* os.close(self.streams[-1])
* del self.streams[-1]
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__dup2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__dup2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_4 = 0;
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3149
+ /* "pysam/csamtools.pyx":3366
* sys.stderr.flush()
* os.dup2(self.streams[-1], self.id)
* os.close(self.streams[-1]) # <<<<<<<<<<<<<<
* del self.streams[-1]
*
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3150
+ /* "pysam/csamtools.pyx":3367
* os.dup2(self.streams[-1], self.id)
* os.close(self.streams[-1])
* del self.streams[-1] # <<<<<<<<<<<<<<
*
* def _samtools_dispatch( method,
*/
- __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__streams); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_DelItemInt(__pyx_t_3, -1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_DelItemInt(__pyx_t_3, -1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L3;
}
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__method,&__pyx_n_s__args,&__pyx_n_s__catch_stdout,0};
PyObject* values[3] = {0,0,0};
- /* "pysam/csamtools.pyx":3153
+ /* "pysam/csamtools.pyx":3370
*
* def _samtools_dispatch( method,
* args = (), # <<<<<<<<<<<<<<
* '''call ``method`` in samtools providing arguments in args.
*/
values[1] = ((PyObject *)__pyx_empty_tuple);
- values[2] = __pyx_k_180;
+ values[2] = __pyx_k_188;
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_samtools_dispatch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_samtools_dispatch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_samtools_dispatch", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("_samtools_dispatch", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3152
+/* "pysam/csamtools.pyx":3369
* del self.streams[-1]
*
* def _samtools_dispatch( method, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("_samtools_dispatch", 0);
- __Pyx_TraceCall("_samtools_dispatch", __pyx_f[0], 3152);
+ __Pyx_TraceCall("_samtools_dispatch", __pyx_f[0], 3369);
__Pyx_INCREF(__pyx_v_method);
__Pyx_INCREF(__pyx_v_args);
__Pyx_INCREF(__pyx_v_catch_stdout);
- /* "pysam/csamtools.pyx":3178
+ /* "pysam/csamtools.pyx":3395
*
* # some special cases
* if method == "index": # <<<<<<<<<<<<<<
* if not os.path.exists( args[0] ):
* raise IOError( "No such file or directory: '%s'" % args[0] )
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_method, ((PyObject *)__pyx_n_s__index), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_method, ((PyObject *)__pyx_n_s__index), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "pysam/csamtools.pyx":3179
+ /* "pysam/csamtools.pyx":3396
* # some special cases
* if method == "index":
* if not os.path.exists( args[0] ): # <<<<<<<<<<<<<<
* raise IOError( "No such file or directory: '%s'" % args[0] )
*
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_5 = (!__pyx_t_2);
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":3180
+ /* "pysam/csamtools.pyx":3397
* if method == "index":
* if not os.path.exists( args[0] ):
* raise IOError( "No such file or directory: '%s'" % args[0] ) # <<<<<<<<<<<<<<
*
* # redirect stderr and stdout to file
*/
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_181), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_189), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
__Pyx_GIVEREF(((PyObject *)__pyx_t_4));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":3183
+ /* "pysam/csamtools.pyx":3400
*
* # redirect stderr and stdout to file
* stderr_h, stderr_f = tempfile.mkstemp() # <<<<<<<<<<<<<<
* pysam_set_stderr( stderr_h )
*
*/
- __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__tempfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__tempfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__mkstemp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__mkstemp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
#else
- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
#endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
__Pyx_GOTREF(__pyx_t_3);
index = 1; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_1);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_7 = NULL;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L6_unpacking_done;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_7 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L6_unpacking_done:;
}
__pyx_v_stderr_h = __pyx_t_3;
__pyx_v_stderr_f = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3184
+ /* "pysam/csamtools.pyx":3401
* # redirect stderr and stdout to file
* stderr_h, stderr_f = tempfile.mkstemp()
* pysam_set_stderr( stderr_h ) # <<<<<<<<<<<<<<
*
* if catch_stdout:
*/
- __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_stderr_h); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_stderr_h); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
pysam_set_stderr(__pyx_t_8);
- /* "pysam/csamtools.pyx":3186
+ /* "pysam/csamtools.pyx":3403
* pysam_set_stderr( stderr_h )
*
* if catch_stdout: # <<<<<<<<<<<<<<
* stdout_h, stdout_f = tempfile.mkstemp()
* try:
*/
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":3187
+ /* "pysam/csamtools.pyx":3404
*
* if catch_stdout:
* stdout_h, stdout_f = tempfile.mkstemp() # <<<<<<<<<<<<<<
* try:
* stdout_save = Outs( sys.stdout.fileno() )
*/
- __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__tempfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__tempfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__mkstemp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__mkstemp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_3);
#else
- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
#endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
__Pyx_GOTREF(__pyx_t_1);
index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_7 = NULL;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L9_unpacking_done;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_7 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L9_unpacking_done:;
}
__pyx_v_stdout_h = __pyx_t_1;
__pyx_v_stdout_f = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3188
+ /* "pysam/csamtools.pyx":3405
* if catch_stdout:
* stdout_h, stdout_f = tempfile.mkstemp()
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_11);
/*try:*/ {
- /* "pysam/csamtools.pyx":3189
+ /* "pysam/csamtools.pyx":3406
* stdout_h, stdout_f = tempfile.mkstemp()
* try:
* stdout_save = Outs( sys.stdout.fileno() ) # <<<<<<<<<<<<<<
* stdout_save.setfd( stdout_h )
* except AttributeError:
*/
- __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__Outs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__Outs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stdout); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stdout); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__fileno); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__fileno); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__pyx_v_stdout_save = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3190
+ /* "pysam/csamtools.pyx":3407
* try:
* stdout_save = Outs( sys.stdout.fileno() )
* stdout_save.setfd( stdout_h ) # <<<<<<<<<<<<<<
* except AttributeError:
* # stdout has already been redirected
*/
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_stdout_save, __pyx_n_s__setfd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3190; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_stdout_save, __pyx_n_s__setfd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3190; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_stdout_h);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stdout_h);
__Pyx_GIVEREF(__pyx_v_stdout_h);
- __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3190; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3407; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":3191
+ /* "pysam/csamtools.pyx":3408
* stdout_save = Outs( sys.stdout.fileno() )
* stdout_save.setfd( stdout_h )
* except AttributeError: # <<<<<<<<<<<<<<
__pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
if (__pyx_t_8) {
__Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_1);
- /* "pysam/csamtools.pyx":3193
+ /* "pysam/csamtools.pyx":3410
* except AttributeError:
* # stdout has already been redirected
* catch_stdout = False # <<<<<<<<<<<<<<
*
* # patch for `samtools view`
*/
- __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+ __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3410; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_v_catch_stdout);
__pyx_v_catch_stdout = __pyx_t_6;
__pyx_L17_try_end:;
}
- /* "pysam/csamtools.pyx":3198
+ /* "pysam/csamtools.pyx":3415
* # samtools `view` closes stdout, from which I can not
* # recover. Thus redirect output to file with -o option.
* if method == "view": # <<<<<<<<<<<<<<
* if "-o" in args: raise ValueError("option -o is forbidden in samtools view")
* args = ( "-o", stdout_f ) + args
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_method, ((PyObject *)__pyx_n_s__view), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_method, ((PyObject *)__pyx_n_s__view), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":3199
+ /* "pysam/csamtools.pyx":3416
* # recover. Thus redirect output to file with -o option.
* if method == "view":
* if "-o" in args: raise ValueError("option -o is forbidden in samtools view") # <<<<<<<<<<<<<<
* args = ( "-o", stdout_f ) + args
*
*/
- __pyx_t_5 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_182), __pyx_v_args, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_kp_s_190), __pyx_v_args, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_184), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_192), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L21;
}
__pyx_L21:;
- /* "pysam/csamtools.pyx":3200
+ /* "pysam/csamtools.pyx":3417
* if method == "view":
* if "-o" in args: raise ValueError("option -o is forbidden in samtools view")
* args = ( "-o", stdout_f ) + args # <<<<<<<<<<<<<<
*
* # do the function call to samtools
*/
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_182));
- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_182));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_182));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_190));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_190));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_190));
__Pyx_INCREF(__pyx_v_stdout_f);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_stdout_f);
__Pyx_GIVEREF(__pyx_v_stdout_f);
- __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_1), __pyx_v_args); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_1), __pyx_v_args); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_v_args);
}
__pyx_L7:;
- /* "pysam/csamtools.pyx":3206
+ /* "pysam/csamtools.pyx":3423
* cdef int i, n, retval
*
* n = len(args) # <<<<<<<<<<<<<<
* method = _force_cmdline_bytes(method)
* args = [ _force_cmdline_bytes(a) for a in args ]
*/
- __pyx_t_12 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_n = __pyx_t_12;
- /* "pysam/csamtools.pyx":3207
+ /* "pysam/csamtools.pyx":3424
*
* n = len(args)
* method = _force_cmdline_bytes(method) # <<<<<<<<<<<<<<
* args = [ _force_cmdline_bytes(a) for a in args ]
*
*/
- __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_cmdline_bytes(__pyx_v_method)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_cmdline_bytes(__pyx_v_method)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_v_method);
__pyx_v_method = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3208
+ /* "pysam/csamtools.pyx":3425
* n = len(args)
* method = _force_cmdline_bytes(method)
* args = [ _force_cmdline_bytes(a) for a in args ] # <<<<<<<<<<<<<<
*
* # allocate two more for first (dummy) argument (contains command)
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyList_CheckExact(__pyx_v_args) || PyTuple_CheckExact(__pyx_v_args)) {
__pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
__pyx_t_13 = NULL;
} else {
- __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_13(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_XDECREF(__pyx_v_a);
__pyx_v_a = __pyx_t_4;
__pyx_t_4 = 0;
- __pyx_t_4 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_cmdline_bytes(__pyx_v_a)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((PyObject *)__pyx_f_5pysam_9csamtools__force_cmdline_bytes(__pyx_v_a)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_args = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3211
+ /* "pysam/csamtools.pyx":3428
*
* # allocate two more for first (dummy) argument (contains command)
* cargs = <char**>calloc( n+2, sizeof( char *) ) # <<<<<<<<<<<<<<
*/
__pyx_v_cargs = ((char **)calloc((__pyx_v_n + 2), (sizeof(char *))));
- /* "pysam/csamtools.pyx":3212
+ /* "pysam/csamtools.pyx":3429
* # allocate two more for first (dummy) argument (contains command)
* cargs = <char**>calloc( n+2, sizeof( char *) )
* cargs[0] = "samtools" # <<<<<<<<<<<<<<
*/
(__pyx_v_cargs[0]) = __pyx_k__samtools;
- /* "pysam/csamtools.pyx":3213
+ /* "pysam/csamtools.pyx":3430
* cargs = <char**>calloc( n+2, sizeof( char *) )
* cargs[0] = "samtools"
* cargs[1] = method # <<<<<<<<<<<<<<
* for i from 0 <= i < n: cargs[i+2] = args[i]
*
*/
- __pyx_t_14 = PyBytes_AsString(__pyx_v_method); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyBytes_AsString(__pyx_v_method); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
(__pyx_v_cargs[1]) = __pyx_t_14;
- /* "pysam/csamtools.pyx":3214
+ /* "pysam/csamtools.pyx":3431
* cargs[0] = "samtools"
* cargs[1] = method
* for i from 0 <= i < n: cargs[i+2] = args[i] # <<<<<<<<<<<<<<
*/
__pyx_t_8 = __pyx_v_n;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_args, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_args, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_14 = PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
(__pyx_v_cargs[(__pyx_v_i + 2)]) = __pyx_t_14;
}
- /* "pysam/csamtools.pyx":3216
+ /* "pysam/csamtools.pyx":3433
* for i from 0 <= i < n: cargs[i+2] = args[i]
*
* retval = pysam_dispatch(n+2, cargs) # <<<<<<<<<<<<<<
*/
__pyx_v_retval = pysam_dispatch((__pyx_v_n + 2), __pyx_v_cargs);
- /* "pysam/csamtools.pyx":3217
+ /* "pysam/csamtools.pyx":3434
*
* retval = pysam_dispatch(n+2, cargs)
* free( cargs ) # <<<<<<<<<<<<<<
*/
free(__pyx_v_cargs);
- /* "pysam/csamtools.pyx":3221
+ /* "pysam/csamtools.pyx":3438
* # restore stdout/stderr. This will also flush, so
* # needs to be before reading back the file contents
* if catch_stdout: # <<<<<<<<<<<<<<
* stdout_save.restore()
* try:
*/
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- /* "pysam/csamtools.pyx":3222
+ /* "pysam/csamtools.pyx":3439
* # needs to be before reading back the file contents
* if catch_stdout:
* stdout_save.restore() # <<<<<<<<<<<<<<
* try:
* with open( stdout_f, "r") as inf:
*/
- if (unlikely(!__pyx_v_stdout_save)) { __Pyx_RaiseUnboundLocalError("stdout_save"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_1 = PyObject_GetAttr(__pyx_v_stdout_save, __pyx_n_s__restore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_v_stdout_save)) { __Pyx_RaiseUnboundLocalError("stdout_save"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_stdout_save, __pyx_n_s__restore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3223
+ /* "pysam/csamtools.pyx":3440
* if catch_stdout:
* stdout_save.restore()
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_9);
/*try:*/ {
- /* "pysam/csamtools.pyx":3224
+ /* "pysam/csamtools.pyx":3441
* stdout_save.restore()
* try:
* with open( stdout_f, "r") as inf: # <<<<<<<<<<<<<<
* except UnicodeDecodeError:
*/
/*with:*/ {
- if (unlikely(!__pyx_v_stdout_f)) { __Pyx_RaiseUnboundLocalError("stdout_f"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L27_error;} }
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+ if (unlikely(!__pyx_v_stdout_f)) { __Pyx_RaiseUnboundLocalError("stdout_f"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L27_error;} }
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_stdout_f);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stdout_f);
__Pyx_INCREF(((PyObject *)__pyx_n_s__r));
PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__r));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
- __pyx_t_1 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_15 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+ __pyx_t_15 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____enter__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L35_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____enter__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L35_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L35_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L35_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_inf = __pyx_t_4;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":3225
+ /* "pysam/csamtools.pyx":3442
* try:
* with open( stdout_f, "r") as inf:
* out_stdout = inf.readlines() # <<<<<<<<<<<<<<
* except UnicodeDecodeError:
* with open( stdout_f, "rb") as inf:
*/
- __pyx_t_4 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3225; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
+ __pyx_t_4 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3442; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3225; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3442; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_out_stdout = __pyx_t_1;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3224
+ /* "pysam/csamtools.pyx":3441
* stdout_save.restore()
* try:
* with open( stdout_f, "r") as inf: # <<<<<<<<<<<<<<
*/
/*except:*/ {
__Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_19 = PyObject_Call(__pyx_t_15, __pyx_t_6, NULL);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+ if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
__Pyx_GOTREF(__pyx_t_19);
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_19);
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+ if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
__pyx_t_2 = (!__pyx_t_5);
if (__pyx_t_2) {
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_ErrRestore(__pyx_t_1, __pyx_t_4, __pyx_t_3);
__pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
goto __pyx_L52;
}
__pyx_L52:;
}
/*finally:*/ {
if (__pyx_t_15) {
- __pyx_t_18 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_185, NULL);
+ __pyx_t_18 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_193, NULL);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+ if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
__Pyx_GOTREF(__pyx_t_18);
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_18);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+ if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
}
}
goto __pyx_L53;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3226
+ /* "pysam/csamtools.pyx":3443
* with open( stdout_f, "r") as inf:
* out_stdout = inf.readlines()
* except UnicodeDecodeError: # <<<<<<<<<<<<<<
__pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
if (__pyx_t_8) {
__Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+ if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3443; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_1);
- /* "pysam/csamtools.pyx":3227
+ /* "pysam/csamtools.pyx":3444
* out_stdout = inf.readlines()
* except UnicodeDecodeError:
* with open( stdout_f, "rb") as inf: # <<<<<<<<<<<<<<
* out_stdout = inf.read()
*/
/*with:*/ {
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_stdout_f);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stdout_f);
__Pyx_INCREF(((PyObject *)__pyx_n_s__rb));
PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__rb));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__rb));
- __pyx_t_20 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+ __pyx_t_20 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
__Pyx_GOTREF(__pyx_t_20);
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_15 = PyObject_GetAttr(__pyx_t_20, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+ __pyx_t_15 = PyObject_GetAttr(__pyx_t_20, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_6 = PyObject_GetAttr(__pyx_t_20, __pyx_n_s____enter__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+ __pyx_t_6 = PyObject_GetAttr(__pyx_t_20, __pyx_n_s____enter__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_21 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
+ __pyx_t_21 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
__Pyx_GOTREF(__pyx_t_21);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
__pyx_v_inf = __pyx_t_21;
__Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- /* "pysam/csamtools.pyx":3229
+ /* "pysam/csamtools.pyx":3446
* with open( stdout_f, "rb") as inf:
* # read binary output
* out_stdout = inf.read() # <<<<<<<<<<<<<<
* os.remove( stdout_f )
* else:
*/
- __pyx_t_21 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__read); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L62_error;}
+ __pyx_t_21 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__read); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3446; __pyx_clineno = __LINE__; goto __pyx_L62_error;}
__Pyx_GOTREF(__pyx_t_21);
- __pyx_t_20 = PyObject_Call(__pyx_t_21, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L62_error;}
+ __pyx_t_20 = PyObject_Call(__pyx_t_21, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3446; __pyx_clineno = __LINE__; goto __pyx_L62_error;}
__Pyx_GOTREF(__pyx_t_20);
__Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
__Pyx_XDECREF(__pyx_v_out_stdout);
__Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
- /* "pysam/csamtools.pyx":3227
+ /* "pysam/csamtools.pyx":3444
* out_stdout = inf.readlines()
* except UnicodeDecodeError:
* with open( stdout_f, "rb") as inf: # <<<<<<<<<<<<<<
*/
/*except:*/ {
__Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+ if (__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
__Pyx_GOTREF(__pyx_t_20);
__Pyx_GOTREF(__pyx_t_21);
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+ __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
__Pyx_GOTREF(__pyx_t_22);
__Pyx_INCREF(__pyx_t_20);
PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_20);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_19 = PyObject_Call(__pyx_t_15, __pyx_t_22, NULL);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+ if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
__Pyx_GOTREF(__pyx_t_19);
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_19);
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+ if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
__pyx_t_5 = (!__pyx_t_2);
if (__pyx_t_5) {
__Pyx_GIVEREF(__pyx_t_20);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_6);
__pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_6 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L64_except_error;}
goto __pyx_L73;
}
__pyx_L73:;
}
/*finally:*/ {
if (__pyx_t_15) {
- __pyx_t_16 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_186, NULL);
+ __pyx_t_16 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_194, NULL);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+ if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
__Pyx_GOTREF(__pyx_t_16);
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
+ if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
}
}
goto __pyx_L74;
__pyx_L34_try_end:;
}
- /* "pysam/csamtools.pyx":3230
+ /* "pysam/csamtools.pyx":3447
* # read binary output
* out_stdout = inf.read()
* os.remove( stdout_f ) # <<<<<<<<<<<<<<
* else:
* out_stdout = []
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_stdout_f);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_stdout_f);
__Pyx_GIVEREF(__pyx_v_stdout_f);
- __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":3232
+ /* "pysam/csamtools.pyx":3449
* os.remove( stdout_f )
* else:
* out_stdout = [] # <<<<<<<<<<<<<<
*
* # get error messages
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_out_stdout = ((PyObject *)__pyx_t_3);
__pyx_t_3 = 0;
}
__pyx_L26:;
- /* "pysam/csamtools.pyx":3235
+ /* "pysam/csamtools.pyx":3452
*
* # get error messages
* pysam_unset_stderr() # <<<<<<<<<<<<<<
*/
pysam_unset_stderr();
- /* "pysam/csamtools.pyx":3236
+ /* "pysam/csamtools.pyx":3453
* # get error messages
* pysam_unset_stderr()
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_11);
/*try:*/ {
- /* "pysam/csamtools.pyx":3237
+ /* "pysam/csamtools.pyx":3454
* pysam_unset_stderr()
* try:
* with open( stderr_f, "r") as inf: # <<<<<<<<<<<<<<
* except UnicodeDecodeError:
*/
/*with:*/ {
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_stderr_f);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stderr_f);
__Pyx_INCREF(((PyObject *)__pyx_n_s__r));
PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__r));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
- __pyx_t_1 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_15 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
+ __pyx_t_15 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____enter__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____enter__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L86_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_inf = __pyx_t_4;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":3238
+ /* "pysam/csamtools.pyx":3455
* try:
* with open( stderr_f, "r") as inf:
* out_stderr = inf.readlines() # <<<<<<<<<<<<<<
* except UnicodeDecodeError:
* with open( stderr_f, "rb") as inf:
*/
- __pyx_t_4 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3238; __pyx_clineno = __LINE__; goto __pyx_L92_error;}
+ __pyx_t_4 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3455; __pyx_clineno = __LINE__; goto __pyx_L92_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3238; __pyx_clineno = __LINE__; goto __pyx_L92_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3455; __pyx_clineno = __LINE__; goto __pyx_L92_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_out_stderr = __pyx_t_1;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3237
+ /* "pysam/csamtools.pyx":3454
* pysam_unset_stderr()
* try:
* with open( stderr_f, "r") as inf: # <<<<<<<<<<<<<<
*/
/*except:*/ {
__Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_19 = PyObject_Call(__pyx_t_15, __pyx_t_6, NULL);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+ if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
__Pyx_GOTREF(__pyx_t_19);
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_19);
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+ if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
__pyx_t_2 = (!__pyx_t_5);
if (__pyx_t_2) {
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_ErrRestore(__pyx_t_1, __pyx_t_4, __pyx_t_3);
__pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L94_except_error;}
goto __pyx_L103;
}
__pyx_L103:;
}
/*finally:*/ {
if (__pyx_t_15) {
- __pyx_t_18 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_187, NULL);
+ __pyx_t_18 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_195, NULL);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
+ if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
__Pyx_GOTREF(__pyx_t_18);
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_18);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
+ if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L78_error;}
}
}
goto __pyx_L104;
}
/*else:*/ {
- /* "pysam/csamtools.pyx":3244
+ /* "pysam/csamtools.pyx":3461
* out_stderr = inf.read()
* else:
* out_stderr = [] # <<<<<<<<<<<<<<
* finally:
* os.remove( stderr_f )
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3461; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_out_stderr);
__pyx_v_out_stderr = ((PyObject *)__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3239
+ /* "pysam/csamtools.pyx":3456
* with open( stderr_f, "r") as inf:
* out_stderr = inf.readlines()
* except UnicodeDecodeError: # <<<<<<<<<<<<<<
__pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
if (__pyx_t_8) {
__Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+ if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3456; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_1);
- /* "pysam/csamtools.pyx":3240
+ /* "pysam/csamtools.pyx":3457
* out_stderr = inf.readlines()
* except UnicodeDecodeError:
* with open( stderr_f, "rb") as inf: # <<<<<<<<<<<<<<
* out_stderr = inf.read()
*/
/*with:*/ {
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_stderr_f);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stderr_f);
__Pyx_INCREF(((PyObject *)__pyx_n_s__rb));
PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__rb));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__rb));
- __pyx_t_21 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+ __pyx_t_21 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
__Pyx_GOTREF(__pyx_t_21);
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_15 = PyObject_GetAttr(__pyx_t_21, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+ __pyx_t_15 = PyObject_GetAttr(__pyx_t_21, __pyx_n_s____exit__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_6 = PyObject_GetAttr(__pyx_t_21, __pyx_n_s____enter__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L107_error;}
+ __pyx_t_6 = PyObject_GetAttr(__pyx_t_21, __pyx_n_s____enter__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L107_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_20 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L107_error;}
+ __pyx_t_20 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L107_error;}
__Pyx_GOTREF(__pyx_t_20);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
__pyx_v_inf = __pyx_t_20;
__Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- /* "pysam/csamtools.pyx":3242
+ /* "pysam/csamtools.pyx":3459
* with open( stderr_f, "rb") as inf:
* # read binary output
* out_stderr = inf.read() # <<<<<<<<<<<<<<
* else:
* out_stderr = []
*/
- __pyx_t_20 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__read); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
+ __pyx_t_20 = PyObject_GetAttr(__pyx_v_inf, __pyx_n_s__read); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3459; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
__Pyx_GOTREF(__pyx_t_20);
- __pyx_t_21 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
+ __pyx_t_21 = PyObject_Call(__pyx_t_20, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3459; __pyx_clineno = __LINE__; goto __pyx_L113_error;}
__Pyx_GOTREF(__pyx_t_21);
__Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
__Pyx_XDECREF(__pyx_v_out_stderr);
__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
__Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
- /* "pysam/csamtools.pyx":3240
+ /* "pysam/csamtools.pyx":3457
* out_stderr = inf.readlines()
* except UnicodeDecodeError:
* with open( stderr_f, "rb") as inf: # <<<<<<<<<<<<<<
*/
/*except:*/ {
__Pyx_AddTraceback("pysam.csamtools._samtools_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+ if (__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
__Pyx_GOTREF(__pyx_t_21);
__Pyx_GOTREF(__pyx_t_20);
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+ __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
__Pyx_GOTREF(__pyx_t_22);
__Pyx_INCREF(__pyx_t_21);
PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_21);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_19 = PyObject_Call(__pyx_t_15, __pyx_t_22, NULL);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+ if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
__Pyx_GOTREF(__pyx_t_19);
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_19);
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+ if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
__pyx_t_5 = (!__pyx_t_2);
if (__pyx_t_5) {
__Pyx_GIVEREF(__pyx_t_21);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_ErrRestore(__pyx_t_21, __pyx_t_20, __pyx_t_6);
__pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_6 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L115_except_error;}
goto __pyx_L124;
}
__pyx_L124:;
}
/*finally:*/ {
if (__pyx_t_15) {
- __pyx_t_16 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_188, NULL);
+ __pyx_t_16 = PyObject_Call(__pyx_t_15, __pyx_k_tuple_196, NULL);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+ if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
__Pyx_GOTREF(__pyx_t_16);
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
+ if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L80_except_error;}
}
}
goto __pyx_L125;
}
}
- /* "pysam/csamtools.pyx":3246
+ /* "pysam/csamtools.pyx":3463
* out_stderr = []
* finally:
* os.remove( stderr_f ) # <<<<<<<<<<<<<<
goto __pyx_L77;
}
__pyx_L77:;
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3463; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
+ __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3463; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3463; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_stderr_f);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_stderr_f);
__Pyx_GIVEREF(__pyx_v_stderr_f);
- __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3463; __pyx_clineno = __LINE__; goto __pyx_L126_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
}
}
- /* "pysam/csamtools.pyx":3248
+ /* "pysam/csamtools.pyx":3465
* os.remove( stderr_f )
*
* return retval, out_stderr, out_stdout # <<<<<<<<<<<<<<
* cdef class SNPCall:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (unlikely(!__pyx_v_out_stderr)) { __Pyx_RaiseUnboundLocalError("out_stderr"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- if (unlikely(!__pyx_v_out_stdout)) { __Pyx_RaiseUnboundLocalError("out_stdout"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_v_out_stderr)) { __Pyx_RaiseUnboundLocalError("out_stderr"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_v_out_stdout)) { __Pyx_RaiseUnboundLocalError("out_stdout"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3263
+/* "pysam/csamtools.pyx":3480
* property tid:
* '''the chromosome ID as is defined in the header'''
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3263);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3480);
- /* "pysam/csamtools.pyx":3264
+ /* "pysam/csamtools.pyx":3481
* '''the chromosome ID as is defined in the header'''
* def __get__(self):
* return self._tid # <<<<<<<<<<<<<<
* property pos:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_tid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3268
+/* "pysam/csamtools.pyx":3485
* property pos:
* '''nucleotide position of SNP.'''
* def __get__(self): return self._pos # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3268);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3485);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3272
+/* "pysam/csamtools.pyx":3489
* property reference_base:
* '''reference base at pos. ``N`` if no reference sequence supplied.'''
* def __get__(self): return from_string_and_size( &self._reference_base, 1 ) # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3272);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3489);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_5pysam_9csamtools_from_string_and_size((&__pyx_v_self->_reference_base), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_5pysam_9csamtools_from_string_and_size((&__pyx_v_self->_reference_base), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3276
+/* "pysam/csamtools.pyx":3493
* property genotype:
* '''the genotype called.'''
* def __get__(self): return from_string_and_size( &self._genotype, 1 ) # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3276);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3493);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_5pysam_9csamtools_from_string_and_size((&__pyx_v_self->_genotype), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_5pysam_9csamtools_from_string_and_size((&__pyx_v_self->_genotype), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3280
+/* "pysam/csamtools.pyx":3497
* property consensus_quality:
* '''the genotype quality (Phred-scaled).'''
* def __get__(self): return self._consensus_quality # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3280);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3497);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_consensus_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_consensus_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3284
+/* "pysam/csamtools.pyx":3501
* property snp_quality:
* '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.'''
* def __get__(self): return self._snp_quality # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3284);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3501);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_snp_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_snp_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3288
+/* "pysam/csamtools.pyx":3505
* property mapping_quality:
* '''the root mean square (rms) of the mapping quality of all reads involved in the call.'''
* def __get__(self): return self._rms_mapping_quality # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3288);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3505);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_rms_mapping_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_rms_mapping_quality); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3292
+/* "pysam/csamtools.pyx":3509
* property coverage:
* '''coverage or read depth - the number of reads involved in the call.'''
* def __get__(self): return self._coverage # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_TraceCall("__get__", __pyx_f[0], 3292);
+ __Pyx_TraceCall("__get__", __pyx_f[0], 3509);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_coverage); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_coverage); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3294
+/* "pysam/csamtools.pyx":3511
* def __get__(self): return self._coverage
*
* def __str__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__str__", 0);
- __Pyx_TraceCall("__str__", __pyx_f[0], 3294);
+ __Pyx_TraceCall("__str__", __pyx_f[0], 3511);
- /* "pysam/csamtools.pyx":3296
+ /* "pysam/csamtools.pyx":3513
* def __str__(self):
*
* return "\t".join( map(str, ( # <<<<<<<<<<<<<<
* self.pos,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_5), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "pysam/csamtools.pyx":3297
+ /* "pysam/csamtools.pyx":3514
*
* return "\t".join( map(str, (
* self.tid, # <<<<<<<<<<<<<<
* self.pos,
* self.reference_base,
*/
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- /* "pysam/csamtools.pyx":3298
+ /* "pysam/csamtools.pyx":3515
* return "\t".join( map(str, (
* self.tid,
* self.pos, # <<<<<<<<<<<<<<
* self.reference_base,
* self.genotype,
*/
- __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- /* "pysam/csamtools.pyx":3299
+ /* "pysam/csamtools.pyx":3516
* self.tid,
* self.pos,
* self.reference_base, # <<<<<<<<<<<<<<
* self.genotype,
* self.consensus_quality,
*/
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__reference_base); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__reference_base); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- /* "pysam/csamtools.pyx":3300
+ /* "pysam/csamtools.pyx":3517
* self.pos,
* self.reference_base,
* self.genotype, # <<<<<<<<<<<<<<
* self.consensus_quality,
* self.snp_quality,
*/
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__genotype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__genotype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- /* "pysam/csamtools.pyx":3301
+ /* "pysam/csamtools.pyx":3518
* self.reference_base,
* self.genotype,
* self.consensus_quality, # <<<<<<<<<<<<<<
* self.snp_quality,
* self.mapping_quality,
*/
- __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__consensus_quality); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__consensus_quality); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- /* "pysam/csamtools.pyx":3302
+ /* "pysam/csamtools.pyx":3519
* self.genotype,
* self.consensus_quality,
* self.snp_quality, # <<<<<<<<<<<<<<
* self.mapping_quality,
* self.coverage ) ) )
*/
- __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__snp_quality); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__snp_quality); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- /* "pysam/csamtools.pyx":3303
+ /* "pysam/csamtools.pyx":3520
* self.consensus_quality,
* self.snp_quality,
* self.mapping_quality, # <<<<<<<<<<<<<<
* self.coverage ) ) )
*
*/
- __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mapping_quality); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__mapping_quality); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- /* "pysam/csamtools.pyx":3304
+ /* "pysam/csamtools.pyx":3521
* self.snp_quality,
* self.mapping_quality,
* self.coverage ) ) ) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coverage); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coverage); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = PyTuple_New(8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_7 = 0;
__pyx_t_8 = 0;
__pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_t_10));
__Pyx_GIVEREF(((PyObject *)__pyx_t_10));
__pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
__pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4031; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_samfile = ((struct __pyx_obj_5pysam_9csamtools_Samfile *)values[0]);
if (values[1]) {
- __pyx_v_reopen = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_reopen = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4031; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "pysam/csamtools.pyx":3814
+ /* "pysam/csamtools.pyx":4031
* """
*
* def __init__(self, Samfile samfile, int reopen = True ): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4031; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("pysam.csamtools.IndexedReads.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_5pysam_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_5pysam_9csamtools_12IndexedReads___init__(((struct __pyx_obj_5pysam_9csamtools_IndexedReads *)__pyx_v_self), __pyx_v_samfile, __pyx_v_reopen);
goto __pyx_L0;
__pyx_L1_error:;
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- __Pyx_TraceCall("__init__", __pyx_f[0], 3814);
+ __Pyx_TraceCall("__init__", __pyx_f[0], 4031);
- /* "pysam/csamtools.pyx":3815
+ /* "pysam/csamtools.pyx":4032
*
* def __init__(self, Samfile samfile, int reopen = True ):
* self.samfile = samfile # <<<<<<<<<<<<<<
__Pyx_DECREF(((PyObject *)__pyx_v_self->samfile));
__pyx_v_self->samfile = __pyx_v_samfile;
- /* "pysam/csamtools.pyx":3817
+ /* "pysam/csamtools.pyx":4034
* self.samfile = samfile
*
* if samfile.isbam: mode = b"rb" # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":3818
+ /* "pysam/csamtools.pyx":4035
*
* if samfile.isbam: mode = b"rb"
* else: mode = b"r" # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pysam/csamtools.pyx":3822
+ /* "pysam/csamtools.pyx":4039
* # reopen the file - note that this makes the iterator
* # slow and causes pileup to slow down significantly.
* if reopen: # <<<<<<<<<<<<<<
*/
if (__pyx_v_reopen) {
- /* "pysam/csamtools.pyx":3823
+ /* "pysam/csamtools.pyx":4040
* # slow and causes pileup to slow down significantly.
* if reopen:
* store = StderrStore() # <<<<<<<<<<<<<<
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release()
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_store = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":3824
+ /* "pysam/csamtools.pyx":4041
* if reopen:
* store = StderrStore()
* self.fp = samopen( samfile._filename, mode, NULL ) # <<<<<<<<<<<<<<
* store.release()
* assert self.fp != NULL
*/
- __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_mode)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->fp = samopen(__pyx_v_samfile->_filename, __pyx_t_3, NULL);
- /* "pysam/csamtools.pyx":3825
+ /* "pysam/csamtools.pyx":4042
* store = StderrStore()
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release() # <<<<<<<<<<<<<<
* assert self.fp != NULL
* self.owns_samfile = True
*/
- __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3826
+ /* "pysam/csamtools.pyx":4043
* self.fp = samopen( samfile._filename, mode, NULL )
* store.release()
* assert self.fp != NULL # <<<<<<<<<<<<<<
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!(__pyx_v_self->fp != NULL))) {
PyErr_SetNone(PyExc_AssertionError);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
- /* "pysam/csamtools.pyx":3827
+ /* "pysam/csamtools.pyx":4044
* store.release()
* assert self.fp != NULL
* self.owns_samfile = True # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "pysam/csamtools.pyx":3829
+ /* "pysam/csamtools.pyx":4046
* self.owns_samfile = True
* else:
* self.fp = samfile.samfile # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_samfile->samfile;
__pyx_v_self->fp = __pyx_t_4;
- /* "pysam/csamtools.pyx":3830
+ /* "pysam/csamtools.pyx":4047
* else:
* self.fp = samfile.samfile
* self.owns_samfile = False # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "pysam/csamtools.pyx":3832
+ /* "pysam/csamtools.pyx":4049
* self.owns_samfile = False
*
* assert samfile.isbam, "can only IndexReads on bam files" # <<<<<<<<<<<<<<
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!__pyx_v_samfile->isbam)) {
- PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_189));
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_197));
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#endif
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3834
+/* "pysam/csamtools.pyx":4051
* assert samfile.isbam, "can only IndexReads on bam files"
*
* def build( self ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("build", 0);
- __Pyx_TraceCall("build", __pyx_f[0], 3834);
+ __Pyx_TraceCall("build", __pyx_f[0], 4051);
- /* "pysam/csamtools.pyx":3837
+ /* "pysam/csamtools.pyx":4054
* '''build index.'''
*
* self.index = collections.defaultdict( list ) # <<<<<<<<<<<<<<
*
* # this method will start indexing from the current file position
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyList_Type))));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyList_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyList_Type))));
- __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__pyx_v_self->index = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3841
+ /* "pysam/csamtools.pyx":4058
* # this method will start indexing from the current file position
* # if you decide
* cdef int ret = 1 # <<<<<<<<<<<<<<
*/
__pyx_v_ret = 1;
- /* "pysam/csamtools.pyx":3842
+ /* "pysam/csamtools.pyx":4059
* # if you decide
* cdef int ret = 1
* cdef bam1_t * b = <bam1_t*> calloc(1, sizeof( bam1_t) ) # <<<<<<<<<<<<<<
*/
__pyx_v_b = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
- /* "pysam/csamtools.pyx":3846
+ /* "pysam/csamtools.pyx":4063
* cdef uint64_t pos
*
* while ret > 0: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_v_ret > 0);
if (!__pyx_t_4) break;
- /* "pysam/csamtools.pyx":3847
+ /* "pysam/csamtools.pyx":4064
*
* while ret > 0:
* pos = bam_tell( self.fp.x.bam ) # <<<<<<<<<<<<<<
*/
__pyx_v_pos = bam_tell(__pyx_v_self->fp->x.bam);
- /* "pysam/csamtools.pyx":3848
+ /* "pysam/csamtools.pyx":4065
* while ret > 0:
* pos = bam_tell( self.fp.x.bam )
* ret = samread( self.fp, b) # <<<<<<<<<<<<<<
*/
__pyx_v_ret = samread(__pyx_v_self->fp, __pyx_v_b);
- /* "pysam/csamtools.pyx":3849
+ /* "pysam/csamtools.pyx":4066
* pos = bam_tell( self.fp.x.bam )
* ret = samread( self.fp, b)
* if ret > 0: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_v_ret > 0);
if (__pyx_t_4) {
- /* "pysam/csamtools.pyx":3850
+ /* "pysam/csamtools.pyx":4067
* ret = samread( self.fp, b)
* if ret > 0:
* qname = _charptr_to_str(bam1_qname( b )) # <<<<<<<<<<<<<<
* self.index[qname].append( pos )
*
*/
- __pyx_t_3 = __pyx_f_5pysam_9csamtools__charptr_to_str(bam1_qname(__pyx_v_b)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_5pysam_9csamtools__charptr_to_str(bam1_qname(__pyx_v_b)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_qname);
__pyx_v_qname = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pysam/csamtools.pyx":3851
+ /* "pysam/csamtools.pyx":4068
* if ret > 0:
* qname = _charptr_to_str(bam1_qname( b ))
* self.index[qname].append( pos ) # <<<<<<<<<<<<<<
*
* bam_destroy1( b )
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_v_self->index, __pyx_v_qname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_self->index, __pyx_v_qname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyInt_to_py_uint64_t(__pyx_v_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_to_py_uint64_t(__pyx_v_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_L5:;
}
- /* "pysam/csamtools.pyx":3853
+ /* "pysam/csamtools.pyx":4070
* self.index[qname].append( pos )
*
* bam_destroy1( b ) # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pysam/csamtools.pyx":3855
+/* "pysam/csamtools.pyx":4072
* bam_destroy1( b )
*
* def find( self, qname ): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("find", 0);
- __Pyx_TraceCall("find", __pyx_f[0], 3855);
+ __Pyx_TraceCall("find", __pyx_f[0], 4072);
- /* "pysam/csamtools.pyx":3856
+ /* "pysam/csamtools.pyx":4073
*
* def find( self, qname ):
* if qname in self.index: # <<<<<<<<<<<<<<
* return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )
* else:
*/
- __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_qname, __pyx_v_self->index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_qname, __pyx_v_self->index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "pysam/csamtools.pyx":3857
+ /* "pysam/csamtools.pyx":4074
* def find( self, qname ):
* if qname in self.index:
* return IteratorRowSelection( self.samfile, self.index[qname], reopen = False ) # <<<<<<<<<<<<<<
* raise KeyError( "read %s not found" % qname )
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_GetItem(__pyx_v_self->index, __pyx_v_qname); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_self->index, __pyx_v_qname); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self->samfile));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->samfile));
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
- __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowSelection)), ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5pysam_9csamtools_IteratorRowSelection)), ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
}
/*else*/ {
- /* "pysam/csamtools.pyx":3859
+ /* "pysam/csamtools.pyx":4076
* return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )
* else:
* raise KeyError( "read %s not found" % qname ) # <<<<<<<<<<<<<<
*
* def __dealloc__(self):
*/
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_190), __pyx_v_qname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_198), __pyx_v_qname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
__Pyx_GIVEREF(((PyObject *)__pyx_t_4));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
__Pyx_RefNannyFinishContext();
}
-/* "pysam/csamtools.pyx":3861
+/* "pysam/csamtools.pyx":4078
* raise KeyError( "read %s not found" % qname )
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_TraceDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- __Pyx_TraceCall("__dealloc__", __pyx_f[0], 3861);
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 4078);
- /* "pysam/csamtools.pyx":3862
+ /* "pysam/csamtools.pyx":4079
*
* def __dealloc__(self):
* if self.owns_samfile: samclose( self.fp ) # <<<<<<<<<<<<<<
};
static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_Fastafile[] = {
- {(char *)"filename", __pyx_getprop_5pysam_9csamtools_9Fastafile_filename, 0, __Pyx_DOCSTR(__pyx_k_191), 0},
+ {(char *)"filename", __pyx_getprop_5pysam_9csamtools_9Fastafile_filename, 0, __Pyx_DOCSTR(__pyx_k_199), 0},
{0, 0, 0, 0, 0}
};
#endif
};
-static PySequenceMethods __pyx_tp_as_sequence_Fastafile = {
- __pyx_pw_5pysam_9csamtools_9Fastafile_5__len__, /*sq_length*/
+static PySequenceMethods __pyx_tp_as_sequence_Fastafile = {
+ __pyx_pw_5pysam_9csamtools_9Fastafile_5__len__, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ 0, /*sq_item*/
+ 0, /*sq_slice*/
+ 0, /*sq_ass_item*/
+ 0, /*sq_ass_slice*/
+ 0, /*sq_contains*/
+ 0, /*sq_inplace_concat*/
+ 0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_Fastafile = {
+ __pyx_pw_5pysam_9csamtools_9Fastafile_5__len__, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_Fastafile = {
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getreadbuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getwritebuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getsegcount*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getcharbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*bf_getbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*bf_releasebuffer*/
+ #endif
+};
+
+static PyTypeObject __pyx_type_5pysam_9csamtools_Fastafile = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("pysam.csamtools.Fastafile"), /*tp_name*/
+ sizeof(struct __pyx_obj_5pysam_9csamtools_Fastafile), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pysam_9csamtools_Fastafile, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*tp_repr*/
+ &__pyx_tp_as_number_Fastafile, /*tp_as_number*/
+ &__pyx_tp_as_sequence_Fastafile, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_Fastafile, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_Fastafile, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ __Pyx_DOCSTR("*(filename)*\n\n A *FASTA* file. The file is automatically opened.\n\n The file expects an indexed fasta file.\n\n TODO:\n add automatic indexing.\n add function to get sequence names.\n "), /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_5pysam_9csamtools_Fastafile, /*tp_methods*/
+ 0, /*tp_members*/
+ __pyx_getsets_5pysam_9csamtools_Fastafile, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pysam_9csamtools_Fastafile, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_5pysam_9csamtools_FastqProxy(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_9csamtools_FastqProxy(PyObject *o) {
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_9csamtools_10FastqProxy_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_5pysam_9csamtools_10FastqProxy_4name_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_9csamtools_10FastqProxy_sequence(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_5pysam_9csamtools_10FastqProxy_8sequence_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_9csamtools_10FastqProxy_comment(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_5pysam_9csamtools_10FastqProxy_7comment_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_9csamtools_10FastqProxy_quality(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_5pysam_9csamtools_10FastqProxy_7quality_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_9csamtools_FastqProxy[] = {
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_FastqProxy[] = {
+ {(char *)"name", __pyx_getprop_5pysam_9csamtools_10FastqProxy_name, 0, 0, 0},
+ {(char *)"sequence", __pyx_getprop_5pysam_9csamtools_10FastqProxy_sequence, 0, 0, 0},
+ {(char *)"comment", __pyx_getprop_5pysam_9csamtools_10FastqProxy_comment, 0, 0, 0},
+ {(char *)"quality", __pyx_getprop_5pysam_9csamtools_10FastqProxy_quality, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_FastqProxy = {
+ 0, /*nb_add*/
+ 0, /*nb_subtract*/
+ 0, /*nb_multiply*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_divide*/
+ #endif
+ 0, /*nb_remainder*/
+ 0, /*nb_divmod*/
+ 0, /*nb_power*/
+ 0, /*nb_negative*/
+ 0, /*nb_positive*/
+ 0, /*nb_absolute*/
+ 0, /*nb_nonzero*/
+ 0, /*nb_invert*/
+ 0, /*nb_lshift*/
+ 0, /*nb_rshift*/
+ 0, /*nb_and*/
+ 0, /*nb_xor*/
+ 0, /*nb_or*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_coerce*/
+ #endif
+ 0, /*nb_int*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_long*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*nb_float*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_oct*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_hex*/
+ #endif
+ 0, /*nb_inplace_add*/
+ 0, /*nb_inplace_subtract*/
+ 0, /*nb_inplace_multiply*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_inplace_divide*/
+ #endif
+ 0, /*nb_inplace_remainder*/
+ 0, /*nb_inplace_power*/
+ 0, /*nb_inplace_lshift*/
+ 0, /*nb_inplace_rshift*/
+ 0, /*nb_inplace_and*/
+ 0, /*nb_inplace_xor*/
+ 0, /*nb_inplace_or*/
+ 0, /*nb_floor_divide*/
+ 0, /*nb_true_divide*/
+ 0, /*nb_inplace_floor_divide*/
+ 0, /*nb_inplace_true_divide*/
+ #if PY_VERSION_HEX >= 0x02050000
+ 0, /*nb_index*/
+ #endif
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_FastqProxy = {
+ 0, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ 0, /*sq_item*/
+ 0, /*sq_slice*/
+ 0, /*sq_ass_item*/
+ 0, /*sq_ass_slice*/
+ 0, /*sq_contains*/
+ 0, /*sq_inplace_concat*/
+ 0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_FastqProxy = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_FastqProxy = {
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getreadbuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getwritebuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getsegcount*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getcharbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*bf_getbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*bf_releasebuffer*/
+ #endif
+};
+
+static PyTypeObject __pyx_type_5pysam_9csamtools_FastqProxy = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("pysam.csamtools.FastqProxy"), /*tp_name*/
+ sizeof(struct __pyx_obj_5pysam_9csamtools_FastqProxy), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pysam_9csamtools_FastqProxy, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*tp_repr*/
+ &__pyx_tp_as_number_FastqProxy, /*tp_as_number*/
+ &__pyx_tp_as_sequence_FastqProxy, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_FastqProxy, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_FastqProxy, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ __Pyx_DOCSTR("FastqProxy()"), /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_5pysam_9csamtools_FastqProxy, /*tp_methods*/
+ 0, /*tp_members*/
+ __pyx_getsets_5pysam_9csamtools_FastqProxy, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pw_5pysam_9csamtools_10FastqProxy_1__init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pysam_9csamtools_FastqProxy, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+};
+static struct __pyx_vtabstruct_5pysam_9csamtools_Fastqfile __pyx_vtable_5pysam_9csamtools_Fastqfile;
+
+static PyObject *__pyx_tp_new_5pysam_9csamtools_Fastqfile(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_5pysam_9csamtools_Fastqfile *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_5pysam_9csamtools_Fastqfile *)o);
+ p->__pyx_vtab = __pyx_vtabptr_5pysam_9csamtools_Fastqfile;
+ if (__pyx_pw_5pysam_9csamtools_9Fastqfile_1__cinit__(o, a, k) < 0) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pysam_9csamtools_Fastqfile(PyObject *o) {
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_5pysam_9csamtools_9Fastqfile_9__dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_5pysam_9csamtools_9Fastqfile_filename(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_5pysam_9csamtools_9Fastqfile_8filename_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_5pysam_9csamtools_Fastqfile[] = {
+ {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastqfile_3_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastqfile_2_isOpen)},
+ {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastqfile_5_open, METH_O, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastqfile_4_open)},
+ {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastqfile_7close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastqfile_6close)},
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastqfile_13__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastqfile_12__next__)},
+ {__Pyx_NAMESTR("test"), (PyCFunction)__pyx_pw_5pysam_9csamtools_9Fastqfile_15test, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5pysam_9csamtools_9Fastqfile_14test)},
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_Fastqfile[] = {
+ {(char *)"filename", __pyx_getprop_5pysam_9csamtools_9Fastqfile_filename, 0, __Pyx_DOCSTR(__pyx_k_199), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_Fastqfile = {
+ 0, /*nb_add*/
+ 0, /*nb_subtract*/
+ 0, /*nb_multiply*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_divide*/
+ #endif
+ 0, /*nb_remainder*/
+ 0, /*nb_divmod*/
+ 0, /*nb_power*/
+ 0, /*nb_negative*/
+ 0, /*nb_positive*/
+ 0, /*nb_absolute*/
+ 0, /*nb_nonzero*/
+ 0, /*nb_invert*/
+ 0, /*nb_lshift*/
+ 0, /*nb_rshift*/
+ 0, /*nb_and*/
+ 0, /*nb_xor*/
+ 0, /*nb_or*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_coerce*/
+ #endif
+ 0, /*nb_int*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_long*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*nb_float*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_oct*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_hex*/
+ #endif
+ 0, /*nb_inplace_add*/
+ 0, /*nb_inplace_subtract*/
+ 0, /*nb_inplace_multiply*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_inplace_divide*/
+ #endif
+ 0, /*nb_inplace_remainder*/
+ 0, /*nb_inplace_power*/
+ 0, /*nb_inplace_lshift*/
+ 0, /*nb_inplace_rshift*/
+ 0, /*nb_inplace_and*/
+ 0, /*nb_inplace_xor*/
+ 0, /*nb_inplace_or*/
+ 0, /*nb_floor_divide*/
+ 0, /*nb_true_divide*/
+ 0, /*nb_inplace_floor_divide*/
+ 0, /*nb_inplace_true_divide*/
+ #if PY_VERSION_HEX >= 0x02050000
+ 0, /*nb_index*/
+ #endif
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_Fastqfile = {
+ 0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
0, /*sq_item*/
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping_Fastafile = {
- __pyx_pw_5pysam_9csamtools_9Fastafile_5__len__, /*mp_length*/
+static PyMappingMethods __pyx_tp_as_mapping_Fastqfile = {
+ 0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyBufferProcs __pyx_tp_as_buffer_Fastafile = {
+static PyBufferProcs __pyx_tp_as_buffer_Fastqfile = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
#endif
};
-static PyTypeObject __pyx_type_5pysam_9csamtools_Fastafile = {
+static PyTypeObject __pyx_type_5pysam_9csamtools_Fastqfile = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("pysam.csamtools.Fastafile"), /*tp_name*/
- sizeof(struct __pyx_obj_5pysam_9csamtools_Fastafile), /*tp_basicsize*/
+ __Pyx_NAMESTR("pysam.csamtools.Fastqfile"), /*tp_name*/
+ sizeof(struct __pyx_obj_5pysam_9csamtools_Fastqfile), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_5pysam_9csamtools_Fastafile, /*tp_dealloc*/
+ __pyx_tp_dealloc_5pysam_9csamtools_Fastqfile, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*reserved*/
#endif
0, /*tp_repr*/
- &__pyx_tp_as_number_Fastafile, /*tp_as_number*/
- &__pyx_tp_as_sequence_Fastafile, /*tp_as_sequence*/
- &__pyx_tp_as_mapping_Fastafile, /*tp_as_mapping*/
+ &__pyx_tp_as_number_Fastqfile, /*tp_as_number*/
+ &__pyx_tp_as_sequence_Fastqfile, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_Fastqfile, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer_Fastafile, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer_Fastqfile, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- __Pyx_DOCSTR("*(filename)*\n\n A *FASTA* file. The file is automatically opened.\n\n The file expects an indexed fasta file.\n\n TODO:\n add automatic indexing.\n add function to get sequence names.\n "), /*tp_doc*/
+ __Pyx_DOCSTR("*(filename)*\n\n A *FASTQ* file. The file is automatically opened.\n\n "), /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_5pysam_9csamtools_Fastafile, /*tp_methods*/
+ __pyx_pw_5pysam_9csamtools_9Fastqfile_11__iter__, /*tp_iter*/
+ __pyx_pw_5pysam_9csamtools_9Fastqfile_13__next__, /*tp_iternext*/
+ __pyx_methods_5pysam_9csamtools_Fastqfile, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_5pysam_9csamtools_Fastafile, /*tp_getset*/
+ __pyx_getsets_5pysam_9csamtools_Fastqfile, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_5pysam_9csamtools_Fastafile, /*tp_new*/
+ __pyx_tp_new_5pysam_9csamtools_Fastqfile, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
return __pyx_pw_5pysam_9csamtools_11AlignedRead_9positions_1__get__(o);
}
+static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_inferred_length(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_5pysam_9csamtools_11AlignedRead_15inferred_length_1__get__(o);
+}
+
static PyObject *__pyx_getprop_5pysam_9csamtools_11AlignedRead_aligned_pairs(PyObject *o, CYTHON_UNUSED void *x) {
return __pyx_pw_5pysam_9csamtools_11AlignedRead_13aligned_pairs_1__get__(o);
}
};
static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_AlignedRead[] = {
- {(char *)"qname", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qname, __pyx_setprop_5pysam_9csamtools_11AlignedRead_qname, __Pyx_DOCSTR(__pyx_k_192), 0},
- {(char *)"cigar", __pyx_getprop_5pysam_9csamtools_11AlignedRead_cigar, __pyx_setprop_5pysam_9csamtools_11AlignedRead_cigar, __Pyx_DOCSTR(__pyx_k_193), 0},
- {(char *)"cigarstring", __pyx_getprop_5pysam_9csamtools_11AlignedRead_cigarstring, __pyx_setprop_5pysam_9csamtools_11AlignedRead_cigarstring, __Pyx_DOCSTR(__pyx_k_194), 0},
- {(char *)"seq", __pyx_getprop_5pysam_9csamtools_11AlignedRead_seq, __pyx_setprop_5pysam_9csamtools_11AlignedRead_seq, __Pyx_DOCSTR(__pyx_k_195), 0},
- {(char *)"qual", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qual, __pyx_setprop_5pysam_9csamtools_11AlignedRead_qual, __Pyx_DOCSTR(__pyx_k_196), 0},
- {(char *)"query", __pyx_getprop_5pysam_9csamtools_11AlignedRead_query, 0, __Pyx_DOCSTR(__pyx_k_197), 0},
- {(char *)"qqual", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qqual, 0, __Pyx_DOCSTR(__pyx_k_198), 0},
- {(char *)"qstart", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qstart, 0, __Pyx_DOCSTR(__pyx_k_199), 0},
- {(char *)"qend", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qend, 0, __Pyx_DOCSTR(__pyx_k_200), 0},
- {(char *)"qlen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qlen, 0, __Pyx_DOCSTR(__pyx_k_201), 0},
- {(char *)"tags", __pyx_getprop_5pysam_9csamtools_11AlignedRead_tags, __pyx_setprop_5pysam_9csamtools_11AlignedRead_tags, __Pyx_DOCSTR(__pyx_k_202), 0},
- {(char *)"flag", __pyx_getprop_5pysam_9csamtools_11AlignedRead_flag, __pyx_setprop_5pysam_9csamtools_11AlignedRead_flag, __Pyx_DOCSTR(__pyx_k_203), 0},
- {(char *)"rname", __pyx_getprop_5pysam_9csamtools_11AlignedRead_rname, __pyx_setprop_5pysam_9csamtools_11AlignedRead_rname, __Pyx_DOCSTR(__pyx_k_204), 0},
- {(char *)"tid", __pyx_getprop_5pysam_9csamtools_11AlignedRead_tid, __pyx_setprop_5pysam_9csamtools_11AlignedRead_tid, __Pyx_DOCSTR(__pyx_k_205), 0},
- {(char *)"pos", __pyx_getprop_5pysam_9csamtools_11AlignedRead_pos, __pyx_setprop_5pysam_9csamtools_11AlignedRead_pos, __Pyx_DOCSTR(__pyx_k_206), 0},
- {(char *)"bin", __pyx_getprop_5pysam_9csamtools_11AlignedRead_bin, __pyx_setprop_5pysam_9csamtools_11AlignedRead_bin, __Pyx_DOCSTR(__pyx_k_207), 0},
- {(char *)"rlen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_rlen, 0, __Pyx_DOCSTR(__pyx_k_208), 0},
- {(char *)"aend", __pyx_getprop_5pysam_9csamtools_11AlignedRead_aend, 0, __Pyx_DOCSTR(__pyx_k_209), 0},
- {(char *)"alen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_alen, 0, __Pyx_DOCSTR(__pyx_k_210), 0},
- {(char *)"mapq", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mapq, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mapq, __Pyx_DOCSTR(__pyx_k_211), 0},
- {(char *)"mrnm", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mrnm, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mrnm, __Pyx_DOCSTR(__pyx_k_212), 0},
- {(char *)"rnext", __pyx_getprop_5pysam_9csamtools_11AlignedRead_rnext, __pyx_setprop_5pysam_9csamtools_11AlignedRead_rnext, __Pyx_DOCSTR(__pyx_k_213), 0},
- {(char *)"mpos", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mpos, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mpos, __Pyx_DOCSTR(__pyx_k_214), 0},
- {(char *)"pnext", __pyx_getprop_5pysam_9csamtools_11AlignedRead_pnext, __pyx_setprop_5pysam_9csamtools_11AlignedRead_pnext, __Pyx_DOCSTR(__pyx_k_215), 0},
- {(char *)"isize", __pyx_getprop_5pysam_9csamtools_11AlignedRead_isize, __pyx_setprop_5pysam_9csamtools_11AlignedRead_isize, __Pyx_DOCSTR(__pyx_k_216), 0},
- {(char *)"tlen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_tlen, __pyx_setprop_5pysam_9csamtools_11AlignedRead_tlen, __Pyx_DOCSTR(__pyx_k_217), 0},
- {(char *)"is_paired", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_paired, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_paired, __Pyx_DOCSTR(__pyx_k_218), 0},
- {(char *)"is_proper_pair", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_proper_pair, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_proper_pair, __Pyx_DOCSTR(__pyx_k_219), 0},
- {(char *)"is_unmapped", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_unmapped, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_unmapped, __Pyx_DOCSTR(__pyx_k_220), 0},
- {(char *)"mate_is_unmapped", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mate_is_unmapped, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mate_is_unmapped, __Pyx_DOCSTR(__pyx_k_221), 0},
- {(char *)"is_reverse", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_reverse, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_reverse, __Pyx_DOCSTR(__pyx_k_222), 0},
- {(char *)"mate_is_reverse", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mate_is_reverse, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mate_is_reverse, __Pyx_DOCSTR(__pyx_k_223), 0},
- {(char *)"is_read1", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_read1, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_read1, __Pyx_DOCSTR(__pyx_k_224), 0},
- {(char *)"is_read2", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_read2, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_read2, __Pyx_DOCSTR(__pyx_k_225), 0},
- {(char *)"is_secondary", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_secondary, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_secondary, __Pyx_DOCSTR(__pyx_k_226), 0},
- {(char *)"is_qcfail", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_qcfail, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_qcfail, __Pyx_DOCSTR(__pyx_k_227), 0},
- {(char *)"is_duplicate", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_duplicate, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_duplicate, __Pyx_DOCSTR(__pyx_k_228), 0},
- {(char *)"positions", __pyx_getprop_5pysam_9csamtools_11AlignedRead_positions, 0, __Pyx_DOCSTR(__pyx_k_229), 0},
- {(char *)"aligned_pairs", __pyx_getprop_5pysam_9csamtools_11AlignedRead_aligned_pairs, 0, __Pyx_DOCSTR(__pyx_k_230), 0},
+ {(char *)"qname", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qname, __pyx_setprop_5pysam_9csamtools_11AlignedRead_qname, __Pyx_DOCSTR(__pyx_k_200), 0},
+ {(char *)"cigar", __pyx_getprop_5pysam_9csamtools_11AlignedRead_cigar, __pyx_setprop_5pysam_9csamtools_11AlignedRead_cigar, __Pyx_DOCSTR(__pyx_k_201), 0},
+ {(char *)"cigarstring", __pyx_getprop_5pysam_9csamtools_11AlignedRead_cigarstring, __pyx_setprop_5pysam_9csamtools_11AlignedRead_cigarstring, __Pyx_DOCSTR(__pyx_k_202), 0},
+ {(char *)"seq", __pyx_getprop_5pysam_9csamtools_11AlignedRead_seq, __pyx_setprop_5pysam_9csamtools_11AlignedRead_seq, __Pyx_DOCSTR(__pyx_k_203), 0},
+ {(char *)"qual", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qual, __pyx_setprop_5pysam_9csamtools_11AlignedRead_qual, __Pyx_DOCSTR(__pyx_k_204), 0},
+ {(char *)"query", __pyx_getprop_5pysam_9csamtools_11AlignedRead_query, 0, __Pyx_DOCSTR(__pyx_k_205), 0},
+ {(char *)"qqual", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qqual, 0, __Pyx_DOCSTR(__pyx_k_206), 0},
+ {(char *)"qstart", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qstart, 0, __Pyx_DOCSTR(__pyx_k_207), 0},
+ {(char *)"qend", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qend, 0, __Pyx_DOCSTR(__pyx_k_208), 0},
+ {(char *)"qlen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_qlen, 0, __Pyx_DOCSTR(__pyx_k_209), 0},
+ {(char *)"tags", __pyx_getprop_5pysam_9csamtools_11AlignedRead_tags, __pyx_setprop_5pysam_9csamtools_11AlignedRead_tags, __Pyx_DOCSTR(__pyx_k_210), 0},
+ {(char *)"flag", __pyx_getprop_5pysam_9csamtools_11AlignedRead_flag, __pyx_setprop_5pysam_9csamtools_11AlignedRead_flag, __Pyx_DOCSTR(__pyx_k_211), 0},
+ {(char *)"rname", __pyx_getprop_5pysam_9csamtools_11AlignedRead_rname, __pyx_setprop_5pysam_9csamtools_11AlignedRead_rname, __Pyx_DOCSTR(__pyx_k_212), 0},
+ {(char *)"tid", __pyx_getprop_5pysam_9csamtools_11AlignedRead_tid, __pyx_setprop_5pysam_9csamtools_11AlignedRead_tid, __Pyx_DOCSTR(__pyx_k_213), 0},
+ {(char *)"pos", __pyx_getprop_5pysam_9csamtools_11AlignedRead_pos, __pyx_setprop_5pysam_9csamtools_11AlignedRead_pos, __Pyx_DOCSTR(__pyx_k_214), 0},
+ {(char *)"bin", __pyx_getprop_5pysam_9csamtools_11AlignedRead_bin, __pyx_setprop_5pysam_9csamtools_11AlignedRead_bin, __Pyx_DOCSTR(__pyx_k_215), 0},
+ {(char *)"rlen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_rlen, 0, __Pyx_DOCSTR(__pyx_k_216), 0},
+ {(char *)"aend", __pyx_getprop_5pysam_9csamtools_11AlignedRead_aend, 0, __Pyx_DOCSTR(__pyx_k_217), 0},
+ {(char *)"alen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_alen, 0, __Pyx_DOCSTR(__pyx_k_218), 0},
+ {(char *)"mapq", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mapq, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mapq, __Pyx_DOCSTR(__pyx_k_219), 0},
+ {(char *)"mrnm", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mrnm, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mrnm, __Pyx_DOCSTR(__pyx_k_220), 0},
+ {(char *)"rnext", __pyx_getprop_5pysam_9csamtools_11AlignedRead_rnext, __pyx_setprop_5pysam_9csamtools_11AlignedRead_rnext, __Pyx_DOCSTR(__pyx_k_221), 0},
+ {(char *)"mpos", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mpos, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mpos, __Pyx_DOCSTR(__pyx_k_222), 0},
+ {(char *)"pnext", __pyx_getprop_5pysam_9csamtools_11AlignedRead_pnext, __pyx_setprop_5pysam_9csamtools_11AlignedRead_pnext, __Pyx_DOCSTR(__pyx_k_223), 0},
+ {(char *)"isize", __pyx_getprop_5pysam_9csamtools_11AlignedRead_isize, __pyx_setprop_5pysam_9csamtools_11AlignedRead_isize, __Pyx_DOCSTR(__pyx_k_224), 0},
+ {(char *)"tlen", __pyx_getprop_5pysam_9csamtools_11AlignedRead_tlen, __pyx_setprop_5pysam_9csamtools_11AlignedRead_tlen, __Pyx_DOCSTR(__pyx_k_225), 0},
+ {(char *)"is_paired", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_paired, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_paired, __Pyx_DOCSTR(__pyx_k_226), 0},
+ {(char *)"is_proper_pair", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_proper_pair, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_proper_pair, __Pyx_DOCSTR(__pyx_k_227), 0},
+ {(char *)"is_unmapped", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_unmapped, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_unmapped, __Pyx_DOCSTR(__pyx_k_228), 0},
+ {(char *)"mate_is_unmapped", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mate_is_unmapped, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mate_is_unmapped, __Pyx_DOCSTR(__pyx_k_229), 0},
+ {(char *)"is_reverse", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_reverse, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_reverse, __Pyx_DOCSTR(__pyx_k_230), 0},
+ {(char *)"mate_is_reverse", __pyx_getprop_5pysam_9csamtools_11AlignedRead_mate_is_reverse, __pyx_setprop_5pysam_9csamtools_11AlignedRead_mate_is_reverse, __Pyx_DOCSTR(__pyx_k_231), 0},
+ {(char *)"is_read1", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_read1, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_read1, __Pyx_DOCSTR(__pyx_k_232), 0},
+ {(char *)"is_read2", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_read2, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_read2, __Pyx_DOCSTR(__pyx_k_233), 0},
+ {(char *)"is_secondary", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_secondary, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_secondary, __Pyx_DOCSTR(__pyx_k_234), 0},
+ {(char *)"is_qcfail", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_qcfail, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_qcfail, __Pyx_DOCSTR(__pyx_k_235), 0},
+ {(char *)"is_duplicate", __pyx_getprop_5pysam_9csamtools_11AlignedRead_is_duplicate, __pyx_setprop_5pysam_9csamtools_11AlignedRead_is_duplicate, __Pyx_DOCSTR(__pyx_k_236), 0},
+ {(char *)"positions", __pyx_getprop_5pysam_9csamtools_11AlignedRead_positions, 0, __Pyx_DOCSTR(__pyx_k_237), 0},
+ {(char *)"inferred_length", __pyx_getprop_5pysam_9csamtools_11AlignedRead_inferred_length, 0, __Pyx_DOCSTR(__pyx_k_238), 0},
+ {(char *)"aligned_pairs", __pyx_getprop_5pysam_9csamtools_11AlignedRead_aligned_pairs, 0, __Pyx_DOCSTR(__pyx_k_239), 0},
{0, 0, 0, 0, 0}
};
};
static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_Samfile[] = {
- {(char *)"filename", __pyx_getprop_5pysam_9csamtools_7Samfile_filename, 0, __Pyx_DOCSTR(__pyx_k_191), 0},
- {(char *)"nreferences", __pyx_getprop_5pysam_9csamtools_7Samfile_nreferences, 0, __Pyx_DOCSTR(__pyx_k_231), 0},
- {(char *)"references", __pyx_getprop_5pysam_9csamtools_7Samfile_references, 0, __Pyx_DOCSTR(__pyx_k_232), 0},
- {(char *)"lengths", __pyx_getprop_5pysam_9csamtools_7Samfile_lengths, 0, __Pyx_DOCSTR(__pyx_k_233), 0},
- {(char *)"mapped", __pyx_getprop_5pysam_9csamtools_7Samfile_mapped, 0, __Pyx_DOCSTR(__pyx_k_234), 0},
- {(char *)"unmapped", __pyx_getprop_5pysam_9csamtools_7Samfile_unmapped, 0, __Pyx_DOCSTR(__pyx_k_235), 0},
- {(char *)"text", __pyx_getprop_5pysam_9csamtools_7Samfile_text, 0, __Pyx_DOCSTR(__pyx_k_236), 0},
- {(char *)"header", __pyx_getprop_5pysam_9csamtools_7Samfile_header, 0, __Pyx_DOCSTR(__pyx_k_237), 0},
+ {(char *)"filename", __pyx_getprop_5pysam_9csamtools_7Samfile_filename, 0, __Pyx_DOCSTR(__pyx_k_199), 0},
+ {(char *)"nreferences", __pyx_getprop_5pysam_9csamtools_7Samfile_nreferences, 0, __Pyx_DOCSTR(__pyx_k_240), 0},
+ {(char *)"references", __pyx_getprop_5pysam_9csamtools_7Samfile_references, 0, __Pyx_DOCSTR(__pyx_k_241), 0},
+ {(char *)"lengths", __pyx_getprop_5pysam_9csamtools_7Samfile_lengths, 0, __Pyx_DOCSTR(__pyx_k_242), 0},
+ {(char *)"mapped", __pyx_getprop_5pysam_9csamtools_7Samfile_mapped, 0, __Pyx_DOCSTR(__pyx_k_243), 0},
+ {(char *)"unmapped", __pyx_getprop_5pysam_9csamtools_7Samfile_unmapped, 0, __Pyx_DOCSTR(__pyx_k_244), 0},
+ {(char *)"text", __pyx_getprop_5pysam_9csamtools_7Samfile_text, 0, __Pyx_DOCSTR(__pyx_k_245), 0},
+ {(char *)"header", __pyx_getprop_5pysam_9csamtools_7Samfile_header, 0, __Pyx_DOCSTR(__pyx_k_246), 0},
{0, 0, 0, 0, 0}
};
};
static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_PileupProxy[] = {
- {(char *)"tid", __pyx_getprop_5pysam_9csamtools_11PileupProxy_tid, 0, __Pyx_DOCSTR(__pyx_k_238), 0},
- {(char *)"n", __pyx_getprop_5pysam_9csamtools_11PileupProxy_n, __pyx_setprop_5pysam_9csamtools_11PileupProxy_n, __Pyx_DOCSTR(__pyx_k_239), 0},
+ {(char *)"tid", __pyx_getprop_5pysam_9csamtools_11PileupProxy_tid, 0, __Pyx_DOCSTR(__pyx_k_247), 0},
+ {(char *)"n", __pyx_getprop_5pysam_9csamtools_11PileupProxy_n, __pyx_setprop_5pysam_9csamtools_11PileupProxy_n, __Pyx_DOCSTR(__pyx_k_248), 0},
{(char *)"pos", __pyx_getprop_5pysam_9csamtools_11PileupProxy_pos, 0, 0, 0},
- {(char *)"pileups", __pyx_getprop_5pysam_9csamtools_11PileupProxy_pileups, 0, __Pyx_DOCSTR(__pyx_k_240), 0},
+ {(char *)"pileups", __pyx_getprop_5pysam_9csamtools_11PileupProxy_pileups, 0, __Pyx_DOCSTR(__pyx_k_249), 0},
{0, 0, 0, 0, 0}
};
};
static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_PileupRead[] = {
- {(char *)"alignment", __pyx_getprop_5pysam_9csamtools_10PileupRead_alignment, 0, __Pyx_DOCSTR(__pyx_k_241), 0},
- {(char *)"qpos", __pyx_getprop_5pysam_9csamtools_10PileupRead_qpos, 0, __Pyx_DOCSTR(__pyx_k_242), 0},
- {(char *)"indel", __pyx_getprop_5pysam_9csamtools_10PileupRead_indel, 0, __Pyx_DOCSTR(__pyx_k_243), 0},
- {(char *)"is_del", __pyx_getprop_5pysam_9csamtools_10PileupRead_is_del, 0, __Pyx_DOCSTR(__pyx_k_244), 0},
+ {(char *)"alignment", __pyx_getprop_5pysam_9csamtools_10PileupRead_alignment, 0, __Pyx_DOCSTR(__pyx_k_250), 0},
+ {(char *)"qpos", __pyx_getprop_5pysam_9csamtools_10PileupRead_qpos, 0, __Pyx_DOCSTR(__pyx_k_251), 0},
+ {(char *)"indel", __pyx_getprop_5pysam_9csamtools_10PileupRead_indel, 0, __Pyx_DOCSTR(__pyx_k_252), 0},
+ {(char *)"is_del", __pyx_getprop_5pysam_9csamtools_10PileupRead_is_del, 0, __Pyx_DOCSTR(__pyx_k_253), 0},
{(char *)"is_head", __pyx_getprop_5pysam_9csamtools_10PileupRead_is_head, 0, 0, 0},
{(char *)"is_tail", __pyx_getprop_5pysam_9csamtools_10PileupRead_is_tail, 0, 0, 0},
{(char *)"level", __pyx_getprop_5pysam_9csamtools_10PileupRead_level, 0, 0, 0},
0, /*tp_setattro*/
&__pyx_tp_as_buffer_IteratorRow, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- __Pyx_DOCSTR("abstract base class for iterators over mapped reads.\n\n Various iterators implement different behaviours for wrapping around\n contig boundaries. Examples include:\n\n :class:`pysam.IteratorRowRegion`\n iterate within a single contig and a defined region.\n\n :class:`pysam.IteratorRowAll`\n iterate until EOF. This iterator will also include unmapped reads.\n\n :class:`pysam.IteratorRowAllRefs`\n iterate over all reads in all reference sequences.\n\n The method :meth:`Samfile.fetch` returns an IteratorRow.\n "), /*tp_doc*/
+ __Pyx_DOCSTR("abstract base class for iterators over mapped reads.\n\n Various iterators implement different behaviours for wrapping around\n contig boundaries. Examples include:\n\n :class:`pysam.IteratorRowRegion`\n iterate within a single contig and a defined region.\n\n :class:`pysam.IteratorRowAll`\n iterate until EOF. This iterator will also include unmapped reads.\n\n :class:`pysam.IteratorRowAllRefs`\n iterate over all reads in all reference sequences.\n\n The method :meth:`Samfile.fetch` returns an IteratorRow.\n\n .. note::\n It is usually not necessary to create an object of this class\n explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n\n "), /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_IteratorRowRegion, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("*(Samfile samfile, int tid, int beg, int end, int reopen = True )*\n\n iterate over mapped reads in a region.\n\n By default, the file is re-openend to avoid conflicts between\n multiple iterators working on the same file. Set *reopen* = False\n to not re-open *samfile*.\n\n The samtools iterators assume that the file\n position between iterations do not change.\n As a consequence, no two iterators can work\n on the same file. To permit this, each iterator\n creates its own file handle by re-opening the\n file.\n\n Note that the index will be shared between\n samfile and the iterator.\n "), /*tp_doc*/
+ __Pyx_DOCSTR("*(Samfile samfile, int tid, int beg, int end, int reopen = True )*\n\n iterate over mapped reads in a region.\n\n By default, the file is re-openend to avoid conflicts between\n multiple iterators working on the same file. Set *reopen* = False\n to not re-open *samfile*.\n\n The samtools iterators assume that the file\n position between iterations do not change.\n As a consequence, no two iterators can work\n on the same file. To permit this, each iterator\n creates its own file handle by re-opening the\n file.\n\n Note that the index will be shared between\n samfile and the iterator.\n\n .. note::\n It is usually not necessary to create an object of this class\n explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n\n "), /*tp_doc*/
__pyx_tp_traverse_5pysam_9csamtools_IteratorRowRegion, /*tp_traverse*/
__pyx_tp_clear_5pysam_9csamtools_IteratorRowRegion, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_IteratorRowAll, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- __Pyx_DOCSTR("*(Samfile samfile, int reopen = True)*\n\n iterate over all reads in *samfile*\n\n By default, the file is re-openend to avoid conflicts between\n multiple iterators working on the same file. Set *reopen* = False\n to not re-open *samfile*.\n "), /*tp_doc*/
+ __Pyx_DOCSTR("*(Samfile samfile, int reopen = True)*\n\n iterate over all reads in *samfile*\n\n By default, the file is re-openend to avoid conflicts between\n multiple iterators working on the same file. Set *reopen* = False\n to not re-open *samfile*.\n\n .. note::\n It is usually not necessary to create an object of this class\n explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n \n\n "), /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_IteratorRowAllRefs, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("iterates over all mapped reads by chaining iterators over each reference\n "), /*tp_doc*/
+ __Pyx_DOCSTR("iterates over all mapped reads by chaining iterators over each reference\n\n .. note::\n It is usually not necessary to create an object of this class\n explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n "), /*tp_doc*/
__pyx_tp_traverse_5pysam_9csamtools_IteratorRowAllRefs, /*tp_traverse*/
__pyx_tp_clear_5pysam_9csamtools_IteratorRowAllRefs, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_IteratorRowSelection, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("*(Samfile samfile)*\n\n iterate over reads in *samfile* at a given list of file positions.\n "), /*tp_doc*/
+ __Pyx_DOCSTR("*(Samfile samfile)*\n\n iterate over reads in *samfile* at a given list of file positions.\n\n .. note::\n It is usually not necessary to create an object of this class\n explicitely. It is returned as a result of call to a :meth:`Samfile.fetch`.\n "), /*tp_doc*/
__pyx_tp_traverse_5pysam_9csamtools_IteratorRowSelection, /*tp_traverse*/
__pyx_tp_clear_5pysam_9csamtools_IteratorRowSelection, /*tp_clear*/
0, /*tp_richcompare*/
};
static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_IteratorColumn[] = {
- {(char *)"seq_len", __pyx_getprop_5pysam_9csamtools_14IteratorColumn_seq_len, 0, __Pyx_DOCSTR(__pyx_k_245), 0},
+ {(char *)"seq_len", __pyx_getprop_5pysam_9csamtools_14IteratorColumn_seq_len, 0, __Pyx_DOCSTR(__pyx_k_254), 0},
{0, 0, 0, 0, 0}
};
};
static struct PyGetSetDef __pyx_getsets_5pysam_9csamtools_SNPCall[] = {
- {(char *)"tid", __pyx_getprop_5pysam_9csamtools_7SNPCall_tid, 0, __Pyx_DOCSTR(__pyx_k_238), 0},
- {(char *)"pos", __pyx_getprop_5pysam_9csamtools_7SNPCall_pos, 0, __Pyx_DOCSTR(__pyx_k_246), 0},
- {(char *)"reference_base", __pyx_getprop_5pysam_9csamtools_7SNPCall_reference_base, 0, __Pyx_DOCSTR(__pyx_k_247), 0},
- {(char *)"genotype", __pyx_getprop_5pysam_9csamtools_7SNPCall_genotype, 0, __Pyx_DOCSTR(__pyx_k_248), 0},
- {(char *)"consensus_quality", __pyx_getprop_5pysam_9csamtools_7SNPCall_consensus_quality, 0, __Pyx_DOCSTR(__pyx_k_249), 0},
- {(char *)"snp_quality", __pyx_getprop_5pysam_9csamtools_7SNPCall_snp_quality, 0, __Pyx_DOCSTR(__pyx_k_250), 0},
- {(char *)"mapping_quality", __pyx_getprop_5pysam_9csamtools_7SNPCall_mapping_quality, 0, __Pyx_DOCSTR(__pyx_k_251), 0},
- {(char *)"coverage", __pyx_getprop_5pysam_9csamtools_7SNPCall_coverage, 0, __Pyx_DOCSTR(__pyx_k_252), 0},
+ {(char *)"tid", __pyx_getprop_5pysam_9csamtools_7SNPCall_tid, 0, __Pyx_DOCSTR(__pyx_k_247), 0},
+ {(char *)"pos", __pyx_getprop_5pysam_9csamtools_7SNPCall_pos, 0, __Pyx_DOCSTR(__pyx_k_255), 0},
+ {(char *)"reference_base", __pyx_getprop_5pysam_9csamtools_7SNPCall_reference_base, 0, __Pyx_DOCSTR(__pyx_k_256), 0},
+ {(char *)"genotype", __pyx_getprop_5pysam_9csamtools_7SNPCall_genotype, 0, __Pyx_DOCSTR(__pyx_k_257), 0},
+ {(char *)"consensus_quality", __pyx_getprop_5pysam_9csamtools_7SNPCall_consensus_quality, 0, __Pyx_DOCSTR(__pyx_k_258), 0},
+ {(char *)"snp_quality", __pyx_getprop_5pysam_9csamtools_7SNPCall_snp_quality, 0, __Pyx_DOCSTR(__pyx_k_259), 0},
+ {(char *)"mapping_quality", __pyx_getprop_5pysam_9csamtools_7SNPCall_mapping_quality, 0, __Pyx_DOCSTR(__pyx_k_260), 0},
+ {(char *)"coverage", __pyx_getprop_5pysam_9csamtools_7SNPCall_coverage, 0, __Pyx_DOCSTR(__pyx_k_261), 0},
{0, 0, 0, 0, 0}
};
static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0},
{&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
+ {&__pyx_kp_s_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 1, 0},
{&__pyx_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0},
- {&__pyx_kp_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 0},
- {&__pyx_kp_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 0},
- {&__pyx_kp_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 0},
- {&__pyx_kp_s_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 1, 0},
- {&__pyx_kp_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 0},
+ {&__pyx_kp_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 0},
+ {&__pyx_kp_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 0},
{&__pyx_kp_s_112, __pyx_k_112, sizeof(__pyx_k_112), 0, 0, 1, 0},
- {&__pyx_kp_s_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 0, 1, 0},
{&__pyx_kp_s_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 1, 0},
{&__pyx_kp_s_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 0, 1, 0},
- {&__pyx_kp_s_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 0, 1, 0},
+ {&__pyx_kp_s_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 1, 0},
+ {&__pyx_kp_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 0},
{&__pyx_kp_s_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 1, 0},
+ {&__pyx_kp_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 0},
+ {&__pyx_kp_s_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 0, 1, 0},
{&__pyx_kp_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 0},
- {&__pyx_kp_s_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 0, 1, 0},
+ {&__pyx_kp_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 0},
+ {&__pyx_kp_s_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 1, 0},
{&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
- {&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 0},
{&__pyx_kp_s_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 1, 0},
- {&__pyx_kp_s_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 1, 0},
+ {&__pyx_kp_s_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 1, 0},
+ {&__pyx_kp_s_138, __pyx_k_138, sizeof(__pyx_k_138), 0, 0, 1, 0},
{&__pyx_kp_s_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 1, 0},
- {&__pyx_kp_s_140, __pyx_k_140, sizeof(__pyx_k_140), 0, 0, 1, 0},
{&__pyx_kp_s_141, __pyx_k_141, sizeof(__pyx_k_141), 0, 0, 1, 0},
- {&__pyx_kp_s_142, __pyx_k_142, sizeof(__pyx_k_142), 0, 0, 1, 0},
- {&__pyx_kp_s_144, __pyx_k_144, sizeof(__pyx_k_144), 0, 0, 1, 0},
- {&__pyx_kp_s_145, __pyx_k_145, sizeof(__pyx_k_145), 0, 0, 1, 0},
+ {&__pyx_kp_s_147, __pyx_k_147, sizeof(__pyx_k_147), 0, 0, 1, 0},
+ {&__pyx_kp_s_148, __pyx_k_148, sizeof(__pyx_k_148), 0, 0, 1, 0},
{&__pyx_kp_s_149, __pyx_k_149, sizeof(__pyx_k_149), 0, 0, 1, 0},
{&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
- {&__pyx_n_s_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 1, 1},
+ {&__pyx_kp_s_150, __pyx_k_150, sizeof(__pyx_k_150), 0, 0, 1, 0},
{&__pyx_kp_s_152, __pyx_k_152, sizeof(__pyx_k_152), 0, 0, 1, 0},
{&__pyx_kp_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 0},
- {&__pyx_kp_s_154, __pyx_k_154, sizeof(__pyx_k_154), 0, 0, 1, 0},
- {&__pyx_kp_s_155, __pyx_k_155, sizeof(__pyx_k_155), 0, 0, 1, 0},
- {&__pyx_kp_s_156, __pyx_k_156, sizeof(__pyx_k_156), 0, 0, 1, 0},
{&__pyx_kp_s_157, __pyx_k_157, sizeof(__pyx_k_157), 0, 0, 1, 0},
- {&__pyx_kp_s_158, __pyx_k_158, sizeof(__pyx_k_158), 0, 0, 1, 0},
- {&__pyx_kp_s_159, __pyx_k_159, sizeof(__pyx_k_159), 0, 0, 1, 0},
+ {&__pyx_n_s_159, __pyx_k_159, sizeof(__pyx_k_159), 0, 0, 1, 1},
{&__pyx_kp_b_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 0, 0},
{&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
{&__pyx_kp_s_160, __pyx_k_160, sizeof(__pyx_k_160), 0, 0, 1, 0},
{&__pyx_kp_s_173, __pyx_k_173, sizeof(__pyx_k_173), 0, 0, 1, 0},
{&__pyx_kp_s_174, __pyx_k_174, sizeof(__pyx_k_174), 0, 0, 1, 0},
{&__pyx_kp_s_175, __pyx_k_175, sizeof(__pyx_k_175), 0, 0, 1, 0},
+ {&__pyx_kp_s_176, __pyx_k_176, sizeof(__pyx_k_176), 0, 0, 1, 0},
{&__pyx_kp_s_177, __pyx_k_177, sizeof(__pyx_k_177), 0, 0, 1, 0},
+ {&__pyx_kp_s_178, __pyx_k_178, sizeof(__pyx_k_178), 0, 0, 1, 0},
+ {&__pyx_kp_s_179, __pyx_k_179, sizeof(__pyx_k_179), 0, 0, 1, 0},
{&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
+ {&__pyx_kp_s_180, __pyx_k_180, sizeof(__pyx_k_180), 0, 0, 1, 0},
{&__pyx_kp_s_181, __pyx_k_181, sizeof(__pyx_k_181), 0, 0, 1, 0},
{&__pyx_kp_s_182, __pyx_k_182, sizeof(__pyx_k_182), 0, 0, 1, 0},
{&__pyx_kp_s_183, __pyx_k_183, sizeof(__pyx_k_183), 0, 0, 1, 0},
+ {&__pyx_kp_s_185, __pyx_k_185, sizeof(__pyx_k_185), 0, 0, 1, 0},
{&__pyx_kp_s_189, __pyx_k_189, sizeof(__pyx_k_189), 0, 0, 1, 0},
{&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
{&__pyx_kp_s_190, __pyx_k_190, sizeof(__pyx_k_190), 0, 0, 1, 0},
- {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
- {&__pyx_n_s_253, __pyx_k_253, sizeof(__pyx_k_253), 0, 0, 1, 1},
- {&__pyx_kp_s_255, __pyx_k_255, sizeof(__pyx_k_255), 0, 0, 1, 0},
- {&__pyx_kp_s_260, __pyx_k_260, sizeof(__pyx_k_260), 0, 0, 1, 0},
- {&__pyx_n_s_261, __pyx_k_261, sizeof(__pyx_k_261), 0, 0, 1, 1},
+ {&__pyx_kp_s_191, __pyx_k_191, sizeof(__pyx_k_191), 0, 0, 1, 0},
+ {&__pyx_kp_s_197, __pyx_k_197, sizeof(__pyx_k_197), 0, 0, 1, 0},
+ {&__pyx_kp_s_198, __pyx_k_198, sizeof(__pyx_k_198), 0, 0, 1, 0},
+ {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
{&__pyx_n_s_262, __pyx_k_262, sizeof(__pyx_k_262), 0, 0, 1, 1},
- {&__pyx_kp_s_263, __pyx_k_263, sizeof(__pyx_k_263), 0, 0, 1, 0},
- {&__pyx_n_s_266, __pyx_k_266, sizeof(__pyx_k_266), 0, 0, 1, 1},
- {&__pyx_n_s_269, __pyx_k_269, sizeof(__pyx_k_269), 0, 0, 1, 1},
- {&__pyx_n_s_272, __pyx_k_272, sizeof(__pyx_k_272), 0, 0, 1, 1},
+ {&__pyx_kp_s_264, __pyx_k_264, sizeof(__pyx_k_264), 0, 0, 1, 0},
+ {&__pyx_kp_s_269, __pyx_k_269, sizeof(__pyx_k_269), 0, 0, 1, 0},
+ {&__pyx_n_s_270, __pyx_k_270, sizeof(__pyx_k_270), 0, 0, 1, 1},
+ {&__pyx_n_s_271, __pyx_k_271, sizeof(__pyx_k_271), 0, 0, 1, 1},
+ {&__pyx_kp_s_272, __pyx_k_272, sizeof(__pyx_k_272), 0, 0, 1, 0},
{&__pyx_n_s_275, __pyx_k_275, sizeof(__pyx_k_275), 0, 0, 1, 1},
- {&__pyx_kp_s_276, __pyx_k_276, sizeof(__pyx_k_276), 0, 0, 1, 0},
- {&__pyx_n_s_279, __pyx_k_279, sizeof(__pyx_k_279), 0, 0, 1, 1},
- {&__pyx_n_s_282, __pyx_k_282, sizeof(__pyx_k_282), 0, 0, 1, 1},
- {&__pyx_n_s_285, __pyx_k_285, sizeof(__pyx_k_285), 0, 0, 1, 1},
- {&__pyx_kp_s_286, __pyx_k_286, sizeof(__pyx_k_286), 0, 0, 1, 0},
- {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0},
- {&__pyx_n_s_295, __pyx_k_295, sizeof(__pyx_k_295), 0, 0, 1, 1},
- {&__pyx_n_s_298, __pyx_k_298, sizeof(__pyx_k_298), 0, 0, 1, 1},
+ {&__pyx_n_s_278, __pyx_k_278, sizeof(__pyx_k_278), 0, 0, 1, 1},
+ {&__pyx_n_s_281, __pyx_k_281, sizeof(__pyx_k_281), 0, 0, 1, 1},
+ {&__pyx_n_s_284, __pyx_k_284, sizeof(__pyx_k_284), 0, 0, 1, 1},
+ {&__pyx_kp_s_285, __pyx_k_285, sizeof(__pyx_k_285), 0, 0, 1, 0},
+ {&__pyx_n_s_288, __pyx_k_288, sizeof(__pyx_k_288), 0, 0, 1, 1},
+ {&__pyx_n_s_291, __pyx_k_291, sizeof(__pyx_k_291), 0, 0, 1, 1},
+ {&__pyx_n_s_294, __pyx_k_294, sizeof(__pyx_k_294), 0, 0, 1, 1},
+ {&__pyx_kp_s_295, __pyx_k_295, sizeof(__pyx_k_295), 0, 0, 1, 0},
{&__pyx_kp_u_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 1, 0, 0},
- {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
- {&__pyx_n_s_301, __pyx_k_301, sizeof(__pyx_k_301), 0, 0, 1, 1},
{&__pyx_n_s_304, __pyx_k_304, sizeof(__pyx_k_304), 0, 0, 1, 1},
{&__pyx_n_s_307, __pyx_k_307, sizeof(__pyx_k_307), 0, 0, 1, 1},
- {&__pyx_kp_s_308, __pyx_k_308, sizeof(__pyx_k_308), 0, 0, 1, 0},
- {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
+ {&__pyx_n_s_310, __pyx_k_310, sizeof(__pyx_k_310), 0, 0, 1, 1},
+ {&__pyx_n_s_313, __pyx_k_313, sizeof(__pyx_k_313), 0, 0, 1, 1},
+ {&__pyx_n_s_316, __pyx_k_316, sizeof(__pyx_k_316), 0, 0, 1, 1},
+ {&__pyx_kp_s_317, __pyx_k_317, sizeof(__pyx_k_317), 0, 0, 1, 0},
{&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
- {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0},
- {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0},
- {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0},
- {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
- {&__pyx_kp_b_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 0, 0},
+ {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0},
{&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
+ {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
+ {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0},
{&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0},
+ {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0},
{&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0},
- {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0},
+ {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0},
+ {&__pyx_kp_b_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 0, 0},
{&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0},
- {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0},
+ {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0},
{&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
- {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0},
+ {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0},
+ {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0},
+ {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0},
{&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0},
{&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0},
{&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
- {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
- {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0},
{&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0},
{&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
- {&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 0},
+ {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0},
{&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
{&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0},
- {&__pyx_kp_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 0},
- {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0},
+ {&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0},
+ {&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 0},
+ {&__pyx_kp_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 0},
+ {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0},
{&__pyx_kp_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 0},
- {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0},
- {&__pyx_kp_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 0},
+ {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0},
+ {&__pyx_kp_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 0},
{&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
- {&__pyx_kp_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 0},
- {&__pyx_kp_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 0},
- {&__pyx_kp_s_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 0, 1, 0},
+ {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0},
+ {&__pyx_kp_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 0},
{&__pyx_kp_s__2scB, __pyx_k__2scB, sizeof(__pyx_k__2scB), 0, 0, 1, 0},
{&__pyx_kp_s__2scH, __pyx_k__2scH, sizeof(__pyx_k__2scH), 0, 0, 1, 0},
{&__pyx_kp_s__2scI, __pyx_k__2scI, sizeof(__pyx_k__2scI), 0, 0, 1, 0},
{&__pyx_n_s__F, __pyx_k__F, sizeof(__pyx_k__F), 0, 0, 1, 1},
{&__pyx_n_s__FO, __pyx_k__FO, sizeof(__pyx_k__FO), 0, 0, 1, 1},
{&__pyx_n_s__Fastafile, __pyx_k__Fastafile, sizeof(__pyx_k__Fastafile), 0, 0, 1, 1},
+ {&__pyx_n_s__Fastqfile, __pyx_k__Fastqfile, sizeof(__pyx_k__Fastqfile), 0, 0, 1, 1},
{&__pyx_n_s__GO, __pyx_k__GO, sizeof(__pyx_k__GO), 0, 0, 1, 1},
{&__pyx_n_s__H, __pyx_k__H, sizeof(__pyx_k__H), 0, 0, 1, 1},
{&__pyx_n_s__HD, __pyx_k__HD, sizeof(__pyx_k__HD), 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
- __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_ord = __Pyx_GetName(__pyx_b, __pyx_n_s__ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_IOError = __Pyx_GetName(__pyx_b, __pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_OverflowError = __Pyx_GetName(__pyx_b, __pyx_n_s__OverflowError); if (!__pyx_builtin_OverflowError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_OSError = __Pyx_GetName(__pyx_b, __pyx_n_s__OSError); if (!__pyx_builtin_OSError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_zip = __Pyx_GetName(__pyx_b, __pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_sorted = __Pyx_GetName(__pyx_b, __pyx_n_s__sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_min = __Pyx_GetName(__pyx_b, __pyx_n_s__min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_max = __Pyx_GetName(__pyx_b, __pyx_n_s__max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_chr = __Pyx_GetName(__pyx_b, __pyx_n_s__chr); if (!__pyx_builtin_chr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_open = __Pyx_GetName(__pyx_b, __pyx_n_s__open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_UnicodeDecodeError = __Pyx_GetName(__pyx_b, __pyx_n_s__UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_IOError = __Pyx_GetName(__pyx_b, __pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_OverflowError = __Pyx_GetName(__pyx_b, __pyx_n_s__OverflowError); if (!__pyx_builtin_OverflowError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_OSError = __Pyx_GetName(__pyx_b, __pyx_n_s__OSError); if (!__pyx_builtin_OSError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_zip = __Pyx_GetName(__pyx_b, __pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_sorted = __Pyx_GetName(__pyx_b, __pyx_n_s__sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_min = __Pyx_GetName(__pyx_b, __pyx_n_s__min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_max = __Pyx_GetName(__pyx_b, __pyx_n_s__max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_chr = __Pyx_GetName(__pyx_b, __pyx_n_s__chr); if (!__pyx_builtin_chr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_open = __Pyx_GetName(__pyx_b, __pyx_n_s__open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_UnicodeDecodeError = __Pyx_GetName(__pyx_b, __pyx_n_s__UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
return 0;
__pyx_L1_error:;
return -1;
__Pyx_GOTREF(__pyx_k_tuple_4);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
- /* "pysam/csamtools.pyx":398
+ /* "pysam/csamtools.pyx":405
* def __len__(self):
* if self.fastafile == NULL:
* raise ValueError( "calling len() on closed file" ) # <<<<<<<<<<<<<<
*
* return faidx_fetch_nseq(self.fastafile)
*/
- __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_7)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_8);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));
- /* "pysam/csamtools.pyx":431
+ /* "pysam/csamtools.pyx":438
* '''number of :term:`filename` associated with this object.'''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* return self._filename
*
*/
- __pyx_k_tuple_11 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_11 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_11);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
- /* "pysam/csamtools.pyx":456
+ /* "pysam/csamtools.pyx":463
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* cdef int length
*/
- __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_12);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
- /* "pysam/csamtools.pyx":462
+ /* "pysam/csamtools.pyx":469
*
* if not region:
* if reference is None: raise ValueError( 'no sequence/region supplied.' ) # <<<<<<<<<<<<<<
* if start is None: start = 0
* if end is None: end = max_pos -1
*/
- __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_14);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
- /* "pysam/csamtools.pyx":481
+ /* "pysam/csamtools.pyx":488
* region = "%s:%i-%i" % (reference, start+1, end)
* if PY_MAJOR_VERSION >= 3:
* region = region.encode('ascii') # <<<<<<<<<<<<<<
* seq = fai_fetch( self.fastafile,
* region,
*/
- __pyx_k_tuple_20 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_20 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_20);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));
- /* "pysam/csamtools.pyx":663
+ /* "pysam/csamtools.pyx":593
+ * '''number of :term:`filename` associated with this object.'''
+ * def __get__(self):
+ * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
+ * return self._filename
+ *
+ */
+ __pyx_k_tuple_22 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_22);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));
+
+ /* "pysam/csamtools.pyx":597
+ *
+ * def __iter__(self):
+ * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+ __pyx_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_23);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
+
+ /* "pysam/csamtools.pyx":789
* if self._filename != NULL: free(self._filename )
* filename = _my_encodeFilename(filename)
* cdef bytes bmode = mode.encode('ascii') # <<<<<<<<<<<<<<
* #cdef char* cfilename
* #cfilename = filename.encode(_FILENAME_ENCODING)
*/
- __pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_25);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));
+ __pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_33);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
- /* "pysam/csamtools.pyx":791
+ /* "pysam/csamtools.pyx":917
* returns -1 if reference is not known.
* '''
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* reference = _force_bytes(reference)
* return pysam_reference2tid( self.samfile.header, reference )
*/
- __pyx_k_tuple_39 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_39);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));
+ __pyx_k_tuple_47 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_47);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
- /* "pysam/csamtools.pyx":798
+ /* "pysam/csamtools.pyx":924
* '''
* convert numerical :term:`tid` into :term:`reference` name.'''
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not 0 <= tid < self.samfile.header.n_targets:
* raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
*/
- __pyx_k_tuple_40 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_40);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40));
+ __pyx_k_tuple_48 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_48);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));
- /* "pysam/csamtools.pyx":806
+ /* "pysam/csamtools.pyx":932
* '''
* convert numerical :term:`tid` into :term:`reference` name.'''
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not 0 <= tid < self.samfile.header.n_targets:
* raise ValueError( "tid %i out of range 0<=tid<%i" % (tid, self.samfile.header.n_targets ) )
*/
- __pyx_k_tuple_42 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_42);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));
+ __pyx_k_tuple_50 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_50);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50));
- /* "pysam/csamtools.pyx":856
+ /* "pysam/csamtools.pyx":982
* if len(parts) >= 3: rend = int(parts[2])
*
* if not reference: return 0, 0, 0, 0 # <<<<<<<<<<<<<<
*
* rtid = self.gettid( reference )
*/
- __pyx_k_tuple_44 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_44);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));
+ __pyx_k_tuple_52 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_52);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));
- /* "pysam/csamtools.pyx":876
+ /* "pysam/csamtools.pyx":1002
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam:
* raise NotImplementedError("seek only available in bam files")
*/
- __pyx_k_tuple_47 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_47);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
+ __pyx_k_tuple_55 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_55);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55));
- /* "pysam/csamtools.pyx":878
+ /* "pysam/csamtools.pyx":1004
* raise ValueError( "I/O operation on closed file" )
* if not self.isbam:
* raise NotImplementedError("seek only available in bam files") # <<<<<<<<<<<<<<
* if self.isstream:
* raise OSError("seek no available in streams")
*/
- __pyx_k_tuple_49 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_48)); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_49);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));
+ __pyx_k_tuple_57 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_57);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));
- /* "pysam/csamtools.pyx":880
+ /* "pysam/csamtools.pyx":1006
* raise NotImplementedError("seek only available in bam files")
* if self.isstream:
* raise OSError("seek no available in streams") # <<<<<<<<<<<<<<
*
* return bam_seek( self.samfile.x.bam, offset, where )
*/
- __pyx_k_tuple_51 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_50)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_51);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
+ __pyx_k_tuple_59 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_58)); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_59);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));
- /* "pysam/csamtools.pyx":889
+ /* "pysam/csamtools.pyx":1015
* '''
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam:
* raise NotImplementedError("seek only available in bam files")
*/
- __pyx_k_tuple_52 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_52);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));
+ __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_60);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60));
- /* "pysam/csamtools.pyx":891
+ /* "pysam/csamtools.pyx":1017
* raise ValueError( "I/O operation on closed file" )
* if not self.isbam:
* raise NotImplementedError("seek only available in bam files") # <<<<<<<<<<<<<<
*
* return bam_tell( self.samfile.x.bam )
*/
- __pyx_k_tuple_53 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_48)); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_53);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));
+ __pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_61);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));
- /* "pysam/csamtools.pyx":926
+ /* "pysam/csamtools.pyx":1052
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
*/
- __pyx_k_tuple_55 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_55);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55));
+ __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_63);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
- /* "pysam/csamtools.pyx":935
+ /* "pysam/csamtools.pyx":1061
* if self.isbam:
* if not until_eof and not self._hasIndex() and not self.isremote:
* raise ValueError( "fetch called on bamfile without index" ) # <<<<<<<<<<<<<<
*
* if callback:
*/
- __pyx_k_tuple_57 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_57);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));
+ __pyx_k_tuple_65 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_64)); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_65);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65));
- /* "pysam/csamtools.pyx":938
+ /* "pysam/csamtools.pyx":1064
*
* if callback:
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" ) # <<<<<<<<<<<<<<
* if not self._hasIndex(): raise ValueError( "no index available for fetch" )
* return bam_fetch(self.samfile.x.bam,
*/
- __pyx_k_tuple_59 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_58)); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_59);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));
+ __pyx_k_tuple_67 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_66)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_67);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));
- /* "pysam/csamtools.pyx":939
+ /* "pysam/csamtools.pyx":1065
* if callback:
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" )
* if not self._hasIndex(): raise ValueError( "no index available for fetch" ) # <<<<<<<<<<<<<<
* return bam_fetch(self.samfile.x.bam,
* self.index,
*/
- __pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_60)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_61);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));
+ __pyx_k_tuple_69 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_68)); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_69);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69));
- /* "pysam/csamtools.pyx":959
+ /* "pysam/csamtools.pyx":1085
* else:
* if has_coord:
* raise ValueError ("fetching by region is not available for sam files" ) # <<<<<<<<<<<<<<
*
* if callback:
*/
- __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_62)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_63);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
+ __pyx_k_tuple_71 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_70)); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_71);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71));
- /* "pysam/csamtools.pyx":962
+ /* "pysam/csamtools.pyx":1088
*
* if callback:
* raise NotImplementedError( "callback not implemented yet" ) # <<<<<<<<<<<<<<
*
* if self.samfile.header == NULL:
*/
- __pyx_k_tuple_65 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_64)); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_65);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65));
+ __pyx_k_tuple_73 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_72)); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_73);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73));
- /* "pysam/csamtools.pyx":965
+ /* "pysam/csamtools.pyx":1091
*
* if self.samfile.header == NULL:
* raise ValueError( "fetch called for samfile without header") # <<<<<<<<<<<<<<
*
* # check if targets are defined
*/
- __pyx_k_tuple_67 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_66)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_67);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));
+ __pyx_k_tuple_75 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_74)); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_75);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));
- /* "pysam/csamtools.pyx":970
+ /* "pysam/csamtools.pyx":1096
* # give warning, sam_read1 segfaults
* if self.samfile.header.n_targets == 0:
* warnings.warn( "fetch called for samfile without header") # <<<<<<<<<<<<<<
*
* return IteratorRowAll( self, reopen=reopen )
*/
- __pyx_k_tuple_68 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_66)); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_68);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68));
+ __pyx_k_tuple_76 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_74)); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_76);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76));
- /* "pysam/csamtools.pyx":1011
+ /* "pysam/csamtools.pyx":1137
*
* if mate_data.mate == NULL:
* raise ValueError( "mate not found" ) # <<<<<<<<<<<<<<
*
* cdef AlignedRead dest = AlignedRead.__new__(AlignedRead)
*/
- __pyx_k_tuple_72 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_71)); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_72);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));
+ __pyx_k_tuple_80 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_79)); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_80);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));
- /* "pysam/csamtools.pyx":1036
+ /* "pysam/csamtools.pyx":1162
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* region, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
*/
- __pyx_k_tuple_74 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_74);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));
+ __pyx_k_tuple_82 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_82);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));
- /* "pysam/csamtools.pyx":1045
+ /* "pysam/csamtools.pyx":1171
* if self.isbam:
* if not until_eof and not self._hasIndex() and not self.isremote:
* raise ValueError( "fetch called on bamfile without index" ) # <<<<<<<<<<<<<<
*
* if not region:
*/
- __pyx_k_tuple_75 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_75);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));
+ __pyx_k_tuple_83 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_64)); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_83);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));
- /* "pysam/csamtools.pyx":1048
+ /* "pysam/csamtools.pyx":1174
*
* if not region:
* raise ValueError( "counting functionality requires a region/reference" ) # <<<<<<<<<<<<<<
* if not self._hasIndex(): raise ValueError( "no index available for fetch" )
* bam_fetch(self.samfile.x.bam,
*/
- __pyx_k_tuple_77 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_76)); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_77);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77));
+ __pyx_k_tuple_85 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_84)); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_85);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85));
- /* "pysam/csamtools.pyx":1049
+ /* "pysam/csamtools.pyx":1175
* if not region:
* raise ValueError( "counting functionality requires a region/reference" )
* if not self._hasIndex(): raise ValueError( "no index available for fetch" ) # <<<<<<<<<<<<<<
* bam_fetch(self.samfile.x.bam,
* self.index,
*/
- __pyx_k_tuple_78 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_60)); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_78);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));
+ __pyx_k_tuple_86 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_68)); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_86);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));
- /* "pysam/csamtools.pyx":1059
+ /* "pysam/csamtools.pyx":1185
* return counter
* else:
* raise ValueError ("count for a region is not available for sam files" ) # <<<<<<<<<<<<<<
*
* def pileup( self,
*/
- __pyx_k_tuple_80 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_79)); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_80);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));
+ __pyx_k_tuple_88 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_87)); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_88);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));
- /* "pysam/csamtools.pyx":1118
+ /* "pysam/csamtools.pyx":1244
*
* if not self._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region )
*/
- __pyx_k_tuple_81 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_81);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81));
+ __pyx_k_tuple_89 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_89);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));
- /* "pysam/csamtools.pyx":1123
+ /* "pysam/csamtools.pyx":1249
*
* if self.isbam:
* if not self._hasIndex(): raise ValueError( "no index available for pileup" ) # <<<<<<<<<<<<<<
*
* if callback:
*/
- __pyx_k_tuple_83 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_82)); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_83);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));
+ __pyx_k_tuple_91 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_90)); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_91);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_91));
- /* "pysam/csamtools.pyx":1126
+ /* "pysam/csamtools.pyx":1252
*
* if callback:
* if not has_coord: raise ValueError( "callback functionality requires a region/reference" ) # <<<<<<<<<<<<<<
*
* buf = bam_plbuf_init( <bam_pileup_f>pileup_callback, <void*>callback )
*/
- __pyx_k_tuple_84 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_58)); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_84);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));
+ __pyx_k_tuple_92 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_66)); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_92);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92));
- /* "pysam/csamtools.pyx":1147
+ /* "pysam/csamtools.pyx":1273
*
* else:
* raise NotImplementedError( "pileup of samfiles not implemented yet" ) # <<<<<<<<<<<<<<
*
* def close( self ):
*/
- __pyx_k_tuple_86 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_85)); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_86);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));
+ __pyx_k_tuple_94 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_93)); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_94);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94));
- /* "pysam/csamtools.pyx":1191
+ /* "pysam/csamtools.pyx":1317
* '''number of :term:`filename` associated with this object.'''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* return self._filename
*
*/
- __pyx_k_tuple_87 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_87);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));
+ __pyx_k_tuple_95 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_95);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));
- /* "pysam/csamtools.pyx":1197
+ /* "pysam/csamtools.pyx":1323
* '''number of :term:`reference` sequences in the file.'''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* return self.samfile.header.n_targets
*
*/
- __pyx_k_tuple_88 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_88);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));
+ __pyx_k_tuple_96 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_96);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96));
- /* "pysam/csamtools.pyx":1203
+ /* "pysam/csamtools.pyx":1329
* """tuple with the names of :term:`reference` sequences."""
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* t = []
* for x from 0 <= x < self.samfile.header.n_targets:
*/
- __pyx_k_tuple_89 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_89);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));
+ __pyx_k_tuple_97 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_97);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));
- /* "pysam/csamtools.pyx":1214
+ /* "pysam/csamtools.pyx":1340
* """
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* t = []
* for x from 0 <= x < self.samfile.header.n_targets:
*/
- __pyx_k_tuple_90 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_90);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90));
+ __pyx_k_tuple_98 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_98);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));
- /* "pysam/csamtools.pyx":1224
+ /* "pysam/csamtools.pyx":1350
* """
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" )
* if self.index == NULL:
*/
- __pyx_k_tuple_91 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_91);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_91));
+ __pyx_k_tuple_99 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_99);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));
- /* "pysam/csamtools.pyx":1225
+ /* "pysam/csamtools.pyx":1351
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" ) # <<<<<<<<<<<<<<
* if self.index == NULL:
* raise ValueError( "mapping information not recorded in index or index not available")
*/
- __pyx_k_tuple_93 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_92)); if (unlikely(!__pyx_k_tuple_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_93);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_93));
+ __pyx_k_tuple_101 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_100)); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_101);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101));
- /* "pysam/csamtools.pyx":1227
+ /* "pysam/csamtools.pyx":1353
* if not self.isbam: raise AttributeError( "Samfile.mapped only available in bam files" )
* if self.index == NULL:
* raise ValueError( "mapping information not recorded in index or index not available") # <<<<<<<<<<<<<<
*
* cdef int tid
*/
- __pyx_k_tuple_95 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_94)); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_95);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));
+ __pyx_k_tuple_103 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_102)); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_103);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));
- /* "pysam/csamtools.pyx":1239
+ /* "pysam/csamtools.pyx":1365
* """
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam: raise AttributeError( "Samfile.unmapped only available in bam files" )
* cdef int tid
*/
- __pyx_k_tuple_96 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_96);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96));
+ __pyx_k_tuple_104 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_104);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));
- /* "pysam/csamtools.pyx":1240
+ /* "pysam/csamtools.pyx":1366
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not self.isbam: raise AttributeError( "Samfile.unmapped only available in bam files" ) # <<<<<<<<<<<<<<
* cdef int tid
* cdef uint32_t total = 0
*/
- __pyx_k_tuple_98 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_97)); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_98);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));
+ __pyx_k_tuple_106 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_105)); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_106);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106));
- /* "pysam/csamtools.pyx":1252
+ /* "pysam/csamtools.pyx":1378
* '''full contents of the :term:`sam file` header as a string.'''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* return from_string_and_size(self.samfile.header.text, self.samfile.header.l_text)
*
*/
- __pyx_k_tuple_99 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_99);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));
+ __pyx_k_tuple_107 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_107);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));
- /* "pysam/csamtools.pyx":1260
+ /* "pysam/csamtools.pyx":1386
* '''
* def __get__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* result = {}
*/
- __pyx_k_tuple_100 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_100);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));
+ __pyx_k_tuple_108 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_108);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
- /* "pysam/csamtools.pyx":1267
+ /* "pysam/csamtools.pyx":1393
* # convert to python string (note: call self.text to create 0-terminated string)
* t = self.text
* for line in t.split("\n"): # <<<<<<<<<<<<<<
* if not line.strip(): continue
* assert line.startswith("@"), "header line without '@': '%s'" % line
*/
- __pyx_k_tuple_101 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_101);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101));
+ __pyx_k_tuple_109 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_6)); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_109);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
- /* "pysam/csamtools.pyx":1269
+ /* "pysam/csamtools.pyx":1395
* for line in t.split("\n"):
* if not line.strip(): continue
* assert line.startswith("@"), "header line without '@': '%s'" % line # <<<<<<<<<<<<<<
* fields = line[1:].split("\t")
* record = fields[0]
*/
- __pyx_k_tuple_103 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_102)); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_103);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));
+ __pyx_k_tuple_111 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_110)); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_111);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));
- /* "pysam/csamtools.pyx":1270
+ /* "pysam/csamtools.pyx":1396
* if not line.strip(): continue
* assert line.startswith("@"), "header line without '@': '%s'" % line
* fields = line[1:].split("\t") # <<<<<<<<<<<<<<
* record = fields[0]
* assert record in VALID_HEADER_TYPES, "header line with invalid type '%s': '%s'" % (record, line)
*/
- __pyx_k_tuple_105 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_105);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));
+ __pyx_k_tuple_113 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_113);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));
- /* "pysam/csamtools.pyx":1283
+ /* "pysam/csamtools.pyx":1409
* for field in fields[1:]:
* if ":" not in field:
* raise ValueError("malformatted header: no ':' in field" ) # <<<<<<<<<<<<<<
* key, value = field.split(":",1)
* # uppercase keys must be valid
*/
- __pyx_k_tuple_109 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_108)); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_109);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
+ __pyx_k_tuple_117 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_116)); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_117);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));
- /* "pysam/csamtools.pyx":1284
+ /* "pysam/csamtools.pyx":1410
* if ":" not in field:
* raise ValueError("malformatted header: no ':' in field" )
* key, value = field.split(":",1) # <<<<<<<<<<<<<<
* # uppercase keys must be valid
* # lowercase are permitted for user fields
*/
- __pyx_k_tuple_110 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_107), __pyx_int_1); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_110);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));
+ __pyx_k_tuple_118 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_115), __pyx_int_1); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_118);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118));
- /* "pysam/csamtools.pyx":1382
+ /* "pysam/csamtools.pyx":1508
* dest.text = <char*>calloc( len(text), sizeof(char))
* dest.l_text = len(text)
* cdef bytes btext = text.encode('ascii') # <<<<<<<<<<<<<<
* strncpy( dest.text, btext, dest.l_text )
*
*/
- __pyx_k_tuple_116 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_116);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116));
+ __pyx_k_tuple_124 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_124);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));
- /* "pysam/csamtools.pyx":1402
+ /* "pysam/csamtools.pyx":1528
* seqname, seqlen = seqs[x]
* dest.target_name[x] = <char*>calloc( len( seqname ) + 1, sizeof(char) )
* bseqname = seqname.encode('ascii') # <<<<<<<<<<<<<<
* strncpy( dest.target_name[x], bseqname, len(seqname) + 1 )
* dest.target_len[x] = seqlen
*/
- __pyx_k_tuple_118 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_118);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118));
+ __pyx_k_tuple_126 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_126);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126));
- /* "pysam/csamtools.pyx":1417
+ /* "pysam/csamtools.pyx":1543
* ###############################################################
* def __iter__(self):
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
* if not self.isbam and self.samfile.header.n_targets == 0:
* raise NotImplementedError( "can not iterate over samfile without header")
*/
- __pyx_k_tuple_119 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_119);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_119));
+ __pyx_k_tuple_127 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_127);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
- /* "pysam/csamtools.pyx":1419
+ /* "pysam/csamtools.pyx":1545
* if not self._isOpen(): raise ValueError( "I/O operation on closed file" )
* if not self.isbam and self.samfile.header.n_targets == 0:
* raise NotImplementedError( "can not iterate over samfile without header") # <<<<<<<<<<<<<<
* return self
*
*/
- __pyx_k_tuple_121 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_120)); if (unlikely(!__pyx_k_tuple_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_121);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_121));
+ __pyx_k_tuple_129 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_128)); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_129);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_129));
- /* "pysam/csamtools.pyx":1489
+ /* "pysam/csamtools.pyx":1625
*
* if not samfile._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* if not samfile._hasIndex():
*/
- __pyx_k_tuple_122 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_122);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));
+ __pyx_k_tuple_130 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_130);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_130));
- /* "pysam/csamtools.pyx":1492
+ /* "pysam/csamtools.pyx":1628
*
* if not samfile._hasIndex():
* raise ValueError( "no index available for iteration" ) # <<<<<<<<<<<<<<
*
* # makes sure that samfile stays alive as long as the
*/
- __pyx_k_tuple_124 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_123)); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_124);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));
+ __pyx_k_tuple_132 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_131)); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_132);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132));
- /* "pysam/csamtools.pyx":1558
+ /* "pysam/csamtools.pyx":1700
*
* if not samfile._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* if samfile.isbam: mode = b"rb"
*/
- __pyx_k_tuple_125 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_125);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125));
+ __pyx_k_tuple_133 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_133);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_133));
- /* "pysam/csamtools.pyx":1609
+ /* "pysam/csamtools.pyx":1755
* def __cinit__(self, Samfile samfile):
* assert samfile._isOpen()
* if not samfile._hasIndex(): raise ValueError("no index available for fetch") # <<<<<<<<<<<<<<
* self.samfile = samfile
* self.tid = -1
*/
- __pyx_k_tuple_126 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_60)); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_126);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126));
+ __pyx_k_tuple_134 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_68)); if (unlikely(!__pyx_k_tuple_134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_134);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_134));
- /* "pysam/csamtools.pyx":1655
+ /* "pysam/csamtools.pyx":1805
*
* if not samfile._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* if not samfile._isOpen():
*/
- __pyx_k_tuple_127 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_127);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
+ __pyx_k_tuple_135 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_135);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));
- /* "pysam/csamtools.pyx":1658
+ /* "pysam/csamtools.pyx":1808
*
* if not samfile._isOpen():
* raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<<
*
* assert samfile.isbam, "can only use this iterator on bam files"
*/
- __pyx_k_tuple_128 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_128);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_128));
+ __pyx_k_tuple_136 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_k_tuple_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_136);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_136));
- /* "pysam/csamtools.pyx":1959
+ /* "pysam/csamtools.pyx":2106
* self.cnext()
* if self.n_plp < 0:
* raise ValueError("error during iteration" ) # <<<<<<<<<<<<<<
*
* if self.plp == NULL:
*/
- __pyx_k_tuple_134 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_133)); if (unlikely(!__pyx_k_tuple_134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_134);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_134));
+ __pyx_k_tuple_142 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_141)); if (unlikely(!__pyx_k_tuple_142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_142);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_142));
- /* "pysam/csamtools.pyx":1995
+ /* "pysam/csamtools.pyx":2142
*
* if self.n_plp < 0:
* raise ValueError("error during iteration" ) # <<<<<<<<<<<<<<
*
* # return result, if within same reference
*/
- __pyx_k_tuple_135 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_133)); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_135);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));
+ __pyx_k_tuple_143 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_141)); if (unlikely(!__pyx_k_tuple_143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_143);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_143));
- /* "pysam/csamtools.pyx":2158
+ /* "pysam/csamtools.pyx":2305
* qual = self.qual
* else:
* seq = self.seq.decode('ascii') # <<<<<<<<<<<<<<
* qual = self.qual.decode('ascii')
* return "\t".join(map(str, (self.qname,
*/
- __pyx_k_tuple_137 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_137);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_137));
+ __pyx_k_tuple_145 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_145);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_145));
- /* "pysam/csamtools.pyx":2159
+ /* "pysam/csamtools.pyx":2306
* else:
* seq = self.seq.decode('ascii')
* qual = self.qual.decode('ascii') # <<<<<<<<<<<<<<
* return "\t".join(map(str, (self.qname,
* self.flag,
*/
- __pyx_k_tuple_138 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_138);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_138));
+ __pyx_k_tuple_146 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_146);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_146));
- /* "pysam/csamtools.pyx":2587
+ /* "pysam/csamtools.pyx":2766
* for pytag, value in tags:
* if not type(pytag) is bytes:
* pytag = pytag.encode('ascii') # <<<<<<<<<<<<<<
* t = type(value)
*
*/
- __pyx_k_tuple_143 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_143);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_143));
+ __pyx_k_tuple_151 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_151);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_151));
- /* "pysam/csamtools.pyx":2615
+ /* "pysam/csamtools.pyx":2794
* datafmt = "2sccI%i%s" % (len(value), datafmt)
* args.extend( [pytag[:2],
* pytype.encode('ascii'), # <<<<<<<<<<<<<<
* datatype.encode('ascii'),
* len(value)] + list(value) )
*/
- __pyx_k_tuple_146 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_146);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_146));
+ __pyx_k_tuple_154 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_154);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_154));
- /* "pysam/csamtools.pyx":2616
+ /* "pysam/csamtools.pyx":2795
* args.extend( [pytag[:2],
* pytype.encode('ascii'),
* datatype.encode('ascii'), # <<<<<<<<<<<<<<
* len(value)] + list(value) )
* fmts.append( datafmt )
*/
- __pyx_k_tuple_147 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_147);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_147));
+ __pyx_k_tuple_155 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_155);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_155));
- /* "pysam/csamtools.pyx":2639
+ /* "pysam/csamtools.pyx":2818
* # Note: hex strings (H) are not supported yet
* if t is not bytes:
* value = value.encode('ascii') # <<<<<<<<<<<<<<
* if len(value) == 1:
* fmt, pytype = "2scc", 'A'
*/
- __pyx_k_tuple_148 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_148);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_148));
+ __pyx_k_tuple_156 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_156);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_156));
- /* "pysam/csamtools.pyx":2646
+ /* "pysam/csamtools.pyx":2825
*
* args.extend( [pytag[:2],
* pytype.encode('ascii'), # <<<<<<<<<<<<<<
* value ] )
*
*/
- __pyx_k_tuple_150 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_150);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_150));
+ __pyx_k_tuple_158 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__ascii)); if (unlikely(!__pyx_k_tuple_158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_158);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_158));
- /* "pysam/csamtools.pyx":3047
+ /* "pysam/csamtools.pyx":3264
* '''
* def __init__(self):
* raise TypeError("This class cannot be instantiated from Python") # <<<<<<<<<<<<<<
*
* def __str__(self):
*/
- __pyx_k_tuple_176 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_175)); if (unlikely(!__pyx_k_tuple_176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_176);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_176));
+ __pyx_k_tuple_184 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_183)); if (unlikely(!__pyx_k_tuple_184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_184);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184));
- /* "pysam/csamtools.pyx":3073
+ /* "pysam/csamtools.pyx":3290
*
- * if self.plp[0] == NULL:
+ * if self.plp == NULL or self.plp[0] == NULL:
* raise ValueError("PileupProxy accessed after iterator finished") # <<<<<<<<<<<<<<
*
* # warning: there could be problems if self.n and self.buf are
*/
- __pyx_k_tuple_178 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_177)); if (unlikely(!__pyx_k_tuple_178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_178);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_178));
+ __pyx_k_tuple_186 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_185)); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_186);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186));
- /* "pysam/csamtools.pyx":3086
+ /* "pysam/csamtools.pyx":3303
*
* def __init__(self):
* raise TypeError("This class cannot be instantiated from Python") # <<<<<<<<<<<<<<
*
* def __str__(self):
*/
- __pyx_k_tuple_179 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_175)); if (unlikely(!__pyx_k_tuple_179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_179);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_179));
+ __pyx_k_tuple_187 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_183)); if (unlikely(!__pyx_k_tuple_187)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_187);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_187));
- /* "pysam/csamtools.pyx":3199
+ /* "pysam/csamtools.pyx":3416
* # recover. Thus redirect output to file with -o option.
* if method == "view":
* if "-o" in args: raise ValueError("option -o is forbidden in samtools view") # <<<<<<<<<<<<<<
* args = ( "-o", stdout_f ) + args
*
*/
- __pyx_k_tuple_184 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_183)); if (unlikely(!__pyx_k_tuple_184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_184);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184));
+ __pyx_k_tuple_192 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_191)); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_192);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
- /* "pysam/csamtools.pyx":3224
+ /* "pysam/csamtools.pyx":3441
* stdout_save.restore()
* try:
* with open( stdout_f, "r") as inf: # <<<<<<<<<<<<<<
* out_stdout = inf.readlines()
* except UnicodeDecodeError:
*/
- __pyx_k_tuple_185 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_185);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_185));
+ __pyx_k_tuple_193 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_193)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_193);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_193));
- /* "pysam/csamtools.pyx":3227
+ /* "pysam/csamtools.pyx":3444
* out_stdout = inf.readlines()
* except UnicodeDecodeError:
* with open( stdout_f, "rb") as inf: # <<<<<<<<<<<<<<
* # read binary output
* out_stdout = inf.read()
*/
- __pyx_k_tuple_186 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_186);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186));
+ __pyx_k_tuple_194 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_194);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));
- /* "pysam/csamtools.pyx":3237
+ /* "pysam/csamtools.pyx":3454
* pysam_unset_stderr()
* try:
* with open( stderr_f, "r") as inf: # <<<<<<<<<<<<<<
* out_stderr = inf.readlines()
* except UnicodeDecodeError:
*/
- __pyx_k_tuple_187 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_187)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_187);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_187));
+ __pyx_k_tuple_195 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_195);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_195));
- /* "pysam/csamtools.pyx":3240
+ /* "pysam/csamtools.pyx":3457
* out_stderr = inf.readlines()
* except UnicodeDecodeError:
* with open( stderr_f, "rb") as inf: # <<<<<<<<<<<<<<
* # read binary output
* out_stderr = inf.read()
*/
- __pyx_k_tuple_188 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_188);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));
+ __pyx_k_tuple_196 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_196)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_196);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_196));
/* "pysam/csamtools.pyx":143
* else:
*
* #####################################################################
*/
- __pyx_k_tuple_256 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_255)); if (unlikely(!__pyx_k_tuple_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_256);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_256));
+ __pyx_k_tuple_265 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_264)); if (unlikely(!__pyx_k_tuple_265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_265);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_265));
- /* "pysam/csamtools.pyx":260
+ /* "pysam/csamtools.pyx":267
* list of reads (:class:`pysam.PileupRead`) aligned to this column
* '''
* def __str__(self): # <<<<<<<<<<<<<<
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
* "\n" + "\n".join( map(str, self.pileups) )
*/
- __pyx_k_tuple_258 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_258)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_258);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_258));
- __pyx_k_codeobj_259 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s____str__, 260, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_259)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_267 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_267)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_267);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_267));
+ __pyx_k_codeobj_268 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____str__, 267, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":308
+ /* "pysam/csamtools.pyx":315
* stderr is captured.
* '''
* def __init__(self): # <<<<<<<<<<<<<<
* return
* self.stderr_h, self.stderr_f = tempfile.mkstemp()
*/
- __pyx_k_tuple_264 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_264)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_264);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_264));
- __pyx_k_codeobj_265 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s____init__, 308, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_265)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_273 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_273);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_273));
+ __pyx_k_codeobj_274 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____init__, 315, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":314
+ /* "pysam/csamtools.pyx":321
* self.stderr_save.setfd( self.stderr_h )
*
* def readAndRelease( self ): # <<<<<<<<<<<<<<
* return []
* self.stderr_save.restore()
*/
- __pyx_k_tuple_267 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_267)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_267);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_267));
- __pyx_k_codeobj_268 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s__readAndRelease, 314, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_268)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_276 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_276)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_276);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_276));
+ __pyx_k_codeobj_277 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__readAndRelease, 321, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_277)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":323
+ /* "pysam/csamtools.pyx":330
* return lines
*
* def release(self): # <<<<<<<<<<<<<<
* return
* self.stderr_save.restore()
*/
- __pyx_k_tuple_270 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_270)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_270);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_270));
- __pyx_k_codeobj_271 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s__release, 323, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_271)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_279 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_279)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_279);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_279));
+ __pyx_k_codeobj_280 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__release, 330, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_280)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":329
+ /* "pysam/csamtools.pyx":336
* os.remove( self.stderr_f )
*
* def __del__(self): # <<<<<<<<<<<<<<
* self.release()
*
*/
- __pyx_k_tuple_273 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_273);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_273));
- __pyx_k_codeobj_274 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s____del__, 329, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_274)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_282 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_282)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_282);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_282));
+ __pyx_k_codeobj_283 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____del__, 336, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_283)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":334
+ /* "pysam/csamtools.pyx":341
* class StderrStoreWindows():
* '''does nothing. stderr can't be redirected on windows'''
* def __init__(self): pass # <<<<<<<<<<<<<<
* def readAndRelease(self): return []
* def release(self): pass
*/
- __pyx_k_tuple_277 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_277)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_277);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_277));
- __pyx_k_codeobj_278 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s____init__, 334, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_278)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_286 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_286)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_286);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_286));
+ __pyx_k_codeobj_287 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____init__, 341, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_287)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":335
+ /* "pysam/csamtools.pyx":342
* '''does nothing. stderr can't be redirected on windows'''
* def __init__(self): pass
* def readAndRelease(self): return [] # <<<<<<<<<<<<<<
* def release(self): pass
*
*/
- __pyx_k_tuple_280 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_280)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_280);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_280));
- __pyx_k_codeobj_281 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s__readAndRelease, 335, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_281)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_289 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_289)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_289);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_289));
+ __pyx_k_codeobj_290 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__readAndRelease, 342, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_290)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":336
+ /* "pysam/csamtools.pyx":343
* def __init__(self): pass
* def readAndRelease(self): return []
* def release(self): pass # <<<<<<<<<<<<<<
*
* if platform.system()=='Windows':
*/
- __pyx_k_tuple_283 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_283)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_283);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_283));
- __pyx_k_codeobj_284 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s__release, 336, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_284)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_292 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_292)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_292);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_292));
+ __pyx_k_codeobj_293 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__release, 343, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_293)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":354
+ /* "pysam/csamtools.pyx":361
*
* # order of records within sam headers
* VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO" ) # <<<<<<<<<<<<<<
*
* # type conversions within sam header records
*/
- __pyx_k_tuple_287 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_n_s__CO)); if (unlikely(!__pyx_k_tuple_287)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_287);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_287));
+ __pyx_k_tuple_296 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_n_s__CO)); if (unlikely(!__pyx_k_tuple_296)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_296);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_296));
- /* "pysam/csamtools.pyx":364
+ /* "pysam/csamtools.pyx":371
*
* # output order of fields within records
* VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ), # <<<<<<<<<<<<<<
* "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
* "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
*/
- __pyx_k_tuple_288 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__VN), ((PyObject *)__pyx_n_s__SO), ((PyObject *)__pyx_n_s__GO)); if (unlikely(!__pyx_k_tuple_288)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_288);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_288));
+ __pyx_k_tuple_297 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__VN), ((PyObject *)__pyx_n_s__SO), ((PyObject *)__pyx_n_s__GO)); if (unlikely(!__pyx_k_tuple_297)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_297);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_297));
- /* "pysam/csamtools.pyx":365
+ /* "pysam/csamtools.pyx":372
* # output order of fields within records
* VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),
* "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ), # <<<<<<<<<<<<<<
* "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
* "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }
*/
- __pyx_k_tuple_289 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__SN), ((PyObject *)__pyx_n_s__LN), ((PyObject *)__pyx_n_s__AS), ((PyObject *)__pyx_n_s__M5), ((PyObject *)__pyx_n_s__UR), ((PyObject *)__pyx_n_s__SP)); if (unlikely(!__pyx_k_tuple_289)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_289);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_289));
+ __pyx_k_tuple_298 = PyTuple_Pack(6, ((PyObject *)__pyx_n_s__SN), ((PyObject *)__pyx_n_s__LN), ((PyObject *)__pyx_n_s__AS), ((PyObject *)__pyx_n_s__M5), ((PyObject *)__pyx_n_s__UR), ((PyObject *)__pyx_n_s__SP)); if (unlikely(!__pyx_k_tuple_298)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_298);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_298));
- /* "pysam/csamtools.pyx":366
+ /* "pysam/csamtools.pyx":373
* VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),
* "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
* "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ), # <<<<<<<<<<<<<<
* "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }
*
*/
- __pyx_k_tuple_290 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__ID), ((PyObject *)__pyx_n_s__SM), ((PyObject *)__pyx_n_s__LB), ((PyObject *)__pyx_n_s__DS), ((PyObject *)__pyx_n_s__PU), ((PyObject *)__pyx_n_s__PI), ((PyObject *)__pyx_n_s__CN), ((PyObject *)__pyx_n_s__DT), ((PyObject *)__pyx_n_s__PL), ((PyObject *)__pyx_n_s__FO), ((PyObject *)__pyx_n_s__KS), ((PyObject *)__pyx_n_s__PG)); if (unlikely(!__pyx_k_tuple_290)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_290);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_290));
+ __pyx_k_tuple_299 = PyTuple_Pack(12, ((PyObject *)__pyx_n_s__ID), ((PyObject *)__pyx_n_s__SM), ((PyObject *)__pyx_n_s__LB), ((PyObject *)__pyx_n_s__DS), ((PyObject *)__pyx_n_s__PU), ((PyObject *)__pyx_n_s__PI), ((PyObject *)__pyx_n_s__CN), ((PyObject *)__pyx_n_s__DT), ((PyObject *)__pyx_n_s__PL), ((PyObject *)__pyx_n_s__FO), ((PyObject *)__pyx_n_s__KS), ((PyObject *)__pyx_n_s__PG)); if (unlikely(!__pyx_k_tuple_299)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_299);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_299));
- /* "pysam/csamtools.pyx":367
+ /* "pysam/csamtools.pyx":374
* "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
* "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
* "PG" : ( "PN", "ID", "VN", "CL", "PP" ), } # <<<<<<<<<<<<<<
*
*
*/
- __pyx_k_tuple_291 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__PN), ((PyObject *)__pyx_n_s__ID), ((PyObject *)__pyx_n_s__VN), ((PyObject *)__pyx_n_s__CL), ((PyObject *)__pyx_n_s__PP)); if (unlikely(!__pyx_k_tuple_291)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_291);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_291));
+ __pyx_k_tuple_300 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__PN), ((PyObject *)__pyx_n_s__ID), ((PyObject *)__pyx_n_s__VN), ((PyObject *)__pyx_n_s__CL), ((PyObject *)__pyx_n_s__PP)); if (unlikely(!__pyx_k_tuple_300)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_300);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_300));
- /* "pysam/csamtools.pyx":3119
+ /* "pysam/csamtools.pyx":3336
* class Outs:
* '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
* def __init__(self, id = 1): # <<<<<<<<<<<<<<
* self.streams = []
* self.id = id
*/
- __pyx_k_tuple_292 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_292)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_292);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_292));
- __pyx_k_codeobj_293 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s____init__, 3119, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_293)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_k_tuple_294 = PyTuple_Pack(1, ((PyObject *)__pyx_int_1)); if (unlikely(!__pyx_k_tuple_294)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_294);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_294));
+ __pyx_k_tuple_301 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__id)); if (unlikely(!__pyx_k_tuple_301)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_301);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_301));
+ __pyx_k_codeobj_302 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s____init__, 3336, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_302)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_303 = PyTuple_Pack(1, ((PyObject *)__pyx_int_1)); if (unlikely(!__pyx_k_tuple_303)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_303);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_303));
- /* "pysam/csamtools.pyx":3123
+ /* "pysam/csamtools.pyx":3340
* self.id = id
*
* def setdevice(self, filename): # <<<<<<<<<<<<<<
* '''open an existing file, like "/dev/null"'''
* fd = os.open(filename, os.O_WRONLY)
*/
- __pyx_k_tuple_296 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__fd)); if (unlikely(!__pyx_k_tuple_296)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_296);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_296));
- __pyx_k_codeobj_297 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s__setdevice, 3123, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_297)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_305 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__fd)); if (unlikely(!__pyx_k_tuple_305)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_305);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_305));
+ __pyx_k_codeobj_306 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__setdevice, 3340, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_306)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":3128
+ /* "pysam/csamtools.pyx":3345
* self.setfd(fd)
*
* def setfile(self, filename): # <<<<<<<<<<<<<<
* '''open a new file.'''
* fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660);
*/
- __pyx_k_tuple_299 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__fd)); if (unlikely(!__pyx_k_tuple_299)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_299);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_299));
- __pyx_k_codeobj_300 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s__setfile, 3128, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_300)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_308 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__fd)); if (unlikely(!__pyx_k_tuple_308)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_308);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_308));
+ __pyx_k_codeobj_309 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__setfile, 3345, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_309)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":3133
+ /* "pysam/csamtools.pyx":3350
* self.setfd(fd)
*
* def setfd(self, fd): # <<<<<<<<<<<<<<
* ofd = os.dup(self.id) # Save old stream on new unit.
* self.streams.append(ofd)
*/
- __pyx_k_tuple_302 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__fd), ((PyObject *)__pyx_n_s__ofd)); if (unlikely(!__pyx_k_tuple_302)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_302);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_302));
- __pyx_k_codeobj_303 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s__setfd, 3133, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_303)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_311 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_n_s__fd), ((PyObject *)__pyx_n_s__ofd)); if (unlikely(!__pyx_k_tuple_311)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_311);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_311));
+ __pyx_k_codeobj_312 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__setfd, 3350, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_312)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":3141
+ /* "pysam/csamtools.pyx":3358
* os.close(fd) # Close other unit (look out, caller.)
*
* def restore(self): # <<<<<<<<<<<<<<
* '''restore previous output stream'''
* if self.streams:
*/
- __pyx_k_tuple_305 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_305)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_305);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_305));
- __pyx_k_codeobj_306 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s__restore, 3141, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_306)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_314 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__self)); if (unlikely(!__pyx_k_tuple_314)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_314);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_314));
+ __pyx_k_codeobj_315 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s__restore, 3358, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_315)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":3152
+ /* "pysam/csamtools.pyx":3369
* del self.streams[-1]
*
* def _samtools_dispatch( method, # <<<<<<<<<<<<<<
* args = (),
* catch_stdout = True ):
*/
- __pyx_k_tuple_309 = PyTuple_Pack(16, ((PyObject *)__pyx_n_s__method), ((PyObject *)__pyx_n_s__args), ((PyObject *)__pyx_n_s__catch_stdout), ((PyObject *)__pyx_n_s__stderr_h), ((PyObject *)__pyx_n_s__stderr_f), ((PyObject *)__pyx_n_s__stdout_h), ((PyObject *)__pyx_n_s__stdout_f), ((PyObject *)__pyx_n_s__stdout_save), ((PyObject *)__pyx_n_s__cargs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__retval), ((PyObject *)__pyx_n_s__inf), ((PyObject *)__pyx_n_s__out_stdout), ((PyObject *)__pyx_n_s__out_stderr), ((PyObject *)__pyx_n_s__a)); if (unlikely(!__pyx_k_tuple_309)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_309);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_309));
- __pyx_k_codeobj_310 = (PyObject*)__Pyx_PyCode_New(3, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_260, __pyx_n_s___samtools_dispatch, 3152, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_310)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_318 = PyTuple_Pack(16, ((PyObject *)__pyx_n_s__method), ((PyObject *)__pyx_n_s__args), ((PyObject *)__pyx_n_s__catch_stdout), ((PyObject *)__pyx_n_s__stderr_h), ((PyObject *)__pyx_n_s__stderr_f), ((PyObject *)__pyx_n_s__stdout_h), ((PyObject *)__pyx_n_s__stdout_f), ((PyObject *)__pyx_n_s__stdout_save), ((PyObject *)__pyx_n_s__cargs), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__n), ((PyObject *)__pyx_n_s__retval), ((PyObject *)__pyx_n_s__inf), ((PyObject *)__pyx_n_s__out_stdout), ((PyObject *)__pyx_n_s__out_stderr), ((PyObject *)__pyx_n_s__a)); if (unlikely(!__pyx_k_tuple_318)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_318);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_318));
+ __pyx_k_codeobj_319 = (PyObject*)__Pyx_PyCode_New(3, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_269, __pyx_n_s___samtools_dispatch, 3369, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_319)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
/*--- Type init code ---*/
__pyx_vtabptr_5pysam_9csamtools_Fastafile = &__pyx_vtable_5pysam_9csamtools_Fastafile;
__pyx_vtable_5pysam_9csamtools_Fastafile._fetch = (char *(*)(struct __pyx_obj_5pysam_9csamtools_Fastafile *, char *, int, int, int *))__pyx_f_5pysam_9csamtools_9Fastafile__fetch;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_Fastafile.tp_dict, __pyx_vtabptr_5pysam_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "Fastafile", (PyObject *)&__pyx_type_5pysam_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_Fastafile.tp_dict, __pyx_vtabptr_5pysam_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Fastafile", (PyObject *)&__pyx_type_5pysam_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_Fastafile = &__pyx_type_5pysam_9csamtools_Fastafile;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_FastqProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "FastqProxy", (PyObject *)&__pyx_type_5pysam_9csamtools_FastqProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5pysam_9csamtools_FastqProxy = &__pyx_type_5pysam_9csamtools_FastqProxy;
+ __pyx_vtabptr_5pysam_9csamtools_Fastqfile = &__pyx_vtable_5pysam_9csamtools_Fastqfile;
+ __pyx_vtable_5pysam_9csamtools_Fastqfile.getCurrent = (kseq_t *(*)(struct __pyx_obj_5pysam_9csamtools_Fastqfile *))__pyx_f_5pysam_9csamtools_9Fastqfile_getCurrent;
+ __pyx_vtable_5pysam_9csamtools_Fastqfile.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_Fastqfile *))__pyx_f_5pysam_9csamtools_9Fastqfile_cnext;
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_Fastqfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_AlignedRead, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_Fastqfile, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+ __pyx_wrapperbase_5pysam_9csamtools_9Fastqfile_12__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_5pysam_9csamtools_9Fastqfile_12__next__.doc = __pyx_doc_5pysam_9csamtools_9Fastqfile_12__next__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9csamtools_9Fastqfile_12__next__;
+ }
+ }
+ #endif
+ if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_Fastqfile.tp_dict, __pyx_vtabptr_5pysam_9csamtools_Fastqfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Fastqfile", (PyObject *)&__pyx_type_5pysam_9csamtools_Fastqfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_5pysam_9csamtools_Fastqfile = &__pyx_type_5pysam_9csamtools_Fastqfile;
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #if CYTHON_COMPILING_IN_CPYTHON
+ {
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_AlignedRead, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
__pyx_wrapperbase_5pysam_9csamtools_11AlignedRead_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
__pyx_wrapperbase_5pysam_9csamtools_11AlignedRead_4__str__.doc = __pyx_doc_5pysam_9csamtools_11AlignedRead_4__str__;
}
}
#endif
- if (__Pyx_SetAttrString(__pyx_m, "AlignedRead", (PyObject *)&__pyx_type_5pysam_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "AlignedRead", (PyObject *)&__pyx_type_5pysam_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_AlignedRead = &__pyx_type_5pysam_9csamtools_AlignedRead;
__pyx_vtabptr_5pysam_9csamtools_Samfile = &__pyx_vtable_5pysam_9csamtools_Samfile;
__pyx_vtable_5pysam_9csamtools_Samfile._buildHeader = (bam_header_t *(*)(struct __pyx_obj_5pysam_9csamtools_Samfile *, PyObject *))__pyx_f_5pysam_9csamtools_7Samfile__buildHeader;
__pyx_vtable_5pysam_9csamtools_Samfile.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_Samfile *))__pyx_f_5pysam_9csamtools_7Samfile_cnext;
__pyx_vtable_5pysam_9csamtools_Samfile.write = (int (*)(struct __pyx_obj_5pysam_9csamtools_Samfile *, struct __pyx_obj_5pysam_9csamtools_AlignedRead *, int __pyx_skip_dispatch))__pyx_f_5pysam_9csamtools_7Samfile_write;
__pyx_vtable_5pysam_9csamtools_Samfile._getrname = (char *(*)(struct __pyx_obj_5pysam_9csamtools_Samfile *, int))__pyx_f_5pysam_9csamtools_7Samfile__getrname;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_Samfile, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_Samfile, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
__pyx_wrapperbase_5pysam_9csamtools_7Samfile_42__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
__pyx_wrapperbase_5pysam_9csamtools_7Samfile_42__next__.doc = __pyx_doc_5pysam_9csamtools_7Samfile_42__next__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_Samfile.tp_dict, __pyx_vtabptr_5pysam_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "Samfile", (PyObject *)&__pyx_type_5pysam_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_Samfile.tp_dict, __pyx_vtabptr_5pysam_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Samfile", (PyObject *)&__pyx_type_5pysam_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_Samfile = &__pyx_type_5pysam_9csamtools_Samfile;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "PileupProxy", (PyObject *)&__pyx_type_5pysam_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "PileupProxy", (PyObject *)&__pyx_type_5pysam_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_PileupProxy = &__pyx_type_5pysam_9csamtools_PileupProxy;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "PileupRead", (PyObject *)&__pyx_type_5pysam_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "PileupRead", (PyObject *)&__pyx_type_5pysam_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_PileupRead = &__pyx_type_5pysam_9csamtools_PileupRead;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "IteratorRow", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IteratorRow", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_IteratorRow = &__pyx_type_5pysam_9csamtools_IteratorRow;
__pyx_vtabptr_5pysam_9csamtools_IteratorRowRegion = &__pyx_vtable_5pysam_9csamtools_IteratorRowRegion;
__pyx_vtable_5pysam_9csamtools_IteratorRowRegion.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *))__pyx_f_5pysam_9csamtools_17IteratorRowRegion_getCurrent;
__pyx_vtable_5pysam_9csamtools_IteratorRowRegion.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowRegion *))__pyx_f_5pysam_9csamtools_17IteratorRowRegion_cnext;
__pyx_type_5pysam_9csamtools_IteratorRowRegion.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorRow;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
__pyx_wrapperbase_5pysam_9csamtools_17IteratorRowRegion_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
__pyx_wrapperbase_5pysam_9csamtools_17IteratorRowRegion_4__next__.doc = __pyx_doc_5pysam_9csamtools_17IteratorRowRegion_4__next__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorRowRegion.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "IteratorRowRegion", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorRowRegion.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IteratorRowRegion", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_IteratorRowRegion = &__pyx_type_5pysam_9csamtools_IteratorRowRegion;
__pyx_vtabptr_5pysam_9csamtools_IteratorRowAll = &__pyx_vtable_5pysam_9csamtools_IteratorRowAll;
__pyx_vtable_5pysam_9csamtools_IteratorRowAll.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *))__pyx_f_5pysam_9csamtools_14IteratorRowAll_getCurrent;
__pyx_vtable_5pysam_9csamtools_IteratorRowAll.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowAll *))__pyx_f_5pysam_9csamtools_14IteratorRowAll_cnext;
__pyx_type_5pysam_9csamtools_IteratorRowAll.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorRow;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAll, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAll, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
__pyx_wrapperbase_5pysam_9csamtools_14IteratorRowAll_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
__pyx_wrapperbase_5pysam_9csamtools_14IteratorRowAll_4__next__.doc = __pyx_doc_5pysam_9csamtools_14IteratorRowAll_4__next__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorRowAll.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAll", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorRowAll.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAll", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_IteratorRowAll = &__pyx_type_5pysam_9csamtools_IteratorRowAll;
__pyx_type_5pysam_9csamtools_IteratorRowAllRefs.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorRow;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
__pyx_wrapperbase_5pysam_9csamtools_18IteratorRowAllRefs_6__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
__pyx_wrapperbase_5pysam_9csamtools_18IteratorRowAllRefs_6__next__.doc = __pyx_doc_5pysam_9csamtools_18IteratorRowAllRefs_6__next__;
}
}
#endif
- if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAllRefs", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAllRefs", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_IteratorRowAllRefs = &__pyx_type_5pysam_9csamtools_IteratorRowAllRefs;
__pyx_vtabptr_5pysam_9csamtools_IteratorRowSelection = &__pyx_vtable_5pysam_9csamtools_IteratorRowSelection;
__pyx_vtable_5pysam_9csamtools_IteratorRowSelection.getCurrent = (bam1_t *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *))__pyx_f_5pysam_9csamtools_20IteratorRowSelection_getCurrent;
__pyx_vtable_5pysam_9csamtools_IteratorRowSelection.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_IteratorRowSelection *))__pyx_f_5pysam_9csamtools_20IteratorRowSelection_cnext;
__pyx_type_5pysam_9csamtools_IteratorRowSelection.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorRow;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowSelection, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowSelection, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
__pyx_wrapperbase_5pysam_9csamtools_20IteratorRowSelection_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
__pyx_wrapperbase_5pysam_9csamtools_20IteratorRowSelection_4__next__.doc = __pyx_doc_5pysam_9csamtools_20IteratorRowSelection_4__next__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorRowSelection.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "IteratorRowSelection", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorRowSelection.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IteratorRowSelection", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorRowSelection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_IteratorRowSelection = &__pyx_type_5pysam_9csamtools_IteratorRowSelection;
__pyx_vtabptr_5pysam_9csamtools_IteratorColumn = &__pyx_vtable_5pysam_9csamtools_IteratorColumn;
__pyx_vtable_5pysam_9csamtools_IteratorColumn.cnext = (int (*)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *))__pyx_f_5pysam_9csamtools_14IteratorColumn_cnext;
__pyx_vtable_5pysam_9csamtools_IteratorColumn.setMask = (PyObject *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *))__pyx_f_5pysam_9csamtools_14IteratorColumn_setMask;
__pyx_vtable_5pysam_9csamtools_IteratorColumn.setupIteratorData = (PyObject *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, int, int, int, struct __pyx_opt_args_5pysam_9csamtools_14IteratorColumn_setupIteratorData *__pyx_optional_args))__pyx_f_5pysam_9csamtools_14IteratorColumn_setupIteratorData;
__pyx_vtable_5pysam_9csamtools_IteratorColumn.reset = (PyObject *(*)(struct __pyx_obj_5pysam_9csamtools_IteratorColumn *, PyObject *, PyObject *, PyObject *))__pyx_f_5pysam_9csamtools_14IteratorColumn_reset;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorColumn.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "IteratorColumn", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorColumn.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IteratorColumn", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_IteratorColumn = &__pyx_type_5pysam_9csamtools_IteratorColumn;
__pyx_vtabptr_5pysam_9csamtools_IteratorColumnRegion = &__pyx_vtable_5pysam_9csamtools_IteratorColumnRegion;
__pyx_vtable_5pysam_9csamtools_IteratorColumnRegion.__pyx_base = *__pyx_vtabptr_5pysam_9csamtools_IteratorColumn;
__pyx_type_5pysam_9csamtools_IteratorColumnRegion.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorColumn;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
__pyx_wrapperbase_5pysam_9csamtools_20IteratorColumnRegion_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
__pyx_wrapperbase_5pysam_9csamtools_20IteratorColumnRegion_2__next__.doc = __pyx_doc_5pysam_9csamtools_20IteratorColumnRegion_2__next__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorColumnRegion.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnRegion", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorColumnRegion.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnRegion", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_IteratorColumnRegion = &__pyx_type_5pysam_9csamtools_IteratorColumnRegion;
__pyx_vtabptr_5pysam_9csamtools_IteratorColumnAllRefs = &__pyx_vtable_5pysam_9csamtools_IteratorColumnAllRefs;
__pyx_vtable_5pysam_9csamtools_IteratorColumnAllRefs.__pyx_base = *__pyx_vtabptr_5pysam_9csamtools_IteratorColumn;
__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs.tp_base = __pyx_ptype_5pysam_9csamtools_IteratorColumn;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
__pyx_wrapperbase_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
__pyx_wrapperbase_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__.doc = __pyx_doc_5pysam_9csamtools_21IteratorColumnAllRefs_2__next__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnAllRefs", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs.tp_dict, __pyx_vtabptr_5pysam_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnAllRefs", (PyObject *)&__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_IteratorColumnAllRefs = &__pyx_type_5pysam_9csamtools_IteratorColumnAllRefs;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IndexedReads) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "IndexedReads", (PyObject *)&__pyx_type_5pysam_9csamtools_IndexedReads) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_IndexedReads) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IndexedReads", (PyObject *)&__pyx_type_5pysam_9csamtools_IndexedReads) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_IndexedReads = &__pyx_type_5pysam_9csamtools_IndexedReads;
- if (PyType_Ready(&__pyx_type_5pysam_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "SNPCall", (PyObject *)&__pyx_type_5pysam_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_5pysam_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "SNPCall", (PyObject *)&__pyx_type_5pysam_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools_SNPCall = &__pyx_type_5pysam_9csamtools_SNPCall;
if (PyType_Ready(&__pyx_type_5pysam_9csamtools___pyx_scope_struct__genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_5pysam_9csamtools___pyx_scope_struct__genexpr = &__pyx_type_5pysam_9csamtools___pyx_scope_struct__genexpr;
*/
__pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_253); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_262); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* if IS_PYTHON3:
* CIGAR2CODE = dict( [y,x] for x,y in enumerate( CODE2CIGAR) )
*/
- __pyx_v_5pysam_9csamtools_CODE2CIGAR = __pyx_k_254;
+ __pyx_v_5pysam_9csamtools_CODE2CIGAR = __pyx_k_263;
/* "pysam/csamtools.pyx":139
*
__pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_256), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_265), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__CIGAR_REGEX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* cdef int max_pos = 2 << 29
*
*/
- __pyx_v_5pysam_9csamtools_bam_nt16_rev_table = __pyx_k_257;
+ __pyx_v_5pysam_9csamtools_bam_nt16_rev_table = __pyx_k_266;
/* "pysam/csamtools.pyx":152
* # hard-coded constants
*/
__pyx_v_5pysam_9csamtools_max_pos = 1073741824;
- /* "pysam/csamtools.pyx":247
+ /* "pysam/csamtools.pyx":254
* (<object>f)(a)
*
* class PileupColumn(object): # <<<<<<<<<<<<<<
* '''A pileup column. A pileup column contains
* all the reads that map to a certain target base.
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- /* "pysam/csamtools.pyx":260
+ /* "pysam/csamtools.pyx":267
* list of reads (:class:`pysam.PileupRead`) aligned to this column
* '''
* def __str__(self): # <<<<<<<<<<<<<<
* return "\t".join( map(str, (self.tid, self.pos, self.n))) +\
* "\n" + "\n".join( map(str, self.pileups) )
*/
- __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_12PileupColumn_1__str__, 0, __pyx_n_s_261, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_259)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_12PileupColumn_1__str__, 0, __pyx_n_s_270, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_268)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____str__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____str__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pysam/csamtools.pyx":247
+ /* "pysam/csamtools.pyx":254
* (<object>f)(a)
*
* class PileupColumn(object): # <<<<<<<<<<<<<<
* '''A pileup column. A pileup column contains
* all the reads that map to a certain target base.
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_builtin_object);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
__Pyx_GIVEREF(__pyx_builtin_object);
- if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_263)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__PileupColumn, __pyx_n_s__PileupColumn, __pyx_n_s_262); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_272)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__PileupColumn, __pyx_n_s__PileupColumn, __pyx_n_s_271); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PileupColumn, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PileupColumn, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":304
+ /* "pysam/csamtools.pyx":311
* return 0
*
* class StderrStore(): # <<<<<<<<<<<<<<
* '''
* stderr is captured.
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- /* "pysam/csamtools.pyx":308
+ /* "pysam/csamtools.pyx":315
* stderr is captured.
* '''
* def __init__(self): # <<<<<<<<<<<<<<
* return
* self.stderr_h, self.stderr_f = tempfile.mkstemp()
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_1__init__, 0, __pyx_n_s_266, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_265)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_1__init__, 0, __pyx_n_s_275, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_274)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":314
+ /* "pysam/csamtools.pyx":321
* self.stderr_save.setfd( self.stderr_h )
*
* def readAndRelease( self ): # <<<<<<<<<<<<<<
* return []
* self.stderr_save.restore()
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_3readAndRelease, 0, __pyx_n_s_269, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_268)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_3readAndRelease, 0, __pyx_n_s_278, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_277)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__readAndRelease, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__readAndRelease, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":323
+ /* "pysam/csamtools.pyx":330
* return lines
*
* def release(self): # <<<<<<<<<<<<<<
* return
* self.stderr_save.restore()
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_5release, 0, __pyx_n_s_272, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_271)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_5release, 0, __pyx_n_s_281, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_280)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__release, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__release, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":329
+ /* "pysam/csamtools.pyx":336
* os.remove( self.stderr_f )
*
* def __del__(self): # <<<<<<<<<<<<<<
* self.release()
*
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_7__del__, 0, __pyx_n_s_275, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_274)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_11StderrStore_7__del__, 0, __pyx_n_s_284, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_283)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____del__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____del__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":304
+ /* "pysam/csamtools.pyx":311
* return 0
*
* class StderrStore(): # <<<<<<<<<<<<<<
* '''
* stderr is captured.
*/
- if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_276)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s__StderrStore, __pyx_n_s__StderrStore, __pyx_n_s_262); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_285)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s__StderrStore, __pyx_n_s__StderrStore, __pyx_n_s_271); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStore, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStore, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":332
+ /* "pysam/csamtools.pyx":339
* self.release()
*
* class StderrStoreWindows(): # <<<<<<<<<<<<<<
* '''does nothing. stderr can't be redirected on windows'''
* def __init__(self): pass
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- /* "pysam/csamtools.pyx":334
+ /* "pysam/csamtools.pyx":341
* class StderrStoreWindows():
* '''does nothing. stderr can't be redirected on windows'''
* def __init__(self): pass # <<<<<<<<<<<<<<
* def readAndRelease(self): return []
* def release(self): pass
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_1__init__, 0, __pyx_n_s_279, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_278)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_1__init__, 0, __pyx_n_s_288, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_287)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":335
+ /* "pysam/csamtools.pyx":342
* '''does nothing. stderr can't be redirected on windows'''
* def __init__(self): pass
* def readAndRelease(self): return [] # <<<<<<<<<<<<<<
* def release(self): pass
*
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_3readAndRelease, 0, __pyx_n_s_282, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_281)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_3readAndRelease, 0, __pyx_n_s_291, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_290)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__readAndRelease, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__readAndRelease, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":336
+ /* "pysam/csamtools.pyx":343
* def __init__(self): pass
* def readAndRelease(self): return []
* def release(self): pass # <<<<<<<<<<<<<<
*
* if platform.system()=='Windows':
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_5release, 0, __pyx_n_s_285, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_284)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_18StderrStoreWindows_5release, 0, __pyx_n_s_294, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_293)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__release, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__release, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":332
+ /* "pysam/csamtools.pyx":339
* self.release()
*
* class StderrStoreWindows(): # <<<<<<<<<<<<<<
* '''does nothing. stderr can't be redirected on windows'''
* def __init__(self): pass
*/
- if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_286)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s__StderrStoreWindows, __pyx_n_s__StderrStoreWindows, __pyx_n_s_262); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_295)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s__StderrStoreWindows, __pyx_n_s__StderrStoreWindows, __pyx_n_s_271); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStoreWindows, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStoreWindows, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":338
+ /* "pysam/csamtools.pyx":345
* def release(self): pass
*
* if platform.system()=='Windows': # <<<<<<<<<<<<<<
* del StderrStore
* StderrStore = StderrStoreWindows
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__platform); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__platform); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__system); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__system); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Windows), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__Windows), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- /* "pysam/csamtools.pyx":339
+ /* "pysam/csamtools.pyx":346
*
* if platform.system()=='Windows':
* del StderrStore # <<<<<<<<<<<<<<
* StderrStore = StderrStoreWindows
*
*/
- if (__Pyx_DelAttrString(__pyx_m, "StderrStore") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_DelAttrString(__pyx_m, "StderrStore") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":340
+ /* "pysam/csamtools.pyx":347
* if platform.system()=='Windows':
* del StderrStore
* StderrStore = StderrStoreWindows # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStoreWindows); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStoreWindows); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStore, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStore, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L5;
}
__pyx_L5:;
- /* "pysam/csamtools.pyx":347
+ /* "pysam/csamtools.pyx":354
* ######################################################################
* # valid types for sam headers
* VALID_HEADER_TYPES = { "HD" : dict, # <<<<<<<<<<<<<<
* "SQ" : list,
* "RG" : list,
*/
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__HD), ((PyObject *)((PyObject*)(&PyDict_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__HD), ((PyObject *)((PyObject*)(&PyDict_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":348
+ /* "pysam/csamtools.pyx":355
* # valid types for sam headers
* VALID_HEADER_TYPES = { "HD" : dict,
* "SQ" : list, # <<<<<<<<<<<<<<
* "RG" : list,
* "PG" : list,
*/
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":349
+ /* "pysam/csamtools.pyx":356
* VALID_HEADER_TYPES = { "HD" : dict,
* "SQ" : list,
* "RG" : list, # <<<<<<<<<<<<<<
* "PG" : list,
* "CO" : list }
*/
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__RG), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__RG), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":350
+ /* "pysam/csamtools.pyx":357
* "SQ" : list,
* "RG" : list,
* "PG" : list, # <<<<<<<<<<<<<<
* "CO" : list }
*
*/
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__PG), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__PG), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":351
+ /* "pysam/csamtools.pyx":358
* "RG" : list,
* "PG" : list,
* "CO" : list } # <<<<<<<<<<<<<<
*
* # order of records within sam headers
*/
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__CO), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__CO), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":354
+ /* "pysam/csamtools.pyx":361
*
* # order of records within sam headers
* VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO" ) # <<<<<<<<<<<<<<
*
* # type conversions within sam header records
*/
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADERS, ((PyObject *)__pyx_k_tuple_287)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADERS, ((PyObject *)__pyx_k_tuple_296)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":357
+ /* "pysam/csamtools.pyx":364
*
* # type conversions within sam header records
* VALID_HEADER_FIELDS = { "HD" : { "VN" : str, "SO" : str, "GO" : str }, # <<<<<<<<<<<<<<
* "SQ" : { "SN" : str, "LN" : int, "AS" : str, "M5" : str, "UR" : str, "SP" : str },
* "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str,
*/
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__GO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__GO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":358
+ /* "pysam/csamtools.pyx":365
* # type conversions within sam header records
* VALID_HEADER_FIELDS = { "HD" : { "VN" : str, "SO" : str, "GO" : str },
* "SQ" : { "SN" : str, "LN" : int, "AS" : str, "M5" : str, "UR" : str, "SP" : str }, # <<<<<<<<<<<<<<
* "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str,
* "CN" : str, "DT" : str, "PL" : str, "FO" : str, "KS" : str, "PG" : str,},
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__LN), ((PyObject *)((PyObject*)(&PyInt_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__AS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__M5), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__UR), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SP), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__LN), ((PyObject *)((PyObject*)(&PyInt_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__AS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__M5), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__UR), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SP), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":359
+ /* "pysam/csamtools.pyx":366
* VALID_HEADER_FIELDS = { "HD" : { "VN" : str, "SO" : str, "GO" : str },
* "SQ" : { "SN" : str, "LN" : int, "AS" : str, "M5" : str, "UR" : str, "SP" : str },
* "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str, # <<<<<<<<<<<<<<
* "CN" : str, "DT" : str, "PL" : str, "FO" : str, "KS" : str, "PG" : str,},
* "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str, "PP" : str }, }
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SM), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__LB), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__DS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PU), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PI), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "pysam/csamtools.pyx":360
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SM), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__LB), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__DS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PU), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PI), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "pysam/csamtools.pyx":367
* "SQ" : { "SN" : str, "LN" : int, "AS" : str, "M5" : str, "UR" : str, "SP" : str },
* "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str,
* "CN" : str, "DT" : str, "PL" : str, "FO" : str, "KS" : str, "PG" : str,}, # <<<<<<<<<<<<<<
* "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str, "PP" : str }, }
*
*/
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__CN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__DT), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PL), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__KS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PG), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__CN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__DT), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PL), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__KS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PG), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":361
+ /* "pysam/csamtools.pyx":368
* "RG" : { "ID" : str, "SM" : str, "LB" : str, "DS" : str, "PU" : str, "PI" : str,
* "CN" : str, "DT" : str, "PL" : str, "FO" : str, "KS" : str, "PG" : str,},
* "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str, "PP" : str }, } # <<<<<<<<<<<<<<
*
* # output order of fields within records
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__CL), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PP), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__CL), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PP), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":364
+ /* "pysam/csamtools.pyx":371
*
* # output order of fields within records
* VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ), # <<<<<<<<<<<<<<
* "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
* "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
*/
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_k_tuple_288)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_k_tuple_297)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":365
+ /* "pysam/csamtools.pyx":372
* # output order of fields within records
* VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),
* "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ), # <<<<<<<<<<<<<<
* "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
* "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }
*/
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_k_tuple_289)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_k_tuple_298)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":366
+ /* "pysam/csamtools.pyx":373
* VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ),
* "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
* "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ), # <<<<<<<<<<<<<<
* "PG" : ( "PN", "ID", "VN", "CL", "PP" ), }
*
*/
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_k_tuple_290)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_k_tuple_299)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "pysam/csamtools.pyx":367
+ /* "pysam/csamtools.pyx":374
* "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ),
* "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL", "FO", "KS", "PG" ),
* "PG" : ( "PN", "ID", "VN", "CL", "PP" ), } # <<<<<<<<<<<<<<
*
*
*/
- if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_k_tuple_291)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_ORDER, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_k_tuple_300)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_ORDER, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":619
+ /* "pysam/csamtools.pyx":745
* header = None,
* port = None,
* add_sq_text = True, # <<<<<<<<<<<<<<
* check_header = True,
* check_sq = True,
*/
- __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_k_21 = __pyx_t_4;
+ __pyx_k_29 = __pyx_t_4;
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":620
+ /* "pysam/csamtools.pyx":746
* port = None,
* add_sq_text = True,
* check_header = True, # <<<<<<<<<<<<<<
* check_sq = True,
* ):
*/
- __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_k_22 = __pyx_t_4;
+ __pyx_k_30 = __pyx_t_4;
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":621
+ /* "pysam/csamtools.pyx":747
* add_sq_text = True,
* check_header = True,
* check_sq = True, # <<<<<<<<<<<<<<
* ):
* '''open a sam/bam file.
*/
- __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_k_23 = __pyx_t_4;
+ __pyx_k_31 = __pyx_t_4;
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":901
+ /* "pysam/csamtools.pyx":1027
* region = None,
* callback = None,
* until_eof = False ): # <<<<<<<<<<<<<<
* '''
* fetch aligned reads in a :term:`region` using 0-based indexing. The region is specified by
*/
- __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_k_54 = __pyx_t_4;
+ __pyx_k_62 = __pyx_t_4;
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":1022
+ /* "pysam/csamtools.pyx":1148
* end = None,
* region = None,
* until_eof = False ): # <<<<<<<<<<<<<<
* '''*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)*
*
*/
- __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_k_73 = __pyx_t_4;
+ __pyx_k_81 = __pyx_t_4;
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":1942
+ /* "pysam/csamtools.pyx":2089
* int tid = 0,
* int start = 0,
* int end = max_pos, # <<<<<<<<<<<<<<
* int truncate = False,
* **kwargs ):
*/
- __pyx_k_132 = __pyx_v_5pysam_9csamtools_max_pos;
+ __pyx_k_140 = __pyx_v_5pysam_9csamtools_max_pos;
- /* "pysam/csamtools.pyx":3117
+ /* "pysam/csamtools.pyx":3334
* return self._level
*
* class Outs: # <<<<<<<<<<<<<<
* '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
* def __init__(self, id = 1):
*/
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
- /* "pysam/csamtools.pyx":3119
+ /* "pysam/csamtools.pyx":3336
* class Outs:
* '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
* def __init__(self, id = 1): # <<<<<<<<<<<<<<
* self.streams = []
* self.id = id
*/
- __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_1__init__, 0, __pyx_n_s_295, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_293)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_1__init__, 0, __pyx_n_s_304, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_302)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_294));
- if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_303));
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3123
+ /* "pysam/csamtools.pyx":3340
* self.id = id
*
* def setdevice(self, filename): # <<<<<<<<<<<<<<
* '''open an existing file, like "/dev/null"'''
* fd = os.open(filename, os.O_WRONLY)
*/
- __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_3setdevice, 0, __pyx_n_s_298, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_297)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_3setdevice, 0, __pyx_n_s_307, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_306)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__setdevice, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__setdevice, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3128
+ /* "pysam/csamtools.pyx":3345
* self.setfd(fd)
*
* def setfile(self, filename): # <<<<<<<<<<<<<<
* '''open a new file.'''
* fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660);
*/
- __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_5setfile, 0, __pyx_n_s_301, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_300)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_5setfile, 0, __pyx_n_s_310, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_309)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__setfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__setfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3133
+ /* "pysam/csamtools.pyx":3350
* self.setfd(fd)
*
* def setfd(self, fd): # <<<<<<<<<<<<<<
* ofd = os.dup(self.id) # Save old stream on new unit.
* self.streams.append(ofd)
*/
- __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_7setfd, 0, __pyx_n_s_304, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_303)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_7setfd, 0, __pyx_n_s_313, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_312)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__setfd, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__setfd, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3141
+ /* "pysam/csamtools.pyx":3358
* os.close(fd) # Close other unit (look out, caller.)
*
* def restore(self): # <<<<<<<<<<<<<<
* '''restore previous output stream'''
* if self.streams:
*/
- __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_9restore, 0, __pyx_n_s_307, NULL, __pyx_n_s_262, ((PyObject *)__pyx_k_codeobj_306)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_4Outs_9restore, 0, __pyx_n_s_316, NULL, __pyx_n_s_271, ((PyObject *)__pyx_k_codeobj_315)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__restore, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s__restore, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pysam/csamtools.pyx":3117
+ /* "pysam/csamtools.pyx":3334
* return self._level
*
* class Outs: # <<<<<<<<<<<<<<
* '''http://mail.python.org/pipermail/python-list/2000-June/038406.html'''
* def __init__(self, id = 1):
*/
- if (PyDict_SetItemString(((PyObject *)__pyx_t_4), "__doc__", ((PyObject *)__pyx_kp_s_308)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_4), __pyx_n_s__Outs, __pyx_n_s__Outs, __pyx_n_s_262); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItemString(((PyObject *)__pyx_t_4), "__doc__", ((PyObject *)__pyx_kp_s_317)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_4), __pyx_n_s__Outs, __pyx_n_s__Outs, __pyx_n_s_271); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Outs, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Outs, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":3154
+ /* "pysam/csamtools.pyx":3371
* def _samtools_dispatch( method,
* args = (),
* catch_stdout = True ): # <<<<<<<<<<<<<<
* '''call ``method`` in samtools providing arguments in args.
*
*/
- __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_k_180 = __pyx_t_4;
+ __pyx_k_188 = __pyx_t_4;
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":3152
+ /* "pysam/csamtools.pyx":3369
* del self.streams[-1]
*
* def _samtools_dispatch( method, # <<<<<<<<<<<<<<
* args = (),
* catch_stdout = True ):
*/
- __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_1_samtools_dispatch, NULL, __pyx_n_s_262); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_5pysam_9csamtools_1_samtools_dispatch, NULL, __pyx_n_s_271); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s___samtools_dispatch, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s___samtools_dispatch, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pysam/csamtools.pyx":3864
+ /* "pysam/csamtools.pyx":4081
* if self.owns_samfile: samclose( self.fp )
*
* __all__ = ["Samfile", # <<<<<<<<<<<<<<
* "Fastafile",
- * "IteratorRow",
+ * "Fastqfile",
*/
- __pyx_t_4 = PyList_New(9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_New(10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_n_s__Samfile));
PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__Samfile));
__Pyx_INCREF(((PyObject *)__pyx_n_s__Fastafile));
PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__Fastafile));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__Fastafile));
+ __Pyx_INCREF(((PyObject *)__pyx_n_s__Fastqfile));
+ PyList_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_n_s__Fastqfile));
+ __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Fastqfile));
__Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorRow));
- PyList_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_n_s__IteratorRow));
+ PyList_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_n_s__IteratorRow));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorRow));
__Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorColumn));
- PyList_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_n_s__IteratorColumn));
+ PyList_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_n_s__IteratorColumn));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorColumn));
__Pyx_INCREF(((PyObject *)__pyx_n_s__AlignedRead));
- PyList_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_n_s__AlignedRead));
+ PyList_SET_ITEM(__pyx_t_4, 5, ((PyObject *)__pyx_n_s__AlignedRead));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__AlignedRead));
__Pyx_INCREF(((PyObject *)__pyx_n_s__PileupColumn));
- PyList_SET_ITEM(__pyx_t_4, 5, ((PyObject *)__pyx_n_s__PileupColumn));
+ PyList_SET_ITEM(__pyx_t_4, 6, ((PyObject *)__pyx_n_s__PileupColumn));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupColumn));
__Pyx_INCREF(((PyObject *)__pyx_n_s__PileupProxy));
- PyList_SET_ITEM(__pyx_t_4, 6, ((PyObject *)__pyx_n_s__PileupProxy));
+ PyList_SET_ITEM(__pyx_t_4, 7, ((PyObject *)__pyx_n_s__PileupProxy));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupProxy));
__Pyx_INCREF(((PyObject *)__pyx_n_s__PileupRead));
- PyList_SET_ITEM(__pyx_t_4, 7, ((PyObject *)__pyx_n_s__PileupRead));
+ PyList_SET_ITEM(__pyx_t_4, 8, ((PyObject *)__pyx_n_s__PileupRead));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupRead));
__Pyx_INCREF(((PyObject *)__pyx_n_s__IndexedReads));
- PyList_SET_ITEM(__pyx_t_4, 8, ((PyObject *)__pyx_n_s__IndexedReads));
+ PyList_SET_ITEM(__pyx_t_4, 9, ((PyObject *)__pyx_n_s__IndexedReads));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__IndexedReads));
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
/* "pysam/csamtools.pyx":1