From 10e2bb45002784b73d4fb0f6c8b52427ec503577 Mon Sep 17 00:00:00 2001 From: Charles Plessy Date: Mon, 14 Feb 2011 18:53:02 +0900 Subject: [PATCH] Imported Upstream version 0.4.1 --- MANIFEST.in | 2 + PKG-INFO | 2 +- pysam.egg-info/PKG-INFO | 2 +- pysam.egg-info/SOURCES.txt | 1 + pysam/csamtools.c | 10845 +++++++++++++++-------------- pysam/ctabix.c | 12808 +++++++++++++++++++++++++++++++++++ pysam/version.py | 2 +- setup.cfg | 4 +- 8 files changed, 18156 insertions(+), 5510 deletions(-) create mode 100644 pysam/ctabix.c diff --git a/MANIFEST.in b/MANIFEST.in index 7e07b23..0140549 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -13,6 +13,8 @@ include pysam/csamtools.pxd include pysam/csamtools.pyx include pysam/csamtools.c include pysam/ctabix.pxd +include pysam/ctabix.c +include pysam/ctabix.pyx include pysam/pysam_util.h include samtools/*.h include samtools/*/*.h diff --git a/PKG-INFO b/PKG-INFO index 94b8b6e..f14bb9c 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pysam -Version: 0.4 +Version: 0.4.1 Summary: pysam Home-page: http://code.google.com/p/pysam/ Author: Andreas Heger diff --git a/pysam.egg-info/PKG-INFO b/pysam.egg-info/PKG-INFO index 94b8b6e..f14bb9c 100644 --- a/pysam.egg-info/PKG-INFO +++ b/pysam.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pysam -Version: 0.4 +Version: 0.4.1 Summary: pysam Home-page: http://code.google.com/p/pysam/ Author: Andreas Heger diff --git a/pysam.egg-info/SOURCES.txt b/pysam.egg-info/SOURCES.txt index 37688d0..69d2326 100644 --- a/pysam.egg-info/SOURCES.txt +++ b/pysam.egg-info/SOURCES.txt @@ -11,6 +11,7 @@ pysam/__init__.py pysam/csamtools.c pysam/csamtools.pxd pysam/csamtools.pyx +pysam/ctabix.c pysam/ctabix.pxd pysam/ctabix.pyx pysam/namedtuple.py diff --git a/pysam/csamtools.c b/pysam/csamtools.c index 3175a72..bdb21aa 100644 --- a/pysam/csamtools.c +++ b/pysam/csamtools.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.14 on Thu Feb 10 23:20:05 2011 */ +/* Generated by Cython 0.13 on Fri Feb 11 09:01:21 2011 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -135,7 +135,6 @@ #endif #if PY_MAJOR_VERSION >= 3 - #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) @@ -164,25 +163,6 @@ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif -#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300) - #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) - #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) - #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) -#else - #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ - (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ - (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ - (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) - #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ - (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ - (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ - (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) - #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ - (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ - (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ - (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) -#endif - #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif @@ -233,11 +213,6 @@ #include "pysam_util.h" #include "pythread.h" -#ifdef PYREX_WITHOUT_ASSERTIONS -#define CYTHON_WITHOUT_ASSERTIONS -#endif - - /* inline attribute */ #ifndef CYTHON_INLINE #if defined(__GNUC__) @@ -247,7 +222,7 @@ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else - #define CYTHON_INLINE + #define CYTHON_INLINE #endif #endif @@ -255,14 +230,14 @@ #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || defined(__INTEL_COMPILER) -# define CYTHON_UNUSED __attribute__ ((__unused__)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) # else -# define CYTHON_UNUSED +# define CYTHON_UNUSED # endif #endif @@ -287,7 +262,7 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #ifdef __GNUC__ /* Test for GCC > 2.95 */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) +#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* __GNUC__ > 2 ... */ @@ -313,12 +288,11 @@ static const char *__pyx_f[] = { "csamtools.pyx", "csamtools.pxd", "bool.pxd", - "complex.pxd", }; /* Type declarations */ -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":366 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":366 * counter[0] += 1; * * ctypedef struct MateData: # <<<<<<<<<<<<<< @@ -332,7 +306,7 @@ typedef struct { uint32_t flag; } __pyx_t_9csamtools_MateData; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1332 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1332 * ##------------------------------------------------------------------- * ##------------------------------------------------------------------- * ctypedef struct __iterdata: # <<<<<<<<<<<<<< @@ -349,7 +323,7 @@ typedef struct { int seq_len; } __pyx_t_9csamtools___iterdata; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1510 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1510 * bam_plp_set_mask( self.pileup_iter, self.mask ) * * cdef setupIteratorData( self, # <<<<<<<<<<<<<< @@ -362,7 +336,7 @@ struct __pyx_opt_args_9csamtools_14IteratorColumn_setupIteratorData { int reopen; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":80 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":80 * return dest * * cdef class PileupRead # <<<<<<<<<<<<<< @@ -381,7 +355,7 @@ struct __pyx_obj_9csamtools_PileupRead { uint32_t _is_tail; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1125 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1125 * ##------------------------------------------------------------------- * ##------------------------------------------------------------------- * cdef class IteratorRow: # <<<<<<<<<<<<<< @@ -393,7 +367,7 @@ struct __pyx_obj_9csamtools_IteratorRow { PyObject_HEAD }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1283 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1283 * * * cdef class IteratorRowAllRefs(IteratorRow): # <<<<<<<<<<<<<< @@ -408,7 +382,7 @@ struct __pyx_obj_9csamtools_IteratorRowAllRefs { struct __pyx_obj_9csamtools_IteratorRowRegion *rowiter; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":71 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":71 * return dest * * cdef class PileupProxy # <<<<<<<<<<<<<< @@ -424,7 +398,7 @@ struct __pyx_obj_9csamtools_PileupProxy { int n_pu; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1144 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1144 * pass * * cdef class IteratorRowRegion(IteratorRow): # <<<<<<<<<<<<<< @@ -442,7 +416,7 @@ struct __pyx_obj_9csamtools_IteratorRowRegion { samfile_t *fp; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":222 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":222 * ## Public methods * ###################################################################### * cdef class Fastafile: # <<<<<<<<<<<<<< @@ -457,7 +431,7 @@ struct __pyx_obj_9csamtools_Fastafile { faidx_t *fastafile; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2892 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2892 * return call * * cdef class IndelCall: # <<<<<<<<<<<<<< @@ -474,7 +448,7 @@ struct __pyx_obj_9csamtools_IndelCall { bam_maqindel_ret_t *_r; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2981 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2981 * bam_maqindel_ret_destroy(self._r) * * cdef class IndelCallerBase: # <<<<<<<<<<<<<< @@ -490,7 +464,7 @@ struct __pyx_obj_9csamtools_IndelCallerBase { int max_depth; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3119 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3119 * return self._call() * * cdef class IteratorIndelCalls( IndelCallerBase ): # <<<<<<<<<<<<<< @@ -502,7 +476,7 @@ struct __pyx_obj_9csamtools_IteratorIndelCalls { struct __pyx_obj_9csamtools_IndelCallerBase __pyx_base; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2662 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2662 * * * cdef class SNPCallerBase: # <<<<<<<<<<<<<< @@ -517,7 +491,7 @@ struct __pyx_obj_9csamtools_SNPCallerBase { struct __pyx_obj_9csamtools_IteratorColumn *iter; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2735 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2735 * sys.stdout.flush() * * cdef class IteratorSNPCalls( SNPCallerBase ): # <<<<<<<<<<<<<< @@ -529,7 +503,7 @@ struct __pyx_obj_9csamtools_IteratorSNPCalls { struct __pyx_obj_9csamtools_SNPCallerBase __pyx_base; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1397 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1397 * return ret * * cdef class IteratorColumn: # <<<<<<<<<<<<<< @@ -553,7 +527,7 @@ struct __pyx_obj_9csamtools_IteratorColumn { PyObject *stepper; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1567 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1567 * self.iterdata.seq = NULL * * cdef class IteratorColumnRegion(IteratorColumn): # <<<<<<<<<<<<<< @@ -565,7 +539,7 @@ struct __pyx_obj_9csamtools_IteratorColumnRegion { struct __pyx_obj_9csamtools_IteratorColumn __pyx_base; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2810 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2810 * return call * * cdef class SNPCaller( SNPCallerBase ): # <<<<<<<<<<<<<< @@ -577,7 +551,7 @@ struct __pyx_obj_9csamtools_SNPCaller { struct __pyx_obj_9csamtools_SNPCallerBase __pyx_base; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1596 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1596 * self.n_plp ) * * cdef class IteratorColumnAllRefs(IteratorColumn): # <<<<<<<<<<<<<< @@ -589,7 +563,7 @@ struct __pyx_obj_9csamtools_IteratorColumnAllRefs { struct __pyx_obj_9csamtools_IteratorColumn __pyx_base; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3076 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3076 * return call * * cdef class IndelCaller( IndelCallerBase ): # <<<<<<<<<<<<<< @@ -601,7 +575,7 @@ struct __pyx_obj_9csamtools_IndelCaller { struct __pyx_obj_9csamtools_IndelCallerBase __pyx_base; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":393 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":393 * * * cdef class Samfile: # <<<<<<<<<<<<<< @@ -621,7 +595,7 @@ struct __pyx_obj_9csamtools_Samfile { char *mode; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2605 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2605 * return retval, out_stderr, out_stdout * * cdef class SNPCall: # <<<<<<<<<<<<<< @@ -641,7 +615,7 @@ struct __pyx_obj_9csamtools_SNPCall { int _coverage; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1224 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1224 * samclose( self.fp ) * * cdef class IteratorRowAll(IteratorRow): # <<<<<<<<<<<<<< @@ -656,7 +630,7 @@ struct __pyx_obj_9csamtools_IteratorRowAll { samfile_t *fp; }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":64 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":64 * ## private factory methods * ##################################################################### * cdef class AlignedRead # <<<<<<<<<<<<<< @@ -670,7 +644,7 @@ struct __pyx_obj_9csamtools_AlignedRead { }; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1397 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1397 * return ret * * cdef class IteratorColumn: # <<<<<<<<<<<<<< @@ -688,7 +662,7 @@ struct __pyx_vtabstruct_9csamtools_IteratorColumn { static struct __pyx_vtabstruct_9csamtools_IteratorColumn *__pyx_vtabptr_9csamtools_IteratorColumn; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1567 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1567 * self.iterdata.seq = NULL * * cdef class IteratorColumnRegion(IteratorColumn): # <<<<<<<<<<<<<< @@ -702,7 +676,7 @@ struct __pyx_vtabstruct_9csamtools_IteratorColumnRegion { static struct __pyx_vtabstruct_9csamtools_IteratorColumnRegion *__pyx_vtabptr_9csamtools_IteratorColumnRegion; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2662 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2662 * * * cdef class SNPCallerBase: # <<<<<<<<<<<<<< @@ -716,7 +690,7 @@ struct __pyx_vtabstruct_9csamtools_SNPCallerBase { static struct __pyx_vtabstruct_9csamtools_SNPCallerBase *__pyx_vtabptr_9csamtools_SNPCallerBase; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2810 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2810 * return call * * cdef class SNPCaller( SNPCallerBase ): # <<<<<<<<<<<<<< @@ -730,7 +704,7 @@ struct __pyx_vtabstruct_9csamtools_SNPCaller { static struct __pyx_vtabstruct_9csamtools_SNPCaller *__pyx_vtabptr_9csamtools_SNPCaller; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1144 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1144 * pass * * cdef class IteratorRowRegion(IteratorRow): # <<<<<<<<<<<<<< @@ -745,7 +719,7 @@ struct __pyx_vtabstruct_9csamtools_IteratorRowRegion { static struct __pyx_vtabstruct_9csamtools_IteratorRowRegion *__pyx_vtabptr_9csamtools_IteratorRowRegion; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1596 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1596 * self.n_plp ) * * cdef class IteratorColumnAllRefs(IteratorColumn): # <<<<<<<<<<<<<< @@ -759,7 +733,7 @@ struct __pyx_vtabstruct_9csamtools_IteratorColumnAllRefs { static struct __pyx_vtabstruct_9csamtools_IteratorColumnAllRefs *__pyx_vtabptr_9csamtools_IteratorColumnAllRefs; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":393 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":393 * * * cdef class Samfile: # <<<<<<<<<<<<<< @@ -775,7 +749,7 @@ struct __pyx_vtabstruct_9csamtools_Samfile { static struct __pyx_vtabstruct_9csamtools_Samfile *__pyx_vtabptr_9csamtools_Samfile; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":222 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":222 * ## Public methods * ###################################################################### * cdef class Fastafile: # <<<<<<<<<<<<<< @@ -789,7 +763,7 @@ struct __pyx_vtabstruct_9csamtools_Fastafile { static struct __pyx_vtabstruct_9csamtools_Fastafile *__pyx_vtabptr_9csamtools_Fastafile; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1224 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1224 * samclose( self.fp ) * * cdef class IteratorRowAll(IteratorRow): # <<<<<<<<<<<<<< @@ -804,7 +778,7 @@ struct __pyx_vtabstruct_9csamtools_IteratorRowAll { static struct __pyx_vtabstruct_9csamtools_IteratorRowAll *__pyx_vtabptr_9csamtools_IteratorRowAll; -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2735 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2735 * sys.stdout.flush() * * cdef class IteratorSNPCalls( SNPCallerBase ): # <<<<<<<<<<<<<< @@ -890,7 +864,7 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ #define __Pyx_TraceDeclarations \ static PyCodeObject *__pyx_frame_code = NULL; \ CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL; \ - int __Pyx_use_tracing = 0; + int __Pyx_use_tracing = 0; #define __Pyx_TraceCall(funcname, srcfile, firstlineno) \ if (unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc)) { \ @@ -920,9 +894,9 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ #else #define __Pyx_TraceDeclarations - #define __Pyx_TraceCall(funcname, srcfile, firstlineno) - #define __Pyx_TraceException() - #define __Pyx_TraceReturn(result) + #define __Pyx_TraceCall(funcname, srcfile, firstlineno) + #define __Pyx_TraceException() + #define __Pyx_TraceReturn(result) #endif /* CYTHON_PROFILE */ @@ -1036,6 +1010,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) { return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b); } +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (PyList_Append(L, x) < 0) return NULL; @@ -1054,6 +1030,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void); + #if PY_MAJOR_VERSION >= 3 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; @@ -1136,24 +1113,7 @@ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ -static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ - -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *modname); /*proto*/ - -#define __pyx_binding_PyCFunctionType_USED 1 - -typedef struct { - PyCFunctionObject func; -} __pyx_binding_PyCFunctionType_object; - -PyTypeObject __pyx_binding_PyCFunctionType_type; -PyTypeObject *__pyx_binding_PyCFunctionType = NULL; - -PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module); /* proto */ -#define __pyx_binding_PyCFunctionType_New(ml, self) __pyx_binding_PyCFunctionType_NewEx(ml, self, NULL) - -int __pyx_binding_PyCFunctionType_init(void); /* proto */ +static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, const char *modname); /*proto*/ static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t); @@ -1263,11 +1223,8 @@ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from cpython.float */ -/* Module declarations from __builtin__ */ - /* Module declarations from cpython.complex */ -static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from cpython.string */ /* Module declarations from cpython.unicode */ @@ -1358,53 +1315,97 @@ static PyObject *__pyx_builtin_range; static char __pyx_k_1[] = "\t"; static char __pyx_k_2[] = "\n"; static char __pyx_k_3[] = "calling len() on closed file"; -static char __pyx_k_5[] = "could not open file `%s`"; -static char __pyx_k_6[] = "I/O operation on closed file"; -static char __pyx_k_9[] = "no sequence/region supplied."; -static char __pyx_k_11[] = "invalid region: start (%i) > end (%i)"; -static char __pyx_k_12[] = ""; -static char __pyx_k_13[] = "start out of range (%i)"; -static char __pyx_k_14[] = "end out of range (%i)"; -static char __pyx_k_15[] = "%s:%i-%i"; -static char __pyx_k_16[] = "invalid file opening mode `%s`"; -static char __pyx_k_17[] = "http:"; -static char __pyx_k_18[] = "ftp:"; -static char __pyx_k_19[] = "either supply options `template`, `header` or both `referencenames` and `referencelengths` for writing"; -static char __pyx_k_20[] = "unequal names and lengths of reference sequences"; -static char __pyx_k_21[] = "-"; -static char __pyx_k_22[] = "file `%s` not found"; -static char __pyx_k_23[] = "could not open file - is it SAM/BAM format?"; -static char __pyx_k_27[] = ".bai"; -static char __pyx_k_28[] = "error while opening index `%s` "; -static char __pyx_k_30[] = "tid out of range 0<=tid<%i"; -static char __pyx_k_32[] = "[:-]"; -static char __pyx_k_34[] = "invalid reference `%s`"; -static char __pyx_k_35[] = "invalid coordinates: start (%i) > end (%i)"; -static char __pyx_k_37[] = "seek only available in bam files"; -static char __pyx_k_43[] = "fetch called on bamfile without index"; -static char __pyx_k_45[] = "callback functionality requires a region/reference"; -static char __pyx_k_47[] = "no index available for fetch"; -static char __pyx_k_49[] = "fetch called for samfile without header"; -static char __pyx_k_51[] = "fetch for a region is not available for sam files"; -static char __pyx_k_53[] = "callback not implemented yet"; -static char __pyx_k_55[] = "read is unpaired"; -static char __pyx_k_57[] = "mate is unmapped"; -static char __pyx_k_59[] = "mate not found"; -static char __pyx_k_64[] = "counting functionality requires a region/reference"; -static char __pyx_k_67[] = "count for a region is not available for sam files"; -static char __pyx_k_70[] = "no index available for pileup"; -static char __pyx_k_73[] = "pileup of samfiles not implemented yet"; -static char __pyx_k_83[] = "@"; -static char __pyx_k_85[] = "header line without '@': '%s'"; -static char __pyx_k_87[] = "header line with invalid type '%s': '%s'"; -static char __pyx_k_88[] = ":"; -static char __pyx_k_90[] = "unknown field code '%s' in record '%s'"; -static char __pyx_k_91[] = "multiple '%s' lines are not permitted"; -static char __pyx_k_92[] = "@%s"; -static char __pyx_k_93[] = "%s:%s"; -static char __pyx_k_94[] = "invalid type for record %s: %s, expected %s"; -static char __pyx_k_95[] = "incomplete sequence information in '%s'"; -static char __pyx_k_98[] = "no index available for iteration"; +static char __pyx_k_4[] = "could not open file `%s`"; +static char __pyx_k_5[] = "I/O operation on closed file"; +static char __pyx_k_6[] = "no sequence/region supplied."; +static char __pyx_k_7[] = "invalid region: start (%i) > end (%i)"; +static char __pyx_k_8[] = ""; +static char __pyx_k_9[] = "start out of range (%i)"; +static char __pyx_k_10[] = "end out of range (%i)"; +static char __pyx_k_11[] = "%s:%i-%i"; +static char __pyx_k_12[] = "invalid file opening mode `%s`"; +static char __pyx_k_13[] = "http:"; +static char __pyx_k_14[] = "ftp:"; +static char __pyx_k_15[] = "either supply options `template`, `header` or both `referencenames` and `referencelengths` for writing"; +static char __pyx_k_16[] = "unequal names and lengths of reference sequences"; +static char __pyx_k_17[] = "-"; +static char __pyx_k_18[] = "file `%s` not found"; +static char __pyx_k_19[] = "could not open file - is it SAM/BAM format?"; +static char __pyx_k_20[] = ".bai"; +static char __pyx_k_21[] = "error while opening index `%s` "; +static char __pyx_k_22[] = "tid out of range 0<=tid<%i"; +static char __pyx_k_23[] = "[:-]"; +static char __pyx_k_24[] = "invalid reference `%s`"; +static char __pyx_k_25[] = "invalid coordinates: start (%i) > end (%i)"; +static char __pyx_k_26[] = "seek only available in bam files"; +static char __pyx_k_28[] = "fetch called on bamfile without index"; +static char __pyx_k_29[] = "callback functionality requires a region/reference"; +static char __pyx_k_30[] = "no index available for fetch"; +static char __pyx_k_31[] = "fetch called for samfile without header"; +static char __pyx_k_32[] = "fetch for a region is not available for sam files"; +static char __pyx_k_33[] = "callback not implemented yet"; +static char __pyx_k_34[] = "read is unpaired"; +static char __pyx_k_35[] = "mate is unmapped"; +static char __pyx_k_36[] = "mate not found"; +static char __pyx_k_38[] = "counting functionality requires a region/reference"; +static char __pyx_k_39[] = "count for a region is not available for sam files"; +static char __pyx_k_40[] = "no index available for pileup"; +static char __pyx_k_41[] = "pileup of samfiles not implemented yet"; +static char __pyx_k_42[] = "@"; +static char __pyx_k_43[] = "header line without '@': '%s'"; +static char __pyx_k_44[] = "header line with invalid type '%s': '%s'"; +static char __pyx_k_45[] = ":"; +static char __pyx_k_46[] = "unknown field code '%s' in record '%s'"; +static char __pyx_k_47[] = "multiple '%s' lines are not permitted"; +static char __pyx_k_48[] = "@%s"; +static char __pyx_k_49[] = "%s:%s"; +static char __pyx_k_50[] = "invalid type for record %s: %s, expected %s"; +static char __pyx_k_51[] = "incomplete sequence information in '%s'"; +static char __pyx_k_52[] = "no index available for iteration"; +static char __pyx_k_53[] = "reference sequence for '%s' (tid=%i) not found"; +static char __pyx_k_54[] = "unknown stepper option `%s` in IteratorColumn"; +static char __pyx_k_56[] = "error during iteration"; +static char __pyx_k_57[] = "Invalid clipping in CIGAR string"; +static char __pyx_k_58[] = "quality and sequence mismatch: %i != %i"; +static char __pyx_k_59[] = "%c"; +static char __pyx_k_60[] = "create_string_buffer"; +static char __pyx_k_61[] = "_delegate = bam_dup1(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":69 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":69 * cdef AlignedRead dest = AlignedRead.__new__(AlignedRead) * dest._delegate = bam_dup1(src) * return dest # <<<<<<<<<<<<<< @@ -2356,7 +2352,7 @@ static PyObject *__pyx_f_9csamtools_makeAlignedRead(bam1_t *__pyx_v_src) { return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":72 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":72 * * cdef class PileupProxy * cdef makePileupProxy( bam_pileup1_t * plp, int tid, int pos, int n ): # <<<<<<<<<<<<<< @@ -2372,7 +2368,7 @@ static PyObject *__pyx_f_9csamtools_makePileupProxy(bam_pileup1_t *__pyx_v_plp, __Pyx_RefNannySetupContext("makePileupProxy"); __Pyx_TraceCall("makePileupProxy", __pyx_f[0], 72); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":73 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":73 * cdef class PileupProxy * cdef makePileupProxy( bam_pileup1_t * plp, int tid, int pos, int n ): * cdef PileupProxy dest = PileupProxy.__new__(PileupProxy) # <<<<<<<<<<<<<< @@ -2385,7 +2381,7 @@ static PyObject *__pyx_f_9csamtools_makePileupProxy(bam_pileup1_t *__pyx_v_plp, __pyx_v_dest = ((struct __pyx_obj_9csamtools_PileupProxy *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":74 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":74 * cdef makePileupProxy( bam_pileup1_t * plp, int tid, int pos, int n ): * cdef PileupProxy dest = PileupProxy.__new__(PileupProxy) * dest.plp = plp # <<<<<<<<<<<<<< @@ -2394,7 +2390,7 @@ static PyObject *__pyx_f_9csamtools_makePileupProxy(bam_pileup1_t *__pyx_v_plp, */ __pyx_v_dest->plp = __pyx_v_plp; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":75 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":75 * cdef PileupProxy dest = PileupProxy.__new__(PileupProxy) * dest.plp = plp * dest.tid = tid # <<<<<<<<<<<<<< @@ -2403,7 +2399,7 @@ static PyObject *__pyx_f_9csamtools_makePileupProxy(bam_pileup1_t *__pyx_v_plp, */ __pyx_v_dest->tid = __pyx_v_tid; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":76 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":76 * dest.plp = plp * dest.tid = tid * dest.pos = pos # <<<<<<<<<<<<<< @@ -2412,7 +2408,7 @@ static PyObject *__pyx_f_9csamtools_makePileupProxy(bam_pileup1_t *__pyx_v_plp, */ __pyx_v_dest->pos = __pyx_v_pos; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":77 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":77 * dest.tid = tid * dest.pos = pos * dest.n = n # <<<<<<<<<<<<<< @@ -2424,7 +2420,7 @@ static PyObject *__pyx_f_9csamtools_makePileupProxy(bam_pileup1_t *__pyx_v_plp, if (PyObject_SetAttr(((PyObject *)__pyx_v_dest), __pyx_n_s__n, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":78 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":78 * dest.pos = pos * dest.n = n * return dest # <<<<<<<<<<<<<< @@ -2450,7 +2446,7 @@ static PyObject *__pyx_f_9csamtools_makePileupProxy(bam_pileup1_t *__pyx_v_plp, return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":81 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":81 * * cdef class PileupRead * cdef makePileupRead( bam_pileup1_t * src ): # <<<<<<<<<<<<<< @@ -2466,7 +2462,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) __Pyx_RefNannySetupContext("makePileupRead"); __Pyx_TraceCall("makePileupRead", __pyx_f[0], 81); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":83 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":83 * cdef makePileupRead( bam_pileup1_t * src ): * '''fill a PileupRead object from a bam_pileup1_t * object.''' * cdef PileupRead dest = PileupRead.__new__(PileupRead) # <<<<<<<<<<<<<< @@ -2479,7 +2475,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) __pyx_v_dest = ((struct __pyx_obj_9csamtools_PileupRead *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":84 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":84 * '''fill a PileupRead object from a bam_pileup1_t * object.''' * cdef PileupRead dest = PileupRead.__new__(PileupRead) * dest._alignment = makeAlignedRead( src.b ) # <<<<<<<<<<<<<< @@ -2495,7 +2491,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) __pyx_v_dest->_alignment = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":85 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":85 * cdef PileupRead dest = PileupRead.__new__(PileupRead) * dest._alignment = makeAlignedRead( src.b ) * dest._qpos = src.qpos # <<<<<<<<<<<<<< @@ -2504,7 +2500,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) */ __pyx_v_dest->_qpos = __pyx_v_src->qpos; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":86 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":86 * dest._alignment = makeAlignedRead( src.b ) * dest._qpos = src.qpos * dest._indel = src.indel # <<<<<<<<<<<<<< @@ -2513,7 +2509,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) */ __pyx_v_dest->_indel = __pyx_v_src->indel; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":87 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":87 * dest._qpos = src.qpos * dest._indel = src.indel * dest._level = src.level # <<<<<<<<<<<<<< @@ -2522,7 +2518,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) */ __pyx_v_dest->_level = __pyx_v_src->level; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":88 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":88 * dest._indel = src.indel * dest._level = src.level * dest._is_del = src.is_del # <<<<<<<<<<<<<< @@ -2531,7 +2527,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) */ __pyx_v_dest->_is_del = __pyx_v_src->is_del; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":89 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":89 * dest._level = src.level * dest._is_del = src.is_del * dest._is_head = src.is_head # <<<<<<<<<<<<<< @@ -2540,7 +2536,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) */ __pyx_v_dest->_is_head = __pyx_v_src->is_head; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":90 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":90 * dest._is_del = src.is_del * dest._is_head = src.is_head * dest._is_tail = src.is_tail # <<<<<<<<<<<<<< @@ -2549,7 +2545,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) */ __pyx_v_dest->_is_tail = __pyx_v_src->is_tail; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":91 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":91 * dest._is_head = src.is_head * dest._is_tail = src.is_tail * return dest # <<<<<<<<<<<<<< @@ -2575,7 +2571,7 @@ static PyObject *__pyx_f_9csamtools_makePileupRead(bam_pileup1_t *__pyx_v_src) return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":98 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":98 * ## Generic callbacks for inserting python callbacks. * ##################################################################### * cdef int fetch_callback( bam1_t *alignment, void *f): # <<<<<<<<<<<<<< @@ -2593,7 +2589,7 @@ static int __pyx_f_9csamtools_fetch_callback(bam1_t *__pyx_v_alignment, void *_ __Pyx_TraceCall("fetch_callback", __pyx_f[0], 98); __pyx_v_a = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":103 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":103 * calls function in *f* with a new :class:`AlignedRead` object as parameter. * ''' * a = makeAlignedRead( alignment ) # <<<<<<<<<<<<<< @@ -2606,7 +2602,7 @@ static int __pyx_f_9csamtools_fetch_callback(bam1_t *__pyx_v_alignment, void *_ __pyx_v_a = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":104 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":104 * ''' * a = makeAlignedRead( alignment ) * (f)(a) # <<<<<<<<<<<<<< @@ -2614,13 +2610,13 @@ static int __pyx_f_9csamtools_fetch_callback(bam1_t *__pyx_v_alignment, void *_ * class PileupColumn(object): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __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 = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_f), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __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_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = 0; @@ -2637,7 +2633,7 @@ static int __pyx_f_9csamtools_fetch_callback(bam1_t *__pyx_v_alignment, void *_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":119 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":119 * list of reads (:class:`pysam.PileupRead`) aligned to this column * ''' * def __str__(self): # <<<<<<<<<<<<<< @@ -2645,9 +2641,9 @@ static int __pyx_f_9csamtools_fetch_callback(bam1_t *__pyx_v_alignment, void *_ * "\n" + "\n".join( map(str, self.pileups) ) */ -static PyObject *__pyx_pf_9csamtools_12PileupColumn_0__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ -static PyMethodDef __pyx_mdef_9csamtools_12PileupColumn_0__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_9csamtools_12PileupColumn_0__str__, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_9csamtools_12PileupColumn_0__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_12PileupColumn___str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_9csamtools_12PileupColumn___str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_9csamtools_12PileupColumn___str__, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pf_9csamtools_12PileupColumn___str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -2659,7 +2655,7 @@ static PyObject *__pyx_pf_9csamtools_12PileupColumn_0__str__(PyObject *__pyx_sel __Pyx_TraceCall("__str__", __pyx_f[0], 119); __pyx_self = __pyx_self; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":120 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":120 * ''' * def __str__(self): * return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ # <<<<<<<<<<<<<< @@ -2668,7 +2664,7 @@ static PyObject *__pyx_pf_9csamtools_12PileupColumn_0__str__(PyObject *__pyx_sel */ __Pyx_XDECREF(__pyx_r); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":121 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":121 * def __str__(self): * return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ * "\n" + "\n".join( map(str, self.pileups) ) # <<<<<<<<<<<<<< @@ -2678,7 +2674,7 @@ static PyObject *__pyx_pf_9csamtools_12PileupColumn_0__str__(PyObject *__pyx_sel __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":120 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":120 * ''' * def __str__(self): * return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ # <<<<<<<<<<<<<< @@ -2692,7 +2688,7 @@ static PyObject *__pyx_pf_9csamtools_12PileupColumn_0__str__(PyObject *__pyx_sel __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __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 = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); @@ -2703,30 +2699,30 @@ static PyObject *__pyx_pf_9csamtools_12PileupColumn_0__str__(PyObject *__pyx_sel __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 = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type)))); - __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_5)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)&PyString_Type))); + __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __Pyx_GIVEREF(__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 = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_builtin_map, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 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 = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __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 = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":121 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":121 * def __str__(self): * return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ * "\n" + "\n".join( map(str, self.pileups) ) # <<<<<<<<<<<<<< @@ -2738,25 +2734,25 @@ static PyObject *__pyx_pf_9csamtools_12PileupColumn_0__str__(PyObject *__pyx_sel __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pileups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __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 = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type)))); - __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type)))); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)&PyString_Type))); + __Pyx_GIVEREF(((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 = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_map, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __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 = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __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_DECREF(__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 = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -2782,7 +2778,7 @@ static PyObject *__pyx_pf_9csamtools_12PileupColumn_0__str__(PyObject *__pyx_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":123 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":123 * "\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): # <<<<<<<<<<<<<< @@ -2803,9 +2799,9 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ __Pyx_RefNannySetupContext("pileup_callback"); __Pyx_TraceCall("pileup_callback", __pyx_f[0], 123); __pyx_v_p = Py_None; __Pyx_INCREF(Py_None); - __pyx_v_pileups = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_pileups = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":140 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":140 * ''' * * p = PileupColumn() # <<<<<<<<<<<<<< @@ -2821,7 +2817,7 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ __pyx_v_p = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":141 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":141 * * p = PileupColumn() * p.tid = tid # <<<<<<<<<<<<<< @@ -2833,7 +2829,7 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__tid, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":142 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":142 * p = PileupColumn() * p.tid = tid * p.pos = pos # <<<<<<<<<<<<<< @@ -2845,7 +2841,7 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__pos, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":143 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":143 * p.tid = tid * p.pos = pos * p.n = n # <<<<<<<<<<<<<< @@ -2857,7 +2853,7 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__n, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":144 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":144 * p.pos = pos * p.n = n * pileups = [] # <<<<<<<<<<<<<< @@ -2870,7 +2866,7 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ __pyx_v_pileups = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":147 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":147 * * cdef int x * for x from 0 <= x < n: # <<<<<<<<<<<<<< @@ -2880,7 +2876,7 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ __pyx_t_3 = __pyx_v_n; for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":148 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":148 * cdef int x * for x from 0 <= x < n: * pileups.append( makePileupRead( &(pl[x]) ) ) # <<<<<<<<<<<<<< @@ -2892,11 +2888,11 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ } __pyx_t_2 = __pyx_f_9csamtools_makePileupRead((&(__pyx_v_pl[__pyx_v_x]))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __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 = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_Append(((PyObject *)__pyx_v_pileups), __pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":149 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":149 * for x from 0 <= x < n: * pileups.append( makePileupRead( &(pl[x]) ) ) * p.pileups = pileups # <<<<<<<<<<<<<< @@ -2905,7 +2901,7 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ */ if (PyObject_SetAttr(__pyx_v_p, __pyx_n_s__pileups, ((PyObject *)__pyx_v_pileups)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":151 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":151 * p.pileups = pileups * * (f)(p) # <<<<<<<<<<<<<< @@ -2913,13 +2909,13 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ * 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 = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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 = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)__pyx_v_f), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __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_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = 0; @@ -2937,7 +2933,7 @@ static int __pyx_f_9csamtools_pileup_callback(uint32_t __pyx_v_tid, uint32_t __ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":153 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":153 * (f)(p) * * cdef int pileup_fetch_callback( bam1_t *b, void *data): # <<<<<<<<<<<<<< @@ -2952,7 +2948,7 @@ static int __pyx_f_9csamtools_pileup_fetch_callback(bam1_t *__pyx_v_b, void *__ __Pyx_RefNannySetupContext("pileup_fetch_callback"); __Pyx_TraceCall("pileup_fetch_callback", __pyx_f[0], 153); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":159 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":159 * ''' * cdef bam_plbuf_t * buf * buf = data # <<<<<<<<<<<<<< @@ -2961,7 +2957,7 @@ static int __pyx_f_9csamtools_pileup_fetch_callback(bam1_t *__pyx_v_b, void *__ */ __pyx_v_buf = ((bam_plbuf_t *)__pyx_v_data); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":160 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":160 * cdef bam_plbuf_t * buf * buf = data * bam_plbuf_push(b, buf) # <<<<<<<<<<<<<< @@ -2970,7 +2966,7 @@ static int __pyx_f_9csamtools_pileup_fetch_callback(bam1_t *__pyx_v_b, void *__ */ bam_plbuf_push(__pyx_v_b, __pyx_v_buf); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":161 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":161 * buf = data * bam_plbuf_push(b, buf) * return 0 # <<<<<<<<<<<<<< @@ -2987,7 +2983,7 @@ static int __pyx_f_9csamtools_pileup_fetch_callback(bam1_t *__pyx_v_b, void *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":167 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":167 * stderr is captured. * ''' * def __init__(self): # <<<<<<<<<<<<<< @@ -2995,9 +2991,9 @@ static int __pyx_f_9csamtools_pileup_fetch_callback(bam1_t *__pyx_v_b, void *__ * self.stderr_h, self.stderr_f = tempfile.mkstemp() */ -static PyObject *__pyx_pf_9csamtools_11StderrStore_0__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ -static PyMethodDef __pyx_mdef_9csamtools_11StderrStore_0__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9csamtools_11StderrStore_0__init__, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_9csamtools_11StderrStore_0__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11StderrStore___init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_9csamtools_11StderrStore___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9csamtools_11StderrStore___init__, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pf_9csamtools_11StderrStore___init__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -3008,7 +3004,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_0__init__(PyObject *__pyx_sel __Pyx_TraceCall("__init__", __pyx_f[0], 167); __pyx_self = __pyx_self; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":168 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":168 * ''' * def __init__(self): * return # <<<<<<<<<<<<<< @@ -3019,7 +3015,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_0__init__(PyObject *__pyx_sel __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":169 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":169 * def __init__(self): * return * self.stderr_h, self.stderr_f = tempfile.mkstemp() # <<<<<<<<<<<<<< @@ -3059,7 +3055,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_0__init__(PyObject *__pyx_sel __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":170 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":170 * return * self.stderr_h, self.stderr_f = tempfile.mkstemp() * self.stderr_save = Outs( sys.stderr.fileno() ) # <<<<<<<<<<<<<< @@ -3080,18 +3076,18 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_0__init__(PyObject *__pyx_sel __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 = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __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 = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __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; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__stderr_save, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":171 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":171 * self.stderr_h, self.stderr_f = tempfile.mkstemp() * self.stderr_save = Outs( sys.stderr.fileno() ) * self.stderr_save.setfd( self.stderr_h ) # <<<<<<<<<<<<<< @@ -3106,14 +3102,14 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_0__init__(PyObject *__pyx_sel __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__stderr_h); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __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 = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __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 = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -3132,7 +3128,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_0__init__(PyObject *__pyx_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":173 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":173 * self.stderr_save.setfd( self.stderr_h ) * * def readAndRelease( self ): # <<<<<<<<<<<<<< @@ -3140,9 +3136,9 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_0__init__(PyObject *__pyx_sel * self.stderr_save.restore() */ -static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ -static PyMethodDef __pyx_mdef_9csamtools_11StderrStore_1readAndRelease = {__Pyx_NAMESTR("readAndRelease"), (PyCFunction)__pyx_pf_9csamtools_11StderrStore_1readAndRelease, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__pyx_self, PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11StderrStore_readAndRelease(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_9csamtools_11StderrStore_readAndRelease = {__Pyx_NAMESTR("readAndRelease"), (PyCFunction)__pyx_pf_9csamtools_11StderrStore_readAndRelease, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pf_9csamtools_11StderrStore_readAndRelease(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_lines; PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; @@ -3155,7 +3151,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p __pyx_self = __pyx_self; __pyx_v_lines = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":174 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":174 * * def readAndRelease( self ): * return [] # <<<<<<<<<<<<<< @@ -3169,7 +3165,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p __pyx_t_1 = 0; goto __pyx_L0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":175 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":175 * def readAndRelease( self ): * return [] * self.stderr_save.restore() # <<<<<<<<<<<<<< @@ -3186,7 +3182,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":176 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":176 * return [] * self.stderr_save.restore() * lines = [] # <<<<<<<<<<<<<< @@ -3199,7 +3195,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p __pyx_v_lines = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":177 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":177 * self.stderr_save.restore() * lines = [] * if os.path.exists(self.stderr_f): # <<<<<<<<<<<<<< @@ -3217,19 +3213,19 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__stderr_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __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 = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __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; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":178 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":178 * lines = [] * if os.path.exists(self.stderr_f): * lines = open( self.stderr_f, "r" ).readlines() # <<<<<<<<<<<<<< @@ -3239,16 +3235,16 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__stderr_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __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 = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __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_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__readlines); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -3259,7 +3255,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p __pyx_v_lines = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":179 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":179 * if os.path.exists(self.stderr_f): * lines = open( self.stderr_f, "r" ).readlines() * os.remove( self.stderr_f ) # <<<<<<<<<<<<<< @@ -3274,20 +3270,20 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__stderr_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __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 = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __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 = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":180 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":180 * lines = open( self.stderr_f, "r" ).readlines() * os.remove( self.stderr_f ) * return lines # <<<<<<<<<<<<<< @@ -3315,7 +3311,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":182 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":182 * return lines * * def release(self): # <<<<<<<<<<<<<< @@ -3323,9 +3319,9 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_1readAndRelease(PyObject *__p * self.stderr_save.restore() */ -static PyObject *__pyx_pf_9csamtools_11StderrStore_2release(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ -static PyMethodDef __pyx_mdef_9csamtools_11StderrStore_2release = {__Pyx_NAMESTR("release"), (PyCFunction)__pyx_pf_9csamtools_11StderrStore_2release, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_9csamtools_11StderrStore_2release(PyObject *__pyx_self, PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11StderrStore_release(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_9csamtools_11StderrStore_release = {__Pyx_NAMESTR("release"), (PyCFunction)__pyx_pf_9csamtools_11StderrStore_release, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pf_9csamtools_11StderrStore_release(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -3336,7 +3332,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_2release(PyObject *__pyx_self __Pyx_TraceCall("release", __pyx_f[0], 182); __pyx_self = __pyx_self; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":183 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":183 * * def release(self): * return # <<<<<<<<<<<<<< @@ -3347,7 +3343,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_2release(PyObject *__pyx_self __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":184 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":184 * def release(self): * return * self.stderr_save.restore() # <<<<<<<<<<<<<< @@ -3364,7 +3360,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_2release(PyObject *__pyx_self __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":185 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":185 * return * self.stderr_save.restore() * if os.path.exists(self.stderr_f): # <<<<<<<<<<<<<< @@ -3382,19 +3378,19 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_2release(PyObject *__pyx_self __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__stderr_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __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 = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __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; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":186 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":186 * self.stderr_save.restore() * if os.path.exists(self.stderr_f): * os.remove( self.stderr_f ) # <<<<<<<<<<<<<< @@ -3409,14 +3405,14 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_2release(PyObject *__pyx_self __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__stderr_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __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 = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __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 = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } @@ -3437,7 +3433,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_2release(PyObject *__pyx_self return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":188 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":188 * os.remove( self.stderr_f ) * * def __del__(self): # <<<<<<<<<<<<<< @@ -3445,9 +3441,9 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_2release(PyObject *__pyx_self * */ -static PyObject *__pyx_pf_9csamtools_11StderrStore_3__del__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ -static PyMethodDef __pyx_mdef_9csamtools_11StderrStore_3__del__ = {__Pyx_NAMESTR("__del__"), (PyCFunction)__pyx_pf_9csamtools_11StderrStore_3__del__, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_9csamtools_11StderrStore_3__del__(PyObject *__pyx_self, PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11StderrStore___del__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static PyMethodDef __pyx_mdef_9csamtools_11StderrStore___del__ = {__Pyx_NAMESTR("__del__"), (PyCFunction)__pyx_pf_9csamtools_11StderrStore___del__, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pf_9csamtools_11StderrStore___del__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -3456,7 +3452,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_3__del__(PyObject *__pyx_self __Pyx_TraceCall("__del__", __pyx_f[0], 188); __pyx_self = __pyx_self; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":189 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":189 * * def __del__(self): * self.release() # <<<<<<<<<<<<<< @@ -3484,7 +3480,7 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_3__del__(PyObject *__pyx_self return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":238 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":238 * cdef faidx_t * fastafile * * def __cinit__(self, *args, **kwargs ): # <<<<<<<<<<<<<< @@ -3492,8 +3488,8 @@ static PyObject *__pyx_pf_9csamtools_11StderrStore_3__del__(PyObject *__pyx_self * self._filename = NULL */ -static int __pyx_pf_9csamtools_9Fastafile_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_9Fastafile_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_9Fastafile___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_9Fastafile___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -3510,7 +3506,7 @@ static int __pyx_pf_9csamtools_9Fastafile_0__cinit__(PyObject *__pyx_v_self, PyO __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":239 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":239 * * def __cinit__(self, *args, **kwargs ): * self.fastafile = NULL # <<<<<<<<<<<<<< @@ -3519,7 +3515,7 @@ static int __pyx_pf_9csamtools_9Fastafile_0__cinit__(PyObject *__pyx_v_self, PyO */ ((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->fastafile = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":240 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":240 * def __cinit__(self, *args, **kwargs ): * self.fastafile = NULL * self._filename = NULL # <<<<<<<<<<<<<< @@ -3528,7 +3524,7 @@ static int __pyx_pf_9csamtools_9Fastafile_0__cinit__(PyObject *__pyx_v_self, PyO */ ((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->_filename = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":241 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":241 * self.fastafile = NULL * self._filename = NULL * self._open( *args, **kwargs ) # <<<<<<<<<<<<<< @@ -3561,7 +3557,7 @@ static int __pyx_pf_9csamtools_9Fastafile_0__cinit__(PyObject *__pyx_v_self, PyO return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":243 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":243 * self._open( *args, **kwargs ) * * def _isOpen( self ): # <<<<<<<<<<<<<< @@ -3569,16 +3565,16 @@ static int __pyx_pf_9csamtools_9Fastafile_0__cinit__(PyObject *__pyx_v_self, PyO * return self.fastafile != NULL */ -static PyObject *__pyx_pf_9csamtools_9Fastafile_1_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_9csamtools_9Fastafile_1_isOpen[] = "return true if samfile has been opened."; -static PyObject *__pyx_pf_9csamtools_9Fastafile_1_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_9Fastafile__isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_9csamtools_9Fastafile__isOpen[] = "return true if samfile has been opened."; +static PyObject *__pyx_pf_9csamtools_9Fastafile__isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("_isOpen"); __Pyx_TraceCall("_isOpen", __pyx_f[0], 243); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":245 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":245 * def _isOpen( self ): * '''return true if samfile has been opened.''' * return self.fastafile != NULL # <<<<<<<<<<<<<< @@ -3605,7 +3601,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_1_isOpen(PyObject *__pyx_v_self, return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":247 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":247 * return self.fastafile != NULL * * def __len__(self): # <<<<<<<<<<<<<< @@ -3613,16 +3609,17 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_1_isOpen(PyObject *__pyx_v_self, * raise ValueError( "calling len() on closed file" ) */ -static Py_ssize_t __pyx_pf_9csamtools_9Fastafile_2__len__(PyObject *__pyx_v_self); /*proto*/ -static Py_ssize_t __pyx_pf_9csamtools_9Fastafile_2__len__(PyObject *__pyx_v_self) { +static Py_ssize_t __pyx_pf_9csamtools_9Fastafile___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pf_9csamtools_9Fastafile___len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__len__"); __Pyx_TraceCall("__len__", __pyx_f[0], 247); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":248 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":248 * * def __len__(self): * if self.fastafile == NULL: # <<<<<<<<<<<<<< @@ -3632,23 +3629,29 @@ static Py_ssize_t __pyx_pf_9csamtools_9Fastafile_2__len__(PyObject *__pyx_v_self __pyx_t_1 = (((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->fastafile == NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":249 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":249 * 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_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __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 = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":251 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":251 * raise ValueError( "calling len() on closed file" ) * * return faidx_fetch_nseq(self.fastafile) # <<<<<<<<<<<<<< @@ -3662,6 +3665,7 @@ static Py_ssize_t __pyx_pf_9csamtools_9Fastafile_2__len__(PyObject *__pyx_v_self goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("csamtools.Fastafile.__len__"); __pyx_r = -1; __pyx_L0:; @@ -3670,7 +3674,7 @@ static Py_ssize_t __pyx_pf_9csamtools_9Fastafile_2__len__(PyObject *__pyx_v_self return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":253 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":253 * return faidx_fetch_nseq(self.fastafile) * * def _open( self, # <<<<<<<<<<<<<< @@ -3678,9 +3682,9 @@ static Py_ssize_t __pyx_pf_9csamtools_9Fastafile_2__len__(PyObject *__pyx_v_self * '''open an indexed fasta file. */ -static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/ -static char __pyx_doc_9csamtools_9Fastafile_3_open[] = "open an indexed fasta file.\n\n This method expects an indexed fasta file.\n "; -static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) { +static PyObject *__pyx_pf_9csamtools_9Fastafile__open(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/ +static char __pyx_doc_9csamtools_9Fastafile__open[] = "open an indexed fasta file.\n\n This method expects an indexed fasta file.\n "; +static PyObject *__pyx_pf_9csamtools_9Fastafile__open(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) { char *__pyx_v_filename; PyObject *__pyx_r = NULL; int __pyx_t_1; @@ -3699,7 +3703,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, P return NULL; __pyx_L4_argument_unpacking_done:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":261 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":261 * * # close a previously opened file * if self.fastafile != NULL: self.close() # <<<<<<<<<<<<<< @@ -3718,7 +3722,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, P } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":262 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":262 * # close a previously opened file * if self.fastafile != NULL: self.close() * if self._filename != NULL: free(self._filename) # <<<<<<<<<<<<<< @@ -3732,7 +3736,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, P } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":263 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":263 * if self.fastafile != NULL: self.close() * if self._filename != NULL: free(self._filename) * self._filename = strdup(filename) # <<<<<<<<<<<<<< @@ -3741,7 +3745,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, P */ ((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->_filename = strdup(__pyx_v_filename); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":264 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":264 * if self._filename != NULL: free(self._filename) * self._filename = strdup(filename) * self.fastafile = fai_load( filename ) # <<<<<<<<<<<<<< @@ -3750,7 +3754,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, P */ ((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->fastafile = fai_load(__pyx_v_filename); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":266 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":266 * self.fastafile = fai_load( filename ) * * if self.fastafile == NULL: # <<<<<<<<<<<<<< @@ -3760,7 +3764,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, P __pyx_t_1 = (((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->fastafile == NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":267 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":267 * * if self.fastafile == NULL: * raise IOError("could not open file `%s`" % filename ) # <<<<<<<<<<<<<< @@ -3769,17 +3773,17 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, P */ __pyx_t_3 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __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 = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); 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); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3801,7 +3805,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, P return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":269 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":269 * raise IOError("could not open file `%s`" % filename ) * * def close( self ): # <<<<<<<<<<<<<< @@ -3809,15 +3813,15 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_3_open(PyObject *__pyx_v_self, P * fai_destroy( self.fastafile ) */ -static PyObject *__pyx_pf_9csamtools_9Fastafile_4close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9Fastafile_4close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_9Fastafile_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9Fastafile_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = NULL; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("close"); __Pyx_TraceCall("close", __pyx_f[0], 269); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":270 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":270 * * def close( self ): * if self.fastafile != NULL: # <<<<<<<<<<<<<< @@ -3827,7 +3831,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_4close(PyObject *__pyx_v_self, C __pyx_t_1 = (((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->fastafile != NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":271 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":271 * def close( self ): * if self.fastafile != NULL: * fai_destroy( self.fastafile ) # <<<<<<<<<<<<<< @@ -3836,7 +3840,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_4close(PyObject *__pyx_v_self, C */ fai_destroy(((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->fastafile); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":272 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":272 * if self.fastafile != NULL: * fai_destroy( self.fastafile ) * self.fastafile = NULL # <<<<<<<<<<<<<< @@ -3855,7 +3859,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_4close(PyObject *__pyx_v_self, C return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":274 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":274 * self.fastafile = NULL * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -3863,8 +3867,8 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_4close(PyObject *__pyx_v_self, C * if self._filename != NULL: free(self._filename) */ -static void __pyx_pf_9csamtools_9Fastafile_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_9csamtools_9Fastafile_5__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_9csamtools_9Fastafile___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_9csamtools_9Fastafile___dealloc__(PyObject *__pyx_v_self) { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; @@ -3872,7 +3876,7 @@ static void __pyx_pf_9csamtools_9Fastafile_5__dealloc__(PyObject *__pyx_v_self) __Pyx_RefNannySetupContext("__dealloc__"); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 274); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":275 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":275 * * def __dealloc__(self): * self.close() # <<<<<<<<<<<<<< @@ -3886,7 +3890,7 @@ static void __pyx_pf_9csamtools_9Fastafile_5__dealloc__(PyObject *__pyx_v_self) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":276 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":276 * def __dealloc__(self): * self.close() * if self._filename != NULL: free(self._filename) # <<<<<<<<<<<<<< @@ -3910,7 +3914,7 @@ static void __pyx_pf_9csamtools_9Fastafile_5__dealloc__(PyObject *__pyx_v_self) __Pyx_RefNannyFinishContext(); } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":280 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":280 * property filename: * '''number of :term:`filename` associated with this object.''' * def __get__(self): # <<<<<<<<<<<<<< @@ -3918,8 +3922,8 @@ static void __pyx_pf_9csamtools_9Fastafile_5__dealloc__(PyObject *__pyx_v_self) * return self._filename */ -static PyObject *__pyx_pf_9csamtools_9Fastafile_8filename_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9Fastafile_8filename_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9Fastafile_8filename___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9Fastafile_8filename___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -3929,7 +3933,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_8filename_0__get__(PyObject *__p __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 280); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":281 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":281 * '''number of :term:`filename` associated with this object.''' * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< @@ -3945,16 +3949,22 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_8filename_0__get__(PyObject *__p __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_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __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 = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":282 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":282 * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) * return self._filename # <<<<<<<<<<<<<< @@ -3962,10 +3972,10 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_8filename_0__get__(PyObject *__p * def fetch( self, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_r = ((PyObject *)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_self)->_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __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); @@ -3982,7 +3992,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_8filename_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":284 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":284 * return self._filename * * def fetch( self, # <<<<<<<<<<<<<< @@ -3990,9 +4000,9 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_8filename_0__get__(PyObject *__p * start = None, */ -static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_9Fastafile_6fetch[] = "*(reference = None, start = None, end = None, region = None)*\n \n fetch :meth:`AlignedRead` objects in a :term:`region` using 0-based indexing. \n \n The region is specified by :term:`reference`, *start* and *end*. \n \n fetch returns an empty string if the region is out of range or addresses an unknown *reference*.\n\n If *reference* is given and *start* is None, the sequence from the \n first base is returned. Similarly, if *end* is None, the sequence \n until the last base is returned.\n \n Alternatively, a samtools :term:`region` string can be supplied.\n "; -static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_9Fastafile_fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_9Fastafile_fetch[] = "*(reference = None, start = None, end = None, region = None)*\n \n fetch :meth:`AlignedRead` objects in a :term:`region` using 0-based indexing. \n \n The region is specified by :term:`reference`, *start* and *end*. \n \n fetch returns an empty string if the region is out of range or addresses an unknown *reference*.\n\n If *reference* is given and *start* is None, the sequence from the \n first base is returned. Similarly, if *end* is None, the sequence \n until the last base is returned.\n \n Alternatively, a samtools :term:`region` string can be supplied.\n "; +static PyObject *__pyx_pf_9csamtools_9Fastafile_fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reference = 0; PyObject *__pyx_v_start = 0; PyObject *__pyx_v_end = 0; @@ -4014,7 +4024,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[4] = {0,0,0,0}; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":285 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":285 * * def fetch( self, * reference = None, # <<<<<<<<<<<<<< @@ -4023,7 +4033,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P */ values[0] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":286 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":286 * def fetch( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -4032,7 +4042,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P */ values[1] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":287 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":287 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -4041,7 +4051,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P */ values[2] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":288 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":288 * start = None, * end = None, * region = None): # <<<<<<<<<<<<<< @@ -4088,7 +4098,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __pyx_v_region = values[3]; } else { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":285 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":285 * * def fetch( self, * reference = None, # <<<<<<<<<<<<<< @@ -4097,7 +4107,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P */ __pyx_v_reference = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":286 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":286 * def fetch( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -4106,7 +4116,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P */ __pyx_v_start = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":287 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":287 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -4115,7 +4125,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P */ __pyx_v_end = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":288 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":288 * start = None, * end = None, * region = None): # <<<<<<<<<<<<<< @@ -4145,7 +4155,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __Pyx_INCREF(__pyx_v_region); __pyx_v_py_seq = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":305 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":305 * ''' * * if not self._isOpen(): # <<<<<<<<<<<<<< @@ -4162,23 +4172,29 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":306 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":306 * * 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_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __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 = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":311 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":311 * cdef char * seq * * if not region: # <<<<<<<<<<<<<< @@ -4189,7 +4205,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __pyx_t_3 = (!__pyx_t_4); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":312 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":312 * * if not region: * if reference is None: raise ValueError( 'no sequence/region supplied.' ) # <<<<<<<<<<<<<< @@ -4198,8 +4214,14 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P */ __pyx_t_3 = (__pyx_v_reference == Py_None); if (__pyx_t_3) { - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __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 = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4207,7 +4229,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":313 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":313 * if not region: * if reference is None: raise ValueError( 'no sequence/region supplied.' ) * if start is None: start = 0 # <<<<<<<<<<<<<< @@ -4223,7 +4245,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":314 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":314 * if reference is None: raise ValueError( 'no sequence/region supplied.' ) * if start is None: start = 0 * if end is None: end = max_pos -1 # <<<<<<<<<<<<<< @@ -4241,7 +4263,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P } __pyx_L10:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":316 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":316 * if end is None: end = max_pos -1 * * if start > end: raise ValueError( 'invalid region: start (%i) > end (%i)' % (start, end) ) # <<<<<<<<<<<<<< @@ -4254,24 +4276,24 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __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 = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_start); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_start); __Pyx_GIVEREF(__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_11), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __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_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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 = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __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_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4279,7 +4301,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P } __pyx_L11:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":317 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":317 * * if start > end: raise ValueError( 'invalid region: start (%i) > end (%i)' % (start, end) ) * if start == end: return "" # <<<<<<<<<<<<<< @@ -4292,14 +4314,14 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_12)); - __pyx_r = ((PyObject *)__pyx_kp_s_12); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_8)); + __pyx_r = ((PyObject *)__pyx_kp_s_8); goto __pyx_L0; goto __pyx_L12; } __pyx_L12:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":319 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":319 * if start == end: return "" * # valid ranges are from 0 to 2^29-1 * if not 0 <= start < max_pos: raise ValueError( 'start out of range (%i)' % start ) # <<<<<<<<<<<<<< @@ -4320,16 +4342,16 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __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_13), __pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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 = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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 = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4337,7 +4359,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P } __pyx_L13:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":320 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":320 * # 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 ) # <<<<<<<<<<<<<< @@ -4358,16 +4380,16 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __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_14), __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), __pyx_v_end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __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 = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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 = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __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_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4375,7 +4397,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P } __pyx_L14:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":329 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":329 * # end-1, * # &length) * region = "%s:%i-%i" % (reference, start+1, end) # <<<<<<<<<<<<<< @@ -4385,7 +4407,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __pyx_t_1 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __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 = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_reference); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); @@ -4395,14 +4417,14 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P 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_15), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __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_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_v_region); __pyx_v_region = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":331 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":331 * region = "%s:%i-%i" % (reference, start+1, end) * seq = fai_fetch( self.fastafile, * region, # <<<<<<<<<<<<<< @@ -4411,7 +4433,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P */ __pyx_t_5 = PyBytes_AsString(__pyx_v_region); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":332 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":332 * seq = fai_fetch( self.fastafile, * region, * &length ) # <<<<<<<<<<<<<< @@ -4423,7 +4445,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":335 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":335 * else: * # samtools adds a '\0' at the end * seq = fai_fetch( self.fastafile, region, &length ) # <<<<<<<<<<<<<< @@ -4435,7 +4457,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":338 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":338 * * # copy to python * if seq == NULL: # <<<<<<<<<<<<<< @@ -4445,7 +4467,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __pyx_t_3 = (__pyx_v_seq == NULL); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":339 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":339 * # copy to python * if seq == NULL: * return "" # <<<<<<<<<<<<<< @@ -4453,14 +4475,14 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P * try: */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_12)); - __pyx_r = ((PyObject *)__pyx_kp_s_12); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_8)); + __pyx_r = ((PyObject *)__pyx_kp_s_8); goto __pyx_L0; goto __pyx_L15; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":341 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":341 * return "" * else: * try: # <<<<<<<<<<<<<< @@ -4469,7 +4491,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P */ /*try:*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":342 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":342 * else: * try: * py_seq = PyString_FromStringAndSize(seq, length) # <<<<<<<<<<<<<< @@ -4483,7 +4505,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P __pyx_t_1 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":344 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":344 * py_seq = PyString_FromStringAndSize(seq, length) * finally: * free(seq) # <<<<<<<<<<<<<< @@ -4520,7 +4542,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P } __pyx_L15:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":346 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":346 * free(seq) * * return py_seq # <<<<<<<<<<<<<< @@ -4550,7 +4572,7 @@ static PyObject *__pyx_pf_9csamtools_9Fastafile_6fetch(PyObject *__pyx_v_self, P return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":348 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":348 * return py_seq * * cdef char * _fetch( self, char * reference, int start, int end, int * length ): # <<<<<<<<<<<<<< @@ -4564,7 +4586,7 @@ static char *__pyx_f_9csamtools_9Fastafile__fetch(struct __pyx_obj_9csamtools_F __Pyx_RefNannySetupContext("_fetch"); __Pyx_TraceCall("_fetch", __pyx_f[0], 348); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":355 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":355 * start, * end-1, * length ) # <<<<<<<<<<<<<< @@ -4581,7 +4603,7 @@ static char *__pyx_f_9csamtools_9Fastafile__fetch(struct __pyx_obj_9csamtools_F return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":360 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":360 * #------------------------------------------------------------------------ * #------------------------------------------------------------------------ * cdef int count_callback( bam1_t *alignment, void *f): # <<<<<<<<<<<<<< @@ -4592,12 +4614,11 @@ static char *__pyx_f_9csamtools_9Fastafile__fetch(struct __pyx_obj_9csamtools_F static int __pyx_f_9csamtools_count_callback(bam1_t *__pyx_v_alignment, void *__pyx_v_f) { int *__pyx_v_counter; int __pyx_r; - long __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("count_callback"); __Pyx_TraceCall("count_callback", __pyx_f[0], 360); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":363 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":363 * '''callback for bam_fetch - count number of reads. * ''' * cdef int* counter = (f) # <<<<<<<<<<<<<< @@ -4606,15 +4627,14 @@ static int __pyx_f_9csamtools_count_callback(bam1_t *__pyx_v_alignment, void *_ */ __pyx_v_counter = ((int *)__pyx_v_f); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":364 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":364 * ''' * cdef int* counter = (f) * counter[0] += 1; # <<<<<<<<<<<<<< * * ctypedef struct MateData: */ - __pyx_t_1 = 0; - (__pyx_v_counter[__pyx_t_1]) = ((__pyx_v_counter[__pyx_t_1]) + 1); + (__pyx_v_counter[0]) += 1; __pyx_r = 0; __Pyx_TraceReturn(Py_None); @@ -4622,7 +4642,7 @@ static int __pyx_f_9csamtools_count_callback(bam1_t *__pyx_v_alignment, void *_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":374 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":374 * #------------------------------------------------------------------------ * #------------------------------------------------------------------------ * cdef int mate_callback( bam1_t *alignment, void *f): # <<<<<<<<<<<<<< @@ -4640,7 +4660,7 @@ static int __pyx_f_9csamtools_mate_callback(bam1_t *__pyx_v_alignment, void *__ __Pyx_RefNannySetupContext("mate_callback"); __Pyx_TraceCall("mate_callback", __pyx_f[0], 374); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":377 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":377 * '''callback for bam_fetch = filter mate * ''' * cdef MateData * d = (f) # <<<<<<<<<<<<<< @@ -4649,7 +4669,7 @@ static int __pyx_f_9csamtools_mate_callback(bam1_t *__pyx_v_alignment, void *__ */ __pyx_v_d = ((__pyx_t_9csamtools_MateData *)__pyx_v_f); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":382 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":382 * # d.flag, alignment.core.flag, alignment.core.flag & d.flag) * * if d.mate == NULL: # <<<<<<<<<<<<<< @@ -4659,7 +4679,7 @@ static int __pyx_f_9csamtools_mate_callback(bam1_t *__pyx_v_alignment, void *__ __pyx_t_1 = (__pyx_v_d->mate == NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":388 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":388 * # also, make sure that we get the other read by comparing * # the flags * if alignment.core.flag & d.flag != 0 and \ # <<<<<<<<<<<<<< @@ -4669,7 +4689,7 @@ static int __pyx_f_9csamtools_mate_callback(bam1_t *__pyx_v_alignment, void *__ __pyx_t_1 = ((__pyx_v_alignment->core.flag & __pyx_v_d->flag) != 0); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":389 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":389 * # the flags * if alignment.core.flag & d.flag != 0 and \ * strcmp( bam1_qname( alignment ), d.name ) == 0: # <<<<<<<<<<<<<< @@ -4683,7 +4703,7 @@ static int __pyx_f_9csamtools_mate_callback(bam1_t *__pyx_v_alignment, void *__ } if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":390 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":390 * if alignment.core.flag & d.flag != 0 and \ * strcmp( bam1_qname( alignment ), d.name ) == 0: * d.mate = bam_dup1( alignment ) # <<<<<<<<<<<<<< @@ -4704,7 +4724,7 @@ static int __pyx_f_9csamtools_mate_callback(bam1_t *__pyx_v_alignment, void *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":442 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":442 * cdef char * mode * * def __cinit__(self, *args, **kwargs ): # <<<<<<<<<<<<<< @@ -4712,8 +4732,8 @@ static int __pyx_f_9csamtools_mate_callback(bam1_t *__pyx_v_alignment, void *__ * self._filename = NULL */ -static int __pyx_pf_9csamtools_7Samfile_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_7Samfile_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_7Samfile___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_7Samfile___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -4730,7 +4750,7 @@ static int __pyx_pf_9csamtools_7Samfile_0__cinit__(PyObject *__pyx_v_self, PyObj __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":443 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":443 * * def __cinit__(self, *args, **kwargs ): * self.samfile = NULL # <<<<<<<<<<<<<< @@ -4739,7 +4759,7 @@ static int __pyx_pf_9csamtools_7Samfile_0__cinit__(PyObject *__pyx_v_self, PyObj */ ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":444 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":444 * def __cinit__(self, *args, **kwargs ): * self.samfile = NULL * self._filename = NULL # <<<<<<<<<<<<<< @@ -4748,7 +4768,7 @@ static int __pyx_pf_9csamtools_7Samfile_0__cinit__(PyObject *__pyx_v_self, PyObj */ ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->_filename = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":445 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":445 * self.samfile = NULL * self._filename = NULL * self.isbam = False # <<<<<<<<<<<<<< @@ -4757,7 +4777,7 @@ static int __pyx_pf_9csamtools_7Samfile_0__cinit__(PyObject *__pyx_v_self, PyObj */ ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isbam = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":446 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":446 * self._filename = NULL * self.isbam = False * self._open( *args, **kwargs ) # <<<<<<<<<<<<<< @@ -4774,7 +4794,7 @@ static int __pyx_pf_9csamtools_7Samfile_0__cinit__(PyObject *__pyx_v_self, PyObj __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":449 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":449 * * # allocate memory for iterator * self.b = calloc(1, sizeof(bam1_t)) # <<<<<<<<<<<<<< @@ -4799,7 +4819,7 @@ static int __pyx_pf_9csamtools_7Samfile_0__cinit__(PyObject *__pyx_v_self, PyObj return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":451 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":451 * self.b = calloc(1, sizeof(bam1_t)) * * def _isOpen( self ): # <<<<<<<<<<<<<< @@ -4807,16 +4827,16 @@ static int __pyx_pf_9csamtools_7Samfile_0__cinit__(PyObject *__pyx_v_self, PyObj * return self.samfile != NULL */ -static PyObject *__pyx_pf_9csamtools_7Samfile_1_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_1_isOpen[] = "return true if samfile has been opened."; -static PyObject *__pyx_pf_9csamtools_7Samfile_1_isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_7Samfile__isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile__isOpen[] = "return true if samfile has been opened."; +static PyObject *__pyx_pf_9csamtools_7Samfile__isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("_isOpen"); __Pyx_TraceCall("_isOpen", __pyx_f[0], 451); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":453 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":453 * def _isOpen( self ): * '''return true if samfile has been opened.''' * return self.samfile != NULL # <<<<<<<<<<<<<< @@ -4843,7 +4863,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_1_isOpen(PyObject *__pyx_v_self, C return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":455 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":455 * return self.samfile != NULL * * def _hasIndex( self ): # <<<<<<<<<<<<<< @@ -4851,16 +4871,16 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_1_isOpen(PyObject *__pyx_v_self, C * return self.index != NULL */ -static PyObject *__pyx_pf_9csamtools_7Samfile_2_hasIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_2_hasIndex[] = "return true if samfile has an existing (and opened) index."; -static PyObject *__pyx_pf_9csamtools_7Samfile_2_hasIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_7Samfile__hasIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile__hasIndex[] = "return true if samfile has an existing (and opened) index."; +static PyObject *__pyx_pf_9csamtools_7Samfile__hasIndex(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("_hasIndex"); __Pyx_TraceCall("_hasIndex", __pyx_f[0], 455); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":457 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":457 * def _hasIndex( self ): * '''return true if samfile has an existing (and opened) index.''' * return self.index != NULL # <<<<<<<<<<<<<< @@ -4887,7 +4907,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_2_hasIndex(PyObject *__pyx_v_self, return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":459 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":459 * return self.index != NULL * * def _open( self, # <<<<<<<<<<<<<< @@ -4895,9 +4915,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_2_hasIndex(PyObject *__pyx_v_self, * mode = 'r', */ -static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_3_open[] = "open a sam/bam file.\n\n If _open is called on an existing bamfile, the current file will be\n closed and a new file will be opened.\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_7Samfile__open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile__open[] = "open a sam/bam file.\n\n If _open is called on an existing bamfile, the current file will be\n closed and a new file will be opened.\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile__open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { char *__pyx_v_filename; PyObject *__pyx_v_mode = 0; struct __pyx_obj_9csamtools_Samfile *__pyx_v_template = 0; @@ -4937,7 +4957,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO PyObject* values[8] = {0,0,0,0,0,0,0,0}; values[1] = ((PyObject *)__pyx_n_s__r); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":462 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":462 * char * filename, * mode = 'r', * Samfile template = None, # <<<<<<<<<<<<<< @@ -4946,7 +4966,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ values[2] = (PyObject *)((struct __pyx_obj_9csamtools_Samfile *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":463 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":463 * mode = 'r', * Samfile template = None, * referencenames = None, # <<<<<<<<<<<<<< @@ -4955,7 +4975,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ values[3] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":464 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":464 * Samfile template = None, * referencenames = None, * referencelengths = None, # <<<<<<<<<<<<<< @@ -4964,7 +4984,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ values[4] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":465 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":465 * referencenames = None, * referencelengths = None, * text = None, # <<<<<<<<<<<<<< @@ -4973,7 +4993,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ values[5] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":466 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":466 * referencelengths = None, * text = None, * header = None, # <<<<<<<<<<<<<< @@ -4982,7 +5002,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ values[6] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":467 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":467 * text = None, * header = None, * port = None, # <<<<<<<<<<<<<< @@ -5057,7 +5077,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } else { __pyx_v_mode = ((PyObject *)__pyx_n_s__r); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":462 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":462 * char * filename, * mode = 'r', * Samfile template = None, # <<<<<<<<<<<<<< @@ -5066,7 +5086,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_template = ((struct __pyx_obj_9csamtools_Samfile *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":463 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":463 * mode = 'r', * Samfile template = None, * referencenames = None, # <<<<<<<<<<<<<< @@ -5075,7 +5095,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_referencenames = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":464 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":464 * Samfile template = None, * referencenames = None, * referencelengths = None, # <<<<<<<<<<<<<< @@ -5084,7 +5104,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_referencelengths = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":465 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":465 * referencenames = None, * referencelengths = None, * text = None, # <<<<<<<<<<<<<< @@ -5093,7 +5113,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_text = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":466 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":466 * referencelengths = None, * text = None, * header = None, # <<<<<<<<<<<<<< @@ -5102,7 +5122,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_header = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":467 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":467 * text = None, * header = None, * port = None, # <<<<<<<<<<<<<< @@ -5137,14 +5157,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_v_store = Py_None; __Pyx_INCREF(Py_None); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_template), __pyx_ptype_9csamtools_Samfile, 1, "template", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":475 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":475 * ''' * * assert mode in ( "r","w","rb","wb", "wh", "wbu" ), "invalid file opening mode `%s`" % mode # <<<<<<<<<<<<<< * assert filename != NULL * */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS __Pyx_INCREF(__pyx_v_mode); __pyx_t_1 = __pyx_v_mode; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__r), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -5204,7 +5224,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) { - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_v_mode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), __pyx_v_mode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __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; @@ -5212,21 +5232,21 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":476 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":476 * * assert mode in ( "r","w","rb","wb", "wh", "wbu" ), "invalid file opening mode `%s`" % mode * assert filename != NULL # <<<<<<<<<<<<<< * * # close a previously opened file */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_filename != NULL))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":479 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":479 * * # close a previously opened file * if self.samfile != NULL: self.close() # <<<<<<<<<<<<<< @@ -5245,7 +5265,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":480 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":480 * # close a previously opened file * if self.samfile != NULL: self.close() * self.samfile = NULL # <<<<<<<<<<<<<< @@ -5254,7 +5274,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":483 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":483 * * cdef bam_header_t * header_to_write * header_to_write = NULL # <<<<<<<<<<<<<< @@ -5263,7 +5283,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_header_to_write = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":485 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":485 * header_to_write = NULL * * if self._filename != NULL: free(self._filename ) # <<<<<<<<<<<<<< @@ -5277,7 +5297,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":486 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":486 * * if self._filename != NULL: free(self._filename ) * self._filename = strdup( filename ) # <<<<<<<<<<<<<< @@ -5286,7 +5306,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->_filename = strdup(__pyx_v_filename); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":488 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":488 * self._filename = strdup( filename ) * * self.isbam = len(mode) > 1 and mode[1] == 'b' # <<<<<<<<<<<<<< @@ -5314,30 +5334,30 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isbam = __pyx_t_8; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":490 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":490 * self.isbam = len(mode) > 1 and mode[1] == 'b' * * self.isremote = strncmp(filename,"http:",5) == 0 or \ # <<<<<<<<<<<<<< * strncmp(filename,"ftp:",4) == 0 * */ - __pyx_t_3 = (strncmp(__pyx_v_filename, __pyx_k_17, 5) == 0); + __pyx_t_3 = (strncmp(__pyx_v_filename, __pyx_k_13, 5) == 0); if (!__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":491 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":491 * * self.isremote = strncmp(filename,"http:",5) == 0 or \ * strncmp(filename,"ftp:",4) == 0 # <<<<<<<<<<<<<< * * cdef char * ctext */ - __pyx_t_4 = (strncmp(__pyx_v_filename, __pyx_k_18, 4) == 0); + __pyx_t_4 = (strncmp(__pyx_v_filename, __pyx_k_14, 4) == 0); __pyx_t_5 = __pyx_t_4; } else { __pyx_t_5 = __pyx_t_3; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":490 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":490 * self.isbam = len(mode) > 1 and mode[1] == 'b' * * self.isremote = strncmp(filename,"http:",5) == 0 or \ # <<<<<<<<<<<<<< @@ -5346,7 +5366,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isremote = __pyx_t_5; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":494 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":494 * * cdef char * ctext * ctext = NULL # <<<<<<<<<<<<<< @@ -5355,7 +5375,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_ctext = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":496 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":496 * ctext = NULL * * if mode[0] == 'w': # <<<<<<<<<<<<<< @@ -5371,7 +5391,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":500 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":500 * * # header structure (used for writing) * if template: # <<<<<<<<<<<<<< @@ -5381,7 +5401,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_template)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":502 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":502 * if template: * # copy header from another file * header_to_write = template.samfile.header # <<<<<<<<<<<<<< @@ -5392,7 +5412,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO goto __pyx_L9; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":504 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":504 * header_to_write = template.samfile.header * * elif header: # <<<<<<<<<<<<<< @@ -5402,7 +5422,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_header); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":505 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":505 * * elif header: * header_to_write = self._buildHeader( header ) # <<<<<<<<<<<<<< @@ -5414,14 +5434,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":509 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":509 * 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" # <<<<<<<<<<<<<< * assert len(referencenames) == len(referencelengths), "unequal names and lengths of reference sequences" * */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_referencenames); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_referencelengths); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -5430,28 +5450,28 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_4 = __pyx_t_5; } if (unlikely(!__pyx_t_4)) { - PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_19)); + PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_15)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":510 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":510 * # 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 + #ifndef PYREX_WITHOUT_ASSERTIONS __pyx_t_6 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = PyObject_Length(__pyx_v_referencelengths); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!(__pyx_t_6 == __pyx_t_9))) { - PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_20)); + PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_16)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":513 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":513 * * # allocate and fill header * header_to_write = bam_header_init() # <<<<<<<<<<<<<< @@ -5460,7 +5480,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_header_to_write = bam_header_init(); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":514 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":514 * # allocate and fill header * header_to_write = bam_header_init() * header_to_write.n_targets = len(referencenames) # <<<<<<<<<<<<<< @@ -5470,7 +5490,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_9 = PyObject_Length(__pyx_v_referencenames); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_header_to_write->n_targets = __pyx_t_9; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":515 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":515 * header_to_write = bam_header_init() * header_to_write.n_targets = len(referencenames) * n = 0 # <<<<<<<<<<<<<< @@ -5481,7 +5501,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __Pyx_DECREF(__pyx_v_n); __pyx_v_n = __pyx_int_0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":516 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":516 * header_to_write.n_targets = len(referencenames) * n = 0 * for x in referencenames: n += len(x) + 1 # <<<<<<<<<<<<<< @@ -5524,7 +5544,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":517 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":517 * n = 0 * for x in referencenames: n += len(x) + 1 * header_to_write.target_name = calloc(n, sizeof(char*)) # <<<<<<<<<<<<<< @@ -5534,7 +5554,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_10 = __Pyx_PyInt_AsSize_t(__pyx_v_n); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_header_to_write->target_name = ((char **)calloc(__pyx_t_10, (sizeof(char *)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":518 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":518 * for x in referencenames: n += len(x) + 1 * header_to_write.target_name = calloc(n, sizeof(char*)) * header_to_write.target_len = calloc(n, sizeof(uint32_t)) # <<<<<<<<<<<<<< @@ -5544,7 +5564,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_10 = __Pyx_PyInt_AsSize_t(__pyx_v_n); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_header_to_write->target_len = ((uint32_t *)calloc(__pyx_t_10, (sizeof(uint32_t)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":519 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":519 * header_to_write.target_name = calloc(n, sizeof(char*)) * header_to_write.target_len = calloc(n, sizeof(uint32_t)) * for x from 0 <= x < header_to_write.n_targets: # <<<<<<<<<<<<<< @@ -5559,7 +5579,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_v_x = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":520 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":520 * header_to_write.target_len = calloc(n, sizeof(uint32_t)) * for x from 0 <= x < header_to_write.n_targets: * header_to_write.target_len[x] = referencelengths[x] # <<<<<<<<<<<<<< @@ -5573,7 +5593,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_header_to_write->target_len[__pyx_t_9]) = __pyx_t_13; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":521 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":521 * for x from 0 <= x < header_to_write.n_targets: * header_to_write.target_len[x] = referencelengths[x] * name = referencenames[x] # <<<<<<<<<<<<<< @@ -5586,7 +5606,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_v_name = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":522 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":522 * header_to_write.target_len[x] = referencelengths[x] * name = referencenames[x] * header_to_write.target_name[x] = calloc(len(name)+1, sizeof(char)) # <<<<<<<<<<<<<< @@ -5597,7 +5617,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_x); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_header_to_write->target_name[__pyx_t_6]) = ((char *)calloc((__pyx_t_9 + 1), (sizeof(char)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":523 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":523 * name = referencenames[x] * header_to_write.target_name[x] = calloc(len(name)+1, sizeof(char)) * strncpy( header_to_write.target_name[x], name, len(name) ) # <<<<<<<<<<<<<< @@ -5611,7 +5631,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_12 = __Pyx_PyInt_AsLong(__pyx_v_x); if (unlikely((__pyx_t_12 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":519 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":519 * header_to_write.target_name = calloc(n, sizeof(char*)) * header_to_write.target_len = calloc(n, sizeof(uint32_t)) * for x from 0 <= x < header_to_write.n_targets: # <<<<<<<<<<<<<< @@ -5624,7 +5644,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_v_x = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":525 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":525 * strncpy( header_to_write.target_name[x], name, len(name) ) * * if text != None: # <<<<<<<<<<<<<< @@ -5637,7 +5657,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":527 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":527 * if text != None: * # copy without \0 * ctext = text # <<<<<<<<<<<<<< @@ -5647,7 +5667,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_14 = PyBytes_AsString(__pyx_v_text); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ctext = __pyx_t_14; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":528 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":528 * # copy without \0 * ctext = text * header_to_write.l_text = strlen(ctext) # <<<<<<<<<<<<<< @@ -5656,7 +5676,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_header_to_write->l_text = strlen(__pyx_v_ctext); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":529 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":529 * ctext = text * header_to_write.l_text = strlen(ctext) * header_to_write.text = calloc( strlen(ctext), sizeof(char) ) # <<<<<<<<<<<<<< @@ -5665,7 +5685,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_header_to_write->text = ((char *)calloc(strlen(__pyx_v_ctext), (sizeof(char)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":530 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":530 * header_to_write.l_text = strlen(ctext) * header_to_write.text = calloc( strlen(ctext), sizeof(char) ) * memcpy( header_to_write.text, ctext, strlen(ctext) ) # <<<<<<<<<<<<<< @@ -5677,7 +5697,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } __pyx_L14:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":532 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":532 * memcpy( header_to_write.text, ctext, strlen(ctext) ) * * header_to_write.hash = NULL # <<<<<<<<<<<<<< @@ -5686,7 +5706,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_v_header_to_write->hash = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":533 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":533 * * header_to_write.hash = NULL * header_to_write.rg2lib = NULL # <<<<<<<<<<<<<< @@ -5697,7 +5717,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":537 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":537 * # 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() # <<<<<<<<<<<<<< @@ -5713,7 +5733,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_v_store = __pyx_t_7; __pyx_t_7 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":538 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":538 * # and sam files (in the latter case, the mode needs to be wh) * store = StderrStore() * self.samfile = samopen( filename, mode, header_to_write ) # <<<<<<<<<<<<<< @@ -5723,7 +5743,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_14 = PyBytes_AsString(__pyx_v_mode); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile = samopen(__pyx_v_filename, __pyx_t_14, __pyx_v_header_to_write); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":539 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":539 * store = StderrStore() * self.samfile = samopen( filename, mode, header_to_write ) * store.release() # <<<<<<<<<<<<<< @@ -5737,7 +5757,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":542 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":542 * * # bam_header_destroy takes care of cleaning up of all the members * if not template and header_to_write != NULL: # <<<<<<<<<<<<<< @@ -5754,7 +5774,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":543 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":543 * # 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 ) # <<<<<<<<<<<<<< @@ -5768,7 +5788,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO goto __pyx_L8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":545 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":545 * bam_header_destroy( header_to_write ) * * elif mode[0] == "r": # <<<<<<<<<<<<<< @@ -5784,17 +5804,17 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":547 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":547 * 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_3 = (strncmp(__pyx_v_filename, __pyx_k_21, 1) != 0); + __pyx_t_3 = (strncmp(__pyx_v_filename, __pyx_k_17, 1) != 0); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":548 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":548 * # open file for reading * if strncmp( filename, "-", 1) != 0 and \ * not self.isremote and \ # <<<<<<<<<<<<<< @@ -5804,7 +5824,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_5 = (!((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isremote); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":549 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":549 * if strncmp( filename, "-", 1) != 0 and \ * not self.isremote and \ * not os.path.exists( filename ): # <<<<<<<<<<<<<< @@ -5822,14 +5842,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_2 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __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_t_7, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __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 = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_15 = (!__pyx_t_4); @@ -5843,7 +5863,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":550 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":550 * not self.isremote and \ * not os.path.exists( filename ): * raise IOError( "file `%s` not found" % filename) # <<<<<<<<<<<<<< @@ -5852,17 +5872,17 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_t_2 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __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 = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __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_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -5870,7 +5890,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } __pyx_L16:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":553 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":553 * * # try to detect errors * self.samfile = samopen( filename, mode, NULL ) # <<<<<<<<<<<<<< @@ -5880,7 +5900,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_14 = PyBytes_AsString(__pyx_v_mode); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile = samopen(__pyx_v_filename, __pyx_t_14, NULL); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":554 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":554 * # try to detect errors * self.samfile = samopen( filename, mode, NULL ) * if self.samfile == NULL: # <<<<<<<<<<<<<< @@ -5890,23 +5910,29 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_5 = (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile == NULL); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":555 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":555 * self.samfile = samopen( filename, mode, NULL ) * if self.samfile == NULL: * raise ValueError( "could not open file - is it SAM/BAM format?") # <<<<<<<<<<<<<< * * if self.samfile.header == NULL: */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __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 = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_19)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_19)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L17; } __pyx_L17:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":557 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":557 * raise ValueError( "could not open file - is it SAM/BAM format?") * * if self.samfile.header == NULL: # <<<<<<<<<<<<<< @@ -5916,15 +5942,21 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_5 = (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header == NULL); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":558 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":558 * * if self.samfile.header == NULL: * raise ValueError( "could not open file - is it SAM/BAM format?") # <<<<<<<<<<<<<< * * if self.samfile.header.n_targets == 0: */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __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 = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_19)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_19)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -5932,7 +5964,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } __pyx_L18:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":560 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":560 * raise ValueError( "could not open file - is it SAM/BAM format?") * * if self.samfile.header.n_targets == 0: # <<<<<<<<<<<<<< @@ -5942,17 +5974,23 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_5 = (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets == 0); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":561 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":561 * * if self.samfile.header.n_targets == 0: * raise ValueError( "could not open file - is it SAM/BAM format?") # <<<<<<<<<<<<<< * * if self.samfile == NULL: */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __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 = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_19)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_19)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L19; } @@ -5961,7 +5999,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":563 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":563 * raise ValueError( "could not open file - is it SAM/BAM format?") * * if self.samfile == NULL: # <<<<<<<<<<<<<< @@ -5971,47 +6009,47 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_5 = (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile == NULL); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":564 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":564 * * if self.samfile == NULL: * raise IOError("could not open file `%s`" % filename ) # <<<<<<<<<<<<<< * * # check for index and open if present */ - __pyx_t_1 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __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 = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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_IOError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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 = 564; __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); + 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_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L20; } __pyx_L20:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":567 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":567 * * # check for index and open if present * if mode[0] == "r" and self.isbam: # <<<<<<<<<<<<<< * * if not self.isremote: */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__r), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__r), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { __pyx_t_3 = ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isbam; } else { @@ -6019,7 +6057,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":569 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":569 * if mode[0] == "r" and self.isbam: * * if not self.isremote: # <<<<<<<<<<<<<< @@ -6029,41 +6067,41 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_3 = (!((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isremote); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":570 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":570 * * if not self.isremote: * if not os.path.exists(filename +".bai"): # <<<<<<<<<<<<<< * self.index = NULL * else: */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __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 = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); 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); - __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 = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__exists); 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); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __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(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); + __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 = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__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 = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = (!__pyx_t_3); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":571 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":571 * if not self.isremote: * if not os.path.exists(filename +".bai"): * self.index = NULL # <<<<<<<<<<<<<< @@ -6075,7 +6113,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":574 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":574 * else: * # returns NULL if there is no index or index could not be opened * self.index = bam_index_load(filename) # <<<<<<<<<<<<<< @@ -6084,7 +6122,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index = bam_index_load(__pyx_v_filename); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":575 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":575 * # returns NULL if there is no index or index could not be opened * self.index = bam_index_load(filename) * if self.index == NULL: # <<<<<<<<<<<<<< @@ -6094,7 +6132,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_5 = (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index == NULL); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":576 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":576 * self.index = bam_index_load(filename) * if self.index == NULL: * raise IOError("error while opening index `%s` " % filename ) # <<<<<<<<<<<<<< @@ -6103,19 +6141,19 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ __pyx_t_7 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_28), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __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 = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__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_IOError, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __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); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __pyx_t_1 = 0; + __pyx_t_1 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L24; } @@ -6126,7 +6164,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":578 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":578 * raise IOError("error while opening index `%s` " % filename ) * else: * self.index = bam_index_load(filename) # <<<<<<<<<<<<<< @@ -6135,7 +6173,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO */ ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index = bam_index_load(__pyx_v_filename); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":579 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":579 * else: * self.index = bam_index_load(filename) * if self.index == NULL: # <<<<<<<<<<<<<< @@ -6145,26 +6183,26 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO __pyx_t_5 = (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index == NULL); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":580 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":580 * self.index = bam_index_load(filename) * if self.index == NULL: * raise IOError("error while opening index `%s` " % filename ) # <<<<<<<<<<<<<< * * def getrname( self, tid ): */ - __pyx_t_2 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_28), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_7)); + __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 = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_7)); __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_7, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6196,7 +6234,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":582 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":582 * raise IOError("error while opening index `%s` " % filename ) * * def getrname( self, tid ): # <<<<<<<<<<<<<< @@ -6204,9 +6242,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_3_open(PyObject *__pyx_v_self, PyO * convert numerical :term:`tid` into :term:`reference` name.''' */ -static PyObject *__pyx_pf_9csamtools_7Samfile_4getrname(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_4getrname[] = "\n convert numerical :term:`tid` into :term:`reference` name."; -static PyObject *__pyx_pf_9csamtools_7Samfile_4getrname(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) { +static PyObject *__pyx_pf_9csamtools_7Samfile_getrname(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_getrname[] = "\n convert numerical :term:`tid` into :term:`reference` name."; +static PyObject *__pyx_pf_9csamtools_7Samfile_getrname(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -6217,7 +6255,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4getrname(PyObject *__pyx_v_self, __Pyx_RefNannySetupContext("getrname"); __Pyx_TraceCall("getrname", __pyx_f[0], 582); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":585 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":585 * ''' * convert numerical :term:`tid` into :term:`reference` name.''' * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< @@ -6233,65 +6271,71 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4getrname(PyObject *__pyx_v_self, __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_29), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __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 = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":586 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":586 * 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 out of range 0<=tid<%i" % self.samfile.header.n_targets ) * return self.samfile.header.target_name[tid] */ - __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_tid, Py_LE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_IsTrue(__pyx_t_2)) { - __Pyx_DECREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __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); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_tid, Py_LE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_IsTrue(__pyx_t_1)) { + __Pyx_DECREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __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_v_tid, __pyx_t_2, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __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_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __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 = 586; __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) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":587 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":587 * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) * if not 0 <= tid < self.samfile.header.n_targets: * raise ValueError( "tid out of range 0<=tid<%i" % self.samfile.header.n_targets ) # <<<<<<<<<<<<<< * return self.samfile.header.target_name[tid] * */ - __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__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 = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__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 = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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 = 587; __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); + 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, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":588 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":588 * if not 0 <= tid < self.samfile.header.n_targets: * raise ValueError( "tid out of range 0<=tid<%i" % self.samfile.header.n_targets ) * return self.samfile.header.target_name[tid] # <<<<<<<<<<<<<< @@ -6300,10 +6344,10 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4getrname(PyObject *__pyx_v_self, */ __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 = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyBytes_FromString((((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->target_name[__pyx_t_5])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_r = ((PyObject *)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_2 = PyBytes_FromString((((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->target_name[__pyx_t_5])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __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); @@ -6320,7 +6364,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4getrname(PyObject *__pyx_v_self, return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":590 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":590 * return self.samfile.header.target_name[tid] * * def gettid( self, reference ): # <<<<<<<<<<<<<< @@ -6328,9 +6372,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4getrname(PyObject *__pyx_v_self, * convert :term:`reference` name into numerical :term:`tid` */ -static PyObject *__pyx_pf_9csamtools_7Samfile_5gettid(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_5gettid[] = "\n convert :term:`reference` name into numerical :term:`tid`\n\n returns -1 if reference is not known.\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_5gettid(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) { +static PyObject *__pyx_pf_9csamtools_7Samfile_gettid(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_gettid[] = "\n convert :term:`reference` name into numerical :term:`tid`\n\n returns -1 if reference is not known.\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile_gettid(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -6341,7 +6385,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_5gettid(PyObject *__pyx_v_self, Py __Pyx_RefNannySetupContext("gettid"); __Pyx_TraceCall("gettid", __pyx_f[0], 590); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":596 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":596 * returns -1 if reference is not known. * ''' * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< @@ -6357,16 +6401,22 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_5gettid(PyObject *__pyx_v_self, Py __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_31), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __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 = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":597 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":597 * ''' * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) * return pysam_reference2tid( self.samfile.header, reference ) # <<<<<<<<<<<<<< @@ -6375,10 +6425,10 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_5gettid(PyObject *__pyx_v_self, Py */ __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 = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = PyInt_FromLong(pysam_reference2tid(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header, __pyx_t_5)); 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_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_1 = PyInt_FromLong(pysam_reference2tid(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header, __pyx_t_5)); 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_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -6395,7 +6445,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_5gettid(PyObject *__pyx_v_self, Py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":599 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":599 * return pysam_reference2tid( self.samfile.header, reference ) * * def _parseRegion( self, # <<<<<<<<<<<<<< @@ -6403,9 +6453,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_5gettid(PyObject *__pyx_v_self, Py * start = None, */ -static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_6_parseRegion[] = "\n parse region information.\n\n raise ValueError for for invalid regions.\n\n returns a tuple of flag, tid, start and end. Flag indicates\n whether some coordinates were supplied.\n\n Note that regions are 1-based, while start,end are python coordinates.\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_7Samfile__parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile__parseRegion[] = "\n parse region information.\n\n raise ValueError for for invalid regions.\n\n returns a tuple of flag, tid, start and end. Flag indicates\n whether some coordinates were supplied.\n\n Note that regions are 1-based, while start,end are python coordinates.\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile__parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reference = 0; PyObject *__pyx_v_start = 0; PyObject *__pyx_v_end = 0; @@ -6431,7 +6481,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[4] = {0,0,0,0}; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":600 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":600 * * def _parseRegion( self, * reference = None, # <<<<<<<<<<<<<< @@ -6440,7 +6490,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ values[0] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":601 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":601 * def _parseRegion( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -6449,7 +6499,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ values[1] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":602 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":602 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -6458,7 +6508,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ values[2] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":603 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":603 * start = None, * end = None, * region = None ): # <<<<<<<<<<<<<< @@ -6505,7 +6555,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_v_region = values[3]; } else { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":600 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":600 * * def _parseRegion( self, * reference = None, # <<<<<<<<<<<<<< @@ -6514,7 +6564,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ __pyx_v_reference = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":601 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":601 * def _parseRegion( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -6523,7 +6573,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ __pyx_v_start = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":602 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":602 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -6532,7 +6582,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ __pyx_v_end = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":603 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":603 * start = None, * end = None, * region = None ): # <<<<<<<<<<<<<< @@ -6560,7 +6610,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __Pyx_INCREF(__pyx_v_reference); __pyx_v_parts = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":622 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":622 * cdef int rend * * rtid = -1 # <<<<<<<<<<<<<< @@ -6569,7 +6619,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ __pyx_v_rtid = -1; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":623 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":623 * * rtid = -1 * rstart = 0 # <<<<<<<<<<<<<< @@ -6578,7 +6628,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ __pyx_v_rstart = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":624 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":624 * rtid = -1 * rstart = 0 * rend = max_pos # <<<<<<<<<<<<<< @@ -6587,7 +6637,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ __pyx_v_rend = __pyx_v_9csamtools_max_pos; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":625 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":625 * rstart = 0 * rend = max_pos * if start != None: rstart = start # <<<<<<<<<<<<<< @@ -6605,7 +6655,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":626 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":626 * rend = max_pos * if start != None: rstart = start * if end != None: rend = end # <<<<<<<<<<<<<< @@ -6623,7 +6673,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":628 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":628 * if end != None: rend = end * * if region: # <<<<<<<<<<<<<< @@ -6633,7 +6683,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":629 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":629 * * if region: * parts = re.split( "[:-]", region ) # <<<<<<<<<<<<<< @@ -6646,22 +6696,22 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __Pyx_GOTREF(__pyx_t_4); __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 = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_32)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_32)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32)); + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_23)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_23)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23)); __Pyx_INCREF(__pyx_v_region); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_region); __Pyx_GIVEREF(__pyx_v_region); - __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_v_parts); __pyx_v_parts = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":630 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":630 * if region: * parts = re.split( "[:-]", region ) * reference = parts[0] # <<<<<<<<<<<<<< @@ -6674,7 +6724,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_v_reference = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":631 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":631 * parts = re.split( "[:-]", region ) * reference = parts[0] * if len(parts) >= 2: rstart = int(parts[1]) - 1 # <<<<<<<<<<<<<< @@ -6687,13 +6737,13 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_parts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -6704,7 +6754,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":632 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":632 * reference = parts[0] * if len(parts) >= 2: rstart = int(parts[1]) - 1 * if len(parts) >= 3: rend = int(parts[2]) # <<<<<<<<<<<<<< @@ -6717,13 +6767,13 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_parts, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 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_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rend = __pyx_t_3; @@ -6734,7 +6784,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":634 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":634 * if len(parts) >= 3: rend = int(parts[2]) * * if not reference: return 0, 0, 0, 0 # <<<<<<<<<<<<<< @@ -6745,14 +6795,28 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_t_7 = (!__pyx_t_2); if (__pyx_t_7) { __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_k_tuple_33)); - __pyx_r = ((PyObject *)__pyx_k_tuple_33); + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L11; } __pyx_L11:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":636 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":636 * if not reference: return 0, 0, 0, 0 * * rtid = self.gettid( reference ) # <<<<<<<<<<<<<< @@ -6762,19 +6826,19 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__gettid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_reference); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); - __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __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_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_rtid = __pyx_t_3; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":637 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":637 * * rtid = self.gettid( reference ) * if rtid < 0: raise ValueError( "invalid reference `%s`" % reference ) # <<<<<<<<<<<<<< @@ -6783,16 +6847,16 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se */ __pyx_t_7 = (__pyx_v_rtid < 0); if (__pyx_t_7) { - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_34), __pyx_v_reference); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_24), __pyx_v_reference); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __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 = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __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 = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6800,7 +6864,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se } __pyx_L12:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":638 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":638 * 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) ) # <<<<<<<<<<<<<< @@ -6814,24 +6878,24 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_t_5 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_35), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_25), __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __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 = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 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_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6839,7 +6903,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se } __pyx_L13:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":639 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":639 * 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 ) # <<<<<<<<<<<<<< @@ -6854,17 +6918,17 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se if (__pyx_t_2) { __pyx_t_5 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(__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 = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __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 = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6872,7 +6936,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se } __pyx_L14:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":640 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":640 * 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 ) # <<<<<<<<<<<<<< @@ -6887,17 +6951,17 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se if (__pyx_t_7) { __pyx_t_1 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __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 = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 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_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6905,7 +6969,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se } __pyx_L15:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":642 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":642 * if not 0 <= rend <= max_pos: raise ValueError( 'end out of range (%i)' % rend ) * * return 1, rtid, rstart, rend # <<<<<<<<<<<<<< @@ -6920,7 +6984,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_t_4 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); @@ -6933,7 +6997,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0; - __pyx_r = ((PyObject *)__pyx_t_8); + __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; @@ -6955,7 +7019,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":644 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":644 * return 1, rtid, rstart, rend * * def seek( self, uint64_t offset, int where = 0): # <<<<<<<<<<<<<< @@ -6963,9 +7027,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6_parseRegion(PyObject *__pyx_v_se * move file pointer to position *offset*, see :meth:`pysam.Samfile.tell`. */ -static PyObject *__pyx_pf_9csamtools_7Samfile_7seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_7seek[] = "\n move file pointer to position *offset*, see :meth:`pysam.Samfile.tell`.\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_7seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_7Samfile_seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_seek[] = "\n move file pointer to position *offset*, see :meth:`pysam.Samfile.tell`.\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile_seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { uint64_t __pyx_v_offset; int __pyx_v_where; PyObject *__pyx_r = NULL; @@ -7024,7 +7088,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7seek(PyObject *__pyx_v_self, PyOb return NULL; __pyx_L4_argument_unpacking_done:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":649 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":649 * ''' * * if not self._isOpen(): # <<<<<<<<<<<<<< @@ -7041,23 +7105,29 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7seek(PyObject *__pyx_v_self, PyOb __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":650 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":650 * * 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_36), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __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 = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":651 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":651 * if not self._isOpen(): * raise ValueError( "I/O operation on closed file" ) * if not self.isbam: # <<<<<<<<<<<<<< @@ -7067,15 +7137,21 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7seek(PyObject *__pyx_v_self, PyOb __pyx_t_4 = (!((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isbam); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":652 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":652 * raise ValueError( "I/O operation on closed file" ) * if not self.isbam: * raise NotImplementedError("seek only available in bam files") # <<<<<<<<<<<<<< * return bam_seek( self.samfile.x.bam, offset, where ) * */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_38), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __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 = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_26)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_26)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_26)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -7083,7 +7159,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7seek(PyObject *__pyx_v_self, PyOb } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":653 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":653 * if not self.isbam: * raise NotImplementedError("seek only available in bam files") * return bam_seek( self.samfile.x.bam, offset, where ) # <<<<<<<<<<<<<< @@ -7111,7 +7187,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7seek(PyObject *__pyx_v_self, PyOb return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":655 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":655 * return bam_seek( self.samfile.x.bam, offset, where ) * * def tell( self ): # <<<<<<<<<<<<<< @@ -7119,9 +7195,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7seek(PyObject *__pyx_v_self, PyOb * return current file position */ -static PyObject *__pyx_pf_9csamtools_7Samfile_8tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_8tell[] = "\n return current file position\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_8tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_7Samfile_tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_tell[] = "\n return current file position\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile_tell(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -7131,7 +7207,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8tell(PyObject *__pyx_v_self, CYTH __Pyx_RefNannySetupContext("tell"); __Pyx_TraceCall("tell", __pyx_f[0], 655); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":659 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":659 * return current file position * ''' * if not self._isOpen(): # <<<<<<<<<<<<<< @@ -7148,23 +7224,29 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8tell(PyObject *__pyx_v_self, CYTH __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":660 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":660 * ''' * 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_39), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __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 = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":661 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":661 * if not self._isOpen(): * raise ValueError( "I/O operation on closed file" ) * if not self.isbam: # <<<<<<<<<<<<<< @@ -7174,15 +7256,21 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8tell(PyObject *__pyx_v_self, CYTH __pyx_t_4 = (!((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isbam); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":662 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":662 * 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_40), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __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 = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_26)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_26)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_26)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -7190,7 +7278,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8tell(PyObject *__pyx_v_self, CYTH } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":664 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":664 * raise NotImplementedError("seek only available in bam files") * * return bam_tell( self.samfile.x.bam ) # <<<<<<<<<<<<<< @@ -7218,7 +7306,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8tell(PyObject *__pyx_v_self, CYTH return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":666 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":666 * return bam_tell( self.samfile.x.bam ) * * def fetch( self, # <<<<<<<<<<<<<< @@ -7226,9 +7314,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8tell(PyObject *__pyx_v_self, CYTH * start = None, */ -static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_9fetch[] = "\n fetch aligned reads in a :term:`region` using 0-based indexing. The region is specified by\n :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can \n be supplied.\n\n Without *reference* or *region* all reads will be fetched. The reads will be returned\n ordered by reference sequence, which will not necessarily be the order within the file.\n If *until_eof* is given, all reads from the current file position will be returned\n *in order as they are within the file*. \n \n If only *reference* is set, all reads aligned to *reference* will be fetched.\n\n The method returns an iterator of type :class:`pysam.IteratorRow` unless\n a *callback is provided. If *callback* is given, the callback will be executed \n for each position within the :term:`region`. Note that callbacks currently work\n only, if *region* or *reference* is given.\n\n Note that a :term:`SAM` file does not allow random access. If *region* or *reference* are given,\n an exception is raised.\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_7Samfile_fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_fetch[] = "\n fetch aligned reads in a :term:`region` using 0-based indexing. The region is specified by\n :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can \n be supplied.\n\n Without *reference* or *region* all reads will be fetched. The reads will be returned\n ordered by reference sequence, which will not necessarily be the order within the file.\n If *until_eof* is given, all reads from the current file position will be returned\n *in order as they are within the file*. \n \n If only *reference* is set, all reads aligned to *reference* will be fetched.\n\n The method returns an iterator of type :class:`pysam.IteratorRow` unless\n a *callback is provided. If *callback* is given, the callback will be executed \n for each position within the :term:`region`. Note that callbacks currently work\n only, if *region* or *reference* is given.\n\n Note that a :term:`SAM` file does not allow random access. If *region* or *reference* are given,\n an exception is raised.\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile_fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reference = 0; PyObject *__pyx_v_start = 0; PyObject *__pyx_v_end = 0; @@ -7262,7 +7350,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[6] = {0,0,0,0,0,0}; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":667 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":667 * * def fetch( self, * reference = None, # <<<<<<<<<<<<<< @@ -7271,7 +7359,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ values[0] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":668 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":668 * def fetch( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -7280,7 +7368,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ values[1] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":669 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":669 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -7289,7 +7377,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ values[2] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":670 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":670 * start = None, * end = None, * region = None, # <<<<<<<<<<<<<< @@ -7298,7 +7386,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ values[3] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":671 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":671 * end = None, * region = None, * callback = None, # <<<<<<<<<<<<<< @@ -7306,7 +7394,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO * ''' */ values[4] = ((PyObject *)Py_None); - values[5] = __pyx_k_41; + values[5] = __pyx_k_27; switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); @@ -7360,7 +7448,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO __pyx_v_until_eof = values[5]; } else { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":667 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":667 * * def fetch( self, * reference = None, # <<<<<<<<<<<<<< @@ -7369,7 +7457,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ __pyx_v_reference = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":668 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":668 * def fetch( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -7378,7 +7466,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ __pyx_v_start = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":669 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":669 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -7387,7 +7475,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ __pyx_v_end = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":670 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":670 * start = None, * end = None, * region = None, # <<<<<<<<<<<<<< @@ -7396,7 +7484,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ __pyx_v_region = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":671 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":671 * end = None, * region = None, * callback = None, # <<<<<<<<<<<<<< @@ -7404,7 +7492,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO * ''' */ __pyx_v_callback = ((PyObject *)Py_None); - __pyx_v_until_eof = __pyx_k_41; + __pyx_v_until_eof = __pyx_k_27; switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: __pyx_v_until_eof = PyTuple_GET_ITEM(__pyx_args, 5); case 5: __pyx_v_callback = PyTuple_GET_ITEM(__pyx_args, 4); @@ -7425,7 +7513,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO return NULL; __pyx_L4_argument_unpacking_done:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":695 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":695 * cdef int rtid, rstart, rend, has_coord * * if not self._isOpen(): # <<<<<<<<<<<<<< @@ -7442,57 +7530,63 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":696 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":696 * * 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_42), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __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 = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":698 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":698 * 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(__pyx_v_self, __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __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 = 698; __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 = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_INCREF(__pyx_v_reference); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); __Pyx_INCREF(__pyx_v_start); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_start); __Pyx_GIVEREF(__pyx_v_start); __Pyx_INCREF(__pyx_v_end); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end); __Pyx_GIVEREF(__pyx_v_end); __Pyx_INCREF(__pyx_v_region); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region); + PyTuple_SET_ITEM(__pyx_t_2, 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 = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 4)) { PyObject* tuple = __pyx_t_5; - __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -7508,14 +7602,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_12, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_12, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_12, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __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 = 698; __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 = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_12, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __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 = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_12, 2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -7532,7 +7626,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO __pyx_v_rend = __pyx_t_8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":700 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":700 * has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region ) * * if self.isbam: # <<<<<<<<<<<<<< @@ -7541,7 +7635,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ if (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isbam) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":701 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":701 * * if self.isbam: * if not until_eof and not self._hasIndex() and not self.isremote: # <<<<<<<<<<<<<< @@ -7571,23 +7665,29 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO } if (__pyx_t_13) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":702 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":702 * 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_44), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __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 = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_Raise(__pyx_t_7, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_28)); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_28)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":704 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":704 * raise ValueError( "fetch called on bamfile without index" ) * * if callback: # <<<<<<<<<<<<<< @@ -7597,7 +7697,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":705 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":705 * * if callback: * if not has_coord: raise ValueError( "callback functionality requires a region/reference" ) # <<<<<<<<<<<<<< @@ -7606,8 +7706,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ __pyx_t_13 = (!__pyx_v_has_coord); if (__pyx_t_13) { - __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __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 = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_29)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_29)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29)); + __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_7, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -7615,7 +7721,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO } __pyx_L10:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":706 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":706 * 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" ) # <<<<<<<<<<<<<< @@ -7631,16 +7737,22 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (!__pyx_t_13); if (__pyx_t_3) { - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __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 = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_30)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_30)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_30)); + __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L11; } __pyx_L11:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":707 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":707 * 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, # <<<<<<<<<<<<<< @@ -7649,23 +7761,23 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ __Pyx_XDECREF(__pyx_r); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":713 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":713 * rend, * callback, * fetch_callback ) # <<<<<<<<<<<<<< * else: * if has_coord: */ - __pyx_t_5 = PyInt_FromLong(bam_fetch(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->x.bam, ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, ((void *)__pyx_v_callback), __pyx_f_9csamtools_fetch_callback)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_7 = PyInt_FromLong(bam_fetch(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->x.bam, ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, ((void *)__pyx_v_callback), __pyx_f_9csamtools_fetch_callback)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L9; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":715 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":715 * fetch_callback ) * else: * if has_coord: # <<<<<<<<<<<<<< @@ -7674,7 +7786,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ if (__pyx_v_has_coord) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":716 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":716 * else: * if has_coord: * return IteratorRowRegion( self, rtid, rstart, rend ) # <<<<<<<<<<<<<< @@ -7682,29 +7794,29 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO * if until_eof: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __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 = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __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 = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); - __pyx_t_5 = 0; __pyx_t_7 = 0; + __pyx_t_5 = 0; __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowRegion)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; @@ -7712,7 +7824,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":718 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":718 * return IteratorRowRegion( self, rtid, rstart, rend ) * else: * if until_eof: # <<<<<<<<<<<<<< @@ -7722,7 +7834,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_until_eof); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":719 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":719 * else: * if until_eof: * return IteratorRowAll( self ) # <<<<<<<<<<<<<< @@ -7731,21 +7843,21 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowAll)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowAll)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; goto __pyx_L13; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":721 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":721 * return IteratorRowAll( self ) * else: * return IteratorRowAllRefs(self) # <<<<<<<<<<<<<< @@ -7753,14 +7865,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO * # check if header is present - otherwise sam_read1 aborts */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowAllRefs)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowAllRefs)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; @@ -7774,7 +7886,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":725 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":725 * # check if header is present - otherwise sam_read1 aborts * # this happens if a bamfile is opened with mode 'r' * if self.samfile.header.n_targets == 0: # <<<<<<<<<<<<<< @@ -7784,44 +7896,56 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO __pyx_t_3 = (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets == 0); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":726 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":726 * # this happens if a bamfile is opened with mode 'r' * if self.samfile.header.n_targets == 0: * raise ValueError( "fetch called for samfile without header") # <<<<<<<<<<<<<< * * if region != None: */ - __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __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 = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_Raise(__pyx_t_6, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_31)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_31)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L14; } __pyx_L14:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":728 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":728 * raise ValueError( "fetch called for samfile without header") * * if region != None: # <<<<<<<<<<<<<< * raise ValueError ("fetch for a region is not available for sam files" ) * if callback: */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_region, Py_None, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = PyObject_RichCompare(__pyx_v_region, Py_None, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":729 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":729 * * if region != None: * raise ValueError ("fetch for a region is not available for sam files" ) # <<<<<<<<<<<<<< * if callback: * raise NotImplementedError( "callback not implemented yet" ) */ - __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __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 = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_32)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_32)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32)); + __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -7829,7 +7953,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO } __pyx_L15:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":730 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":730 * if region != None: * raise ValueError ("fetch for a region is not available for sam files" ) * if callback: # <<<<<<<<<<<<<< @@ -7839,23 +7963,29 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":731 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":731 * raise ValueError ("fetch for a region is not available for sam files" ) * if callback: * raise NotImplementedError( "callback not implemented yet" ) # <<<<<<<<<<<<<< * else: * return IteratorRowAll( self ) */ - __pyx_t_6 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_54), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __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 = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_Raise(__pyx_t_6, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_33)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_33)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_33)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L16; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":733 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":733 * raise NotImplementedError( "callback not implemented yet" ) * else: * return IteratorRowAll( self ) # <<<<<<<<<<<<<< @@ -7863,16 +7993,16 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO * 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 = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowAll)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowAll)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; goto __pyx_L0; } __pyx_L16:; @@ -7897,7 +8027,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":735 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":735 * return IteratorRowAll( self ) * * def mate( self, # <<<<<<<<<<<<<< @@ -7905,9 +8035,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_9fetch(PyObject *__pyx_v_self, PyO * '''return the mate of :class:`AlignedRead` *read*. */ -static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_10mate[] = "return the mate of :class:`AlignedRead` *read*.\n\n Throws a ValueError if read is unpaired or the mate\n is unmapped.\n\n .. note::\n Calling this method will change the file position.\n This might interfere with any iterators that have\n not re-opened the file.\n\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyObject *__pyx_v_read) { +static PyObject *__pyx_pf_9csamtools_7Samfile_mate(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_mate[] = "return the mate of :class:`AlignedRead` *read*.\n\n Throws a ValueError if read is unpaired or the mate\n is unmapped.\n\n .. note::\n Calling this method will change the file position.\n This might interfere with any iterators that have\n not re-opened the file.\n\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile_mate(PyObject *__pyx_v_self, PyObject *__pyx_v_read) { __pyx_t_9csamtools_MateData __pyx_v_mate_data; int __pyx_v_x; struct __pyx_obj_9csamtools_AlignedRead *__pyx_v_dest = 0; @@ -7915,12 +8045,13 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("mate"); __Pyx_TraceCall("mate", __pyx_f[0], 735); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_9csamtools_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":748 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":748 * * ''' * if not read.is_paired: # <<<<<<<<<<<<<< @@ -7934,44 +8065,56 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO __pyx_t_3 = (!__pyx_t_2); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":749 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":749 * ''' * if not read.is_paired: * raise ValueError( "read is unpaired" ) # <<<<<<<<<<<<<< * if read.mate_is_unmapped: * raise ValueError( "mate is unmapped" ) */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_56), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __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 = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_34)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":750 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":750 * if not read.is_paired: * raise ValueError( "read is unpaired" ) * if read.mate_is_unmapped: # <<<<<<<<<<<<<< * raise ValueError( "mate is unmapped" ) * */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_read, __pyx_n_s__mate_is_unmapped); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = PyObject_GetAttr(__pyx_v_read, __pyx_n_s__mate_is_unmapped); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":751 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":751 * raise ValueError( "read is unpaired" ) * if read.mate_is_unmapped: * raise ValueError( "mate is unmapped" ) # <<<<<<<<<<<<<< * * cdef MateData mate_data */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __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 = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_35)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_35)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_35)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -7979,7 +8122,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":755 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":755 * cdef MateData mate_data * * mate_data.name = bam1_qname(read._delegate) # <<<<<<<<<<<<<< @@ -7988,7 +8131,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO */ __pyx_v_mate_data.name = bam1_qname(((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_read)->_delegate); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":756 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":756 * * mate_data.name = bam1_qname(read._delegate) * mate_data.mate = NULL # <<<<<<<<<<<<<< @@ -7997,7 +8140,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO */ __pyx_v_mate_data.mate = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":758 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":758 * mate_data.mate = NULL * # xor flags to get the other mate * cdef int x = BAM_FREAD1 + BAM_FREAD2 # <<<<<<<<<<<<<< @@ -8006,7 +8149,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO */ __pyx_v_x = 192; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":759 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":759 * # xor flags to get the other mate * cdef int x = BAM_FREAD1 + BAM_FREAD2 * mate_data.flag = ( read._delegate.core.flag ^ x) & x # <<<<<<<<<<<<<< @@ -8015,7 +8158,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO */ __pyx_v_mate_data.flag = ((((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_read)->_delegate->core.flag ^ __pyx_v_x) & __pyx_v_x); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":767 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":767 * read._delegate.core.mpos + 1, * &mate_data, * mate_callback ) # <<<<<<<<<<<<<< @@ -8024,7 +8167,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO */ bam_fetch(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->x.bam, ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index, ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_read)->_delegate->core.mtid, ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_read)->_delegate->core.mpos, (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_read)->_delegate->core.mpos + 1), ((void *)(&__pyx_v_mate_data)), __pyx_f_9csamtools_mate_callback); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":769 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":769 * mate_callback ) * * if mate_data.mate == NULL: # <<<<<<<<<<<<<< @@ -8034,36 +8177,42 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO __pyx_t_3 = (__pyx_v_mate_data.mate == NULL); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":770 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":770 * * if mate_data.mate == NULL: * raise ValueError( "mate not found" ) # <<<<<<<<<<<<<< * * cdef AlignedRead dest = AlignedRead.__new__(AlignedRead) */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_60), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __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 = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_36)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_36)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_36)); + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":772 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":772 * raise ValueError( "mate not found" ) * * cdef AlignedRead dest = AlignedRead.__new__(AlignedRead) # <<<<<<<<<<<<<< * dest._delegate = mate_data.mate * return dest */ - __pyx_t_1 = __Pyx_tp_new(((PyObject*)__pyx_ptype_9csamtools_AlignedRead)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9csamtools_AlignedRead)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_dest = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_tp_new(((PyObject*)__pyx_ptype_9csamtools_AlignedRead)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9csamtools_AlignedRead)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_dest = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_t_4); + __pyx_t_4 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":773 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":773 * * cdef AlignedRead dest = AlignedRead.__new__(AlignedRead) * dest._delegate = mate_data.mate # <<<<<<<<<<<<<< @@ -8072,7 +8221,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO */ __pyx_v_dest->_delegate = __pyx_v_mate_data.mate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":774 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":774 * cdef AlignedRead dest = AlignedRead.__new__(AlignedRead) * dest._delegate = mate_data.mate * return dest # <<<<<<<<<<<<<< @@ -8088,6 +8237,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("csamtools.Samfile.mate"); __pyx_r = NULL; __pyx_L0:; @@ -8098,7 +8248,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":776 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":776 * return dest * * def count( self, # <<<<<<<<<<<<<< @@ -8106,9 +8256,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10mate(PyObject *__pyx_v_self, PyO * start = None, */ -static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_11count[] = "*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)*\n \n count reads :term:`region` using 0-based indexing. The region is specified by\n :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can be supplied.\n\n Note that a :term:`TAM` file does not allow random access. If *region* or *reference* are given,\n an exception is raised.\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_7Samfile_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_count[] = "*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)*\n \n count reads :term:`region` using 0-based indexing. The region is specified by\n :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can be supplied.\n\n Note that a :term:`TAM` file does not allow random access. If *region* or *reference* are given,\n an exception is raised.\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reference = 0; PyObject *__pyx_v_start = 0; PyObject *__pyx_v_end = 0; @@ -8140,7 +8290,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[5] = {0,0,0,0,0}; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":777 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":777 * * def count( self, * reference = None, # <<<<<<<<<<<<<< @@ -8149,7 +8299,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py */ values[0] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":778 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":778 * def count( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -8158,7 +8308,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py */ values[1] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":779 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":779 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -8167,7 +8317,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py */ values[2] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":780 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":780 * start = None, * end = None, * region = None, # <<<<<<<<<<<<<< @@ -8175,7 +8325,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py * '''*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)* */ values[3] = ((PyObject *)Py_None); - values[4] = __pyx_k_61; + values[4] = __pyx_k_37; switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); @@ -8222,7 +8372,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py __pyx_v_until_eof = values[4]; } else { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":777 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":777 * * def count( self, * reference = None, # <<<<<<<<<<<<<< @@ -8231,7 +8381,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py */ __pyx_v_reference = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":778 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":778 * def count( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -8240,7 +8390,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py */ __pyx_v_start = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":779 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":779 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -8249,7 +8399,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py */ __pyx_v_end = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":780 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":780 * start = None, * end = None, * region = None, # <<<<<<<<<<<<<< @@ -8257,7 +8407,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py * '''*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)* */ __pyx_v_region = ((PyObject *)Py_None); - __pyx_v_until_eof = __pyx_k_61; + __pyx_v_until_eof = __pyx_k_37; switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: __pyx_v_until_eof = PyTuple_GET_ITEM(__pyx_args, 4); case 4: __pyx_v_region = PyTuple_GET_ITEM(__pyx_args, 3); @@ -8278,7 +8428,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py __pyx_L4_argument_unpacking_done:; __Pyx_INCREF(__pyx_v_region); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":794 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":794 * cdef int rend * * if not self._isOpen(): # <<<<<<<<<<<<<< @@ -8295,55 +8445,61 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":795 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":795 * * 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_62), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __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 = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":797 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":797 * 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(__pyx_v_self, __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __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 = 797; __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 = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_INCREF(__pyx_v_reference); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); __Pyx_INCREF(__pyx_v_start); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_start); __Pyx_GIVEREF(__pyx_v_start); __Pyx_INCREF(__pyx_v_end); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end); __Pyx_GIVEREF(__pyx_v_end); __Pyx_INCREF(__pyx_v_region); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region); + PyTuple_SET_ITEM(__pyx_t_2, 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 = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 4)) { PyObject* tuple = __pyx_t_5; - __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -8352,8 +8508,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_v_region); - __pyx_v_region = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_region = __pyx_t_2; + __pyx_t_2 = 0; __pyx_v_rtid = __pyx_t_8; __pyx_v_rstart = __pyx_t_9; __pyx_v_rend = __pyx_t_10; @@ -8361,12 +8517,12 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_11, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_11, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_11, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __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 = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_11, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __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 = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_11, 2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -8378,14 +8534,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py if (__Pyx_EndUnpack(__pyx_t_11, 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_v_region); - __pyx_v_region = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_region = __pyx_t_2; + __pyx_t_2 = 0; __pyx_v_rtid = __pyx_t_10; __pyx_v_rstart = __pyx_t_9; __pyx_v_rend = __pyx_t_8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":800 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":800 * * cdef int counter * counter = 0; # <<<<<<<<<<<<<< @@ -8394,7 +8550,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py */ __pyx_v_counter = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":802 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":802 * counter = 0; * * if self.isbam: # <<<<<<<<<<<<<< @@ -8403,7 +8559,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py */ if (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isbam) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":803 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":803 * * if self.isbam: * if not until_eof and not self._hasIndex() and not self.isremote: # <<<<<<<<<<<<<< @@ -8433,23 +8589,29 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py } if (__pyx_t_12) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":804 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":804 * 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_63), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __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 = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_Raise(__pyx_t_7, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_28)); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_28)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":806 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":806 * raise ValueError( "fetch called on bamfile without index" ) * * if not region: # <<<<<<<<<<<<<< @@ -8460,15 +8622,21 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py __pyx_t_3 = (!__pyx_t_12); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":807 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":807 * * 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_65), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __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 = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_38)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_38)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38)); + __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_7, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -8476,7 +8644,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":808 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":808 * if not region: * raise ValueError( "counting functionality requires a region/reference" ) * if not self._hasIndex(): raise ValueError( "no index available for fetch" ) # <<<<<<<<<<<<<< @@ -8492,16 +8660,22 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = (!__pyx_t_3); if (__pyx_t_12) { - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_66), NULL); 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 = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_30)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_30)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_30)); + __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":815 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":815 * rend, * &counter, * count_callback ) # <<<<<<<<<<<<<< @@ -8510,7 +8684,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py */ bam_fetch(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->x.bam, ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, ((void *)(&__pyx_v_counter)), __pyx_f_9csamtools_count_callback); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":816 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":816 * &counter, * count_callback ) * return counter # <<<<<<<<<<<<<< @@ -8518,24 +8692,30 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py * 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 = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_7 = PyInt_FromLong(__pyx_v_counter); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; goto __pyx_L0; goto __pyx_L7; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":818 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":818 * return counter * else: * raise ValueError ("count for a region is not available for sam files" ) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __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 = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_39)); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_39)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -8561,7 +8741,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":821 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":821 * * * def pileup( self, # <<<<<<<<<<<<<< @@ -8569,9 +8749,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11count(PyObject *__pyx_v_self, Py * start = None, */ -static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_12pileup[] = "\n perform a :term:`pileup` within a :term:`region`. The region is specified by\n :term:`reference`, *start* and *end* (using 0-based indexing). \n Alternatively, a samtools *region* string can be supplied.\n\n Without *reference* or *region* all reads will be used for the pileup. The reads will be returned\n ordered by :term:`reference` sequence, which will not necessarily be the order within the file.\n\n The method returns an iterator of type :class:`pysam.IteratorColumn` unless\n a *callback is provided. If a *callback* is given, the callback will be executed \n for each column within the :term:`region`. \n\n Note that :term:`SAM` formatted files do not allow random access. \n In these files, if a *region* or *reference* are given an exception is raised.\n \n Optional *kwargs* to the iterator:\n\n stepper\n The stepper controlls how the iterator advances. \n Possible options for the stepper are \n \n ``all``\n use all reads for pileup.\n ``samtools``\n same filter and read processing as in :term:`csamtools` pileup\n\n fastafile\n A :class:`FastaFile` object\n\n mask\n Skip all reads with bits set in mask.\n\n\n .. note::\n\n *all* reads which overlap the region are returned. The first base returned will be the \n first base of the first read *not* necessarily the first base of the region used in the query.\n\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_7Samfile_pileup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_pileup[] = "\n perform a :term:`pileup` within a :term:`region`. The region is specified by\n :term:`reference`, *start* and *end* (using 0-based indexing). \n Alternatively, a samtools *region* string can be supplied.\n\n Without *reference* or *region* all reads will be used for the pileup. The reads will be returned\n ordered by :term:`reference` sequence, which will not necessarily be the order within the file.\n\n The method returns an iterator of type :class:`pysam.IteratorColumn` unless\n a *callback is provided. If a *callback* is given, the callback will be executed \n for each column within the :term:`region`. \n\n Note that :term:`SAM` formatted files do not allow random access. \n In these files, if a *region* or *reference* are given an exception is raised.\n \n Optional *kwargs* to the iterator:\n\n stepper\n The stepper controlls how the iterator advances. \n Possible options for the stepper are \n \n ``all``\n use all reads for pileup.\n ``samtools``\n same filter and read processing as in :term:`csamtools` pileup\n\n fastafile\n A :class:`FastaFile` object\n\n mask\n Skip all reads with bits set in mask.\n\n\n .. note::\n\n *all* reads which overlap the region are returned. The first base returned will be the \n first base of the first read *not* necessarily the first base of the region used in the query.\n\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile_pileup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reference = 0; PyObject *__pyx_v_start = 0; PyObject *__pyx_v_end = 0; @@ -8606,7 +8786,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[5] = {0,0,0,0,0}; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":822 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":822 * * def pileup( self, * reference = None, # <<<<<<<<<<<<<< @@ -8615,7 +8795,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ values[0] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":823 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":823 * def pileup( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -8624,7 +8804,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ values[1] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":824 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":824 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -8633,7 +8813,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ values[2] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":825 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":825 * start = None, * end = None, * region = None, # <<<<<<<<<<<<<< @@ -8642,7 +8822,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ values[3] = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":826 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":826 * end = None, * region = None, * callback = None, # <<<<<<<<<<<<<< @@ -8696,7 +8876,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P __pyx_v_callback = values[4]; } else { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":822 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":822 * * def pileup( self, * reference = None, # <<<<<<<<<<<<<< @@ -8705,7 +8885,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ __pyx_v_reference = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":823 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":823 * def pileup( self, * reference = None, * start = None, # <<<<<<<<<<<<<< @@ -8714,7 +8894,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ __pyx_v_start = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":824 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":824 * reference = None, * start = None, * end = None, # <<<<<<<<<<<<<< @@ -8723,7 +8903,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ __pyx_v_end = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":825 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":825 * start = None, * end = None, * region = None, # <<<<<<<<<<<<<< @@ -8732,7 +8912,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ __pyx_v_region = ((PyObject *)Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":826 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":826 * end = None, * region = None, * callback = None, # <<<<<<<<<<<<<< @@ -8760,7 +8940,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P return NULL; __pyx_L4_argument_unpacking_done:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":870 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":870 * cdef bam_plbuf_t *buf * * if not self._isOpen(): # <<<<<<<<<<<<<< @@ -8777,57 +8957,63 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":871 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":871 * * 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_69), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __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 = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":873 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":873 * 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(__pyx_v_self, __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __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 = 873; __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 = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_INCREF(__pyx_v_reference); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); __Pyx_INCREF(__pyx_v_start); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_start); __Pyx_GIVEREF(__pyx_v_start); __Pyx_INCREF(__pyx_v_end); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end); __Pyx_GIVEREF(__pyx_v_end); __Pyx_INCREF(__pyx_v_region); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region); + PyTuple_SET_ITEM(__pyx_t_2, 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 = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 4)) { PyObject* tuple = __pyx_t_5; - __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -8843,14 +9029,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_12, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_12, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_12, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __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 = 873; __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 = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_12, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __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 = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_12, 2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -8867,7 +9053,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P __pyx_v_rend = __pyx_t_8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":875 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":875 * has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region ) * * if self.isbam: # <<<<<<<<<<<<<< @@ -8876,7 +9062,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ if (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->isbam) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":876 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":876 * * if self.isbam: * if not self._hasIndex(): raise ValueError( "no index available for pileup" ) # <<<<<<<<<<<<<< @@ -8892,16 +9078,22 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P __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_71), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __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 = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_Raise(__pyx_t_7, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_40)); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_40)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":878 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":878 * if not self._hasIndex(): raise ValueError( "no index available for pileup" ) * * if callback: # <<<<<<<<<<<<<< @@ -8911,7 +9103,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_callback); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":879 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":879 * * if callback: * if not has_coord: raise ValueError( "callback functionality requires a region/reference" ) # <<<<<<<<<<<<<< @@ -8920,8 +9112,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ __pyx_t_3 = (!__pyx_v_has_coord); if (__pyx_t_3) { - __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __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 = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_29)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_29)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29)); + __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_7, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -8929,7 +9127,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P } __pyx_L10:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":881 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":881 * if not has_coord: raise ValueError( "callback functionality requires a region/reference" ) * * buf = bam_plbuf_init( pileup_callback, callback ) # <<<<<<<<<<<<<< @@ -8938,7 +9136,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ __pyx_v_buf = bam_plbuf_init(((bam_pileup_f)__pyx_f_9csamtools_pileup_callback), ((void *)__pyx_v_callback)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":884 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":884 * bam_fetch(self.samfile.x.bam, * self.index, rtid, rstart, rend, * buf, pileup_fetch_callback ) # <<<<<<<<<<<<<< @@ -8947,7 +9145,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ bam_fetch(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->x.bam, ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index, __pyx_v_rtid, __pyx_v_rstart, __pyx_v_rend, __pyx_v_buf, __pyx_f_9csamtools_pileup_fetch_callback); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":887 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":887 * * # finalize pileup * bam_plbuf_push( NULL, buf) # <<<<<<<<<<<<<< @@ -8956,7 +9154,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ bam_plbuf_push(NULL, __pyx_v_buf); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":888 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":888 * # finalize pileup * bam_plbuf_push( NULL, buf) * bam_plbuf_destroy(buf) # <<<<<<<<<<<<<< @@ -8968,7 +9166,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":890 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":890 * bam_plbuf_destroy(buf) * else: * if has_coord: # <<<<<<<<<<<<<< @@ -8977,7 +9175,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ if (__pyx_v_has_coord) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":891 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":891 * else: * if has_coord: * return IteratorColumnRegion( self, # <<<<<<<<<<<<<< @@ -8986,14 +9184,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_7)); + __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":892 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":892 * if has_coord: * return IteratorColumnRegion( self, * tid = rtid, # <<<<<<<<<<<<<< @@ -9005,7 +9203,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__tid), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":893 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":893 * return IteratorColumnRegion( self, * tid = rtid, * start = rstart, # <<<<<<<<<<<<<< @@ -9017,7 +9215,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__start), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":894 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":894 * tid = rtid, * start = rstart, * end = rend, # <<<<<<<<<<<<<< @@ -9029,7 +9227,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__end), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":895 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":895 * start = rstart, * end = rend, * **kwargs ) # <<<<<<<<<<<<<< @@ -9037,9 +9235,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P * return IteratorColumnAllRefs(self, **kwargs ) */ if (PyDict_Update(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_v_kwargs)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorColumnRegion)), ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorColumnRegion)), __pyx_t_7, ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; @@ -9048,7 +9246,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":897 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":897 * **kwargs ) * else: * return IteratorColumnAllRefs(self, **kwargs ) # <<<<<<<<<<<<<< @@ -9057,13 +9255,13 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - __pyx_t_5 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorColumnAllRefs)), ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorColumnAllRefs)), __pyx_t_6, ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; @@ -9075,17 +9273,23 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":900 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":900 * * else: * raise NotImplementedError( "pileup of samfiles not implemented yet" ) # <<<<<<<<<<<<<< * * def close( self ): */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __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 = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_41)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_41)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41)); + __pyx_t_6 = PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L7:; @@ -9109,7 +9313,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":902 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":902 * raise NotImplementedError( "pileup of samfiles not implemented yet" ) * * def close( self ): # <<<<<<<<<<<<<< @@ -9117,16 +9321,16 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_12pileup(PyObject *__pyx_v_self, P * closes the :class:`pysam.Samfile`.''' */ -static PyObject *__pyx_pf_9csamtools_7Samfile_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_13close[] = "\n closes the :class:`pysam.Samfile`."; -static PyObject *__pyx_pf_9csamtools_7Samfile_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_7Samfile_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_close[] = "\n closes the :class:`pysam.Samfile`."; +static PyObject *__pyx_pf_9csamtools_7Samfile_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = NULL; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("close"); __Pyx_TraceCall("close", __pyx_f[0], 902); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":905 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":905 * ''' * closes the :class:`pysam.Samfile`.''' * if self.samfile != NULL: # <<<<<<<<<<<<<< @@ -9136,7 +9340,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_13close(PyObject *__pyx_v_self, CY __pyx_t_1 = (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile != NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":906 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":906 * closes the :class:`pysam.Samfile`.''' * if self.samfile != NULL: * samclose( self.samfile ) # <<<<<<<<<<<<<< @@ -9145,7 +9349,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_13close(PyObject *__pyx_v_self, CY */ samclose(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":907 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":907 * if self.samfile != NULL: * samclose( self.samfile ) * bam_index_destroy(self.index); # <<<<<<<<<<<<<< @@ -9154,7 +9358,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_13close(PyObject *__pyx_v_self, CY */ bam_index_destroy(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->index); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":908 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":908 * samclose( self.samfile ) * bam_index_destroy(self.index); * self.samfile = NULL # <<<<<<<<<<<<<< @@ -9173,7 +9377,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_13close(PyObject *__pyx_v_self, CY return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":910 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":910 * self.samfile = NULL * * def __dealloc__( self ): # <<<<<<<<<<<<<< @@ -9181,8 +9385,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_13close(PyObject *__pyx_v_self, CY * # note: no doc string */ -static void __pyx_pf_9csamtools_7Samfile_14__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_9csamtools_7Samfile_14__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_9csamtools_7Samfile___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_9csamtools_7Samfile___dealloc__(PyObject *__pyx_v_self) { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; @@ -9190,7 +9394,7 @@ static void __pyx_pf_9csamtools_7Samfile_14__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannySetupContext("__dealloc__"); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 910); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":914 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":914 * # note: no doc string * # note: __del__ is not called. * self.close() # <<<<<<<<<<<<<< @@ -9204,7 +9408,7 @@ static void __pyx_pf_9csamtools_7Samfile_14__dealloc__(PyObject *__pyx_v_self) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":915 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":915 * # note: __del__ is not called. * self.close() * bam_destroy1(self.b) # <<<<<<<<<<<<<< @@ -9213,7 +9417,7 @@ static void __pyx_pf_9csamtools_7Samfile_14__dealloc__(PyObject *__pyx_v_self) { */ bam_destroy1(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->b); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":916 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":916 * self.close() * bam_destroy1(self.b) * if self._filename != NULL: free( self._filename ) # <<<<<<<<<<<<<< @@ -9237,7 +9441,7 @@ static void __pyx_pf_9csamtools_7Samfile_14__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyFinishContext(); } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":918 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":918 * if self._filename != NULL: free( self._filename ) * * def write( self, AlignedRead read ): # <<<<<<<<<<<<<< @@ -9245,9 +9449,9 @@ static void __pyx_pf_9csamtools_7Samfile_14__dealloc__(PyObject *__pyx_v_self) { * write a single :class:`pysam.AlignedRead` to disk. */ -static PyObject *__pyx_pf_9csamtools_7Samfile_15write(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_15write[] = "\n write a single :class:`pysam.AlignedRead` to disk.\n\n returns the number of bytes written.\n "; -static PyObject *__pyx_pf_9csamtools_7Samfile_15write(PyObject *__pyx_v_self, PyObject *__pyx_v_read) { +static PyObject *__pyx_pf_9csamtools_7Samfile_write(PyObject *__pyx_v_self, PyObject *__pyx_v_read); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile_write[] = "\n write a single :class:`pysam.AlignedRead` to disk.\n\n returns the number of bytes written.\n "; +static PyObject *__pyx_pf_9csamtools_7Samfile_write(PyObject *__pyx_v_self, PyObject *__pyx_v_read) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -9258,7 +9462,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_15write(PyObject *__pyx_v_self, Py __Pyx_TraceCall("write", __pyx_f[0], 918); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read), __pyx_ptype_9csamtools_AlignedRead, 1, "read", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":924 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":924 * returns the number of bytes written. * ''' * if not self._isOpen(): # <<<<<<<<<<<<<< @@ -9275,23 +9479,29 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_15write(PyObject *__pyx_v_self, Py __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":925 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":925 * ''' * if not self._isOpen(): * raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< * * return samwrite( self.samfile, read._delegate ) */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __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 = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":927 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":927 * raise ValueError( "I/O operation on closed file" ) * * return samwrite( self.samfile, read._delegate ) # <<<<<<<<<<<<<< @@ -9299,10 +9509,10 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_15write(PyObject *__pyx_v_self, Py * def __enter__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyInt_FromLong(samwrite(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile, ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_read)->_delegate)); 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; + __pyx_t_1 = PyInt_FromLong(samwrite(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile, ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_read)->_delegate)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __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); @@ -9319,7 +9529,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_15write(PyObject *__pyx_v_self, Py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":929 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":929 * return samwrite( self.samfile, read._delegate ) * * def __enter__(self): # <<<<<<<<<<<<<< @@ -9327,14 +9537,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_15write(PyObject *__pyx_v_self, Py * */ -static PyObject *__pyx_pf_9csamtools_7Samfile_16__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7Samfile_16__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_7Samfile___enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7Samfile___enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__enter__"); __Pyx_TraceCall("__enter__", __pyx_f[0], 929); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":930 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":930 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -9354,7 +9564,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_16__enter__(PyObject *__pyx_v_self return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":932 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":932 * return self * * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<< @@ -9362,8 +9572,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_16__enter__(PyObject *__pyx_v_self * return False */ -static PyObject *__pyx_pf_9csamtools_7Samfile_17__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7Samfile_17__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_7Samfile___exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7Samfile___exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_exc_type = 0; PyObject *__pyx_v_exc_value = 0; PyObject *__pyx_v_traceback = 0; @@ -9424,7 +9634,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_17__exit__(PyObject *__pyx_v_self, return NULL; __pyx_L4_argument_unpacking_done:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":933 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":933 * * def __exit__(self, exc_type, exc_value, traceback): * self.close() # <<<<<<<<<<<<<< @@ -9438,7 +9648,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_17__exit__(PyObject *__pyx_v_self, __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":934 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":934 * def __exit__(self, exc_type, exc_value, traceback): * self.close() * return False # <<<<<<<<<<<<<< @@ -9466,7 +9676,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_17__exit__(PyObject *__pyx_v_self, return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":943 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":943 * property filename: * '''number of :term:`filename` associated with this object.''' * def __get__(self): # <<<<<<<<<<<<<< @@ -9474,8 +9684,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_17__exit__(PyObject *__pyx_v_self, * return self._filename */ -static PyObject *__pyx_pf_9csamtools_7Samfile_8filename_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7Samfile_8filename_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7Samfile_8filename___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7Samfile_8filename___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -9485,7 +9695,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8filename_0__get__(PyObject *__pyx __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 943); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":944 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":944 * '''number of :term:`filename` associated with this object.''' * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< @@ -9501,16 +9711,22 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8filename_0__get__(PyObject *__pyx __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_76), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __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 = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":945 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":945 * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) * return self._filename # <<<<<<<<<<<<<< @@ -9518,10 +9734,10 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8filename_0__get__(PyObject *__pyx * property nreferences: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_r = ((PyObject *)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __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); @@ -9538,7 +9754,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8filename_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":949 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":949 * property nreferences: * '''number of :term:`reference` sequences in the file.''' * def __get__(self): # <<<<<<<<<<<<<< @@ -9546,8 +9762,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_8filename_0__get__(PyObject *__pyx * return self.samfile.header.n_targets */ -static PyObject *__pyx_pf_9csamtools_7Samfile_11nreferences_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7Samfile_11nreferences_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7Samfile_11nreferences___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7Samfile_11nreferences___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -9557,7 +9773,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11nreferences_0__get__(PyObject *_ __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 949); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":950 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":950 * '''number of :term:`reference` sequences in the file.''' * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< @@ -9573,16 +9789,22 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11nreferences_0__get__(PyObject *_ __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_77), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __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 = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":951 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":951 * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) * return self.samfile.header.n_targets # <<<<<<<<<<<<<< @@ -9590,10 +9812,10 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11nreferences_0__get__(PyObject *_ * property references: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_to_py_int32_t(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyInt_to_py_int32_t(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __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); @@ -9610,7 +9832,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11nreferences_0__get__(PyObject *_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":955 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":955 * property references: * """tuple with the names of :term:`reference` sequences.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -9618,8 +9840,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_11nreferences_0__get__(PyObject *_ * t = [] */ -static PyObject *__pyx_pf_9csamtools_7Samfile_10references_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7Samfile_10references_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7Samfile_10references___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7Samfile_10references___get__(PyObject *__pyx_v_self) { PyObject *__pyx_v_t; long __pyx_v_x; PyObject *__pyx_r = NULL; @@ -9632,9 +9854,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10references_0__get__(PyObject *__ __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 955); - __pyx_v_t = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_t = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":956 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":956 * """tuple with the names of :term:`reference` sequences.""" * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< @@ -9650,29 +9872,35 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10references_0__get__(PyObject *__ __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_78), NULL); 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 = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":957 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":957 * 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_name[x] ) */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_v_t)); - __pyx_v_t = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_t = __pyx_t_1; + __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":958 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":958 * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) * t = [] * for x from 0 <= x < self.samfile.header.n_targets: # <<<<<<<<<<<<<< @@ -9682,7 +9910,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10references_0__get__(PyObject *__ __pyx_t_5 = ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets; for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":959 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":959 * t = [] * for x from 0 <= x < self.samfile.header.n_targets: * t.append( self.samfile.header.target_name[x] ) # <<<<<<<<<<<<<< @@ -9692,13 +9920,13 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10references_0__get__(PyObject *__ if (unlikely(__pyx_v_t == Py_None)) { PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = PyBytes_FromString((((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->target_name[__pyx_v_x])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_t_6 = PyList_Append(__pyx_v_t, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __pyx_t_1 = PyBytes_FromString((((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->target_name[__pyx_v_x])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_6 = PyList_Append(((PyObject *)__pyx_v_t), ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":960 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":960 * for x from 0 <= x < self.samfile.header.n_targets: * t.append( self.samfile.header.target_name[x] ) * return tuple(t) # <<<<<<<<<<<<<< @@ -9709,10 +9937,10 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10references_0__get__(PyObject *__ if (unlikely(__pyx_v_t == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __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 = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_r = ((PyObject *)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_1 = ((PyObject *)PyList_AsTuple(__pyx_v_t)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __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); @@ -9730,7 +9958,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10references_0__get__(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":966 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":966 * :attr:`pysam.Samfile.references` * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -9738,8 +9966,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_10references_0__get__(PyObject *__ * t = [] */ -static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths___get__(PyObject *__pyx_v_self) { PyObject *__pyx_v_t; long __pyx_v_x; PyObject *__pyx_r = NULL; @@ -9752,9 +9980,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths_0__get__(PyObject *__pyx_ __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 966); - __pyx_v_t = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_t = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":967 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":967 * """ * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< @@ -9770,29 +9998,35 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths_0__get__(PyObject *__pyx_ __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_79), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __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 = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":968 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":968 * 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 = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_v_t)); - __pyx_v_t = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_t = __pyx_t_1; + __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":969 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":969 * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) * t = [] * for x from 0 <= x < self.samfile.header.n_targets: # <<<<<<<<<<<<<< @@ -9802,7 +10036,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths_0__get__(PyObject *__pyx_ __pyx_t_5 = ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->n_targets; for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_5; __pyx_v_x++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":970 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":970 * t = [] * for x from 0 <= x < self.samfile.header.n_targets: * t.append( self.samfile.header.target_len[x] ) # <<<<<<<<<<<<<< @@ -9812,13 +10046,13 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths_0__get__(PyObject *__pyx_ if (unlikely(__pyx_v_t == Py_None)) { PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t((((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->target_len[__pyx_v_x])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __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 = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t((((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->target_len[__pyx_v_x])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PyList_Append(((PyObject *)__pyx_v_t), __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":971 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":971 * for x from 0 <= x < self.samfile.header.n_targets: * t.append( self.samfile.header.target_len[x] ) * return tuple(t) # <<<<<<<<<<<<<< @@ -9829,10 +10063,10 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths_0__get__(PyObject *__pyx_ if (unlikely(__pyx_v_t == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __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 = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_r = ((PyObject *)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_1 = ((PyObject *)PyList_AsTuple(__pyx_v_t)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __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); @@ -9850,7 +10084,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths_0__get__(PyObject *__pyx_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":975 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":975 * property text: * '''full contents of the :term:`sam file` header as a string.''' * def __get__(self): # <<<<<<<<<<<<<< @@ -9858,8 +10092,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_7lengths_0__get__(PyObject *__pyx_ * return PyString_FromStringAndSize(self.samfile.header.text, self.samfile.header.l_text) */ -static PyObject *__pyx_pf_9csamtools_7Samfile_4text_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7Samfile_4text_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7Samfile_4text___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7Samfile_4text___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -9869,7 +10103,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4text_0__get__(PyObject *__pyx_v_s __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 975); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":976 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":976 * '''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" ) # <<<<<<<<<<<<<< @@ -9885,16 +10119,22 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4text_0__get__(PyObject *__pyx_v_s __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_80), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __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 = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); 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_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":977 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":977 * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) * return PyString_FromStringAndSize(self.samfile.header.text, self.samfile.header.l_text) # <<<<<<<<<<<<<< @@ -9902,10 +10142,10 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4text_0__get__(PyObject *__pyx_v_s * property header: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyString_FromStringAndSize(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->text, ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->l_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_1 = PyString_FromStringAndSize(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->text, ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->l_text); 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_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -9922,7 +10162,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4text_0__get__(PyObject *__pyx_v_s return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":983 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":983 * a two-level dictionary. * ''' * def __get__(self): # <<<<<<<<<<<<<< @@ -9930,8 +10170,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_4text_0__get__(PyObject *__pyx_v_s * */ -static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7Samfile_6header___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7Samfile_6header___get__(PyObject *__pyx_v_self) { PyObject *__pyx_v_result; PyObject *__pyx_v_t; PyObject *__pyx_v_line; @@ -9955,17 +10195,17 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 983); - __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_result = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_v_t = Py_None; __Pyx_INCREF(Py_None); __pyx_v_line = Py_None; __Pyx_INCREF(Py_None); __pyx_v_fields = Py_None; __Pyx_INCREF(Py_None); __pyx_v_record = Py_None; __Pyx_INCREF(Py_None); - __pyx_v_x = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_x = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_v_field = Py_None; __Pyx_INCREF(Py_None); __pyx_v_key = Py_None; __Pyx_INCREF(Py_None); __pyx_v_value = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":984 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":984 * ''' * def __get__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< @@ -9981,29 +10221,35 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v __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_81), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __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 = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":986 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":986 * 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 = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_DECREF(((PyObject *)__pyx_v_result)); - __pyx_v_result = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":988 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":988 * result = {} * * if self.samfile.header.text != NULL: # <<<<<<<<<<<<<< @@ -10013,71 +10259,77 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v __pyx_t_4 = (((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile->header->text != NULL); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":990 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":990 * 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(__pyx_v_self, __pyx_n_s__text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__text); 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_DECREF(__pyx_v_t); - __pyx_v_t = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_v_t = __pyx_t_1; + __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":991 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":991 * # 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 = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_82), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_t, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_2)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2)); + __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); + if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); } 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 = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __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_6); __pyx_t_6 = 0; for (;;) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; } else if (likely(PyTuple_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; } else { - __pyx_t_1 = PyIter_Next(__pyx_t_2); - if (!__pyx_t_1) { + __pyx_t_6 = PyIter_Next(__pyx_t_2); + if (!__pyx_t_6) { if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_v_line); - __pyx_v_line = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_line = __pyx_t_6; + __pyx_t_6 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":992 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":992 * 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 = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __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) { goto __pyx_L7_continue; @@ -10085,50 +10337,62 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":993 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":993 * 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] */ - #ifndef CYTHON_WITHOUT_ASSERTIONS - __pyx_t_6 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_84), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #ifndef PYREX_WITHOUT_ASSERTIONS + __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __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 = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_42)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_42)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42)); + __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) { - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_85), __pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __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_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_43), __pyx_v_line); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_7)); + 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 = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":994 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":994 * 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 = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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 = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_1)); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1)); + __pyx_t_1 = PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_v_fields); __pyx_v_fields = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":995 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":995 * assert line.startswith("@"), "header line without '@': '%s'" % line * fields = line[1:].split("\t") * record = fields[0] # <<<<<<<<<<<<<< @@ -10141,98 +10405,99 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v __pyx_v_record = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":996 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":996 * 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 + #ifndef PYREX_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 = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = ((PySequence_Contains(__pyx_t_1, __pyx_v_record))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __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 = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_record); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_record); __Pyx_GIVEREF(__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_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_87), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_6)); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_44), __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_7)); + __Pyx_DECREF(__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 = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":999 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":999 * * # treat comments * if record == "CO": # <<<<<<<<<<<<<< * if record not in result: result[record] = [] * result[record].append( "\t".join( fields[1:] ) ) */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_record, ((PyObject *)__pyx_n_s__CO), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = PyObject_RichCompare(__pyx_v_record, ((PyObject *)__pyx_n_s__CO), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1000 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1000 * # treat comments * if record == "CO": * if record not in result: result[record] = [] # <<<<<<<<<<<<<< * result[record].append( "\t".join( fields[1:] ) ) * continue */ - if (unlikely(__pyx_v_result == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } else { + __pyx_t_3 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_record))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_record))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__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 = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; goto __pyx_L11; } __pyx_L11:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1001 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1001 * if record == "CO": * if record not in result: result[record] = [] * result[record].append( "\t".join( fields[1:] ) ) # <<<<<<<<<<<<<< * continue * */ - __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); 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_7 = __Pyx_PySequence_GetSlice(__pyx_v_fields, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PySequence_GetSlice(__pyx_v_fields, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __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 = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); - PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - __pyx_t_7 = 0; - __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 = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1002 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1002 * if record not in result: result[record] = [] * result[record].append( "\t".join( fields[1:] ) ) * continue # <<<<<<<<<<<<<< @@ -10244,7 +10509,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v } __pyx_L10:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1005 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1005 * * # the following is clumsy as generators do not work? * x = {} # <<<<<<<<<<<<<< @@ -10257,31 +10522,31 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v __pyx_v_x = __pyx_t_8; __pyx_t_8 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1006 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1006 * # the following is clumsy as generators do not work? * x = {} * for field in fields[1:]: # <<<<<<<<<<<<<< * key, value = field.split(":",1) * if key not in VALID_HEADER_FIELDS[record]: */ - __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 = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PySequence_GetSlice(__pyx_v_fields, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) { - __pyx_t_9 = 0; __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); + __pyx_t_9 = 0; __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6); } else { - __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { - if (likely(PyList_CheckExact(__pyx_t_7))) { - if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break; - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; - } else if (likely(PyTuple_CheckExact(__pyx_t_7))) { - if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break; - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; + } else if (likely(PyTuple_CheckExact(__pyx_t_6))) { + if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; } else { - __pyx_t_8 = PyIter_Next(__pyx_t_7); + __pyx_t_8 = PyIter_Next(__pyx_t_6); if (!__pyx_t_8) { if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; @@ -10292,7 +10557,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v __pyx_v_field = __pyx_t_8; __pyx_t_8 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1007 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1007 * x = {} * for field in fields[1:]: * key, value = field.split(":",1) # <<<<<<<<<<<<<< @@ -10301,173 +10566,183 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v */ __pyx_t_8 = PyObject_GetAttr(__pyx_v_field, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __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 = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_45)); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_45)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_45)); + __Pyx_INCREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + __pyx_t_1 = PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PyTuple_CheckExact(__pyx_t_6) && likely(PyTuple_GET_SIZE(__pyx_t_6) == 2)) { - PyObject* tuple = __pyx_t_6; - __pyx_t_8 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_8); - __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) { + PyObject* tuple = __pyx_t_1; + __pyx_t_7 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_7); + __pyx_t_8 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_v_key); - __pyx_v_key = __pyx_t_8; - __pyx_t_8 = 0; + __pyx_v_key = __pyx_t_7; + __pyx_t_7 = 0; __Pyx_DECREF(__pyx_v_value); - __pyx_v_value = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_value = __pyx_t_8; + __pyx_t_8 = 0; } else { - __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_UnpackItem(__pyx_t_10, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_10, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_UnpackItem(__pyx_t_10, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_10, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); if (__Pyx_EndUnpack(__pyx_t_10, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_v_key); - __pyx_v_key = __pyx_t_8; - __pyx_t_8 = 0; + __pyx_v_key = __pyx_t_7; + __pyx_t_7 = 0; __Pyx_DECREF(__pyx_v_value); - __pyx_v_value = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_value = __pyx_t_8; + __pyx_t_8 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1008 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1008 * for field in fields[1:]: * key, value = field.split(":",1) * if key not in VALID_HEADER_FIELDS[record]: # <<<<<<<<<<<<<< * raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) ) * x[key] = VALID_HEADER_FIELDS[record][key](value) */ - __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyObject_GetItem(__pyx_t_6, __pyx_v_record); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __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 = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_3 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_1, __pyx_v_key))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_8, __pyx_v_key))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1009 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1009 * key, value = field.split(":",1) * if key not in VALID_HEADER_FIELDS[record]: * raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) ) # <<<<<<<<<<<<<< * x[key] = VALID_HEADER_FIELDS[record][key](value) * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_key); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); __Pyx_INCREF(__pyx_v_record); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_record); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_record); __Pyx_GIVEREF(__pyx_v_record); - __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_90), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - __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 = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - PyTuple_SET_ITEM(__pyx_t_1, 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_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __Pyx_Raise(__pyx_t_6, 0, 0); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __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 = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __pyx_t_1 = 0; + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L14; } __pyx_L14:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1010 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1010 * if key not in VALID_HEADER_FIELDS[record]: * raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) ) * x[key] = VALID_HEADER_FIELDS[record][key](value) # <<<<<<<<<<<<<< * * if VALID_HEADER_TYPES[record] == dict: */ - __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyObject_GetItem(__pyx_t_6, __pyx_v_record); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __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 = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_v_record); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __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(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_1 = PyObject_GetItem(__pyx_t_8, __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __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 = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - if (PyDict_SetItem(((PyObject *)__pyx_v_x), __pyx_v_key, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PyDict_SetItem(((PyObject *)__pyx_v_x), __pyx_v_key, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1012 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1012 * x[key] = VALID_HEADER_FIELDS[record][key](value) * * if VALID_HEADER_TYPES[record] == dict: # <<<<<<<<<<<<<< * if record in result: * raise ValueError( "multiple '%s' lines are not permitted" % record ) */ - __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_record); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __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_RichCompare(__pyx_t_8, ((PyObject *)((PyObject*)(&PyDict_Type))), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyObject_GetItem(__pyx_t_6, __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)((PyObject*)&PyDict_Type)), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1013 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1013 * * if VALID_HEADER_TYPES[record] == dict: * if record in result: # <<<<<<<<<<<<<< * raise ValueError( "multiple '%s' lines are not permitted" % record ) * result[record] = x */ - if (unlikely(__pyx_v_result == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } else { + __pyx_t_3 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_record))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_record))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1014 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1014 * 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_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_91), __pyx_v_record); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_7)); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); - PyTuple_SET_ITEM(__pyx_t_8, 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_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_47), __pyx_v_record); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; - __Pyx_Raise(__pyx_t_7, 0, 0); + 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, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L16; } __pyx_L16:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1015 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1015 * if record in result: * raise ValueError( "multiple '%s' lines are not permitted" % record ) * result[record] = x # <<<<<<<<<<<<<< @@ -10478,58 +10753,59 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v goto __pyx_L15; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1016 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1016 * 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_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_record); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __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_RichCompare(__pyx_t_8, ((PyObject *)((PyObject*)(&PyList_Type))), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyObject_GetItem(__pyx_t_6, __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)((PyObject*)&PyList_Type)), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1017 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1017 * result[record] = x * elif VALID_HEADER_TYPES[record] == list: * if record not in result: result[record] = [] # <<<<<<<<<<<<<< * result[record].append( x ) * */ - if (unlikely(__pyx_v_result == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } else { + __pyx_t_3 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_record))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_record))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __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 = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__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 = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_record, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; goto __pyx_L17; } __pyx_L17:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1018 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1018 * elif VALID_HEADER_TYPES[record] == list: * if record not in result: result[record] = [] * result[record].append( x ) # <<<<<<<<<<<<<< * * return result */ - __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_record); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_6, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L15; } __pyx_L15:; @@ -10540,7 +10816,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1020 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1020 * result[record].append( x ) * * return result # <<<<<<<<<<<<<< @@ -10579,7 +10855,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1022 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1022 * return result * * def _buildLine( self, fields, record ): # <<<<<<<<<<<<<< @@ -10587,9 +10863,9 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_6header_0__get__(PyObject *__pyx_v * */ -static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_18_buildLine[] = "build a header line from *fields* dictionary for *record*"; -static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_7Samfile__buildLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile__buildLine[] = "build a header line from *fields* dictionary for *record*"; +static PyObject *__pyx_pf_9csamtools_7Samfile__buildLine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_record = 0; PyObject *__pyx_v_line; @@ -10645,17 +10921,17 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_v_line = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_line = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_v_key = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1026 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1026 * * # TODO: add checking for field and sort order * line = ["@%s" % record ] # <<<<<<<<<<<<<< * if record == "CO": * line.append( fields ) */ - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_92), __pyx_v_record); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), __pyx_v_record); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __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 = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); @@ -10666,7 +10942,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel __pyx_v_line = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1027 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1027 * # TODO: add checking for field and sort order * line = ["@%s" % record ] * if record == "CO": # <<<<<<<<<<<<<< @@ -10679,7 +10955,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1028 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1028 * line = ["@%s" % record ] * if record == "CO": * line.append( fields ) # <<<<<<<<<<<<<< @@ -10689,12 +10965,12 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel if (unlikely(__pyx_v_line == Py_None)) { PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __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 = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_Append(((PyObject *)__pyx_v_line), __pyx_v_fields); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1030 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1030 * line.append( fields ) * else: * for key in VALID_HEADER_ORDER[record]: # <<<<<<<<<<<<<< @@ -10732,7 +11008,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel __pyx_v_key = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1031 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1031 * else: * for key in VALID_HEADER_ORDER[record]: * if key in fields: # <<<<<<<<<<<<<< @@ -10742,7 +11018,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel __pyx_t_3 = ((PySequence_Contains(__pyx_v_fields, __pyx_v_key))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1032 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1032 * for key in VALID_HEADER_ORDER[record]: * if key in fields: * line.append( "%s:%s" % (key, str(fields[key]))) # <<<<<<<<<<<<<< @@ -10755,25 +11031,25 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel __pyx_t_1 = PyObject_GetItem(__pyx_v_fields, __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_93), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __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_4 = PyList_Append(__pyx_v_line, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = PyList_Append(((PyObject *)__pyx_v_line), ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L9; } @@ -10783,7 +11059,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1033 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1033 * if key in fields: * line.append( "%s:%s" % (key, str(fields[key]))) * return "\t".join( line ) # <<<<<<<<<<<<<< @@ -10794,14 +11070,14 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __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 = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_line)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_line)); __Pyx_GIVEREF(((PyObject *)__pyx_v_line)); - __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; @@ -10823,7 +11099,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_18_buildLine(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1035 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1035 * return "\t".join( line ) * * cdef bam_header_t * _buildHeader( self, new_header ): # <<<<<<<<<<<<<< @@ -10860,17 +11136,17 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("_buildHeader"); __Pyx_TraceCall("_buildHeader", __pyx_f[0], 1035); - __pyx_v_lines = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_lines = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_v_record = Py_None; __Pyx_INCREF(Py_None); __pyx_v_ttype = Py_None; __Pyx_INCREF(Py_None); __pyx_v_data = Py_None; __Pyx_INCREF(Py_None); __pyx_v_fields = Py_None; __Pyx_INCREF(Py_None); __pyx_v_text = Py_None; __Pyx_INCREF(Py_None); - __pyx_v_seqs = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_seqs = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_v_seqname = Py_None; __Pyx_INCREF(Py_None); __pyx_v_seqlen = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1041 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1041 * ''' * * lines = [] # <<<<<<<<<<<<<< @@ -10883,7 +11159,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_v_lines = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1048 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1048 * cdef bam_header_t * dest * * dest = bam_header_init() # <<<<<<<<<<<<<< @@ -10892,7 +11168,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ */ __pyx_v_dest = bam_header_init(); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1050 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1050 * dest = bam_header_init() * * for record in VALID_HEADERS: # <<<<<<<<<<<<<< @@ -10927,7 +11203,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_v_record = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1051 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1051 * * for record in VALID_HEADERS: * if record in new_header: # <<<<<<<<<<<<<< @@ -10937,7 +11213,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_4 = ((PySequence_Contains(__pyx_v_new_header, __pyx_v_record))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1052 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1052 * for record in VALID_HEADERS: * if record in new_header: * ttype = VALID_HEADER_TYPES[record] # <<<<<<<<<<<<<< @@ -10953,7 +11229,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_v_ttype = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1053 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1053 * if record in new_header: * ttype = VALID_HEADER_TYPES[record] * data = new_header[record] # <<<<<<<<<<<<<< @@ -10966,7 +11242,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_v_data = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1054 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1054 * ttype = VALID_HEADER_TYPES[record] * data = new_header[record] * if type( data ) != type( ttype() ): # <<<<<<<<<<<<<< @@ -10982,7 +11258,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1055 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1055 * data = new_header[record] * if type( data ) != type( ttype() ): * raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) ) # <<<<<<<<<<<<<< @@ -10992,7 +11268,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __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 = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_record); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_record); __Pyx_GIVEREF(__pyx_v_record); @@ -11003,17 +11279,17 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_5, 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_94), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_50), __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__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 = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __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 = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -11021,7 +11297,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1056 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1056 * if type( data ) != type( ttype() ): * raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) ) * if type( data ) == types.DictType: # <<<<<<<<<<<<<< @@ -11040,7 +11316,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1057 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1057 * raise ValueError( "invalid type for record %s: %s, expected %s" % (record, type(data), type(ttype()) ) ) * if type( data ) == types.DictType: * lines.append( self._buildLine( data, record ) ) # <<<<<<<<<<<<<< @@ -11053,24 +11329,24 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __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 = 1057; __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 = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); __Pyx_INCREF(__pyx_v_record); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_record); __Pyx_GIVEREF(__pyx_v_record); - __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_7 = PyList_Append(__pyx_v_lines, __pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = PyList_Append(((PyObject *)__pyx_v_lines), __pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1059 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1059 * lines.append( self._buildLine( data, record ) ) * else: * for fields in new_header[record]: # <<<<<<<<<<<<<< @@ -11105,7 +11381,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_v_fields = __pyx_t_6; __pyx_t_6 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1060 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1060 * else: * for fields in new_header[record]: * lines.append( self._buildLine( fields, record ) ) # <<<<<<<<<<<<<< @@ -11118,18 +11394,18 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __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 = 1060; __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 = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __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_INCREF(__pyx_v_record); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_record); __Pyx_GIVEREF(__pyx_v_record); - __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __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_1)); __pyx_t_1 = 0; - __pyx_t_7 = PyList_Append(__pyx_v_lines, __pyx_t_9); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = PyList_Append(((PyObject *)__pyx_v_lines), __pyx_t_9); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -11141,7 +11417,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1062 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1062 * lines.append( self._buildLine( fields, record ) ) * * text = "\n".join(lines) + "\n" # <<<<<<<<<<<<<< @@ -11151,14 +11427,14 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_lines)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_lines)); __Pyx_GIVEREF(((PyObject *)__pyx_v_lines)); - __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Add(__pyx_t_9, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -11166,7 +11442,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_v_text = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1063 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1063 * * text = "\n".join(lines) + "\n" * if dest.text != NULL: free( dest.text ) # <<<<<<<<<<<<<< @@ -11180,7 +11456,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ } __pyx_L10:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1064 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1064 * text = "\n".join(lines) + "\n" * if dest.text != NULL: free( dest.text ) * dest.text = calloc( len(text), sizeof(char)) # <<<<<<<<<<<<<< @@ -11190,7 +11466,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_2 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dest->text = ((char *)calloc(__pyx_t_2, (sizeof(char)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1065 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1065 * if dest.text != NULL: free( dest.text ) * dest.text = calloc( len(text), sizeof(char)) * dest.l_text = len(text) # <<<<<<<<<<<<<< @@ -11200,7 +11476,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_2 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_dest->l_text = __pyx_t_2; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1066 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1066 * dest.text = calloc( len(text), sizeof(char)) * dest.l_text = len(text) * strncpy( dest.text, text, dest.l_text ) # <<<<<<<<<<<<<< @@ -11210,7 +11486,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_10 = PyBytes_AsString(__pyx_v_text); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} strncpy(__pyx_v_dest->text, __pyx_t_10, __pyx_v_dest->l_text); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1069 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1069 * * # collect targets * if "SQ" in new_header: # <<<<<<<<<<<<<< @@ -11220,7 +11496,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_4 = ((PySequence_Contains(__pyx_v_new_header, ((PyObject *)__pyx_n_s__SQ)))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1070 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1070 * # collect targets * if "SQ" in new_header: * seqs = [] # <<<<<<<<<<<<<< @@ -11233,7 +11509,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_v_seqs = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1071 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1071 * if "SQ" in new_header: * seqs = [] * for fields in new_header["SQ"]: # <<<<<<<<<<<<<< @@ -11268,7 +11544,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_v_fields = __pyx_t_5; __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1072 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1072 * seqs = [] * for fields in new_header["SQ"]: * try: # <<<<<<<<<<<<<< @@ -11283,7 +11559,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __Pyx_XGOTREF(__pyx_save_exc_tb); /*try:*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1073 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1073 * for fields in new_header["SQ"]: * try: * seqs.append( (fields["SN"], fields["LN"] ) ) # <<<<<<<<<<<<<< @@ -11298,15 +11574,15 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_3 = PyObject_GetItem(__pyx_v_fields, ((PyObject *)__pyx_n_s__LN)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L14_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L14_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_3 = 0; - __pyx_t_7 = PyList_Append(__pyx_v_seqs, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L14_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_7 = PyList_Append(((PyObject *)__pyx_v_seqs), __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L14_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0; __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0; @@ -11318,7 +11594,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1074 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1074 * try: * seqs.append( (fields["SN"], fields["LN"] ) ) * except KeyError: # <<<<<<<<<<<<<< @@ -11333,7 +11609,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1075 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1075 * seqs.append( (fields["SN"], fields["LN"] ) ) * except KeyError: * raise KeyError( "incomplete sequence information in '%s'" % str(fields)) # <<<<<<<<<<<<<< @@ -11341,24 +11617,24 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ * dest.n_targets = len(seqs) */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_fields); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_fields); __Pyx_GIVEREF(__pyx_v_fields); - __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} + __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_95), __pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_51), __pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_11)); + __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} + __pyx_t_6 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_6, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} @@ -11383,7 +11659,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1077 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1077 * raise KeyError( "incomplete sequence information in '%s'" % str(fields)) * * dest.n_targets = len(seqs) # <<<<<<<<<<<<<< @@ -11396,7 +11672,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_seqs)); __pyx_v_dest->n_targets = __pyx_t_2; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1078 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1078 * * dest.n_targets = len(seqs) * dest.target_name = calloc( dest.n_targets, sizeof(char*) ) # <<<<<<<<<<<<<< @@ -11405,7 +11681,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ */ __pyx_v_dest->target_name = ((char **)calloc(__pyx_v_dest->n_targets, (sizeof(char *)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1079 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1079 * dest.n_targets = len(seqs) * dest.target_name = calloc( dest.n_targets, sizeof(char*) ) * dest.target_len = calloc( dest.n_targets, sizeof(uint32_t) ) # <<<<<<<<<<<<<< @@ -11414,7 +11690,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ */ __pyx_v_dest->target_len = ((uint32_t *)calloc(__pyx_v_dest->n_targets, (sizeof(uint32_t)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1081 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1081 * dest.target_len = calloc( dest.n_targets, sizeof(uint32_t) ) * * for x from 0 <= x < dest.n_targets: # <<<<<<<<<<<<<< @@ -11424,7 +11700,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_12 = __pyx_v_dest->n_targets; for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_12; __pyx_v_x++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1082 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1082 * * for x from 0 <= x < dest.n_targets: * seqname, seqlen = seqs[x] # <<<<<<<<<<<<<< @@ -11462,7 +11738,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_3 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1083 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1083 * for x from 0 <= x < dest.n_targets: * seqname, seqlen = seqs[x] * dest.target_name[x] = calloc( len( seqname ) + 1, sizeof(char) ) # <<<<<<<<<<<<<< @@ -11472,7 +11748,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_2 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_dest->target_name[__pyx_v_x]) = ((char *)calloc((__pyx_t_2 + 1), (sizeof(char)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1084 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1084 * seqname, seqlen = seqs[x] * dest.target_name[x] = calloc( len( seqname ) + 1, sizeof(char) ) * strncpy( dest.target_name[x], seqname, len(seqname) + 1 ) # <<<<<<<<<<<<<< @@ -11483,7 +11759,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ __pyx_t_2 = PyObject_Length(__pyx_v_seqname); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} strncpy((__pyx_v_dest->target_name[__pyx_v_x]), __pyx_t_10, (__pyx_t_2 + 1)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1085 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1085 * dest.target_name[x] = calloc( len( seqname ) + 1, sizeof(char) ) * strncpy( dest.target_name[x], seqname, len(seqname) + 1 ) * dest.target_len[x] = seqlen # <<<<<<<<<<<<<< @@ -11497,7 +11773,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ } __pyx_L11:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1087 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1087 * dest.target_len[x] = seqlen * * return dest # <<<<<<<<<<<<<< @@ -11533,7 +11809,7 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1097 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1097 * ## Possible solutions: deprecate or open new file handle * ############################################################### * def __iter__(self): # <<<<<<<<<<<<<< @@ -11541,8 +11817,8 @@ static bam_header_t *__pyx_f_9csamtools_7Samfile__buildHeader(struct __pyx_obj_ * return self */ -static PyObject *__pyx_pf_9csamtools_7Samfile_19__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7Samfile_19__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7Samfile___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7Samfile___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -11552,7 +11828,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_19__iter__(PyObject *__pyx_v_self) __Pyx_RefNannySetupContext("__iter__"); __Pyx_TraceCall("__iter__", __pyx_f[0], 1097); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1098 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1098 * ############################################################### * def __iter__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< @@ -11568,16 +11844,22 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_19__iter__(PyObject *__pyx_v_self) __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 = 1098; __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 = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1099 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1099 * def __iter__(self): * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) * return self # <<<<<<<<<<<<<< @@ -11603,7 +11885,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_19__iter__(PyObject *__pyx_v_self) return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1101 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1101 * return self * * cdef bam1_t * getCurrent( self ): # <<<<<<<<<<<<<< @@ -11617,7 +11899,7 @@ static bam1_t *__pyx_f_9csamtools_7Samfile_getCurrent(struct __pyx_obj_9csamtoo __Pyx_RefNannySetupContext("getCurrent"); __Pyx_TraceCall("getCurrent", __pyx_f[0], 1101); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1102 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1102 * * cdef bam1_t * getCurrent( self ): * return self.b # <<<<<<<<<<<<<< @@ -11634,7 +11916,7 @@ static bam1_t *__pyx_f_9csamtools_7Samfile_getCurrent(struct __pyx_obj_9csamtoo return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1104 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1104 * return self.b * * cdef int cnext(self): # <<<<<<<<<<<<<< @@ -11648,7 +11930,7 @@ static int __pyx_f_9csamtools_7Samfile_cnext(struct __pyx_obj_9csamtools_Samfil __Pyx_RefNannySetupContext("cnext"); __Pyx_TraceCall("cnext", __pyx_f[0], 1104); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1109 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1109 * ''' * cdef int ret * return samread(self.samfile, self.b) # <<<<<<<<<<<<<< @@ -11665,7 +11947,7 @@ static int __pyx_f_9csamtools_7Samfile_cnext(struct __pyx_obj_9csamtools_Samfil return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1111 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1111 * return samread(self.samfile, self.b) * * def __next__(self): # <<<<<<<<<<<<<< @@ -11673,10 +11955,10 @@ static int __pyx_f_9csamtools_7Samfile_cnext(struct __pyx_obj_9csamtools_Samfil * python version of next(). */ -static PyObject *__pyx_pf_9csamtools_7Samfile_20__next__(PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_7Samfile_20__next__[] = "\n python version of next().\n "; -struct wrapperbase __pyx_wrapperbase_9csamtools_7Samfile_20__next__; -static PyObject *__pyx_pf_9csamtools_7Samfile_20__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7Samfile___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_7Samfile___next__[] = "\n python version of next().\n "; +struct wrapperbase __pyx_wrapperbase_9csamtools_7Samfile___next__; +static PyObject *__pyx_pf_9csamtools_7Samfile___next__(PyObject *__pyx_v_self) { int __pyx_v_ret; PyObject *__pyx_r = NULL; int __pyx_t_1; @@ -11685,7 +11967,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_20__next__(PyObject *__pyx_v_self) __Pyx_RefNannySetupContext("__next__"); __Pyx_TraceCall("__next__", __pyx_f[0], 1111); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1116 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1116 * """ * cdef int ret * ret = samread(self.samfile, self.b) # <<<<<<<<<<<<<< @@ -11694,7 +11976,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_20__next__(PyObject *__pyx_v_self) */ __pyx_v_ret = samread(((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->samfile, ((struct __pyx_obj_9csamtools_Samfile *)__pyx_v_self)->b); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1117 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1117 * cdef int ret * ret = samread(self.samfile, self.b) * if (ret > 0): # <<<<<<<<<<<<<< @@ -11704,7 +11986,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_20__next__(PyObject *__pyx_v_self) __pyx_t_1 = (__pyx_v_ret > 0); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1118 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1118 * ret = samread(self.samfile, self.b) * if (ret > 0): * return makeAlignedRead( self.b ) # <<<<<<<<<<<<<< @@ -11721,7 +12003,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_20__next__(PyObject *__pyx_v_self) } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1120 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1120 * return makeAlignedRead( self.b ) * else: * raise StopIteration # <<<<<<<<<<<<<< @@ -11746,7 +12028,7 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_20__next__(PyObject *__pyx_v_self) return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1170 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1170 * cdef samfile_t * fp * * def __cinit__(self, Samfile samfile, int tid, int beg, int end, int reopen = True ): # <<<<<<<<<<<<<< @@ -11754,8 +12036,8 @@ static PyObject *__pyx_pf_9csamtools_7Samfile_20__next__(PyObject *__pyx_v_self) * if not samfile._isOpen(): */ -static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_17IteratorRowRegion___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_17IteratorRowRegion___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_Samfile *__pyx_v_samfile = 0; int __pyx_v_tid; int __pyx_v_beg; @@ -11852,7 +12134,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ __pyx_v_store = Py_None; __Pyx_INCREF(Py_None); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1172 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1172 * def __cinit__(self, Samfile samfile, int tid, int beg, int end, int reopen = True ): * * if not samfile._isOpen(): # <<<<<<<<<<<<<< @@ -11869,48 +12151,60 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1173 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1173 * * 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_97), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __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 = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1175 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1175 * 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 = 1175; __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 = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_samfile), __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __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 = 1175; __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 = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __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 = 1175; __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) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1176 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1176 * * 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_99), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __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 = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_52)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_52)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -11918,7 +12212,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1180 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1180 * # makes sure that samfile stays alive as long as the * # iterator is alive * self.samfile = samfile # <<<<<<<<<<<<<< @@ -11931,7 +12225,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ __Pyx_DECREF(((PyObject *)((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)->samfile)); ((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)->samfile = __pyx_v_samfile; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1182 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1182 * self.samfile = samfile * * if samfile.isbam: mode = "rb" # <<<<<<<<<<<<<< @@ -11946,7 +12240,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1183 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1183 * * if samfile.isbam: mode = "rb" * else: mode = "r" # <<<<<<<<<<<<<< @@ -11959,7 +12253,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1187 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1187 * # reopen the file - note that this makes the iterator * # slow and causes pileup to slow down significantly. * if reopen: # <<<<<<<<<<<<<< @@ -11968,7 +12262,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ */ if (__pyx_v_reopen) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1188 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1188 * # slow and causes pileup to slow down significantly. * if reopen: * store = StderrStore() # <<<<<<<<<<<<<< @@ -11984,7 +12278,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ __pyx_v_store = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1189 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1189 * if reopen: * store = StderrStore() * self.fp = samopen( samfile._filename, mode, NULL ) # <<<<<<<<<<<<<< @@ -11994,7 +12288,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ __pyx_t_5 = PyBytes_AsString(__pyx_v_mode); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)->fp = samopen(__pyx_v_samfile->_filename, __pyx_t_5, NULL); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1190 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1190 * store = StderrStore() * self.fp = samopen( samfile._filename, mode, NULL ) * store.release() # <<<<<<<<<<<<<< @@ -12008,14 +12302,14 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1191 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1191 * self.fp = samopen( samfile._filename, mode, NULL ) * store.release() * assert self.fp != NULL # <<<<<<<<<<<<<< * * self.retval = 0 */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS if (unlikely(!(((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)->fp != NULL))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -12025,7 +12319,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1193 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1193 * assert self.fp != NULL * * self.retval = 0 # <<<<<<<<<<<<<< @@ -12034,7 +12328,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ */ ((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)->retval = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1195 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1195 * self.retval = 0 * * self.iter = bam_iter_query(self.samfile.index, # <<<<<<<<<<<<<< @@ -12043,7 +12337,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ */ ((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)->iter = bam_iter_query(((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)->samfile->index, __pyx_v_tid, __pyx_v_beg, __pyx_v_end); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1199 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1199 * beg, * end) * self.b = bam_init1() # <<<<<<<<<<<<<< @@ -12067,7 +12361,7 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1201 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1201 * self.b = bam_init1() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -12075,14 +12369,14 @@ static int __pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(PyObject *__pyx_v_ * */ -static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_1__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_1__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__iter__"); __Pyx_TraceCall("__iter__", __pyx_f[0], 1201); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1202 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1202 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -12102,7 +12396,7 @@ static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_1__iter__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1204 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1204 * return self * * cdef bam1_t * getCurrent( self ): # <<<<<<<<<<<<<< @@ -12116,7 +12410,7 @@ static bam1_t *__pyx_f_9csamtools_17IteratorRowRegion_getCurrent(struct __pyx_o __Pyx_RefNannySetupContext("getCurrent"); __Pyx_TraceCall("getCurrent", __pyx_f[0], 1204); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1205 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1205 * * cdef bam1_t * getCurrent( self ): * return self.b # <<<<<<<<<<<<<< @@ -12133,7 +12427,7 @@ static bam1_t *__pyx_f_9csamtools_17IteratorRowRegion_getCurrent(struct __pyx_o return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1207 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1207 * return self.b * * cdef int cnext(self): # <<<<<<<<<<<<<< @@ -12147,7 +12441,7 @@ static int __pyx_f_9csamtools_17IteratorRowRegion_cnext(struct __pyx_obj_9csamt __Pyx_RefNannySetupContext("cnext"); __Pyx_TraceCall("cnext", __pyx_f[0], 1207); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1209 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1209 * cdef int cnext(self): * '''cversion of iterator. Used by IteratorColumn''' * self.retval = bam_iter_read( self.fp.x.bam, # <<<<<<<<<<<<<< @@ -12162,7 +12456,7 @@ static int __pyx_f_9csamtools_17IteratorRowRegion_cnext(struct __pyx_obj_9csamt return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1213 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1213 * self.b) * * def __next__(self): # <<<<<<<<<<<<<< @@ -12170,10 +12464,10 @@ static int __pyx_f_9csamtools_17IteratorRowRegion_cnext(struct __pyx_obj_9csamt * """ */ -static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_2__next__(PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_17IteratorRowRegion_2__next__[] = "python version of next().\n "; -struct wrapperbase __pyx_wrapperbase_9csamtools_17IteratorRowRegion_2__next__; -static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_2__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_17IteratorRowRegion___next__[] = "python version of next().\n "; +struct wrapperbase __pyx_wrapperbase_9csamtools_17IteratorRowRegion___next__; +static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion___next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -12181,7 +12475,7 @@ static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_2__next__(PyObject *__p __Pyx_RefNannySetupContext("__next__"); __Pyx_TraceCall("__next__", __pyx_f[0], 1213); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1216 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1216 * """python version of next(). * """ * self.cnext() # <<<<<<<<<<<<<< @@ -12190,7 +12484,7 @@ static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_2__next__(PyObject *__p */ ((struct __pyx_vtabstruct_9csamtools_IteratorRowRegion *)((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)->__pyx_vtab)->cnext(((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1217 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1217 * """ * self.cnext() * if self.retval < 0: raise StopIteration # <<<<<<<<<<<<<< @@ -12205,7 +12499,7 @@ static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_2__next__(PyObject *__p } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1218 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1218 * self.cnext() * if self.retval < 0: raise StopIteration * return makeAlignedRead( self.b ) # <<<<<<<<<<<<<< @@ -12232,7 +12526,7 @@ static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_2__next__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1220 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1220 * return makeAlignedRead( self.b ) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -12240,13 +12534,13 @@ static PyObject *__pyx_pf_9csamtools_17IteratorRowRegion_2__next__(PyObject *__p * samclose( self.fp ) */ -static void __pyx_pf_9csamtools_17IteratorRowRegion_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_9csamtools_17IteratorRowRegion_3__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_9csamtools_17IteratorRowRegion___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_9csamtools_17IteratorRowRegion___dealloc__(PyObject *__pyx_v_self) { __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__dealloc__"); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1220); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1221 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1221 * * def __dealloc__(self): * bam_destroy1(self.b) # <<<<<<<<<<<<<< @@ -12255,7 +12549,7 @@ static void __pyx_pf_9csamtools_17IteratorRowRegion_3__dealloc__(PyObject *__pyx */ bam_destroy1(((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_v_self)->b); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1222 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1222 * def __dealloc__(self): * bam_destroy1(self.b) * samclose( self.fp ) # <<<<<<<<<<<<<< @@ -12268,7 +12562,7 @@ static void __pyx_pf_9csamtools_17IteratorRowRegion_3__dealloc__(PyObject *__pyx __Pyx_RefNannyFinishContext(); } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1237 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1237 * cdef samfile_t * fp * * def __cinit__(self, Samfile samfile, int reopen = True ): # <<<<<<<<<<<<<< @@ -12276,8 +12570,8 @@ static void __pyx_pf_9csamtools_17IteratorRowRegion_3__dealloc__(PyObject *__pyx * if not samfile._isOpen(): */ -static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_14IteratorRowAll___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_14IteratorRowAll___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_Samfile *__pyx_v_samfile = 0; int __pyx_v_reopen; PyObject *__pyx_v_mode; @@ -12342,7 +12636,7 @@ static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_sel __pyx_v_store = Py_None; __Pyx_INCREF(Py_None); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1239 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1239 * def __cinit__(self, Samfile samfile, int reopen = True ): * * if not samfile._isOpen(): # <<<<<<<<<<<<<< @@ -12359,23 +12653,29 @@ static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_sel __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1240 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1240 * * if not samfile._isOpen(): * raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< * * if samfile.isbam: mode = "rb" */ - __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 = 1240; __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 = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1242 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1242 * raise ValueError( "I/O operation on closed file" ) * * if samfile.isbam: mode = "rb" # <<<<<<<<<<<<<< @@ -12390,7 +12690,7 @@ static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_sel } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1243 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1243 * * if samfile.isbam: mode = "rb" * else: mode = "r" # <<<<<<<<<<<<<< @@ -12403,7 +12703,7 @@ static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_sel } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1246 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1246 * * # reopen the file to avoid iterator conflict * if reopen: # <<<<<<<<<<<<<< @@ -12412,23 +12712,23 @@ static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_sel */ if (__pyx_v_reopen) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1247 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1247 * # 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 = 1247; __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 = 1247; __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 = 1247; __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_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __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_store); - __pyx_v_store = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_v_store = __pyx_t_2; + __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1248 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1248 * if reopen: * store = StderrStore() * self.fp = samopen( samfile._filename, mode, NULL ) # <<<<<<<<<<<<<< @@ -12438,28 +12738,28 @@ static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_sel __pyx_t_5 = PyBytes_AsString(__pyx_v_mode); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_obj_9csamtools_IteratorRowAll *)__pyx_v_self)->fp = samopen(__pyx_v_samfile->_filename, __pyx_t_5, NULL); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1249 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1249 * store = StderrStore() * self.fp = samopen( samfile._filename, mode, NULL ) * store.release() # <<<<<<<<<<<<<< * assert self.fp != NULL * */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __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 = 1249; __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 = 1249; __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 = 1249; __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; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1250 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1250 * self.fp = samopen( samfile._filename, mode, NULL ) * store.release() * assert self.fp != NULL # <<<<<<<<<<<<<< * * # allocate memory for alignment */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS if (unlikely(!(((struct __pyx_obj_9csamtools_IteratorRowAll *)__pyx_v_self)->fp != NULL))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -12469,7 +12769,7 @@ static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_sel } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1253 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1253 * * # allocate memory for alignment * self.b = calloc(1, sizeof(bam1_t)) # <<<<<<<<<<<<<< @@ -12493,7 +12793,7 @@ static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1255 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1255 * self.b = calloc(1, sizeof(bam1_t)) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -12501,14 +12801,14 @@ static int __pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(PyObject *__pyx_v_sel * */ -static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_1__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_1__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_14IteratorRowAll___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_14IteratorRowAll___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__iter__"); __Pyx_TraceCall("__iter__", __pyx_f[0], 1255); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1256 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1256 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -12528,7 +12828,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_1__iter__(PyObject *__pyx_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1258 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1258 * return self * * cdef bam1_t * getCurrent( self ): # <<<<<<<<<<<<<< @@ -12542,7 +12842,7 @@ static bam1_t *__pyx_f_9csamtools_14IteratorRowAll_getCurrent(struct __pyx_obj_ __Pyx_RefNannySetupContext("getCurrent"); __Pyx_TraceCall("getCurrent", __pyx_f[0], 1258); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1259 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1259 * * cdef bam1_t * getCurrent( self ): * return self.b # <<<<<<<<<<<<<< @@ -12559,7 +12859,7 @@ static bam1_t *__pyx_f_9csamtools_14IteratorRowAll_getCurrent(struct __pyx_obj_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1261 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1261 * return self.b * * cdef int cnext(self): # <<<<<<<<<<<<<< @@ -12573,7 +12873,7 @@ static int __pyx_f_9csamtools_14IteratorRowAll_cnext(struct __pyx_obj_9csamtool __Pyx_RefNannySetupContext("cnext"); __Pyx_TraceCall("cnext", __pyx_f[0], 1261); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1264 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1264 * '''cversion of iterator. Used by IteratorColumn''' * cdef int ret * return samread(self.fp, self.b) # <<<<<<<<<<<<<< @@ -12590,7 +12890,7 @@ static int __pyx_f_9csamtools_14IteratorRowAll_cnext(struct __pyx_obj_9csamtool return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1266 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1266 * return samread(self.fp, self.b) * * def __next__(self): # <<<<<<<<<<<<<< @@ -12598,10 +12898,10 @@ static int __pyx_f_9csamtools_14IteratorRowAll_cnext(struct __pyx_obj_9csamtool * */ -static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_2__next__(PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_14IteratorRowAll_2__next__[] = "python version of next().\n\n pyrex uses this non-standard name instead of next()\n "; -struct wrapperbase __pyx_wrapperbase_9csamtools_14IteratorRowAll_2__next__; -static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_2__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_14IteratorRowAll___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_14IteratorRowAll___next__[] = "python version of next().\n\n pyrex uses this non-standard name instead of next()\n "; +struct wrapperbase __pyx_wrapperbase_9csamtools_14IteratorRowAll___next__; +static PyObject *__pyx_pf_9csamtools_14IteratorRowAll___next__(PyObject *__pyx_v_self) { int __pyx_v_ret; PyObject *__pyx_r = NULL; int __pyx_t_1; @@ -12610,7 +12910,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_2__next__(PyObject *__pyx_ __Pyx_RefNannySetupContext("__next__"); __Pyx_TraceCall("__next__", __pyx_f[0], 1266); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1272 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1272 * """ * cdef int ret * ret = samread(self.fp, self.b) # <<<<<<<<<<<<<< @@ -12619,7 +12919,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_2__next__(PyObject *__pyx_ */ __pyx_v_ret = samread(((struct __pyx_obj_9csamtools_IteratorRowAll *)__pyx_v_self)->fp, ((struct __pyx_obj_9csamtools_IteratorRowAll *)__pyx_v_self)->b); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1273 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1273 * cdef int ret * ret = samread(self.fp, self.b) * if (ret > 0): # <<<<<<<<<<<<<< @@ -12629,7 +12929,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_2__next__(PyObject *__pyx_ __pyx_t_1 = (__pyx_v_ret > 0); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1274 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1274 * ret = samread(self.fp, self.b) * if (ret > 0): * return makeAlignedRead( self.b ) # <<<<<<<<<<<<<< @@ -12646,7 +12946,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_2__next__(PyObject *__pyx_ } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1276 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1276 * return makeAlignedRead( self.b ) * else: * raise StopIteration # <<<<<<<<<<<<<< @@ -12671,7 +12971,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_2__next__(PyObject *__pyx_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1278 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1278 * raise StopIteration * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -12679,13 +12979,13 @@ static PyObject *__pyx_pf_9csamtools_14IteratorRowAll_2__next__(PyObject *__pyx_ * samclose( self.fp ) */ -static void __pyx_pf_9csamtools_14IteratorRowAll_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_9csamtools_14IteratorRowAll_3__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_9csamtools_14IteratorRowAll___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_9csamtools_14IteratorRowAll___dealloc__(PyObject *__pyx_v_self) { __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__dealloc__"); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1278); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1279 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1279 * * def __dealloc__(self): * bam_destroy1(self.b) # <<<<<<<<<<<<<< @@ -12694,7 +12994,7 @@ static void __pyx_pf_9csamtools_14IteratorRowAll_3__dealloc__(PyObject *__pyx_v_ */ bam_destroy1(((struct __pyx_obj_9csamtools_IteratorRowAll *)__pyx_v_self)->b); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1280 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1280 * def __dealloc__(self): * bam_destroy1(self.b) * samclose( self.fp ) # <<<<<<<<<<<<<< @@ -12707,7 +13007,7 @@ static void __pyx_pf_9csamtools_14IteratorRowAll_3__dealloc__(PyObject *__pyx_v_ __Pyx_RefNannyFinishContext(); } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1290 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1290 * cdef IteratorRowRegion rowiter * * def __cinit__(self, Samfile samfile): # <<<<<<<<<<<<<< @@ -12715,8 +13015,8 @@ static void __pyx_pf_9csamtools_14IteratorRowAll_3__dealloc__(PyObject *__pyx_v_ * if not samfile._hasIndex(): raise ValueError("no index available for fetch") */ -static int __pyx_pf_9csamtools_18IteratorRowAllRefs_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_18IteratorRowAllRefs_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_18IteratorRowAllRefs___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_18IteratorRowAllRefs___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_Samfile *__pyx_v_samfile = 0; int __pyx_r; PyObject *__pyx_t_1 = NULL; @@ -12760,14 +13060,14 @@ static int __pyx_pf_9csamtools_18IteratorRowAllRefs_0__cinit__(PyObject *__pyx_v __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1291 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1291 * * def __cinit__(self, Samfile samfile): * assert samfile._isOpen() # <<<<<<<<<<<<<< * if not samfile._hasIndex(): raise ValueError("no index available for fetch") * self.samfile = samfile */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_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 = 1291; __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 = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -12781,7 +13081,7 @@ static int __pyx_pf_9csamtools_18IteratorRowAllRefs_0__cinit__(PyObject *__pyx_v } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1292 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1292 * def __cinit__(self, Samfile samfile): * assert samfile._isOpen() * if not samfile._hasIndex(): raise ValueError("no index available for fetch") # <<<<<<<<<<<<<< @@ -12797,16 +13097,22 @@ static int __pyx_pf_9csamtools_18IteratorRowAllRefs_0__cinit__(PyObject *__pyx_v __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_101), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __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 = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_30)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_30)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_30)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1293 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1293 * assert samfile._isOpen() * if not samfile._hasIndex(): raise ValueError("no index available for fetch") * self.samfile = samfile # <<<<<<<<<<<<<< @@ -12819,7 +13125,7 @@ static int __pyx_pf_9csamtools_18IteratorRowAllRefs_0__cinit__(PyObject *__pyx_v __Pyx_DECREF(((PyObject *)((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->samfile)); ((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->samfile = __pyx_v_samfile; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1294 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1294 * if not samfile._hasIndex(): raise ValueError("no index available for fetch") * self.samfile = samfile * self.tid = -1 # <<<<<<<<<<<<<< @@ -12841,7 +13147,7 @@ static int __pyx_pf_9csamtools_18IteratorRowAllRefs_0__cinit__(PyObject *__pyx_v return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1296 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1296 * self.tid = -1 * * def nextiter(self): # <<<<<<<<<<<<<< @@ -12849,8 +13155,8 @@ static int __pyx_pf_9csamtools_18IteratorRowAllRefs_0__cinit__(PyObject *__pyx_v * */ -static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_1nextiter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_1nextiter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_nextiter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_nextiter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -12858,7 +13164,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_1nextiter(PyObject *__ __Pyx_RefNannySetupContext("nextiter"); __Pyx_TraceCall("nextiter", __pyx_f[0], 1296); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1297 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1297 * * def nextiter(self): * self.rowiter = IteratorRowRegion(self.samfile, self.tid, 0, 1<<29) # <<<<<<<<<<<<<< @@ -12868,7 +13174,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_1nextiter(PyObject *__ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->tid); 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_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->samfile)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->samfile)); __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->samfile)); @@ -12881,9 +13187,9 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_1nextiter(PyObject *__ 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_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowRegion)), __pyx_t_2, NULL); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->rowiter); __Pyx_DECREF(((PyObject *)((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->rowiter)); @@ -12904,7 +13210,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_1nextiter(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1299 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1299 * self.rowiter = IteratorRowRegion(self.samfile, self.tid, 0, 1<<29) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -12912,14 +13218,14 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_1nextiter(PyObject *__ * */ -static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_2__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_2__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__iter__"); __Pyx_TraceCall("__iter__", __pyx_f[0], 1299); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1300 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1300 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -12939,7 +13245,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_2__iter__(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1302 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1302 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -12947,10 +13253,10 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_2__iter__(PyObject *__ * */ -static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_18IteratorRowAllRefs_3__next__[] = "python version of next().\n\n pyrex uses this non-standard name instead of next()\n "; -struct wrapperbase __pyx_wrapperbase_9csamtools_18IteratorRowAllRefs_3__next__; -static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_18IteratorRowAllRefs___next__[] = "python version of next().\n\n pyrex uses this non-standard name instead of next()\n "; +struct wrapperbase __pyx_wrapperbase_9csamtools_18IteratorRowAllRefs___next__; +static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs___next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -12961,7 +13267,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ __Pyx_RefNannySetupContext("__next__"); __Pyx_TraceCall("__next__", __pyx_f[0], 1302); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1308 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1308 * """ * # Create an initial iterator * if self.tid==-1: # <<<<<<<<<<<<<< @@ -12971,7 +13277,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->tid == -1); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1309 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1309 * # Create an initial iterator * if self.tid==-1: * if not self.samfile.nreferences: # <<<<<<<<<<<<<< @@ -12985,7 +13291,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ __pyx_t_3 = (!__pyx_t_1); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1310 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1310 * if self.tid==-1: * if not self.samfile.nreferences: * raise StopIteration # <<<<<<<<<<<<<< @@ -12998,7 +13304,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1311 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1311 * if not self.samfile.nreferences: * raise StopIteration * self.tid = 0 # <<<<<<<<<<<<<< @@ -13007,7 +13313,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ */ ((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->tid = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1312 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1312 * raise StopIteration * self.tid = 0 * self.nextiter() # <<<<<<<<<<<<<< @@ -13024,7 +13330,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1314 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1314 * self.nextiter() * * while 1: # <<<<<<<<<<<<<< @@ -13034,7 +13340,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ while (1) { if (!1) break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1315 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1315 * * while 1: * self.rowiter.cnext() # <<<<<<<<<<<<<< @@ -13043,7 +13349,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ */ ((struct __pyx_vtabstruct_9csamtools_IteratorRowRegion *)((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->rowiter->__pyx_vtab)->cnext(((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->rowiter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1318 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1318 * * # If current iterator is not exhausted, return aligned read * if self.rowiter.retval>0: # <<<<<<<<<<<<<< @@ -13053,7 +13359,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ __pyx_t_3 = (((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->rowiter->retval > 0); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1319 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1319 * # If current iterator is not exhausted, return aligned read * if self.rowiter.retval>0: * return makeAlignedRead(self.rowiter.b) # <<<<<<<<<<<<<< @@ -13070,16 +13376,16 @@ static PyObject *__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__(PyObject *__ } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1321 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1321 * return makeAlignedRead(self.rowiter.b) * * self.tid += 1 # <<<<<<<<<<<<<< * * # Otherwise, proceed to next reference or stop */ - ((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->tid = (((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->tid + 1); + ((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)__pyx_v_self)->tid += 1; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1324 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1324 * * # Otherwise, proceed to next reference or stop * if self.tiddata # <<<<<<<<<<<<<< @@ -13167,7 +13473,7 @@ static int __pyx_f_9csamtools___advance_all(void *__pyx_v_data, bam1_t *__pyx_v */ __pyx_v_d = ((__pyx_t_9csamtools___iterdata *)__pyx_v_data); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1345 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1345 * cdef __iterdata * d * d = <__iterdata*>data * return bam_iter_read( d.samfile.x.bam, d.iter, b ) # <<<<<<<<<<<<<< @@ -13184,7 +13490,7 @@ static int __pyx_f_9csamtools___advance_all(void *__pyx_v_data, bam1_t *__pyx_v return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1347 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1347 * return bam_iter_read( d.samfile.x.bam, d.iter, b ) * * cdef int __advance_snpcalls( void * data, bam1_t * b ): # <<<<<<<<<<<<<< @@ -13212,7 +13518,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ __Pyx_RefNannySetupContext("__advance_snpcalls"); __Pyx_TraceCall("__advance_snpcalls", __pyx_f[0], 1347); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1352 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1352 * ''' * cdef __iterdata * d * d = <__iterdata*>data # <<<<<<<<<<<<<< @@ -13221,7 +13527,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __pyx_v_d = ((__pyx_t_9csamtools___iterdata *)__pyx_v_data); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1354 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1354 * d = <__iterdata*>data * * cdef int ret = bam_iter_read( d.samfile.x.bam, d.iter, b ) # <<<<<<<<<<<<<< @@ -13230,7 +13536,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __pyx_v_ret = bam_iter_read(__pyx_v_d->samfile->x.bam, __pyx_v_d->iter, __pyx_v_b); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1355 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1355 * * cdef int ret = bam_iter_read( d.samfile.x.bam, d.iter, b ) * cdef int skip = 0 # <<<<<<<<<<<<<< @@ -13239,7 +13545,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __pyx_v_skip = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1357 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1357 * cdef int skip = 0 * cdef int q * cdef int is_cns = 1 # <<<<<<<<<<<<<< @@ -13248,7 +13554,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __pyx_v_is_cns = 1; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1358 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1358 * cdef int q * cdef int is_cns = 1 * cdef int is_nobaq = 0 # <<<<<<<<<<<<<< @@ -13257,7 +13563,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __pyx_v_is_nobaq = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1359 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1359 * cdef int is_cns = 1 * cdef int is_nobaq = 0 * cdef int capQ_thres = 0 # <<<<<<<<<<<<<< @@ -13266,7 +13572,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __pyx_v_capQ_thres = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1362 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1362 * * # reload sequence * if d.fastafile != NULL and b.core.tid != d.tid: # <<<<<<<<<<<<<< @@ -13282,7 +13588,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ } if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1363 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1363 * # reload sequence * if d.fastafile != NULL and b.core.tid != d.tid: * if d.seq != NULL: free(d.seq) # <<<<<<<<<<<<<< @@ -13296,7 +13602,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ } __pyx_L4:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1364 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1364 * if d.fastafile != NULL and b.core.tid != d.tid: * if d.seq != NULL: free(d.seq) * d.tid = b.core.tid; # <<<<<<<<<<<<<< @@ -13305,7 +13611,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __pyx_v_d->tid = __pyx_v_b->core.tid; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1365 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1365 * if d.seq != NULL: free(d.seq) * d.tid = b.core.tid; * d.seq = faidx_fetch_seq(d.fastafile, # <<<<<<<<<<<<<< @@ -13314,7 +13620,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __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_9csamtools_max_pos, (&__pyx_v_d->seq_len)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1370 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1370 * &d.seq_len) * * if d.seq == NULL: # <<<<<<<<<<<<<< @@ -13324,7 +13630,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ __pyx_t_3 = (__pyx_v_d->seq == NULL); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1372 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1372 * if d.seq == NULL: * raise ValueError( "reference sequence for '%s' (tid=%i) not found" % \ * (d.samfile.header.target_name[d.tid], # <<<<<<<<<<<<<< @@ -13334,7 +13640,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ __pyx_t_4 = PyBytes_FromString((__pyx_v_d->samfile->header->target_name[__pyx_v_d->tid])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1373 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1373 * raise ValueError( "reference sequence for '%s' (tid=%i) not found" % \ * (d.samfile.header.target_name[d.tid], * d.tid)) # <<<<<<<<<<<<<< @@ -13344,24 +13650,24 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ __pyx_t_5 = PyInt_FromLong(__pyx_v_d->tid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4)); __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_102), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_53), __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__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 = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 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_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -13372,7 +13678,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ } __pyx_L3:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1376 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1376 * * * while ret >= 0: # <<<<<<<<<<<<<< @@ -13383,7 +13689,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ __pyx_t_3 = (__pyx_v_ret >= 0); if (!__pyx_t_3) break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1378 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1378 * while ret >= 0: * * skip = 0 # <<<<<<<<<<<<<< @@ -13392,7 +13698,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __pyx_v_skip = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1381 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1381 * * # realign read - changes base qualities * if d.seq != NULL and is_cns and not is_nobaq: bam_prob_realn( b, d.seq ) # <<<<<<<<<<<<<< @@ -13417,7 +13723,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1383 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1383 * 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: # <<<<<<<<<<<<<< @@ -13433,7 +13739,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ } if (__pyx_t_2) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1384 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1384 * * if d.seq != NULL and capQ_thres > 10: * q = bam_cap_mapQ(b, d.seq, capQ_thres) # <<<<<<<<<<<<<< @@ -13442,7 +13748,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ */ __pyx_v_q = bam_cap_mapQ(__pyx_v_b, __pyx_v_d->seq, __pyx_v_capQ_thres); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1385 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1385 * if d.seq != NULL and capQ_thres > 10: * q = bam_cap_mapQ(b, d.seq, capQ_thres) * if q < 0: skip = 1 # <<<<<<<<<<<<<< @@ -13455,7 +13761,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ goto __pyx_L10; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1386 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1386 * q = bam_cap_mapQ(b, d.seq, capQ_thres) * if q < 0: skip = 1 * elif b.core.qual > q: b.core.qual = q # <<<<<<<<<<<<<< @@ -13472,7 +13778,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1387 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1387 * if q < 0: skip = 1 * elif b.core.qual > q: b.core.qual = q * if b.core.flag & BAM_FUNMAP: skip = 1 # <<<<<<<<<<<<<< @@ -13485,7 +13791,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ goto __pyx_L11; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1388 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1388 * 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 # <<<<<<<<<<<<<< @@ -13504,7 +13810,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ } __pyx_L11:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1390 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1390 * elif b.core.flag & 1 and not b.core.flag & 2: skip = 1 * * if not skip: break # <<<<<<<<<<<<<< @@ -13518,7 +13824,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ } __pyx_L12:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1393 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1393 * # additional filters * * ret = bam_iter_read( d.samfile.x.bam, d.iter, b ) # <<<<<<<<<<<<<< @@ -13529,7 +13835,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ } __pyx_L7_break:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1395 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1395 * ret = bam_iter_read( d.samfile.x.bam, d.iter, b ) * * return ret # <<<<<<<<<<<<<< @@ -13553,7 +13859,7 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1454 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1454 * cdef stepper * * def __cinit__( self, Samfile samfile, **kwargs ): # <<<<<<<<<<<<<< @@ -13561,8 +13867,8 @@ static int __pyx_f_9csamtools___advance_snpcalls(void *__pyx_v_data, bam1_t *__ * self.mask = kwargs.get("mask", BAM_DEF_MASK ) */ -static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_14IteratorColumn___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_14IteratorColumn___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_Samfile *__pyx_v_samfile = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -13609,7 +13915,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1455 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1455 * * def __cinit__( self, Samfile samfile, **kwargs ): * self.samfile = samfile # <<<<<<<<<<<<<< @@ -13622,7 +13928,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel __Pyx_DECREF(((PyObject *)((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->samfile)); ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->samfile = __pyx_v_samfile; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1456 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1456 * def __cinit__( self, Samfile samfile, **kwargs ): * self.samfile = samfile * self.mask = kwargs.get("mask", BAM_DEF_MASK ) # <<<<<<<<<<<<<< @@ -13641,7 +13947,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->mask = __pyx_t_3; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1457 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1457 * self.samfile = samfile * self.mask = kwargs.get("mask", BAM_DEF_MASK ) * self.fastafile = kwargs.get( "fastafile", None ) # <<<<<<<<<<<<<< @@ -13660,7 +13966,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->fastafile = ((struct __pyx_obj_9csamtools_Fastafile *)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1458 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1458 * self.mask = kwargs.get("mask", BAM_DEF_MASK ) * self.fastafile = kwargs.get( "fastafile", None ) * self.stepper = kwargs.get( "stepper", None ) # <<<<<<<<<<<<<< @@ -13678,7 +13984,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->stepper = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1459 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1459 * self.fastafile = kwargs.get( "fastafile", None ) * self.stepper = kwargs.get( "stepper", None ) * self.iterdata.seq = NULL # <<<<<<<<<<<<<< @@ -13687,7 +13993,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel */ ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->iterdata.seq = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1460 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1460 * self.stepper = kwargs.get( "stepper", None ) * self.iterdata.seq = NULL * self.tid = 0 # <<<<<<<<<<<<<< @@ -13696,7 +14002,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel */ ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->tid = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1461 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1461 * self.iterdata.seq = NULL * self.tid = 0 * self.pos = 0 # <<<<<<<<<<<<<< @@ -13705,7 +14011,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel */ ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->pos = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1462 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1462 * self.tid = 0 * self.pos = 0 * self.n_plp = 0 # <<<<<<<<<<<<<< @@ -13714,7 +14020,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel */ ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->n_plp = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1463 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1463 * self.pos = 0 * self.n_plp = 0 * self.plp = NULL # <<<<<<<<<<<<<< @@ -13723,7 +14029,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel */ ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->plp = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1464 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1464 * self.n_plp = 0 * self.plp = NULL * self.pileup_iter = NULL # <<<<<<<<<<<<<< @@ -13746,7 +14052,7 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1466 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1466 * self.pileup_iter = NULL * * def __iter__(self): # <<<<<<<<<<<<<< @@ -13754,14 +14060,14 @@ static int __pyx_pf_9csamtools_14IteratorColumn_0__cinit__(PyObject *__pyx_v_sel * */ -static PyObject *__pyx_pf_9csamtools_14IteratorColumn_1__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_14IteratorColumn_1__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_14IteratorColumn___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_14IteratorColumn___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__iter__"); __Pyx_TraceCall("__iter__", __pyx_f[0], 1466); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1467 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1467 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -13781,7 +14087,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_1__iter__(PyObject *__pyx_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1469 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1469 * return self * * cdef int cnext(self): # <<<<<<<<<<<<<< @@ -13795,7 +14101,7 @@ static int __pyx_f_9csamtools_14IteratorColumn_cnext(struct __pyx_obj_9csamtool __Pyx_RefNannySetupContext("cnext"); __Pyx_TraceCall("cnext", __pyx_f[0], 1469); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1475 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1475 * It has been re-implemented to permit for filtering. * ''' * self.plp = bam_plp_auto( self.pileup_iter, # <<<<<<<<<<<<<< @@ -13810,7 +14116,7 @@ static int __pyx_f_9csamtools_14IteratorColumn_cnext(struct __pyx_obj_9csamtool return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1480 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1480 * &self.n_plp ) * * cdef char * getSequence( self ): # <<<<<<<<<<<<<< @@ -13824,7 +14130,7 @@ static char *__pyx_f_9csamtools_14IteratorColumn_getSequence(struct __pyx_obj_9 __Pyx_RefNannySetupContext("getSequence"); __Pyx_TraceCall("getSequence", __pyx_f[0], 1480); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1483 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1483 * '''return current reference sequence underlying the iterator. * ''' * return self.iterdata.seq # <<<<<<<<<<<<<< @@ -13841,7 +14147,7 @@ static char *__pyx_f_9csamtools_14IteratorColumn_getSequence(struct __pyx_obj_9 return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1487 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1487 * property seq_len: * '''current sequence length.''' * def __get__(self): return self.iterdata.seq_len # <<<<<<<<<<<<<< @@ -13849,8 +14155,8 @@ static char *__pyx_f_9csamtools_14IteratorColumn_getSequence(struct __pyx_obj_9 * def addReference( self, Fastafile fastafile ): */ -static PyObject *__pyx_pf_9csamtools_14IteratorColumn_7seq_len_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_14IteratorColumn_7seq_len_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_14IteratorColumn_7seq_len___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_14IteratorColumn_7seq_len___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -13876,7 +14182,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_7seq_len_0__get__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1489 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1489 * def __get__(self): return self.iterdata.seq_len * * def addReference( self, Fastafile fastafile ): # <<<<<<<<<<<<<< @@ -13884,9 +14190,9 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_7seq_len_0__get__(PyObject * add reference sequences in *fastafile* to iterator.''' */ -static PyObject *__pyx_pf_9csamtools_14IteratorColumn_2addReference(PyObject *__pyx_v_self, PyObject *__pyx_v_fastafile); /*proto*/ -static char __pyx_doc_9csamtools_14IteratorColumn_2addReference[] = "\n add reference sequences in *fastafile* to iterator."; -static PyObject *__pyx_pf_9csamtools_14IteratorColumn_2addReference(PyObject *__pyx_v_self, PyObject *__pyx_v_fastafile) { +static PyObject *__pyx_pf_9csamtools_14IteratorColumn_addReference(PyObject *__pyx_v_self, PyObject *__pyx_v_fastafile); /*proto*/ +static char __pyx_doc_9csamtools_14IteratorColumn_addReference[] = "\n add reference sequences in *fastafile* to iterator."; +static PyObject *__pyx_pf_9csamtools_14IteratorColumn_addReference(PyObject *__pyx_v_self, PyObject *__pyx_v_fastafile) { PyObject *__pyx_r = NULL; int __pyx_t_1; __Pyx_TraceDeclarations @@ -13894,7 +14200,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_2addReference(PyObject *__ __Pyx_TraceCall("addReference", __pyx_f[0], 1489); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fastafile), __pyx_ptype_9csamtools_Fastafile, 1, "fastafile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1492 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1492 * ''' * add reference sequences in *fastafile* to iterator.''' * self.fastafile = fastafile # <<<<<<<<<<<<<< @@ -13907,7 +14213,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_2addReference(PyObject *__ __Pyx_DECREF(((PyObject *)((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->fastafile)); ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->fastafile = ((struct __pyx_obj_9csamtools_Fastafile *)__pyx_v_fastafile); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1493 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1493 * add reference sequences in *fastafile* to iterator.''' * self.fastafile = fastafile * if self.iterdata.seq != NULL: free(self.iterdata.seq) # <<<<<<<<<<<<<< @@ -13921,7 +14227,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_2addReference(PyObject *__ } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1494 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1494 * self.fastafile = fastafile * if self.iterdata.seq != NULL: free(self.iterdata.seq) * self.iterdata.tid = -1 # <<<<<<<<<<<<<< @@ -13930,7 +14236,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_2addReference(PyObject *__ */ ((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->iterdata.tid = -1; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1495 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1495 * if self.iterdata.seq != NULL: free(self.iterdata.seq) * self.iterdata.tid = -1 * self.iterdata.fastafile = self.fastafile.fastafile # <<<<<<<<<<<<<< @@ -13951,7 +14257,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_2addReference(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1497 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1497 * self.iterdata.fastafile = self.fastafile.fastafile * * def hasReference( self ): # <<<<<<<<<<<<<< @@ -13959,15 +14265,15 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_2addReference(PyObject *__ * return true if iterator is associated with a reference''' */ -static PyObject *__pyx_pf_9csamtools_14IteratorColumn_3hasReference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_9csamtools_14IteratorColumn_3hasReference[] = "\n return true if iterator is associated with a reference"; -static PyObject *__pyx_pf_9csamtools_14IteratorColumn_3hasReference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_14IteratorColumn_hasReference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_9csamtools_14IteratorColumn_hasReference[] = "\n return true if iterator is associated with a reference"; +static PyObject *__pyx_pf_9csamtools_14IteratorColumn_hasReference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("hasReference"); __Pyx_TraceCall("hasReference", __pyx_f[0], 1497); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1500 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1500 * ''' * return true if iterator is associated with a reference''' * return self.fastafile # <<<<<<<<<<<<<< @@ -13987,7 +14293,7 @@ static PyObject *__pyx_pf_9csamtools_14IteratorColumn_3hasReference(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1502 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1502 * return self.fastafile * * cdef setMask( self, mask ): # <<<<<<<<<<<<<< @@ -14002,7 +14308,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setMask(struct __pyx_obj_9 __Pyx_RefNannySetupContext("setMask"); __Pyx_TraceCall("setMask", __pyx_f[0], 1502); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1507 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1507 * reads with bits set in *mask* will be skipped. * ''' * self.mask = mask # <<<<<<<<<<<<<< @@ -14012,7 +14318,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setMask(struct __pyx_obj_9 __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 = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->mask = __pyx_t_1; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1508 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1508 * ''' * self.mask = mask * bam_plp_set_mask( self.pileup_iter, self.mask ) # <<<<<<<<<<<<<< @@ -14033,7 +14339,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setMask(struct __pyx_obj_9 return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1510 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1510 * bam_plp_set_mask( self.pileup_iter, self.mask ) * * cdef setupIteratorData( self, # <<<<<<<<<<<<<< @@ -14061,7 +14367,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ } } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1517 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1517 * '''setup the iterator structure''' * * self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen ) # <<<<<<<<<<<<<< @@ -14077,7 +14383,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ __pyx_t_4 = PyInt_FromLong(__pyx_v_reopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __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 = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __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_GIVEREF(((PyObject *)__pyx_v_self->samfile)); @@ -14093,16 +14399,16 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowRegion)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->iter); __Pyx_DECREF(((PyObject *)__pyx_v_self->iter)); __pyx_v_self->iter = ((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_t_4); __pyx_t_4 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1518 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1518 * * self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen ) * self.iterdata.samfile = self.samfile.samfile # <<<<<<<<<<<<<< @@ -14111,7 +14417,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ */ __pyx_v_self->iterdata.samfile = __pyx_v_self->samfile->samfile; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1519 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1519 * self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen ) * self.iterdata.samfile = self.samfile.samfile * self.iterdata.iter = self.iter.iter # <<<<<<<<<<<<<< @@ -14120,7 +14426,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ */ __pyx_v_self->iterdata.iter = __pyx_v_self->iter->iter; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1520 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1520 * self.iterdata.samfile = self.samfile.samfile * self.iterdata.iter = self.iter.iter * self.iterdata.seq = NULL # <<<<<<<<<<<<<< @@ -14129,7 +14435,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ */ __pyx_v_self->iterdata.seq = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1521 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1521 * self.iterdata.iter = self.iter.iter * self.iterdata.seq = NULL * self.iterdata.tid = -1 # <<<<<<<<<<<<<< @@ -14138,7 +14444,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ */ __pyx_v_self->iterdata.tid = -1; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1523 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1523 * self.iterdata.tid = -1 * * if self.fastafile != None: # <<<<<<<<<<<<<< @@ -14151,7 +14457,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1524 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1524 * * if self.fastafile != None: * self.iterdata.fastafile = self.fastafile.fastafile # <<<<<<<<<<<<<< @@ -14163,7 +14469,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1526 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1526 * self.iterdata.fastafile = self.fastafile.fastafile * else: * self.iterdata.fastafile = NULL # <<<<<<<<<<<<<< @@ -14174,7 +14480,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ } __pyx_L3:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1528 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1528 * self.iterdata.fastafile = NULL * * if self.stepper == None or self.stepper == "all": # <<<<<<<<<<<<<< @@ -14196,7 +14502,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ } if (__pyx_t_8) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1529 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1529 * * if self.stepper == None or self.stepper == "all": * self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata ) # <<<<<<<<<<<<<< @@ -14207,7 +14513,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ goto __pyx_L4; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1530 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1530 * if self.stepper == None or self.stepper == "all": * self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata ) * elif self.stepper == "samtools": # <<<<<<<<<<<<<< @@ -14220,7 +14526,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1531 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1531 * self.pileup_iter = bam_plp_init( &__advance_all, &self.iterdata ) * elif self.stepper == "samtools": * self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata ) # <<<<<<<<<<<<<< @@ -14232,30 +14538,30 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1533 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1533 * self.pileup_iter = bam_plp_init( &__advance_snpcalls, &self.iterdata ) * else: * raise ValueError( "unknown stepper option `%s` in IteratorColumn" % self.stepper) # <<<<<<<<<<<<<< * * bam_plp_set_mask( self.pileup_iter, self.mask ) */ - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_103), __pyx_v_self->stepper); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_54), __pyx_v_self->stepper); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __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 = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __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 = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1535 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1535 * raise ValueError( "unknown stepper option `%s` in IteratorColumn" % self.stepper) * * bam_plp_set_mask( self.pileup_iter, self.mask ) # <<<<<<<<<<<<<< @@ -14281,7 +14587,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_setupIteratorData(struct _ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1537 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1537 * bam_plp_set_mask( self.pileup_iter, self.mask ) * * cdef reset( self, tid, start, end ): # <<<<<<<<<<<<<< @@ -14299,7 +14605,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs __Pyx_RefNannySetupContext("reset"); __Pyx_TraceCall("reset", __pyx_f[0], 1537); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1543 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1543 * having to incur the full set-up costs. * ''' * self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 ) # <<<<<<<<<<<<<< @@ -14307,7 +14613,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs * */ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __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_GIVEREF(((PyObject *)__pyx_v_self->samfile)); @@ -14323,9 +14629,9 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __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 = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowRegion)), ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowRegion)), __pyx_t_1, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __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_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->iter); @@ -14333,7 +14639,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs __pyx_v_self->iter = ((struct __pyx_obj_9csamtools_IteratorRowRegion *)__pyx_t_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1544 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1544 * ''' * self.iter = IteratorRowRegion( self.samfile, tid, start, end, reopen = 0 ) * self.iterdata.iter = self.iter.iter # <<<<<<<<<<<<<< @@ -14342,7 +14648,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs */ __pyx_v_self->iterdata.iter = __pyx_v_self->iter->iter; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1547 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1547 * * # invalidate sequence if different tid * if self.tid != tid: # <<<<<<<<<<<<<< @@ -14358,7 +14664,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1548 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1548 * # invalidate sequence if different tid * if self.tid != tid: * if self.iterdata.seq != NULL: free( self.iterdata.seq ) # <<<<<<<<<<<<<< @@ -14372,7 +14678,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs } __pyx_L4:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1549 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1549 * if self.tid != tid: * if self.iterdata.seq != NULL: free( self.iterdata.seq ) * self.iterdata.seq = NULL # <<<<<<<<<<<<<< @@ -14381,7 +14687,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs */ __pyx_v_self->iterdata.seq = NULL; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1550 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1550 * if self.iterdata.seq != NULL: free( self.iterdata.seq ) * self.iterdata.seq = NULL * self.iterdata.tid = -1 # <<<<<<<<<<<<<< @@ -14393,7 +14699,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs } __pyx_L3:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1553 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1553 * * # self.pileup_iter = bam_plp_init( &__advancepileup, &self.iterdata ) * bam_plp_reset(self.pileup_iter) # <<<<<<<<<<<<<< @@ -14417,7 +14723,7 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1555 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1555 * bam_plp_reset(self.pileup_iter) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -14425,14 +14731,14 @@ static PyObject *__pyx_f_9csamtools_14IteratorColumn_reset(struct __pyx_obj_9cs * # not been fully consumed */ -static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_9csamtools_14IteratorColumn___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_9csamtools_14IteratorColumn___dealloc__(PyObject *__pyx_v_self) { int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__dealloc__"); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1555); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1558 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1558 * # reset in order to avoid memory leak messages for iterators that have * # not been fully consumed * if self.pileup_iter != NULL: # <<<<<<<<<<<<<< @@ -14442,7 +14748,7 @@ static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_ __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->pileup_iter != ((bam_plp_t)NULL)); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1559 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1559 * # not been fully consumed * if self.pileup_iter != NULL: * bam_plp_reset(self.pileup_iter) # <<<<<<<<<<<<<< @@ -14451,7 +14757,7 @@ static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_ */ bam_plp_reset(((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->pileup_iter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1560 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1560 * if self.pileup_iter != NULL: * bam_plp_reset(self.pileup_iter) * bam_plp_destroy(self.pileup_iter) # <<<<<<<<<<<<<< @@ -14460,7 +14766,7 @@ static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_ */ bam_plp_destroy(((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->pileup_iter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1561 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1561 * bam_plp_reset(self.pileup_iter) * bam_plp_destroy(self.pileup_iter) * self.pileup_iter = NULL # <<<<<<<<<<<<<< @@ -14472,7 +14778,7 @@ static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_ } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1563 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1563 * self.pileup_iter = NULL * * if self.iterdata.seq != NULL: # <<<<<<<<<<<<<< @@ -14482,7 +14788,7 @@ static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_ __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->iterdata.seq != NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1564 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1564 * * if self.iterdata.seq != NULL: * free(self.iterdata.seq) # <<<<<<<<<<<<<< @@ -14491,7 +14797,7 @@ static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_ */ free(((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)->iterdata.seq); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1565 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1565 * if self.iterdata.seq != NULL: * free(self.iterdata.seq) * self.iterdata.seq = NULL # <<<<<<<<<<<<<< @@ -14507,7 +14813,7 @@ static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_ __Pyx_RefNannyFinishContext(); } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1570 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1570 * '''iterates over a region only. * ''' * def __cinit__(self, Samfile samfile, # <<<<<<<<<<<<<< @@ -14515,8 +14821,8 @@ static void __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(PyObject *__pyx_v_ * int start = 0, */ -static int __pyx_pf_9csamtools_20IteratorColumnRegion_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_20IteratorColumnRegion_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_20IteratorColumnRegion___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_20IteratorColumnRegion___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_Samfile *__pyx_v_samfile = 0; int __pyx_v_tid; int __pyx_v_start; @@ -14580,12 +14886,12 @@ static int __pyx_pf_9csamtools_20IteratorColumnRegion_0__cinit__(PyObject *__pyx 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 = 1573; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - __pyx_v_end = __pyx_k_104; + __pyx_v_end = __pyx_k_55; } } else { __pyx_v_tid = ((int)0); __pyx_v_start = ((int)0); - __pyx_v_end = __pyx_k_104; + __pyx_v_end = __pyx_k_55; switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: __pyx_v_end = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; __pyx_clineno = __LINE__; goto __pyx_L3_error;} case 3: __pyx_v_start = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L3_error;} @@ -14606,7 +14912,7 @@ static int __pyx_pf_9csamtools_20IteratorColumnRegion_0__cinit__(PyObject *__pyx __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1577 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1577 * * # initialize iterator * self.setupIteratorData( tid, start, end, 1 ) # <<<<<<<<<<<<<< @@ -14632,7 +14938,7 @@ static int __pyx_pf_9csamtools_20IteratorColumnRegion_0__cinit__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1579 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1579 * self.setupIteratorData( tid, start, end, 1 ) * * def __next__(self): # <<<<<<<<<<<<<< @@ -14640,18 +14946,19 @@ static int __pyx_pf_9csamtools_20IteratorColumnRegion_0__cinit__(PyObject *__pyx * """ */ -static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_20IteratorColumnRegion_1__next__[] = "python version of next().\n "; -struct wrapperbase __pyx_wrapperbase_9csamtools_20IteratorColumnRegion_1__next__; -static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_20IteratorColumnRegion___next__[] = "python version of next().\n "; +struct wrapperbase __pyx_wrapperbase_9csamtools_20IteratorColumnRegion___next__; +static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion___next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__next__"); __Pyx_TraceCall("__next__", __pyx_f[0], 1579); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1583 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1583 * """ * * while 1: # <<<<<<<<<<<<<< @@ -14661,7 +14968,7 @@ static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject * while (1) { if (!1) break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1584 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1584 * * while 1: * self.cnext() # <<<<<<<<<<<<<< @@ -14670,7 +14977,7 @@ static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject * */ ((struct __pyx_vtabstruct_9csamtools_IteratorColumnRegion *)((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.__pyx_vtab)->__pyx_base.cnext(((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1585 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1585 * while 1: * self.cnext() * if self.n_plp < 0: # <<<<<<<<<<<<<< @@ -14680,23 +14987,29 @@ static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject * __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.n_plp < 0); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1586 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1586 * 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_106), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __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 = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_56)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_56)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_56)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1588 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1588 * raise ValueError("error during iteration" ) * * if self.plp == NULL: # <<<<<<<<<<<<<< @@ -14706,7 +15019,7 @@ static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject * __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.plp == NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1589 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1589 * * if self.plp == NULL: * raise StopIteration # <<<<<<<<<<<<<< @@ -14719,7 +15032,7 @@ static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject * } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1591 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1591 * raise StopIteration * * return makePileupProxy( self.plp, # <<<<<<<<<<<<<< @@ -14728,17 +15041,17 @@ static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject * */ __Pyx_XDECREF(__pyx_r); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1594 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1594 * self.tid, * self.pos, * self.n_plp ) # <<<<<<<<<<<<<< * * cdef class IteratorColumnAllRefs(IteratorColumn): */ - __pyx_t_2 = __pyx_f_9csamtools_makePileupProxy(((bam_pileup1_t *)((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.plp), ((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.tid, ((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.pos, ((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = __pyx_f_9csamtools_makePileupProxy(((bam_pileup1_t *)((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.plp), ((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.tid, ((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.pos, ((struct __pyx_obj_9csamtools_IteratorColumnRegion *)__pyx_v_self)->__pyx_base.n_plp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; } @@ -14746,6 +15059,7 @@ static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject * goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("csamtools.IteratorColumnRegion.__next__"); __pyx_r = NULL; __pyx_L0:; @@ -14755,7 +15069,7 @@ static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject * return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1600 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1600 * """ * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -14763,8 +15077,8 @@ static PyObject *__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__(PyObject * * **kwargs ): */ -static int __pyx_pf_9csamtools_21IteratorColumnAllRefs_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_21IteratorColumnAllRefs_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_21IteratorColumnAllRefs___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_21IteratorColumnAllRefs___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_Samfile *__pyx_v_samfile = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -14812,7 +15126,7 @@ static int __pyx_pf_9csamtools_21IteratorColumnAllRefs_0__cinit__(PyObject *__py __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_samfile), __pyx_ptype_9csamtools_Samfile, 1, "samfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1605 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1605 * * # no iteration over empty files * if not samfile.nreferences: raise StopIteration # <<<<<<<<<<<<<< @@ -14831,7 +15145,7 @@ static int __pyx_pf_9csamtools_21IteratorColumnAllRefs_0__cinit__(PyObject *__py } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1608 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1608 * * # initialize iterator * self.setupIteratorData( self.tid, 0, max_pos, 1 ) # <<<<<<<<<<<<<< @@ -14857,7 +15171,7 @@ static int __pyx_pf_9csamtools_21IteratorColumnAllRefs_0__cinit__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1610 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1610 * self.setupIteratorData( self.tid, 0, max_pos, 1 ) * * def __next__(self): # <<<<<<<<<<<<<< @@ -14865,10 +15179,10 @@ static int __pyx_pf_9csamtools_21IteratorColumnAllRefs_0__cinit__(PyObject *__py * """ */ -static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_21IteratorColumnAllRefs_1__next__[] = "python version of next().\n "; -struct wrapperbase __pyx_wrapperbase_9csamtools_21IteratorColumnAllRefs_1__next__; -static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_21IteratorColumnAllRefs___next__[] = "python version of next().\n "; +struct wrapperbase __pyx_wrapperbase_9csamtools_21IteratorColumnAllRefs___next__; +static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs___next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -14879,7 +15193,7 @@ static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject __Pyx_RefNannySetupContext("__next__"); __Pyx_TraceCall("__next__", __pyx_f[0], 1610); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1614 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1614 * """ * * while 1: # <<<<<<<<<<<<<< @@ -14889,7 +15203,7 @@ static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject while (1) { if (!1) break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1615 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1615 * * while 1: * self.cnext() # <<<<<<<<<<<<<< @@ -14898,7 +15212,7 @@ static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject */ ((struct __pyx_vtabstruct_9csamtools_IteratorColumnAllRefs *)((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.__pyx_vtab)->__pyx_base.cnext(((struct __pyx_obj_9csamtools_IteratorColumn *)__pyx_v_self)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1617 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1617 * self.cnext() * * if self.n_plp < 0: # <<<<<<<<<<<<<< @@ -14908,23 +15222,29 @@ static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.n_plp < 0); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1618 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1618 * * 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_107), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __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 = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_56)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_56)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_56)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1621 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1621 * * # return result, if within same reference * if self.plp != NULL: # <<<<<<<<<<<<<< @@ -14934,7 +15254,7 @@ static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.plp != NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1622 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1622 * # return result, if within same reference * if self.plp != NULL: * return makePileupProxy( self.plp, # <<<<<<<<<<<<<< @@ -14943,51 +15263,51 @@ static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject */ __Pyx_XDECREF(__pyx_r); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1625 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1625 * self.tid, * self.pos, * self.n_plp ) # <<<<<<<<<<<<<< * * # otherwise, proceed to next reference or stop */ - __pyx_t_2 = __pyx_f_9csamtools_makePileupProxy(((bam_pileup1_t *)((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.plp), ((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.tid, ((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.pos, ((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.n_plp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = __pyx_f_9csamtools_makePileupProxy(((bam_pileup1_t *)((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.plp), ((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.tid, ((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.pos, ((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.n_plp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; goto __pyx_L8; } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1628 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1628 * * # otherwise, proceed to next reference or stop * self.tid += 1 # <<<<<<<<<<<<<< * if self.tid < self.samfile.nreferences: * self.setupIteratorData( self.tid, 0, max_pos, 0 ) */ - ((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.tid = (((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.tid + 1); + ((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.tid += 1; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1629 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1629 * # 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(((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.tid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __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); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)__pyx_v_self)->__pyx_base.samfile), __pyx_n_s__nreferences); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __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_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1630 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1630 * self.tid += 1 * if self.tid < self.samfile.nreferences: * self.setupIteratorData( self.tid, 0, max_pos, 0 ) # <<<<<<<<<<<<<< @@ -15003,7 +15323,7 @@ static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1632 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1632 * self.setupIteratorData( self.tid, 0, max_pos, 0 ) * else: * raise StopIteration # <<<<<<<<<<<<<< @@ -15031,7 +15351,7 @@ static PyObject *__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1637 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1637 * ##------------------------------------------------------------------- * ##------------------------------------------------------------------- * cdef inline int32_t query_start(bam1_t *src) except -1: # <<<<<<<<<<<<<< @@ -15053,7 +15373,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) __Pyx_RefNannySetupContext("query_start"); __Pyx_TraceCall("query_start", __pyx_f[0], 1637); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1640 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1640 * cdef uint32_t * cigar_p, op * cdef uint32_t k * cdef uint32_t start_offset = 0 # <<<<<<<<<<<<<< @@ -15062,7 +15382,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) */ __pyx_v_start_offset = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1642 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1642 * cdef uint32_t start_offset = 0 * * if src.core.n_cigar: # <<<<<<<<<<<<<< @@ -15071,7 +15391,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) */ if (__pyx_v_src->core.n_cigar) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1643 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1643 * * if src.core.n_cigar: * cigar_p = bam1_cigar(src); # <<<<<<<<<<<<<< @@ -15080,7 +15400,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) */ __pyx_v_cigar_p = bam1_cigar(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1644 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1644 * if src.core.n_cigar: * cigar_p = bam1_cigar(src); * for k from 0 <= k < src.core.n_cigar: # <<<<<<<<<<<<<< @@ -15090,7 +15410,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) __pyx_t_1 = __pyx_v_src->core.n_cigar; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_1; __pyx_v_k++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1645 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1645 * cigar_p = bam1_cigar(src); * for k from 0 <= k < src.core.n_cigar: * op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<< @@ -15099,25 +15419,17 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) */ __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1650 - * PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') - * return -1 - * elif op==BAM_CSOFT_CLIP: # <<<<<<<<<<<<<< - * start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT - * else: - */ - switch (__pyx_v_op) { - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1646 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1646 * for k from 0 <= k < src.core.n_cigar: * op = cigar_p[k] & BAM_CIGAR_MASK * if op==BAM_CHARD_CLIP: # <<<<<<<<<<<<<< * if start_offset!=0 and start_offset!=src.core.l_qseq: * PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') */ + switch (__pyx_v_op) { case 5: - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1647 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1647 * op = cigar_p[k] & BAM_CIGAR_MASK * if op==BAM_CHARD_CLIP: * if start_offset!=0 and start_offset!=src.core.l_qseq: # <<<<<<<<<<<<<< @@ -15133,16 +15445,16 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) } if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1648 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1648 * 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_108); + PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_57); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1649 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1649 * if start_offset!=0 and start_offset!=src.core.l_qseq: * PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') * return -1 # <<<<<<<<<<<<<< @@ -15156,7 +15468,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) __pyx_L6:; break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1650 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1650 * PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') * return -1 * elif op==BAM_CSOFT_CLIP: # <<<<<<<<<<<<<< @@ -15165,18 +15477,18 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) */ case 4: - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1651 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1651 * return -1 * elif op==BAM_CSOFT_CLIP: * start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<< * else: * break */ - __pyx_v_start_offset = (__pyx_v_start_offset + ((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); + __pyx_v_start_offset += ((__pyx_v_cigar_p[__pyx_v_k]) >> 4); break; default: - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1653 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1653 * start_offset += cigar_p[k] >> BAM_CIGAR_SHIFT * else: * break # <<<<<<<<<<<<<< @@ -15192,7 +15504,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) } __pyx_L3:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1655 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1655 * break * * return start_offset # <<<<<<<<<<<<<< @@ -15209,7 +15521,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_start(bam1_t *__pyx_v_src) return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1660 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1660 * ##------------------------------------------------------------------- * ##------------------------------------------------------------------- * cdef inline int32_t query_end(bam1_t *src) except -1: # <<<<<<<<<<<<<< @@ -15230,7 +15542,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { __Pyx_RefNannySetupContext("query_end"); __Pyx_TraceCall("query_end", __pyx_f[0], 1660); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1663 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1663 * cdef uint32_t * cigar_p, op * cdef uint32_t k * cdef uint32_t end_offset = src.core.l_qseq # <<<<<<<<<<<<<< @@ -15239,7 +15551,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { */ __pyx_v_end_offset = __pyx_v_src->core.l_qseq; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1665 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1665 * cdef uint32_t end_offset = src.core.l_qseq * * if src.core.n_cigar>1: # <<<<<<<<<<<<<< @@ -15249,7 +15561,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { __pyx_t_1 = (__pyx_v_src->core.n_cigar > 1); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1666 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1666 * * if src.core.n_cigar>1: * cigar_p = bam1_cigar(src); # <<<<<<<<<<<<<< @@ -15258,7 +15570,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { */ __pyx_v_cigar_p = bam1_cigar(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1667 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1667 * if src.core.n_cigar>1: * cigar_p = bam1_cigar(src); * for k from src.core.n_cigar > k >= 1: # <<<<<<<<<<<<<< @@ -15267,7 +15579,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { */ for (__pyx_v_k = __pyx_v_src->core.n_cigar-1; __pyx_v_k >= 1; __pyx_v_k--) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1668 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1668 * cigar_p = bam1_cigar(src); * for k from src.core.n_cigar > k >= 1: * op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<< @@ -15276,25 +15588,17 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { */ __pyx_v_op = ((__pyx_v_cigar_p[__pyx_v_k]) & 15); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1673 - * PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') - * return -1 - * elif op==BAM_CSOFT_CLIP: # <<<<<<<<<<<<<< - * end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT - * else: - */ - switch (__pyx_v_op) { - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1669 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1669 * for k from src.core.n_cigar > k >= 1: * op = cigar_p[k] & BAM_CIGAR_MASK * if op==BAM_CHARD_CLIP: # <<<<<<<<<<<<<< * if end_offset!=0 and end_offset!=src.core.l_qseq: * PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') */ + switch (__pyx_v_op) { case 5: - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1670 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1670 * op = cigar_p[k] & BAM_CIGAR_MASK * if op==BAM_CHARD_CLIP: * if end_offset!=0 and end_offset!=src.core.l_qseq: # <<<<<<<<<<<<<< @@ -15310,16 +15614,16 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { } if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1671 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1671 * 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_108); + PyErr_SetString(__pyx_builtin_ValueError, __pyx_k_57); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1672 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1672 * if end_offset!=0 and end_offset!=src.core.l_qseq: * PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') * return -1 # <<<<<<<<<<<<<< @@ -15333,7 +15637,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { __pyx_L6:; break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1673 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1673 * PyErr_SetString(ValueError, 'Invalid clipping in CIGAR string') * return -1 * elif op==BAM_CSOFT_CLIP: # <<<<<<<<<<<<<< @@ -15342,18 +15646,18 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { */ case 4: - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1674 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1674 * return -1 * elif op==BAM_CSOFT_CLIP: * end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<< * else: * break */ - __pyx_v_end_offset = (__pyx_v_end_offset - ((__pyx_v_cigar_p[__pyx_v_k]) >> 4)); + __pyx_v_end_offset -= ((__pyx_v_cigar_p[__pyx_v_k]) >> 4); break; default: - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1676 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1676 * end_offset -= cigar_p[k] >> BAM_CIGAR_SHIFT * else: * break # <<<<<<<<<<<<<< @@ -15369,7 +15673,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { } __pyx_L3:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1678 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1678 * break * * if end_offset==0: # <<<<<<<<<<<<<< @@ -15379,7 +15683,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { __pyx_t_3 = (__pyx_v_end_offset == 0); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1679 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1679 * * if end_offset==0: * end_offset = src.core.l_qseq # <<<<<<<<<<<<<< @@ -15391,7 +15695,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1681 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1681 * end_offset = src.core.l_qseq * * return end_offset # <<<<<<<<<<<<<< @@ -15408,7 +15712,7 @@ static CYTHON_INLINE int32_t __pyx_f_9csamtools_query_end(bam1_t *__pyx_v_src) { return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1684 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1684 * * * cdef inline object get_seq_range(bam1_t *src, uint32_t start, uint32_t end): # <<<<<<<<<<<<<< @@ -15430,7 +15734,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_seq_range(bam1_t *__pyx_v_ __Pyx_TraceCall("get_seq_range", __pyx_f[0], 1684); __pyx_v_seq = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1689 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1689 * cdef char * s * * if not src.core.l_qseq: # <<<<<<<<<<<<<< @@ -15440,7 +15744,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_seq_range(bam1_t *__pyx_v_ __pyx_t_1 = (!__pyx_v_src->core.l_qseq); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1690 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1690 * * if not src.core.l_qseq: * return None # <<<<<<<<<<<<<< @@ -15455,7 +15759,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_seq_range(bam1_t *__pyx_v_ } __pyx_L3:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1692 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1692 * return None * * seq = PyString_FromStringAndSize(NULL, end-start) # <<<<<<<<<<<<<< @@ -15468,7 +15772,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_seq_range(bam1_t *__pyx_v_ __pyx_v_seq = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1693 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1693 * * seq = PyString_FromStringAndSize(NULL, end-start) * s = PyString_AS_STRING(seq) # <<<<<<<<<<<<<< @@ -15477,7 +15781,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_seq_range(bam1_t *__pyx_v_ */ __pyx_v_s = PyString_AS_STRING(__pyx_v_seq); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1694 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1694 * seq = PyString_FromStringAndSize(NULL, end-start) * s = PyString_AS_STRING(seq) * p = bam1_seq(src) # <<<<<<<<<<<<<< @@ -15486,7 +15790,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_seq_range(bam1_t *__pyx_v_ */ __pyx_v_p = bam1_seq(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1696 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1696 * p = bam1_seq(src) * * for k from start <= k < end: # <<<<<<<<<<<<<< @@ -15496,7 +15800,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_seq_range(bam1_t *__pyx_v_ __pyx_t_3 = __pyx_v_end; for (__pyx_v_k = __pyx_v_start; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1699 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1699 * # 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] # <<<<<<<<<<<<<< @@ -15506,7 +15810,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_seq_range(bam1_t *__pyx_v_ (__pyx_v_s[(__pyx_v_k - __pyx_v_start)]) = (__pyx_v_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)]); } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1701 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1701 * s[k-start] = bam_nt16_rev_table[p[k/2] >> 4 * (1 - k%2) & 0xf] * * return seq # <<<<<<<<<<<<<< @@ -15532,7 +15836,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_seq_range(bam1_t *__pyx_v_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1704 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1704 * * * cdef inline object get_qual_range(bam1_t *src, uint32_t start, uint32_t end): # <<<<<<<<<<<<<< @@ -15554,7 +15858,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v __Pyx_TraceCall("get_qual_range", __pyx_f[0], 1704); __pyx_v_qual = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1709 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1709 * cdef char * q * * p = bam1_qual(src) # <<<<<<<<<<<<<< @@ -15563,7 +15867,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v */ __pyx_v_p = bam1_qual(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1710 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1710 * * p = bam1_qual(src) * if p[0] == 0xff: # <<<<<<<<<<<<<< @@ -15573,7 +15877,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v __pyx_t_1 = ((__pyx_v_p[0]) == 0xff); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1711 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1711 * p = bam1_qual(src) * if p[0] == 0xff: * return None # <<<<<<<<<<<<<< @@ -15588,7 +15892,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v } __pyx_L3:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1713 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1713 * return None * * qual = PyString_FromStringAndSize(NULL, end-start) # <<<<<<<<<<<<<< @@ -15601,7 +15905,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v __pyx_v_qual = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1714 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1714 * * qual = PyString_FromStringAndSize(NULL, end-start) * q = PyString_AS_STRING(qual) # <<<<<<<<<<<<<< @@ -15610,7 +15914,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v */ __pyx_v_q = PyString_AS_STRING(__pyx_v_qual); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1716 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1716 * q = PyString_AS_STRING(qual) * * for k from start <= k < end: # <<<<<<<<<<<<<< @@ -15620,7 +15924,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v __pyx_t_3 = __pyx_v_end; for (__pyx_v_k = __pyx_v_start; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1718 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1718 * for k from start <= k < end: * ## equivalent to t[i] + 33 (see bam.c) * q[k-start] = p[k] + 33 # <<<<<<<<<<<<<< @@ -15630,7 +15934,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v (__pyx_v_q[(__pyx_v_k - __pyx_v_start)]) = ((__pyx_v_p[__pyx_v_k]) + 33); } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1720 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1720 * q[k-start] = p[k] + 33 * * return qual # <<<<<<<<<<<<<< @@ -15656,7 +15960,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1746 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1746 * * # Now only called when instances are created from Python * def __init__(self): # <<<<<<<<<<<<<< @@ -15664,8 +15968,8 @@ static CYTHON_INLINE PyObject *__pyx_f_9csamtools_get_qual_range(bam1_t *__pyx_v * self._delegate = calloc( 1, sizeof( bam1_t) ) */ -static int __pyx_pf_9csamtools_11AlignedRead_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_11AlignedRead___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__"); @@ -15674,7 +15978,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_0__init__(PyObject *__pyx_v_self, P __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; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1748 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1748 * def __init__(self): * # see bam_init1 * self._delegate = calloc( 1, sizeof( bam1_t) ) # <<<<<<<<<<<<<< @@ -15683,7 +15987,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_0__init__(PyObject *__pyx_v_self, P */ ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate = ((bam1_t *)calloc(1, (sizeof(bam1_t)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1752 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1752 * # 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 # <<<<<<<<<<<<<< @@ -15692,7 +15996,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_0__init__(PyObject *__pyx_v_self, P */ ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->m_data = 40; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1753 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1753 * # so allocate 40 bytes for a new read * self._delegate.m_data = 40 * self._delegate.data = calloc( self._delegate.m_data, 1 ) # <<<<<<<<<<<<<< @@ -15701,7 +16005,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_0__init__(PyObject *__pyx_v_self, P */ ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->data = ((uint8_t *)calloc(((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->m_data, 1)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1754 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1754 * self._delegate.m_data = 40 * self._delegate.data = calloc( self._delegate.m_data, 1 ) * self._delegate.data_len = 0 # <<<<<<<<<<<<<< @@ -15716,7 +16020,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_0__init__(PyObject *__pyx_v_self, P return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1756 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1756 * self._delegate.data_len = 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -15724,13 +16028,13 @@ static int __pyx_pf_9csamtools_11AlignedRead_0__init__(PyObject *__pyx_v_self, P * */ -static void __pyx_pf_9csamtools_11AlignedRead_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_9csamtools_11AlignedRead_1__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_9csamtools_11AlignedRead___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_9csamtools_11AlignedRead___dealloc__(PyObject *__pyx_v_self) { __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__dealloc__"); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1756); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1757 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1757 * * def __dealloc__(self): * bam_destroy1(self._delegate) # <<<<<<<<<<<<<< @@ -15743,7 +16047,7 @@ static void __pyx_pf_9csamtools_11AlignedRead_1__dealloc__(PyObject *__pyx_v_sel __Pyx_RefNannyFinishContext(); } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1759 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1759 * bam_destroy1(self._delegate) * * def __str__(self): # <<<<<<<<<<<<<< @@ -15751,10 +16055,10 @@ static void __pyx_pf_9csamtools_11AlignedRead_1__dealloc__(PyObject *__pyx_v_sel * return "\t".join(map(str, (self.qname, */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_11AlignedRead_2__str__[] = "todo"; -struct wrapperbase __pyx_wrapperbase_9csamtools_11AlignedRead_2__str__; -static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead___str__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_11AlignedRead___str__[] = "todo"; +struct wrapperbase __pyx_wrapperbase_9csamtools_11AlignedRead___str__; +static PyObject *__pyx_pf_9csamtools_11AlignedRead___str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -15771,7 +16075,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __Pyx_RefNannySetupContext("__str__"); __Pyx_TraceCall("__str__", __pyx_f[0], 1759); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1761 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1761 * def __str__(self): * """todo""" * return "\t".join(map(str, (self.qname, # <<<<<<<<<<<<<< @@ -15784,7 +16088,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__qname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1762 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1762 * """todo""" * return "\t".join(map(str, (self.qname, * self.rname, # <<<<<<<<<<<<<< @@ -15794,7 +16098,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__rname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1763 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1763 * return "\t".join(map(str, (self.qname, * self.rname, * self.pos, # <<<<<<<<<<<<<< @@ -15804,7 +16108,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pos); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1764 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1764 * self.rname, * self.pos, * self.cigar, # <<<<<<<<<<<<<< @@ -15814,7 +16118,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__cigar); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1765 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1765 * self.pos, * self.cigar, * self.qual, # <<<<<<<<<<<<<< @@ -15824,7 +16128,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__qual); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1766 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1766 * self.cigar, * self.qual, * self.flag, # <<<<<<<<<<<<<< @@ -15834,7 +16138,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__flag); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1767 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1767 * self.qual, * self.flag, * self.seq, # <<<<<<<<<<<<<< @@ -15844,7 +16148,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__seq); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1768 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1768 * self.flag, * self.seq, * self.mapq, # <<<<<<<<<<<<<< @@ -15854,7 +16158,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__mapq); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1769 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1769 * self.seq, * self.mapq, * self.tags))) # <<<<<<<<<<<<<< @@ -15864,7 +16168,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tags); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_11)); + __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3); @@ -15893,25 +16197,25 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); - __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)((PyObject*)(&PyString_Type)))); - __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_t_11)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_11)); + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)((PyObject*)&PyString_Type))); + __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_Call(__pyx_builtin_map, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); + __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; @@ -15939,7 +16243,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1772 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1772 * * * def compare(self, AlignedRead other): # <<<<<<<<<<<<<< @@ -15947,9 +16251,9 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_2__str__(PyObject *__pyx_v_se * */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static char __pyx_doc_9csamtools_11AlignedRead_3compare[] = "return -1,0,1, if contents in this are binary <,=,> to *other*"; -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_compare(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static char __pyx_doc_9csamtools_11AlignedRead_compare[] = "return -1,0,1, if contents in this are binary <,=,> to *other*"; +static PyObject *__pyx_pf_9csamtools_11AlignedRead_compare(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { int __pyx_v_retval; bam1_t *__pyx_v_t; bam1_t *__pyx_v_o; @@ -15964,7 +16268,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se __Pyx_TraceCall("compare", __pyx_f[0], 1772); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_9csamtools_AlignedRead, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1778 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1778 * cdef bam1_t *t, *o * * t = self._delegate # <<<<<<<<<<<<<< @@ -15973,7 +16277,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se */ __pyx_v_t = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1779 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1779 * * t = self._delegate * o = other._delegate # <<<<<<<<<<<<<< @@ -15982,7 +16286,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se */ __pyx_v_o = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_other)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1791 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1791 * * # Fast-path test for object identity * if t==o: # <<<<<<<<<<<<<< @@ -15992,7 +16296,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se __pyx_t_1 = (__pyx_v_t == __pyx_v_o); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1792 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1792 * # Fast-path test for object identity * if t==o: * return 0 # <<<<<<<<<<<<<< @@ -16007,7 +16311,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1794 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1794 * return 0 * * retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t)) # <<<<<<<<<<<<<< @@ -16016,7 +16320,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se */ __pyx_v_retval = memcmp((&__pyx_v_t->core), (&__pyx_v_o->core), (sizeof(bam1_core_t))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1796 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1796 * retval = memcmp(&t.core, &o.core, sizeof(bam1_core_t)) * * if retval: return retval # <<<<<<<<<<<<<< @@ -16034,7 +16338,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1797 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1797 * * if retval: return retval * retval = cmp(t.data_len, o.data_len) # <<<<<<<<<<<<<< @@ -16046,21 +16350,21 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se __pyx_t_3 = PyInt_FromLong(__pyx_v_o->data_len); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_builtin_cmp, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_builtin_cmp, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_retval = __pyx_t_5; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1798 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1798 * if retval: return retval * retval = cmp(t.data_len, o.data_len) * if retval: return retval # <<<<<<<<<<<<<< @@ -16078,7 +16382,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1799 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1799 * retval = cmp(t.data_len, o.data_len) * if retval: return retval * return memcmp(t.data, o.data, t.data_len) # <<<<<<<<<<<<<< @@ -16107,7 +16411,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1802 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1802 * * # Disabled so long as __cmp__ is a special method * def __hash__(self): # <<<<<<<<<<<<<< @@ -16115,14 +16419,14 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3compare(PyObject *__pyx_v_se * */ -static long __pyx_pf_9csamtools_11AlignedRead_4__hash__(PyObject *__pyx_v_self); /*proto*/ -static long __pyx_pf_9csamtools_11AlignedRead_4__hash__(PyObject *__pyx_v_self) { +static long __pyx_pf_9csamtools_11AlignedRead___hash__(PyObject *__pyx_v_self); /*proto*/ +static long __pyx_pf_9csamtools_11AlignedRead___hash__(PyObject *__pyx_v_self) { long __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__hash__"); __Pyx_TraceCall("__hash__", __pyx_f[0], 1802); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1803 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1803 * # Disabled so long as __cmp__ is a special method * def __hash__(self): * return _Py_HashPointer(self) # <<<<<<<<<<<<<< @@ -16140,7 +16444,7 @@ static long __pyx_pf_9csamtools_11AlignedRead_4__hash__(PyObject *__pyx_v_self) return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1807 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1807 * property qname: * """the query name (None if not present)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -16148,8 +16452,8 @@ static long __pyx_pf_9csamtools_11AlignedRead_4__hash__(PyObject *__pyx_v_self) * src = self._delegate */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qname_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qname_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qname___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qname___get__(PyObject *__pyx_v_self) { bam1_t *__pyx_v_src; PyObject *__pyx_r = NULL; int __pyx_t_1; @@ -16158,7 +16462,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qname_0__get__(PyObject *__p __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 1807); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1809 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1809 * def __get__(self): * cdef bam1_t * src * src = self._delegate # <<<<<<<<<<<<<< @@ -16167,7 +16471,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qname_0__get__(PyObject *__p */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1810 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1810 * cdef bam1_t * src * src = self._delegate * if src.core.l_qname == 0: return None # <<<<<<<<<<<<<< @@ -16184,7 +16488,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qname_0__get__(PyObject *__p } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1811 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1811 * src = self._delegate * if src.core.l_qname == 0: return None * return bam1_qname( src ) # <<<<<<<<<<<<<< @@ -16211,7 +16515,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qname_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1813 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1813 * return bam1_qname( src ) * * def __set__(self, qname ): # <<<<<<<<<<<<<< @@ -16219,8 +16523,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qname_0__get__(PyObject *__p * cdef bam1_t * src */ -static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qname); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qname) { +static int __pyx_pf_9csamtools_11AlignedRead_5qname___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qname); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_5qname___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qname) { bam1_t *__pyx_v_src; int __pyx_v_l; char *__pyx_v_p; @@ -16235,7 +16539,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 1813); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1814 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1814 * * def __set__(self, qname ): * if qname == None or len(qname) == 0: return # <<<<<<<<<<<<<< @@ -16260,7 +16564,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1819 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1819 * cdef char * p * * src = self._delegate # <<<<<<<<<<<<<< @@ -16269,7 +16573,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1820 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1820 * * src = self._delegate * p = bam1_qname( src ) # <<<<<<<<<<<<<< @@ -16278,7 +16582,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s */ __pyx_v_p = bam1_qname(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1823 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1823 * * # the qname is \0 terminated * l = len(qname) + 1 # <<<<<<<<<<<<<< @@ -16288,7 +16592,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s __pyx_t_3 = PyObject_Length(__pyx_v_qname); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = (__pyx_t_3 + 1); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1827 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1827 * src.core.l_qname, * l, * p ) # <<<<<<<<<<<<<< @@ -16297,7 +16601,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s */ pysam_bam_update(__pyx_v_src, __pyx_v_src->core.l_qname, __pyx_v_l, ((uint8_t *)__pyx_v_p)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1829 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1829 * p ) * * src.core.l_qname = l # <<<<<<<<<<<<<< @@ -16306,7 +16610,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s */ __pyx_v_src->core.l_qname = __pyx_v_l; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1833 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1833 * # re-acquire pointer to location in memory * # as it might have moved * p = bam1_qname(src) # <<<<<<<<<<<<<< @@ -16315,7 +16619,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s */ __pyx_v_p = bam1_qname(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1835 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1835 * p = bam1_qname(src) * * strncpy( p, qname, l ) # <<<<<<<<<<<<<< @@ -16337,7 +16641,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1840 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1840 * """the :term:`cigar` alignment (None if not present). * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -16345,8 +16649,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(PyObject *__pyx_v_s * cdef bam1_t * src */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar___get__(PyObject *__pyx_v_self) { uint32_t *__pyx_v_cigar_p; bam1_t *__pyx_v_src; PyObject *__pyx_v_op; @@ -16365,7 +16669,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p __pyx_v_l = Py_None; __Pyx_INCREF(Py_None); __pyx_v_cigar = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1846 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1846 * cdef int k * * src = self._delegate # <<<<<<<<<<<<<< @@ -16374,7 +16678,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1847 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1847 * * src = self._delegate * if src.core.n_cigar == 0: return None # <<<<<<<<<<<<<< @@ -16391,7 +16695,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1849 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1849 * if src.core.n_cigar == 0: return None * * cigar = [] # <<<<<<<<<<<<<< @@ -16404,7 +16708,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p __pyx_v_cigar = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1850 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1850 * * cigar = [] * cigar_p = bam1_cigar(src); # <<<<<<<<<<<<<< @@ -16413,7 +16717,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p */ __pyx_v_cigar_p = bam1_cigar(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1851 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1851 * cigar = [] * cigar_p = bam1_cigar(src); * for k from 0 <= k < src.core.n_cigar: # <<<<<<<<<<<<<< @@ -16423,7 +16727,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p __pyx_t_3 = __pyx_v_src->core.n_cigar; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1852 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1852 * cigar_p = bam1_cigar(src); * for k from 0 <= k < src.core.n_cigar: * op = cigar_p[k] & BAM_CIGAR_MASK # <<<<<<<<<<<<<< @@ -16436,7 +16740,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p __pyx_v_op = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1853 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1853 * for k from 0 <= k < src.core.n_cigar: * op = cigar_p[k] & BAM_CIGAR_MASK * l = cigar_p[k] >> BAM_CIGAR_SHIFT # <<<<<<<<<<<<<< @@ -16449,7 +16753,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p __pyx_v_l = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1854 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1854 * op = cigar_p[k] & BAM_CIGAR_MASK * l = cigar_p[k] >> BAM_CIGAR_SHIFT * cigar.append((op, l)) # <<<<<<<<<<<<<< @@ -16457,20 +16761,20 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p * */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_op); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_op); __Pyx_GIVEREF(__pyx_v_op); __Pyx_INCREF(__pyx_v_l); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_l); __Pyx_GIVEREF(__pyx_v_l); - __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_cigar, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_cigar, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1855 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1855 * l = cigar_p[k] >> BAM_CIGAR_SHIFT * cigar.append((op, l)) * return cigar # <<<<<<<<<<<<<< @@ -16499,7 +16803,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1857 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1857 * return cigar * * def __set__(self, values ): # <<<<<<<<<<<<<< @@ -16507,8 +16811,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(PyObject *__p * cdef uint32_t * p */ -static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { +static int __pyx_pf_9csamtools_11AlignedRead_5cigar___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_5cigar___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_values) { uint32_t *__pyx_v_p; bam1_t *__pyx_v_src; PyObject *__pyx_v_op; @@ -16531,7 +16835,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s __pyx_v_op = Py_None; __Pyx_INCREF(Py_None); __pyx_v_l = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1858 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1858 * * def __set__(self, values ): * if values == None or len(values) == 0: return # <<<<<<<<<<<<<< @@ -16556,7 +16860,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1864 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1864 * cdef int k * * k = 0 # <<<<<<<<<<<<<< @@ -16565,7 +16869,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s */ __pyx_v_k = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1866 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1866 * k = 0 * * src = self._delegate # <<<<<<<<<<<<<< @@ -16574,7 +16878,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1869 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1869 * * # get location of cigar string * p = bam1_cigar(src) # <<<<<<<<<<<<<< @@ -16583,7 +16887,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s */ __pyx_v_p = bam1_cigar(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1874 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1874 * pysam_bam_update( src, * src.core.n_cigar * 4, * len(values) * 4, # <<<<<<<<<<<<<< @@ -16592,7 +16896,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s */ __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1875 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1875 * src.core.n_cigar * 4, * len(values) * 4, * p ) # <<<<<<<<<<<<<< @@ -16601,7 +16905,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s */ pysam_bam_update(__pyx_v_src, (__pyx_v_src->core.n_cigar * 4), (__pyx_t_3 * 4), ((uint8_t *)__pyx_v_p)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1878 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1878 * * # length is number of cigar operations, not bytes * src.core.n_cigar = len(values) # <<<<<<<<<<<<<< @@ -16611,7 +16915,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_src->core.n_cigar = __pyx_t_3; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1882 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1882 * # re-acquire pointer to location in memory * # as it might have moved * p = bam1_cigar(src) # <<<<<<<<<<<<<< @@ -16620,7 +16924,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s */ __pyx_v_p = bam1_cigar(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1885 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1885 * * # insert cigar operations * for op, l in values: # <<<<<<<<<<<<<< @@ -16677,7 +16981,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s __pyx_t_8 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1886 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1886 * # insert cigar operations * for op, l in values: * p[k] = l << BAM_CIGAR_SHIFT | op # <<<<<<<<<<<<<< @@ -16693,18 +16997,18 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; (__pyx_v_p[__pyx_v_k]) = __pyx_t_10; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1887 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1887 * for op, l in values: * p[k] = l << BAM_CIGAR_SHIFT | op * k += 1 # <<<<<<<<<<<<<< * * ## setting the cigar string also updates the "bin" attribute */ - __pyx_v_k = (__pyx_v_k + 1); + __pyx_v_k += 1; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1890 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1890 * * ## setting the cigar string also updates the "bin" attribute * src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, p)) # <<<<<<<<<<<<<< @@ -16731,7 +17035,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1894 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1894 * property seq: * """read sequence bases, including :term:`soft clipped` bases (None if not present)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -16739,8 +17043,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(PyObject *__pyx_v_s * cdef char * s */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3seq_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3seq_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_3seq___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_3seq___get__(PyObject *__pyx_v_self) { bam1_t *__pyx_v_src; PyObject *__pyx_r = NULL; int __pyx_t_1; @@ -16749,7 +17053,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3seq_0__get__(PyObject *__pyx __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 1894); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1897 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1897 * cdef bam1_t * src * cdef char * s * src = self._delegate # <<<<<<<<<<<<<< @@ -16758,7 +17062,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3seq_0__get__(PyObject *__pyx */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1899 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1899 * src = self._delegate * * if src.core.l_qseq == 0: return None # <<<<<<<<<<<<<< @@ -16775,7 +17079,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3seq_0__get__(PyObject *__pyx } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1901 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1901 * if src.core.l_qseq == 0: return None * * return get_seq_range(src, 0, src.core.l_qseq) # <<<<<<<<<<<<<< @@ -16802,7 +17106,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3seq_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1903 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1903 * return get_seq_range(src, 0, src.core.l_qseq) * * def __set__(self,seq): # <<<<<<<<<<<<<< @@ -16810,8 +17114,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3seq_0__get__(PyObject *__pyx * # if no quality information is present, the first byte says 0xff. */ -static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq) { +static int __pyx_pf_9csamtools_11AlignedRead_3seq___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_3seq___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_seq) { bam1_t *__pyx_v_src; uint8_t *__pyx_v_p; char *__pyx_v_s; @@ -16827,12 +17131,11 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel int __pyx_t_5; int __pyx_t_6; char *__pyx_t_7; - long __pyx_t_8; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 1903); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1907 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1907 * # if no quality information is present, the first byte says 0xff. * * if seq == None or len(seq) == 0: return # <<<<<<<<<<<<<< @@ -16857,7 +17160,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1913 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1913 * cdef int l, k, nbytes_new, nbytes_old * * src = self._delegate # <<<<<<<<<<<<<< @@ -16866,7 +17169,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1915 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1915 * src = self._delegate * * l = len(seq) # <<<<<<<<<<<<<< @@ -16876,7 +17179,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel __pyx_t_3 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_3; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1919 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1919 * # 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 # <<<<<<<<<<<<<< @@ -16885,7 +17188,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel */ __pyx_v_nbytes_new = (__Pyx_div_long((__pyx_v_l + 1), 2) + __pyx_v_l); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1920 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1920 * # 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 # <<<<<<<<<<<<<< @@ -16894,7 +17197,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel */ __pyx_v_nbytes_old = (__Pyx_div_long((__pyx_v_src->core.l_qseq + 1), 2) + __pyx_v_src->core.l_qseq); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1922 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1922 * nbytes_old = (src.core.l_qseq+1)/2 + src.core.l_qseq * # acquire pointer to location in memory * p = bam1_seq( src ) # <<<<<<<<<<<<<< @@ -16903,7 +17206,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel */ __pyx_v_p = bam1_seq(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1923 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1923 * # acquire pointer to location in memory * p = bam1_seq( src ) * src.core.l_qseq = l # <<<<<<<<<<<<<< @@ -16912,7 +17215,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel */ __pyx_v_src->core.l_qseq = __pyx_v_l; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1928 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1928 * nbytes_old, * nbytes_new, * p) # <<<<<<<<<<<<<< @@ -16921,7 +17224,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel */ pysam_bam_update(__pyx_v_src, __pyx_v_nbytes_old, __pyx_v_nbytes_new, __pyx_v_p); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1931 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1931 * # re-acquire pointer to location in memory * # as it might have moved * p = bam1_seq( src ) # <<<<<<<<<<<<<< @@ -16930,7 +17233,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel */ __pyx_v_p = bam1_seq(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1932 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1932 * # as it might have moved * p = bam1_seq( src ) * for k from 0 <= k < nbytes_new: p[k] = 0 # <<<<<<<<<<<<<< @@ -16942,7 +17245,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel (__pyx_v_p[__pyx_v_k]) = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1934 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1934 * for k from 0 <= k < nbytes_new: p[k] = 0 * # convert to C string * s = seq # <<<<<<<<<<<<<< @@ -16952,7 +17255,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel __pyx_t_7 = PyBytes_AsString(__pyx_v_seq); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_s = __pyx_t_7; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1935 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1935 * # convert to C string * s = seq * for k from 0 <= k < l: # <<<<<<<<<<<<<< @@ -16962,18 +17265,17 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel __pyx_t_6 = __pyx_v_l; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_6; __pyx_v_k++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1936 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1936 * s = seq * for k from 0 <= k < l: * p[k/2] |= pysam_translate_sequence(s[k]) << 4 * (1 - k % 2) # <<<<<<<<<<<<<< * * # erase qualities */ - __pyx_t_8 = __Pyx_div_long(__pyx_v_k, 2); - (__pyx_v_p[__pyx_t_8]) = ((__pyx_v_p[__pyx_t_8]) | (pysam_translate_sequence((__pyx_v_s[__pyx_v_k])) << (4 * (1 - __Pyx_mod_long(__pyx_v_k, 2))))); + (__pyx_v_p[__Pyx_div_long(__pyx_v_k, 2)]) |= (pysam_translate_sequence((__pyx_v_s[__pyx_v_k])) << (4 * (1 - __Pyx_mod_long(__pyx_v_k, 2)))); } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1939 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1939 * * # erase qualities * p = bam1_qual( src ) # <<<<<<<<<<<<<< @@ -16982,7 +17284,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel */ __pyx_v_p = bam1_qual(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1940 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1940 * # erase qualities * p = bam1_qual( src ) * p[0] = 0xff # <<<<<<<<<<<<<< @@ -17003,7 +17305,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1945 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1945 * property qual: * """read sequence base qualities, including :term:`soft clipped` bases (None if not present)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -17011,8 +17313,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(PyObject *__pyx_v_sel * cdef bam1_t * src */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qual_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qual_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qual___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qual___get__(PyObject *__pyx_v_self) { bam1_t *__pyx_v_src; PyObject *__pyx_r = NULL; int __pyx_t_1; @@ -17021,7 +17323,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qual_0__get__(PyObject *__py __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 1945); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1950 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1950 * cdef char * q * * src = self._delegate # <<<<<<<<<<<<<< @@ -17030,7 +17332,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qual_0__get__(PyObject *__py */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1952 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1952 * src = self._delegate * * if src.core.l_qseq == 0: return None # <<<<<<<<<<<<<< @@ -17047,7 +17349,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qual_0__get__(PyObject *__py } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1954 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1954 * if src.core.l_qseq == 0: return None * * return get_qual_range(src, 0, src.core.l_qseq) # <<<<<<<<<<<<<< @@ -17074,7 +17376,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qual_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1956 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1956 * return get_qual_range(src, 0, src.core.l_qseq) * * def __set__(self,qual): # <<<<<<<<<<<<<< @@ -17082,8 +17384,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qual_0__get__(PyObject *__py * cdef bam1_t * src */ -static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual) { +static int __pyx_pf_9csamtools_11AlignedRead_4qual___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_4qual___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual) { bam1_t *__pyx_v_src; uint8_t *__pyx_v_p; char *__pyx_v_q; @@ -17103,7 +17405,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 1956); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1963 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1963 * cdef int k * * src = self._delegate # <<<<<<<<<<<<<< @@ -17112,7 +17414,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1964 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1964 * * src = self._delegate * p = bam1_qual( src ) # <<<<<<<<<<<<<< @@ -17121,7 +17423,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se */ __pyx_v_p = bam1_qual(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1965 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1965 * src = self._delegate * p = bam1_qual( src ) * if qual == None or len(qual) == 0: # <<<<<<<<<<<<<< @@ -17141,7 +17443,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se } if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1967 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1967 * if qual == None or len(qual) == 0: * # if absent - set to 0xff * p[0] = 0xff # <<<<<<<<<<<<<< @@ -17150,7 +17452,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se */ (__pyx_v_p[0]) = 0xff; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1968 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1968 * # if absent - set to 0xff * p[0] = 0xff * return # <<<<<<<<<<<<<< @@ -17163,7 +17465,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1971 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1971 * cdef int l * # convert to C string * q = qual # <<<<<<<<<<<<<< @@ -17173,7 +17475,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se __pyx_t_6 = PyBytes_AsString(__pyx_v_qual); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_q = __pyx_t_6; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1972 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1972 * # convert to C string * q = qual * l = len(qual) # <<<<<<<<<<<<<< @@ -17183,7 +17485,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se __pyx_t_3 = PyObject_Length(__pyx_v_qual); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_3; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1973 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1973 * q = qual * l = len(qual) * if src.core.l_qseq != l: # <<<<<<<<<<<<<< @@ -17193,7 +17495,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se __pyx_t_5 = (__pyx_v_src->core.l_qseq != __pyx_v_l); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1974 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1974 * l = len(qual) * if src.core.l_qseq != l: * raise ValueError("quality and sequence mismatch: %i != %i" % (l, src.core.l_qseq)) # <<<<<<<<<<<<<< @@ -17205,24 +17507,24 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se __pyx_t_7 = __Pyx_PyInt_to_py_int32_t(__pyx_v_src->core.l_qseq); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_1 = 0; __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_109), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_58), __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); - __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; + __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 = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 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_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_7, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -17230,21 +17532,21 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1975 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1975 * 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: * p[k] = q[k] - 33 */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_src->core.l_qseq == __pyx_v_l))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1976 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1976 * 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: # <<<<<<<<<<<<<< @@ -17254,7 +17556,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se __pyx_t_9 = __pyx_v_l; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_9; __pyx_v_k++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1977 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1977 * assert src.core.l_qseq == l * for k from 0 <= k < l: * p[k] = q[k] - 33 # <<<<<<<<<<<<<< @@ -17278,7 +17580,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1989 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1989 * were not considered for alignment may have been retained.""" * * def __get__(self): # <<<<<<<<<<<<<< @@ -17286,8 +17588,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(PyObject *__pyx_v_se * cdef uint32_t start, end */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query___get__(PyObject *__pyx_v_self) { bam1_t *__pyx_v_src; uint32_t __pyx_v_start; uint32_t __pyx_v_end; @@ -17299,7 +17601,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query_0__get__(PyObject *__p __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 1989); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1994 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1994 * cdef char * s * * src = self._delegate # <<<<<<<<<<<<<< @@ -17308,7 +17610,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query_0__get__(PyObject *__p */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1996 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1996 * src = self._delegate * * if src.core.l_qseq == 0: return None # <<<<<<<<<<<<<< @@ -17325,7 +17627,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query_0__get__(PyObject *__p } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1998 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1998 * if src.core.l_qseq == 0: return None * * start = query_start(src) # <<<<<<<<<<<<<< @@ -17335,7 +17637,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query_0__get__(PyObject *__p __pyx_t_2 = __pyx_f_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_start = __pyx_t_2; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1999 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1999 * * start = query_start(src) * end = query_end(src) # <<<<<<<<<<<<<< @@ -17345,7 +17647,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query_0__get__(PyObject *__p __pyx_t_2 = __pyx_f_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_end = __pyx_t_2; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2001 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2001 * end = query_end(src) * * return get_seq_range(src, start, end) # <<<<<<<<<<<<<< @@ -17372,7 +17674,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2005 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2005 * property qqual: * """aligned query sequence quality values (None if not present)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -17380,8 +17682,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5query_0__get__(PyObject *__p * cdef uint32_t start, end */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual___get__(PyObject *__pyx_v_self) { bam1_t *__pyx_v_src; uint32_t __pyx_v_start; uint32_t __pyx_v_end; @@ -17393,7 +17695,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(PyObject *__p __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2005); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2010 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2010 * cdef char * q * * src = self._delegate # <<<<<<<<<<<<<< @@ -17402,7 +17704,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(PyObject *__p */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2012 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2012 * src = self._delegate * * if src.core.l_qseq == 0: return None # <<<<<<<<<<<<<< @@ -17419,7 +17721,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(PyObject *__p } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2014 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2014 * if src.core.l_qseq == 0: return None * * start = query_start(src) # <<<<<<<<<<<<<< @@ -17429,7 +17731,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(PyObject *__p __pyx_t_2 = __pyx_f_9csamtools_query_start(__pyx_v_src); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_start = __pyx_t_2; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2015 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2015 * * start = query_start(src) * end = query_end(src) # <<<<<<<<<<<<<< @@ -17439,7 +17741,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(PyObject *__p __pyx_t_2 = __pyx_f_9csamtools_query_end(__pyx_v_src); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_end = __pyx_t_2; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2017 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2017 * end = query_end(src) * * return get_qual_range(src, start, end) # <<<<<<<<<<<<<< @@ -17466,7 +17768,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2021 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2021 * property qstart: * """start index of the aligned query portion of the sequence (0-based, inclusive)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -17474,8 +17776,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(PyObject *__p * */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_6qstart_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_6qstart_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_6qstart___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_6qstart___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; int32_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -17483,7 +17785,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6qstart_0__get__(PyObject *__ __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2021); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2022 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2022 * """start index of the aligned query portion of the sequence (0-based, inclusive)""" * def __get__(self): * return query_start(self._delegate) # <<<<<<<<<<<<<< @@ -17511,7 +17813,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6qstart_0__get__(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2026 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2026 * property qend: * """end index of the aligned query portion of the sequence (0-based, exclusive)""" * def __get__(self): # <<<<<<<<<<<<<< @@ -17519,8 +17821,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6qstart_0__get__(PyObject *__ * */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qend_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qend_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qend___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qend___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; int32_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -17528,7 +17830,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qend_0__get__(PyObject *__py __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2026); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2027 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2027 * """end index of the aligned query portion of the sequence (0-based, exclusive)""" * def __get__(self): * return query_end(self._delegate) # <<<<<<<<<<<<<< @@ -17556,7 +17858,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qend_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2031 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2031 * property qlen: * """Length of the aligned query sequence""" * def __get__(self): # <<<<<<<<<<<<<< @@ -17564,8 +17866,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qend_0__get__(PyObject *__py * src = self._delegate */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qlen_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qlen_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qlen___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qlen___get__(PyObject *__pyx_v_self) { bam1_t *__pyx_v_src; PyObject *__pyx_r = NULL; int32_t __pyx_t_1; @@ -17575,7 +17877,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qlen_0__get__(PyObject *__py __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2031); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2033 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2033 * def __get__(self): * cdef bam1_t * src * src = self._delegate # <<<<<<<<<<<<<< @@ -17584,7 +17886,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qlen_0__get__(PyObject *__py */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2034 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2034 * cdef bam1_t * src * src = self._delegate * return query_end(src)-query_start(src) # <<<<<<<<<<<<<< @@ -17613,7 +17915,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qlen_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2048 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2048 * * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -17621,8 +17923,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4qlen_0__get__(PyObject *__py * cdef bam1_t * src */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags___get__(PyObject *__pyx_v_self) { bam1_t *__pyx_v_src; uint8_t *__pyx_v_s; char __pyx_v_auxtag[3]; @@ -17641,10 +17943,10 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2048); - __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_result = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_v_value = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2055 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2055 * cdef char auxtype * * src = self._delegate # <<<<<<<<<<<<<< @@ -17653,7 +17955,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2056 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2056 * * src = self._delegate * if src.l_aux == 0: return None # <<<<<<<<<<<<<< @@ -17670,7 +17972,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2058 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2058 * if src.l_aux == 0: return None * * s = bam1_aux( src ) # <<<<<<<<<<<<<< @@ -17679,7 +17981,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py */ __pyx_v_s = bam1_aux(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2059 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2059 * * s = bam1_aux( src ) * result = [] # <<<<<<<<<<<<<< @@ -17692,7 +17994,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2060 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2060 * s = bam1_aux( src ) * result = [] * auxtag[2] = 0 # <<<<<<<<<<<<<< @@ -17701,7 +18003,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py */ (__pyx_v_auxtag[2]) = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2061 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2061 * result = [] * auxtag[2] = 0 * while s < (src.data + src.data_len): # <<<<<<<<<<<<<< @@ -17712,7 +18014,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_t_1 = (__pyx_v_s < (__pyx_v_src->data + __pyx_v_src->data_len)); if (!__pyx_t_1) break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2063 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2063 * while s < (src.data + src.data_len): * # get tag * auxtag[0] = s[0] # <<<<<<<<<<<<<< @@ -17721,7 +18023,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py */ (__pyx_v_auxtag[0]) = (__pyx_v_s[0]); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2064 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2064 * # get tag * auxtag[0] = s[0] * auxtag[1] = s[1] # <<<<<<<<<<<<<< @@ -17730,16 +18032,16 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py */ (__pyx_v_auxtag[1]) = (__pyx_v_s[1]); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2065 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2065 * auxtag[0] = s[0] * auxtag[1] = s[1] * s += 2 # <<<<<<<<<<<<<< * auxtype = s[0] * */ - __pyx_v_s = (__pyx_v_s + 2); + __pyx_v_s += 2; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2066 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2066 * auxtag[1] = s[1] * s += 2 * auxtype = s[0] # <<<<<<<<<<<<<< @@ -17748,7 +18050,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py */ __pyx_v_auxtype = (__pyx_v_s[0]); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2068 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2068 * auxtype = s[0] * * if auxtype in ('c', 'C'): # <<<<<<<<<<<<<< @@ -17766,7 +18068,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_t_1 = __pyx_t_5; if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2069 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2069 * * if auxtype in ('c', 'C'): * value = bam_aux2i(s) # <<<<<<<<<<<<<< @@ -17779,18 +18081,18 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2070 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2070 * if auxtype in ('c', 'C'): * value = bam_aux2i(s) * s += 1 # <<<<<<<<<<<<<< * elif auxtype in ('s', 'S'): * value = bam_aux2i(s) */ - __pyx_v_s = (__pyx_v_s + 1); + __pyx_v_s += 1; goto __pyx_L8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2071 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2071 * value = bam_aux2i(s) * s += 1 * elif auxtype in ('s', 'S'): # <<<<<<<<<<<<<< @@ -17808,7 +18110,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_t_1 = __pyx_t_4; if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2072 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2072 * s += 1 * elif auxtype in ('s', 'S'): * value = bam_aux2i(s) # <<<<<<<<<<<<<< @@ -17821,18 +18123,18 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2073 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2073 * elif auxtype in ('s', 'S'): * value = bam_aux2i(s) * s += 2 # <<<<<<<<<<<<<< * elif auxtype in ('i', 'I'): * value = bam_aux2i(s) */ - __pyx_v_s = (__pyx_v_s + 2); + __pyx_v_s += 2; goto __pyx_L8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2074 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2074 * value = bam_aux2i(s) * s += 2 * elif auxtype in ('i', 'I'): # <<<<<<<<<<<<<< @@ -17850,7 +18152,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_t_1 = __pyx_t_5; if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2075 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2075 * s += 2 * elif auxtype in ('i', 'I'): * value = bam_aux2i(s) # <<<<<<<<<<<<<< @@ -17863,18 +18165,18 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2076 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2076 * elif auxtype in ('i', 'I'): * value = bam_aux2i(s) * s += 4 # <<<<<<<<<<<<<< * elif auxtype == 'f': * value = bam_aux2f(s) */ - __pyx_v_s = (__pyx_v_s + 4); + __pyx_v_s += 4; goto __pyx_L8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2077 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2077 * value = bam_aux2i(s) * s += 4 * elif auxtype == 'f': # <<<<<<<<<<<<<< @@ -17884,7 +18186,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_t_1 = (__pyx_v_auxtype == 'f'); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2078 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2078 * s += 4 * elif auxtype == 'f': * value = bam_aux2f(s) # <<<<<<<<<<<<<< @@ -17897,18 +18199,18 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2079 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2079 * elif auxtype == 'f': * value = bam_aux2f(s) * s += 4 # <<<<<<<<<<<<<< * elif auxtype == 'd': * value = bam_aux2d(s) */ - __pyx_v_s = (__pyx_v_s + 4); + __pyx_v_s += 4; goto __pyx_L8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2080 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2080 * value = bam_aux2f(s) * s += 4 * elif auxtype == 'd': # <<<<<<<<<<<<<< @@ -17918,7 +18220,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_t_1 = (__pyx_v_auxtype == 'd'); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2081 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2081 * s += 4 * elif auxtype == 'd': * value = bam_aux2d(s) # <<<<<<<<<<<<<< @@ -17931,18 +18233,18 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2082 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2082 * elif auxtype == 'd': * value = bam_aux2d(s) * s += 8 # <<<<<<<<<<<<<< * elif auxtype == 'A': * value = "%c" % bam_aux2A(s) */ - __pyx_v_s = (__pyx_v_s + 8); + __pyx_v_s += 8; goto __pyx_L8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2083 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2083 * value = bam_aux2d(s) * s += 8 * elif auxtype == 'A': # <<<<<<<<<<<<<< @@ -17952,7 +18254,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_t_1 = (__pyx_v_auxtype == 'A'); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2084 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2084 * s += 8 * elif auxtype == 'A': * value = "%c" % bam_aux2A(s) # <<<<<<<<<<<<<< @@ -17961,25 +18263,25 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py */ __pyx_t_2 = PyInt_FromLong(bam_aux2A(__pyx_v_s)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_110), __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_59), __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_v_value); __pyx_v_value = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2085 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2085 * elif auxtype == 'A': * value = "%c" % bam_aux2A(s) * s += 1 # <<<<<<<<<<<<<< * elif auxtype in ('Z', 'H'): * value = bam_aux2Z(s) */ - __pyx_v_s = (__pyx_v_s + 1); + __pyx_v_s += 1; goto __pyx_L8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2086 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2086 * value = "%c" % bam_aux2A(s) * s += 1 * elif auxtype in ('Z', 'H'): # <<<<<<<<<<<<<< @@ -17997,7 +18299,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_t_1 = __pyx_t_4; if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2087 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2087 * s += 1 * elif auxtype in ('Z', 'H'): * value = bam_aux2Z(s) # <<<<<<<<<<<<<< @@ -18010,7 +18312,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_v_value = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2089 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2089 * value = bam_aux2Z(s) * # +1 for NULL terminated string * s += len(value) + 1 # <<<<<<<<<<<<<< @@ -18018,21 +18320,21 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py * s += 1 */ __pyx_t_7 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_s = (__pyx_v_s + (__pyx_t_7 + 1)); + __pyx_v_s += (__pyx_t_7 + 1); goto __pyx_L8; } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2091 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2091 * s += len(value) + 1 * # * s += 1 # <<<<<<<<<<<<<< * * result.append( (auxtag, value) ) */ - __pyx_v_s = (__pyx_v_s + 1); + __pyx_v_s += 1; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2093 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2093 * s += 1 * * result.append( (auxtag, value) ) # <<<<<<<<<<<<<< @@ -18045,18 +18347,18 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py __pyx_t_6 = PyBytes_FromString(__pyx_v_auxtag); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_6)); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6)); __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __pyx_t_6 = 0; - __pyx_t_8 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_result), __pyx_t_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2095 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2095 * result.append( (auxtag, value) ) * * return result # <<<<<<<<<<<<<< @@ -18084,7 +18386,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2097 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2097 * return result * * def __set__(self, tags): # <<<<<<<<<<<<<< @@ -18092,8 +18394,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(PyObject *__py * cdef bam1_t * src */ -static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tags); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tags) { +static int __pyx_pf_9csamtools_11AlignedRead_4tags___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tags); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_4tags___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tags) { bam1_t *__pyx_v_src; uint8_t *__pyx_v_s; char *__pyx_v_temp; @@ -18124,11 +18426,11 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __pyx_v_buffer = Py_None; __Pyx_INCREF(Py_None); __pyx_v_pytag = Py_None; __Pyx_INCREF(Py_None); __pyx_v_value = Py_None; __Pyx_INCREF(Py_None); - __pyx_v_t = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_t = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_v_fmt = Py_None; __Pyx_INCREF(Py_None); __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2106 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2106 * cdef int max_size, size, offset * * src = self._delegate # <<<<<<<<<<<<<< @@ -18137,7 +18439,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2107 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2107 * * src = self._delegate * max_size = 4000 # <<<<<<<<<<<<<< @@ -18146,7 +18448,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se */ __pyx_v_max_size = 4000; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2108 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2108 * src = self._delegate * max_size = 4000 * offset = 0 # <<<<<<<<<<<<<< @@ -18155,7 +18457,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se */ __pyx_v_offset = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2110 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2110 * offset = 0 * * if tags != None: # <<<<<<<<<<<<<< @@ -18168,7 +18470,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2113 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2113 * * # map samtools code to python.struct code and byte size * buffer = ctypes.create_string_buffer(max_size) # <<<<<<<<<<<<<< @@ -18177,25 +18479,25 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_111); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_60); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong(__pyx_v_max_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __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 = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __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_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __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_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_v_buffer); __pyx_v_buffer = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2115 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2115 * buffer = ctypes.create_string_buffer(max_size) * * for pytag, value in tags: # <<<<<<<<<<<<<< @@ -18252,7 +18554,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __pyx_t_6 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2116 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2116 * * for pytag, value in tags: * t = type(value) # <<<<<<<<<<<<<< @@ -18261,9 +18563,9 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se */ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value))); __Pyx_DECREF(((PyObject *)__pyx_v_t)); - __pyx_v_t = ((PyObject*)((PyObject *)Py_TYPE(__pyx_v_value))); + __pyx_v_t = ((PyObject *)((PyObject *)Py_TYPE(__pyx_v_value))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2117 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2117 * for pytag, value in tags: * t = type(value) * if t == types.FloatType: # <<<<<<<<<<<<<< @@ -18282,14 +18584,14 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2118 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2118 * t = type(value) * if t == types.FloatType: * fmt, pytype = "= -127: fmt, pytype = "= -127: fmt, pytype = "= -32767: fmt, pytype = "= -127: fmt, pytype = "= -32767: fmt, pytype = "= -32767: fmt, pytype = " 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value ) # <<<<<<<<<<<<<< @@ -18498,16 +18800,16 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_115), __pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_64), __pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 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_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -18515,14 +18817,14 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2129 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2129 * elif value <= 65535: fmt, pytype = " 4294967295: raise ValueError( "integer %i out of range of BAM/SAM specification" % value ) * else: fmt, pytype = " max_size: # <<<<<<<<<<<<<< @@ -18633,46 +18935,52 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __pyx_t_2 = ((__pyx_v_offset + __pyx_v_size) > __pyx_v_max_size); if (__pyx_t_2) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2139 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2139 * size = struct.calcsize(fmt) * if offset + size > max_size: * raise NotImplementedError("tags field too large") # <<<<<<<<<<<<<< * * struct.pack_into( fmt, */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_123), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __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 = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_71)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_71)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_71)); + __pyx_t_4 = PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L13; } __pyx_L13:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2141 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2141 * raise NotImplementedError("tags field too large") * * struct.pack_into( fmt, # <<<<<<<<<<<<<< * buffer, * offset, */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__struct); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__pack_into); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__struct); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__pack_into); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2143 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2143 * struct.pack_into( fmt, * buffer, * offset, # <<<<<<<<<<<<<< * pytag[0], * pytag[1], */ - __pyx_t_3 = PyInt_FromLong(__pyx_v_offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyInt_FromLong(__pyx_v_offset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2144 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2144 * buffer, * offset, * pytag[0], # <<<<<<<<<<<<<< @@ -18682,7 +18990,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_pytag, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2145 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2145 * offset, * pytag[0], * pytag[1], # <<<<<<<<<<<<<< @@ -18692,7 +19000,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_pytag, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2147 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2147 * pytag[1], * pytype, * value ) # <<<<<<<<<<<<<< @@ -18700,15 +19008,15 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se * */ __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); + __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_fmt); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_fmt); __Pyx_GIVEREF(__pyx_v_fmt); __Pyx_INCREF(__pyx_v_buffer); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_buffer); __Pyx_GIVEREF(__pyx_v_buffer); - PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_7); @@ -18719,30 +19027,30 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __pyx_t_3 = 0; + __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; - __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2148 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2148 * pytype, * value ) * offset += size # <<<<<<<<<<<<<< * * # delete the old data and allocate new */ - __pyx_v_offset = (__pyx_v_offset + __pyx_v_size); + __pyx_v_offset += __pyx_v_size; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2156 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2156 * src.l_aux, * offset, * bam1_aux( src ) ) # <<<<<<<<<<<<<< @@ -18751,7 +19059,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se */ pysam_bam_update(__pyx_v_src, __pyx_v_src->l_aux, __pyx_v_offset, bam1_aux(__pyx_v_src)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2158 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2158 * bam1_aux( src ) ) * * src.l_aux = offset # <<<<<<<<<<<<<< @@ -18760,7 +19068,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se */ __pyx_v_src->l_aux = __pyx_v_offset; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2161 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2161 * * # copy data only if there is any * if offset != 0: # <<<<<<<<<<<<<< @@ -18770,7 +19078,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __pyx_t_2 = (__pyx_v_offset != 0); if (__pyx_t_2) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2164 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2164 * * # get location of new data * s = bam1_aux( src ) # <<<<<<<<<<<<<< @@ -18779,7 +19087,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se */ __pyx_v_s = bam1_aux(__pyx_v_src); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2167 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2167 * * # check if there is direct path from buffer.raw to tmp * temp = buffer.raw # <<<<<<<<<<<<<< @@ -18792,7 +19100,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_temp = __pyx_t_11; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2168 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2168 * # check if there is direct path from buffer.raw to tmp * temp = buffer.raw * memcpy( s, temp, offset ) # <<<<<<<<<<<<<< @@ -18827,7 +19135,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2172 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2172 * property flag: * """properties flag""" * def __get__(self): return self._delegate.core.flag # <<<<<<<<<<<<<< @@ -18835,8 +19143,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(PyObject *__pyx_v_se * */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4flag_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4flag_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4flag___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4flag___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -18862,7 +19170,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4flag_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2173 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2173 * """properties flag""" * def __get__(self): return self._delegate.core.flag * def __set__(self, flag): self._delegate.core.flag = flag # <<<<<<<<<<<<<< @@ -18870,8 +19178,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4flag_0__get__(PyObject *__py * property rname: */ -static int __pyx_pf_9csamtools_11AlignedRead_4flag_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flag); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_4flag_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flag) { +static int __pyx_pf_9csamtools_11AlignedRead_4flag___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flag); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_4flag___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flag) { int __pyx_r; uint32_t __pyx_t_1; __Pyx_TraceDeclarations @@ -18891,7 +19199,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4flag_1__set__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2191 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2191 * * """ * def __get__(self): return self._delegate.core.tid # <<<<<<<<<<<<<< @@ -18899,8 +19207,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_4flag_1__set__(PyObject *__pyx_v_se * */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5rname_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5rname_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5rname___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5rname___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -18926,7 +19234,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5rname_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2192 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2192 * """ * def __get__(self): return self._delegate.core.tid * def __set__(self, tid): self._delegate.core.tid = tid # <<<<<<<<<<<<<< @@ -18934,8 +19242,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5rname_0__get__(PyObject *__p * property tid: */ -static int __pyx_pf_9csamtools_11AlignedRead_5rname_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_5rname_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) { +static int __pyx_pf_9csamtools_11AlignedRead_5rname___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_5rname___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) { int __pyx_r; int32_t __pyx_t_1; __Pyx_TraceDeclarations @@ -18955,7 +19263,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5rname_1__set__(PyObject *__pyx_v_s return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2205 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2205 * * """ * def __get__(self): return self._delegate.core.tid # <<<<<<<<<<<<<< @@ -18963,8 +19271,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_5rname_1__set__(PyObject *__pyx_v_s * */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3tid_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3tid_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_3tid___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_3tid___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -18990,7 +19298,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3tid_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2206 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2206 * """ * def __get__(self): return self._delegate.core.tid * def __set__(self, tid): self._delegate.core.tid = tid # <<<<<<<<<<<<<< @@ -18998,8 +19306,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3tid_0__get__(PyObject *__pyx * property pos: */ -static int __pyx_pf_9csamtools_11AlignedRead_3tid_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_3tid_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) { +static int __pyx_pf_9csamtools_11AlignedRead_3tid___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_3tid___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tid) { int __pyx_r; int32_t __pyx_t_1; __Pyx_TraceDeclarations @@ -19019,7 +19327,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3tid_1__set__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2210 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2210 * property pos: * """0-based leftmost coordinate""" * def __get__(self): return self._delegate.core.pos # <<<<<<<<<<<<<< @@ -19027,8 +19335,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_3tid_1__set__(PyObject *__pyx_v_sel * ## setting the cigar string also updates the "bin" attribute */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3pos_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3pos_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_3pos___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_3pos___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -19054,7 +19362,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3pos_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2211 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2211 * """0-based leftmost coordinate""" * def __get__(self): return self._delegate.core.pos * def __set__(self, pos): # <<<<<<<<<<<<<< @@ -19062,8 +19370,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3pos_0__get__(PyObject *__pyx * cdef bam1_t * src */ -static int __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos) { +static int __pyx_pf_9csamtools_11AlignedRead_3pos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_3pos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pos) { bam1_t *__pyx_v_src; int __pyx_r; int32_t __pyx_t_1; @@ -19071,7 +19379,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(PyObject *__pyx_v_sel __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2211); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2214 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2214 * ## setting the cigar string also updates the "bin" attribute * cdef bam1_t * src * src = self._delegate # <<<<<<<<<<<<<< @@ -19080,7 +19388,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(PyObject *__pyx_v_sel */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2215 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2215 * cdef bam1_t * src * src = self._delegate * if src.core.n_cigar: # <<<<<<<<<<<<<< @@ -19089,7 +19397,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(PyObject *__pyx_v_sel */ if (__pyx_v_src->core.n_cigar) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2216 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2216 * src = self._delegate * if src.core.n_cigar: * src.core.bin = bam_reg2bin( src.core.pos, bam_calend( &src.core, bam1_cigar(src)) ) # <<<<<<<<<<<<<< @@ -19101,7 +19409,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(PyObject *__pyx_v_sel } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2218 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2218 * 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) # <<<<<<<<<<<<<< @@ -19112,7 +19420,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(PyObject *__pyx_v_sel } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2219 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2219 * else: * src.core.bin = bam_reg2bin( src.core.pos, src.core.pos + 1) * self._delegate.core.pos = pos # <<<<<<<<<<<<<< @@ -19133,7 +19441,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2222 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2222 * property bin: * """properties bin""" * def __get__(self): return self._delegate.core.bin # <<<<<<<<<<<<<< @@ -19141,8 +19449,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(PyObject *__pyx_v_sel * property rlen: */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3bin_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_3bin_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_3bin___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_3bin___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -19168,7 +19476,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3bin_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2223 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2223 * """properties bin""" * def __get__(self): return self._delegate.core.bin * def __set__(self, bin): self._delegate.core.bin = bin # <<<<<<<<<<<<<< @@ -19176,8 +19484,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_3bin_0__get__(PyObject *__pyx * '''length of the read (read only). Returns 0 if not given.''' */ -static int __pyx_pf_9csamtools_11AlignedRead_3bin_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_bin); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_3bin_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_bin) { +static int __pyx_pf_9csamtools_11AlignedRead_3bin___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_bin); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_3bin___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_bin) { int __pyx_r; uint32_t __pyx_t_1; __Pyx_TraceDeclarations @@ -19197,7 +19505,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_3bin_1__set__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2226 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2226 * property rlen: * '''length of the read (read only). Returns 0 if not given.''' * def __get__(self): return self._delegate.core.l_qseq # <<<<<<<<<<<<<< @@ -19205,8 +19513,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_3bin_1__set__(PyObject *__pyx_v_sel * '''aligned end position of the read (read only). Returns */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4rlen_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4rlen_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4rlen___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4rlen___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -19232,7 +19540,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4rlen_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2230 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2230 * '''aligned end position of the read (read only). Returns * None if not available.''' * def __get__(self): # <<<<<<<<<<<<<< @@ -19240,8 +19548,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4rlen_0__get__(PyObject *__py * src = self._delegate */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend___get__(PyObject *__pyx_v_self) { bam1_t *__pyx_v_src; PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; @@ -19253,7 +19561,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend_0__get__(PyObject *__py __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2230); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2232 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2232 * def __get__(self): * cdef bam1_t * src * src = self._delegate # <<<<<<<<<<<<<< @@ -19262,7 +19570,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend_0__get__(PyObject *__py */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2233 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2233 * cdef bam1_t * src * src = self._delegate * if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0: # <<<<<<<<<<<<<< @@ -19284,7 +19592,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend_0__get__(PyObject *__py } if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2234 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2234 * src = self._delegate * if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0: * return None # <<<<<<<<<<<<<< @@ -19299,7 +19607,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend_0__get__(PyObject *__py } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2235 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2235 * if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0: * return None * return bam_calend(&src.core, bam1_cigar(src)) # <<<<<<<<<<<<<< @@ -19327,7 +19635,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2239 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2239 * '''aligned length of the read (read only). Returns None if * not available.''' * def __get__(self): # <<<<<<<<<<<<<< @@ -19335,8 +19643,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4aend_0__get__(PyObject *__py * src = self._delegate */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen___get__(PyObject *__pyx_v_self) { bam1_t *__pyx_v_src; PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; @@ -19348,7 +19656,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(PyObject *__py __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2239); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2241 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2241 * def __get__(self): * cdef bam1_t * src * src = self._delegate # <<<<<<<<<<<<<< @@ -19357,7 +19665,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(PyObject *__py */ __pyx_v_src = ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2242 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2242 * cdef bam1_t * src * src = self._delegate * if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0: # <<<<<<<<<<<<<< @@ -19379,7 +19687,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(PyObject *__py } if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2243 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2243 * src = self._delegate * if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0: * return None # <<<<<<<<<<<<<< @@ -19394,7 +19702,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(PyObject *__py } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2244 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2244 * if (self.flag & BAM_FUNMAP) or src.core.n_cigar == 0: * return None * return bam_calend(&src.core, # <<<<<<<<<<<<<< @@ -19403,7 +19711,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(PyObject *__py */ __Pyx_XDECREF(__pyx_r); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2246 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2246 * return bam_calend(&src.core, * bam1_cigar(src)) - \ * self._delegate.core.pos # <<<<<<<<<<<<<< @@ -19430,7 +19738,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2250 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2250 * property mapq: * """mapping quality""" * def __get__(self): return self._delegate.core.qual # <<<<<<<<<<<<<< @@ -19438,8 +19746,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(PyObject *__py * property mrnm: */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mapq_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mapq_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mapq___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mapq___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -19465,7 +19773,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mapq_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2251 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2251 * """mapping quality""" * def __get__(self): return self._delegate.core.qual * def __set__(self, qual): self._delegate.core.qual = qual # <<<<<<<<<<<<<< @@ -19473,8 +19781,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mapq_0__get__(PyObject *__py * """the :term:`reference` id of the mate """ */ -static int __pyx_pf_9csamtools_11AlignedRead_4mapq_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_4mapq_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual) { +static int __pyx_pf_9csamtools_11AlignedRead_4mapq___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_4mapq___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_qual) { int __pyx_r; uint32_t __pyx_t_1; __Pyx_TraceDeclarations @@ -19494,7 +19802,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4mapq_1__set__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2254 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2254 * property mrnm: * """the :term:`reference` id of the mate """ * def __get__(self): return self._delegate.core.mtid # <<<<<<<<<<<<<< @@ -19502,8 +19810,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_4mapq_1__set__(PyObject *__pyx_v_se * property mpos: */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mrnm_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mrnm_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mrnm___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mrnm___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -19529,7 +19837,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mrnm_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2255 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2255 * """the :term:`reference` id of the mate """ * def __get__(self): return self._delegate.core.mtid * def __set__(self, mtid): self._delegate.core.mtid = mtid # <<<<<<<<<<<<<< @@ -19537,8 +19845,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mrnm_0__get__(PyObject *__py * """the position of the mate""" */ -static int __pyx_pf_9csamtools_11AlignedRead_4mrnm_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_4mrnm_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid) { +static int __pyx_pf_9csamtools_11AlignedRead_4mrnm___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_4mrnm___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mtid) { int __pyx_r; int32_t __pyx_t_1; __Pyx_TraceDeclarations @@ -19558,7 +19866,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4mrnm_1__set__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2258 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2258 * property mpos: * """the position of the mate""" * def __get__(self): return self._delegate.core.mpos # <<<<<<<<<<<<<< @@ -19566,8 +19874,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_4mrnm_1__set__(PyObject *__pyx_v_se * property isize: */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mpos_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mpos_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mpos___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mpos___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -19593,7 +19901,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mpos_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2259 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2259 * """the position of the mate""" * def __get__(self): return self._delegate.core.mpos * def __set__(self, mpos): self._delegate.core.mpos = mpos # <<<<<<<<<<<<<< @@ -19601,8 +19909,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_4mpos_0__get__(PyObject *__py * """the insert size""" */ -static int __pyx_pf_9csamtools_11AlignedRead_4mpos_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_4mpos_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos) { +static int __pyx_pf_9csamtools_11AlignedRead_4mpos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_4mpos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mpos) { int __pyx_r; int32_t __pyx_t_1; __Pyx_TraceDeclarations @@ -19622,7 +19930,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_4mpos_1__set__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2262 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2262 * property isize: * """the insert size""" * def __get__(self): return self._delegate.core.isize # <<<<<<<<<<<<<< @@ -19630,8 +19938,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_4mpos_1__set__(PyObject *__pyx_v_se * property is_paired: */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5isize_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5isize_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5isize___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_5isize___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -19657,7 +19965,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5isize_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2263 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2263 * """the insert size""" * def __get__(self): return self._delegate.core.isize * def __set__(self, isize): self._delegate.core.isize = isize # <<<<<<<<<<<<<< @@ -19665,8 +19973,8 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5isize_0__get__(PyObject *__p * """true if read is paired in sequencing""" */ -static int __pyx_pf_9csamtools_11AlignedRead_5isize_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_5isize_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize) { +static int __pyx_pf_9csamtools_11AlignedRead_5isize___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_5isize___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isize) { int __pyx_r; int32_t __pyx_t_1; __Pyx_TraceDeclarations @@ -19686,7 +19994,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_5isize_1__set__(PyObject *__pyx_v_s return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2266 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2266 * property is_paired: * """true if read is paired in sequencing""" * def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0 # <<<<<<<<<<<<<< @@ -19694,8 +20002,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_5isize_1__set__(PyObject *__pyx_v_s * if val: self._delegate.core.flag |= BAM_FPAIRED */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_paired_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_paired_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_paired___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_paired___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -19721,7 +20029,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_paired_0__get__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2267 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2267 * """true if read is paired in sequencing""" * def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -19729,15 +20037,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_paired_0__get__(PyObject * else: self._delegate.core.flag &= ~BAM_FPAIRED */ -static int __pyx_pf_9csamtools_11AlignedRead_9is_paired_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_9is_paired_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_9is_paired___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_9is_paired___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2267); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2268 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2268 * def __get__(self): return (self._delegate.core.flag & BAM_FPAIRED) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FPAIRED # <<<<<<<<<<<<<< @@ -19746,19 +20054,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_9is_paired_1__set__(PyObject *__pyx */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 1); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 1; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2269 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2269 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FPAIRED * else: self._delegate.core.flag &= ~BAM_FPAIRED # <<<<<<<<<<<<<< * property is_proper_pair: * """true if read is mapped in a proper pair""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~1)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~1); } __pyx_L5:; @@ -19773,7 +20081,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_9is_paired_1__set__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2272 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2272 * property is_proper_pair: * """true if read is mapped in a proper pair""" * def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0 # <<<<<<<<<<<<<< @@ -19781,8 +20089,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_9is_paired_1__set__(PyObject *__pyx * if val: self._delegate.core.flag |= BAM_FPROPER_PAIR */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_14is_proper_pair___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_14is_proper_pair___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -19816,7 +20124,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_0__get__(PyO return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2273 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2273 * """true if read is mapped in a proper pair""" * def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -19824,15 +20132,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_0__get__(PyO * else: self._delegate.core.flag &= ~BAM_FPROPER_PAIR */ -static int __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2273); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2274 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2274 * def __get__(self): return (self.flag & BAM_FPROPER_PAIR) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FPROPER_PAIR # <<<<<<<<<<<<<< @@ -19841,19 +20149,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_1__set__(PyObject */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 2); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 2; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2275 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2275 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FPROPER_PAIR * else: self._delegate.core.flag &= ~BAM_FPROPER_PAIR # <<<<<<<<<<<<<< * property is_unmapped: * """true if read itself is unmapped""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~2)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~2); } __pyx_L5:; @@ -19868,7 +20176,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_1__set__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2278 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2278 * property is_unmapped: * """true if read itself is unmapped""" * def __get__(self): return (self.flag & BAM_FUNMAP) != 0 # <<<<<<<<<<<<<< @@ -19876,8 +20184,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_1__set__(PyObject * if val: self._delegate.core.flag |= BAM_FUNMAP */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_11is_unmapped_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_11is_unmapped_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_11is_unmapped___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_11is_unmapped___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -19911,7 +20219,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_11is_unmapped_0__get__(PyObje return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2279 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2279 * """true if read itself is unmapped""" * def __get__(self): return (self.flag & BAM_FUNMAP) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -19919,15 +20227,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_11is_unmapped_0__get__(PyObje * else: self._delegate.core.flag &= ~BAM_FUNMAP */ -static int __pyx_pf_9csamtools_11AlignedRead_11is_unmapped_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_11is_unmapped_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_11is_unmapped___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_11is_unmapped___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2279); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2280 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2280 * def __get__(self): return (self.flag & BAM_FUNMAP) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FUNMAP # <<<<<<<<<<<<<< @@ -19936,19 +20244,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_11is_unmapped_1__set__(PyObject *__ */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 4); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 4; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2281 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2281 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FUNMAP * else: self._delegate.core.flag &= ~BAM_FUNMAP # <<<<<<<<<<<<<< * property mate_is_unmapped: * """true if the mate is unmapped""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~4)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~4); } __pyx_L5:; @@ -19963,7 +20271,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_11is_unmapped_1__set__(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2284 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2284 * property mate_is_unmapped: * """true if the mate is unmapped""" * def __get__(self): return (self.flag & BAM_FMUNMAP) != 0 # <<<<<<<<<<<<<< @@ -19971,8 +20279,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_11is_unmapped_1__set__(PyObject *__ * if val: self._delegate.core.flag |= BAM_FMUNMAP */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -20006,7 +20314,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_0__get__(P return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2285 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2285 * """true if the mate is unmapped""" * def __get__(self): return (self.flag & BAM_FMUNMAP) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -20014,15 +20322,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_0__get__(P * else: self._delegate.core.flag &= ~BAM_FMUNMAP */ -static int __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2285); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2286 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2286 * def __get__(self): return (self.flag & BAM_FMUNMAP) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FMUNMAP # <<<<<<<<<<<<<< @@ -20031,19 +20339,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_1__set__(PyObjec */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 8); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 8; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2287 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2287 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FMUNMAP * else: self._delegate.core.flag &= ~BAM_FMUNMAP # <<<<<<<<<<<<<< * property is_reverse: * """true if read is mapped to reverse strand""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~8)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~8); } __pyx_L5:; @@ -20058,7 +20366,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_1__set__(PyObjec return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2290 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2290 * property is_reverse: * """true if read is mapped to reverse strand""" * def __get__(self): return (self.flag & BAM_FREVERSE) != 0 # <<<<<<<<<<<<<< @@ -20066,8 +20374,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_1__set__(PyObjec * if val: self._delegate.core.flag |= BAM_FREVERSE */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_10is_reverse_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_10is_reverse_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_10is_reverse___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_10is_reverse___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -20101,7 +20409,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_10is_reverse_0__get__(PyObjec return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2291 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2291 * """true if read is mapped to reverse strand""" * def __get__(self): return (self.flag & BAM_FREVERSE) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -20109,15 +20417,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_10is_reverse_0__get__(PyObjec * else: self._delegate.core.flag &= ~BAM_FREVERSE */ -static int __pyx_pf_9csamtools_11AlignedRead_10is_reverse_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_10is_reverse_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_10is_reverse___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_10is_reverse___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2291); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2292 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2292 * def __get__(self): return (self.flag & BAM_FREVERSE) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FREVERSE # <<<<<<<<<<<<<< @@ -20126,19 +20434,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_10is_reverse_1__set__(PyObject *__p */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 16); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 16; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2293 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2293 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FREVERSE * else: self._delegate.core.flag &= ~BAM_FREVERSE # <<<<<<<<<<<<<< * property mate_is_reverse: * """true is read is mapped to reverse strand""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~16)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~16); } __pyx_L5:; @@ -20153,7 +20461,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_10is_reverse_1__set__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2296 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2296 * property mate_is_reverse: * """true is read is mapped to reverse strand""" * def __get__(self): return (self.flag & BAM_FMREVERSE) != 0 # <<<<<<<<<<<<<< @@ -20161,8 +20469,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_10is_reverse_1__set__(PyObject *__p * if val: self._delegate.core.flag |= BAM_FMREVERSE */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -20196,7 +20504,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_0__get__(Py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2297 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2297 * """true is read is mapped to reverse strand""" * def __get__(self): return (self.flag & BAM_FMREVERSE) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -20204,15 +20512,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_0__get__(Py * else: self._delegate.core.flag &= ~BAM_FMREVERSE */ -static int __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2297); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2298 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2298 * def __get__(self): return (self.flag & BAM_FMREVERSE) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FMREVERSE # <<<<<<<<<<<<<< @@ -20221,19 +20529,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_1__set__(PyObject */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 32); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 32; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2299 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2299 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FMREVERSE * else: self._delegate.core.flag &= ~BAM_FMREVERSE # <<<<<<<<<<<<<< * property is_read1: * """true if this is read1""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~32)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~32); } __pyx_L5:; @@ -20248,7 +20556,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_1__set__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2302 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2302 * property is_read1: * """true if this is read1""" * def __get__(self): return (self.flag & BAM_FREAD1) != 0 # <<<<<<<<<<<<<< @@ -20256,8 +20564,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_1__set__(PyObject * if val: self._delegate.core.flag |= BAM_FREAD1 */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read1_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read1_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read1___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read1___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -20291,7 +20599,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read1_0__get__(PyObject * return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2303 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2303 * """true if this is read1""" * def __get__(self): return (self.flag & BAM_FREAD1) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -20299,15 +20607,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read1_0__get__(PyObject * * else: self._delegate.core.flag &= ~BAM_FREAD1 */ -static int __pyx_pf_9csamtools_11AlignedRead_8is_read1_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_8is_read1_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_8is_read1___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_8is_read1___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2303); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2304 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2304 * def __get__(self): return (self.flag & BAM_FREAD1) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FREAD1 # <<<<<<<<<<<<<< @@ -20316,19 +20624,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_8is_read1_1__set__(PyObject *__pyx_ */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 64); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 64; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2305 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2305 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FREAD1 * else: self._delegate.core.flag &= ~BAM_FREAD1 # <<<<<<<<<<<<<< * property is_read2: * """true if this is read2""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~64)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~64); } __pyx_L5:; @@ -20343,7 +20651,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_8is_read1_1__set__(PyObject *__pyx_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2308 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2308 * property is_read2: * """true if this is read2""" * def __get__(self): return (self.flag & BAM_FREAD2) != 0 # <<<<<<<<<<<<<< @@ -20351,8 +20659,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_8is_read1_1__set__(PyObject *__pyx_ * if val: self._delegate.core.flag |= BAM_FREAD2 */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read2_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read2_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read2___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read2___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -20386,7 +20694,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read2_0__get__(PyObject * return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2309 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2309 * """true if this is read2""" * def __get__(self): return (self.flag & BAM_FREAD2) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -20394,15 +20702,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_8is_read2_0__get__(PyObject * * else: self._delegate.core.flag &= ~BAM_FREAD2 */ -static int __pyx_pf_9csamtools_11AlignedRead_8is_read2_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_8is_read2_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_8is_read2___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_8is_read2___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2309); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2310 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2310 * def __get__(self): return (self.flag & BAM_FREAD2) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FREAD2 # <<<<<<<<<<<<<< @@ -20411,19 +20719,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_8is_read2_1__set__(PyObject *__pyx_ */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 128); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 128; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2311 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2311 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FREAD2 * else: self._delegate.core.flag &= ~BAM_FREAD2 # <<<<<<<<<<<<<< * property is_secondary: * """true if not primary alignment""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~128)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~128); } __pyx_L5:; @@ -20438,7 +20746,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_8is_read2_1__set__(PyObject *__pyx_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2314 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2314 * property is_secondary: * """true if not primary alignment""" * def __get__(self): return (self.flag & BAM_FSECONDARY) != 0 # <<<<<<<<<<<<<< @@ -20446,8 +20754,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_8is_read2_1__set__(PyObject *__pyx_ * if val: self._delegate.core.flag |= BAM_FSECONDARY */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_secondary_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_secondary_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_secondary___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_secondary___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -20481,7 +20789,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_secondary_0__get__(PyObj return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2315 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2315 * """true if not primary alignment""" * def __get__(self): return (self.flag & BAM_FSECONDARY) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -20489,15 +20797,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_secondary_0__get__(PyObj * else: self._delegate.core.flag &= ~BAM_FSECONDARY */ -static int __pyx_pf_9csamtools_11AlignedRead_12is_secondary_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_12is_secondary_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_12is_secondary___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_12is_secondary___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2315); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2316 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2316 * def __get__(self): return (self.flag & BAM_FSECONDARY) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FSECONDARY # <<<<<<<<<<<<<< @@ -20506,19 +20814,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_12is_secondary_1__set__(PyObject *_ */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 256); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 256; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2317 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2317 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FSECONDARY * else: self._delegate.core.flag &= ~BAM_FSECONDARY # <<<<<<<<<<<<<< * property is_qcfail: * """true if QC failure""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~256)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~256); } __pyx_L5:; @@ -20533,7 +20841,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_12is_secondary_1__set__(PyObject *_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2320 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2320 * property is_qcfail: * """true if QC failure""" * def __get__(self): return (self.flag & BAM_FQCFAIL) != 0 # <<<<<<<<<<<<<< @@ -20541,8 +20849,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_12is_secondary_1__set__(PyObject *_ * if val: self._delegate.core.flag |= BAM_FQCFAIL */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_qcfail_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_qcfail_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_qcfail___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_qcfail___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -20576,7 +20884,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_qcfail_0__get__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2321 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2321 * """true if QC failure""" * def __get__(self): return (self.flag & BAM_FQCFAIL) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -20584,15 +20892,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_9is_qcfail_0__get__(PyObject * else: self._delegate.core.flag &= ~BAM_FQCFAIL */ -static int __pyx_pf_9csamtools_11AlignedRead_9is_qcfail_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_9is_qcfail_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_9is_qcfail___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_9is_qcfail___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2321); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2322 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2322 * def __get__(self): return (self.flag & BAM_FQCFAIL) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FQCFAIL # <<<<<<<<<<<<<< @@ -20601,19 +20909,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_9is_qcfail_1__set__(PyObject *__pyx */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 512); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 512; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2323 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2323 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FQCFAIL * else: self._delegate.core.flag &= ~BAM_FQCFAIL # <<<<<<<<<<<<<< * property is_duplicate: * """ true if optical or PCR duplicate""" */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~512)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~512); } __pyx_L5:; @@ -20628,7 +20936,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_9is_qcfail_1__set__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2326 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2326 * property is_duplicate: * """ true if optical or PCR duplicate""" * def __get__(self): return (self.flag & BAM_FDUP) != 0 # <<<<<<<<<<<<<< @@ -20636,8 +20944,8 @@ static int __pyx_pf_9csamtools_11AlignedRead_9is_qcfail_1__set__(PyObject *__pyx * if val: self._delegate.core.flag |= BAM_FDUP */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_duplicate_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_duplicate_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_duplicate___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_duplicate___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -20671,7 +20979,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_duplicate_0__get__(PyObj return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2327 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2327 * """ true if optical or PCR duplicate""" * def __get__(self): return (self.flag & BAM_FDUP) != 0 * def __set__(self,val): # <<<<<<<<<<<<<< @@ -20679,15 +20987,15 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_12is_duplicate_0__get__(PyObj * else: self._delegate.core.flag &= ~BAM_FDUP */ -static int __pyx_pf_9csamtools_11AlignedRead_12is_duplicate_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ -static int __pyx_pf_9csamtools_11AlignedRead_12is_duplicate_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { +static int __pyx_pf_9csamtools_11AlignedRead_12is_duplicate___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pf_9csamtools_11AlignedRead_12is_duplicate___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__"); __Pyx_TraceCall("__set__", __pyx_f[0], 2327); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2328 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2328 * def __get__(self): return (self.flag & BAM_FDUP) != 0 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FDUP # <<<<<<<<<<<<<< @@ -20696,19 +21004,19 @@ static int __pyx_pf_9csamtools_11AlignedRead_12is_duplicate_1__set__(PyObject *_ */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag | 1024); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag |= 1024; goto __pyx_L5; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2329 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2329 * def __set__(self,val): * if val: self._delegate.core.flag |= BAM_FDUP * else: self._delegate.core.flag &= ~BAM_FDUP # <<<<<<<<<<<<<< * * def opt(self, tag): */ - ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag = (((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag & (~1024)); + ((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate->core.flag &= (~1024); } __pyx_L5:; @@ -20723,7 +21031,7 @@ static int __pyx_pf_9csamtools_11AlignedRead_12is_duplicate_1__set__(PyObject *_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2331 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2331 * else: self._delegate.core.flag &= ~BAM_FDUP * * def opt(self, tag): # <<<<<<<<<<<<<< @@ -20731,9 +21039,9 @@ static int __pyx_pf_9csamtools_11AlignedRead_12is_duplicate_1__set__(PyObject *_ * #see bam_aux.c: bam_aux_get() and bam_aux2i() etc */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/ -static char __pyx_doc_9csamtools_11AlignedRead_5opt[] = "retrieves optional data given a two-letter *tag*"; -static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_opt(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/ +static char __pyx_doc_9csamtools_11AlignedRead_opt[] = "retrieves optional data given a two-letter *tag*"; +static PyObject *__pyx_pf_9csamtools_11AlignedRead_opt(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) { uint8_t *__pyx_v_v; PyObject *__pyx_v_type; PyObject *__pyx_r = NULL; @@ -20750,7 +21058,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, __Pyx_TraceCall("opt", __pyx_f[0], 2331); __pyx_v_type = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2335 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2335 * #see bam_aux.c: bam_aux_get() and bam_aux2i() etc * cdef uint8_t * v * v = bam_aux_get(self._delegate, tag) # <<<<<<<<<<<<<< @@ -20760,7 +21068,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, __pyx_t_1 = PyBytes_AsString(__pyx_v_tag); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_v = bam_aux_get(((struct __pyx_obj_9csamtools_AlignedRead *)__pyx_v_self)->_delegate, __pyx_t_1); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2336 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2336 * cdef uint8_t * v * v = bam_aux_get(self._delegate, tag) * if v == NULL: raise KeyError( "tag '%s' not present" % tag ) # <<<<<<<<<<<<<< @@ -20769,16 +21077,16 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, */ __pyx_t_2 = (__pyx_v_v == NULL); if (__pyx_t_2) { - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_124), __pyx_v_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_72), __pyx_v_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __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_KeyError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -20786,7 +21094,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2337 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2337 * v = bam_aux_get(self._delegate, tag) * if v == NULL: raise KeyError( "tag '%s' not present" % tag ) * type = chr(v[0]) # <<<<<<<<<<<<<< @@ -20796,18 +21104,18 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, __pyx_t_3 = __Pyx_PyInt_to_py_uint8_t((__pyx_v_v[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2337; __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 = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __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_builtin_chr, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_builtin_chr, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_v_type); __pyx_v_type = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2338 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2338 * if v == NULL: raise KeyError( "tag '%s' not present" % tag ) * type = chr(v[0]) * if type == 'c' or type == 'C' or type == 's' or type == 'S': # <<<<<<<<<<<<<< @@ -20847,7 +21155,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, } if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2339 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2339 * type = chr(v[0]) * if type == 'c' or type == 'C' or type == 's' or type == 'S': * return bam_aux2i(v) # <<<<<<<<<<<<<< @@ -20863,7 +21171,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, goto __pyx_L6; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2340 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2340 * if type == 'c' or type == 'C' or type == 's' or type == 'S': * return bam_aux2i(v) * elif type == 'i' or type == 'I': # <<<<<<<<<<<<<< @@ -20885,7 +21193,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, } if (__pyx_t_6) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2341 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2341 * return bam_aux2i(v) * elif type == 'i' or type == 'I': * return bam_aux2i(v) # <<<<<<<<<<<<<< @@ -20901,7 +21209,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, goto __pyx_L6; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2342 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2342 * elif type == 'i' or type == 'I': * return bam_aux2i(v) * elif type == 'f' or type == 'F': # <<<<<<<<<<<<<< @@ -20923,7 +21231,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, } if (__pyx_t_2) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2343 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2343 * return bam_aux2i(v) * elif type == 'f' or type == 'F': * return bam_aux2f(v) # <<<<<<<<<<<<<< @@ -20939,7 +21247,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, goto __pyx_L6; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2344 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2344 * elif type == 'f' or type == 'F': * return bam_aux2f(v) * elif type == 'd' or type == 'D': # <<<<<<<<<<<<<< @@ -20961,7 +21269,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, } if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2345 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2345 * return bam_aux2f(v) * elif type == 'd' or type == 'D': * return bam_aux2d(v) # <<<<<<<<<<<<<< @@ -20977,7 +21285,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, goto __pyx_L6; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2346 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2346 * elif type == 'd' or type == 'D': * return bam_aux2d(v) * elif type == 'A': # <<<<<<<<<<<<<< @@ -20990,7 +21298,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2349 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2349 * # there might a more efficient way * # to convert a char into a string * return '%c' % bam_aux2A(v) # <<<<<<<<<<<<<< @@ -21000,7 +21308,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyInt_FromLong(bam_aux2A(__pyx_v_v)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_110), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_59), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = ((PyObject *)__pyx_t_4); @@ -21009,7 +21317,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, goto __pyx_L6; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2350 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2350 * # to convert a char into a string * return '%c' % bam_aux2A(v) * elif type == 'Z': # <<<<<<<<<<<<<< @@ -21022,7 +21330,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2351 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2351 * return '%c' % bam_aux2A(v) * elif type == 'Z': * return bam_aux2Z(v) # <<<<<<<<<<<<<< @@ -21054,7 +21362,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2353 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2353 * return bam_aux2Z(v) * * def fancy_str (self): # <<<<<<<<<<<<<< @@ -21062,9 +21370,9 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_5opt(PyObject *__pyx_v_self, * """ */ -static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_9csamtools_11AlignedRead_6fancy_str[] = "returns list of fieldnames/values in pretty format for debugging\n "; -static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_11AlignedRead_fancy_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_9csamtools_11AlignedRead_fancy_str[] = "returns list of fieldnames/values in pretty format for debugging\n "; +static PyObject *__pyx_pf_9csamtools_11AlignedRead_fancy_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_v_ret_string; PyObject *__pyx_v_field_names; PyObject *__pyx_v_fields_names_in_order; @@ -21083,12 +21391,12 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("fancy_str"); __Pyx_TraceCall("fancy_str", __pyx_f[0], 2353); - __pyx_v_ret_string = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); - __pyx_v_field_names = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); - __pyx_v_fields_names_in_order = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_ret_string = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_field_names = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_fields_names_in_order = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_v_f = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2356 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2356 * """returns list of fieldnames/values in pretty format for debugging * """ * ret_string = [] # <<<<<<<<<<<<<< @@ -21101,7 +21409,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ __pyx_v_ret_string = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2357 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2357 * """ * ret_string = [] * field_names = { # <<<<<<<<<<<<<< @@ -21110,29 +21418,29 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __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_125)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_kp_s_126)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mtid), ((PyObject *)__pyx_kp_s_127)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mpos), ((PyObject *)__pyx_kp_s_128)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__isize), ((PyObject *)__pyx_kp_s_129)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__flag), ((PyObject *)__pyx_kp_s_130)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_cigar), ((PyObject *)__pyx_kp_s_131)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cigar), ((PyObject *)__pyx_kp_s_132)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), ((PyObject *)__pyx_kp_s_133)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bin), ((PyObject *)__pyx_kp_s_134)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qname), ((PyObject *)__pyx_kp_s_135)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qname), ((PyObject *)__pyx_kp_s_136)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qseq), ((PyObject *)__pyx_kp_s_137)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qseq), ((PyObject *)__pyx_kp_s_138)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bqual), ((PyObject *)__pyx_kp_s_139)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_aux), ((PyObject *)__pyx_kp_s_140)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__m_data), ((PyObject *)__pyx_kp_s_141)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__data_len), ((PyObject *)__pyx_kp_s_142)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__tid), ((PyObject *)__pyx_kp_s_73)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_kp_s_74)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mtid), ((PyObject *)__pyx_kp_s_75)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mpos), ((PyObject *)__pyx_kp_s_76)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__isize), ((PyObject *)__pyx_kp_s_77)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__flag), ((PyObject *)__pyx_kp_s_78)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_cigar), ((PyObject *)__pyx_kp_s_79)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cigar), ((PyObject *)__pyx_kp_s_80)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), ((PyObject *)__pyx_kp_s_81)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bin), ((PyObject *)__pyx_kp_s_82)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qname), ((PyObject *)__pyx_kp_s_83)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qname), ((PyObject *)__pyx_kp_s_84)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_qseq), ((PyObject *)__pyx_kp_s_85)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qseq), ((PyObject *)__pyx_kp_s_86)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__bqual), ((PyObject *)__pyx_kp_s_87)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__l_aux), ((PyObject *)__pyx_kp_s_88)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__m_data), ((PyObject *)__pyx_kp_s_89)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__data_len), ((PyObject *)__pyx_kp_s_90)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_v_field_names)); __pyx_v_field_names = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2377 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2377 * "data_len": "Current data length", * } * fields_names_in_order = ["tid", "pos", "mtid", "mpos", "isize", "flag", # <<<<<<<<<<<<<< @@ -21199,17 +21507,18 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ __pyx_v_fields_names_in_order = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2381 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2381 * "l_qseq", "qseq", "bqual", "l_aux", "m_data", "data_len"] * * for f in fields_names_in_order: # <<<<<<<<<<<<<< * if not f in self.__dict__: * continue */ - if (unlikely(__pyx_v_fields_names_in_order == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (likely(((PyObject *)__pyx_v_fields_names_in_order) != Py_None)) { + __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_fields_names_in_order); __Pyx_INCREF(__pyx_t_1); + } else { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_fields_names_in_order); __Pyx_INCREF(__pyx_t_1); for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; @@ -21217,7 +21526,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ __pyx_v_f = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2382 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2382 * * for f in fields_names_in_order: * if not f in self.__dict__: # <<<<<<<<<<<<<< @@ -21231,7 +21540,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ __pyx_t_5 = (!__pyx_t_4); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2383 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2383 * for f in fields_names_in_order: * if not f in self.__dict__: * continue # <<<<<<<<<<<<<< @@ -21243,7 +21552,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2384 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2384 * if not f in self.__dict__: * continue * ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f))) # <<<<<<<<<<<<<< @@ -21255,24 +21564,24 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ } __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 = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_s_144), __pyx_v_f); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_s_92), __pyx_v_f); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_145)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_93)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __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(__pyx_v_self, __pyx_n_s____getattribute__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __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 = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __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 = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __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_DECREF(__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 = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); @@ -21282,16 +21591,16 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_9 = 0; - __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_143), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_91), __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __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 = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_ret_string), ((PyObject *)__pyx_t_9)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; __pyx_L5_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2386 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2386 * ret_string.append("%-30s %-10s= %s" % (field_names[f], "(" + f + ")", self.__getattribute__(f))) * * for f in self.__dict__: # <<<<<<<<<<<<<< @@ -21326,21 +21635,22 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ __pyx_v_f = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2387 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2387 * * for f in self.__dict__: * if not f in field_names: # <<<<<<<<<<<<<< * ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f))) * return ret_string */ - if (unlikely(__pyx_v_field_names == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(((PyObject *)__pyx_v_field_names) == Py_None)) { + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } else { + __pyx_t_5 = ((PyDict_Contains(((PyObject *)__pyx_v_field_names), __pyx_v_f))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = ((PyDict_Contains(((PyObject *)__pyx_v_field_names), __pyx_v_f))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (!__pyx_t_5); if (__pyx_t_4) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2388 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2388 * for f in self.__dict__: * if not f in field_names: * ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f))) # <<<<<<<<<<<<<< @@ -21353,29 +21663,29 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____getattribute__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __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 = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __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 = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __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_DECREF(__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 = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __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_INCREF(((PyObject *)__pyx_kp_s_12)); - PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_kp_s_12)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_12)); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_8)); + PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_kp_s_8)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8)); 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_143), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_91), __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __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 = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_ret_string), ((PyObject *)__pyx_t_7)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; goto __pyx_L10; } @@ -21383,7 +21693,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2389 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2389 * if not f in field_names: * ret_string.append("%-30s %-10s= %s" % (f, "", self.__getattribute__(f))) * return ret_string # <<<<<<<<<<<<<< @@ -21417,7 +21727,7 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2413 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2413 * cdef int n_pu * * def __init__(self): # <<<<<<<<<<<<<< @@ -21425,10 +21735,11 @@ static PyObject *__pyx_pf_9csamtools_11AlignedRead_6fancy_str(PyObject *__pyx_v_ * */ -static int __pyx_pf_9csamtools_11PileupProxy_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_11PileupProxy_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_11PileupProxy___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_11PileupProxy___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__"); __Pyx_TraceCall("__init__", __pyx_f[0], 2413); @@ -21436,23 +21747,30 @@ static int __pyx_pf_9csamtools_11PileupProxy_0__init__(PyObject *__pyx_v_self, P __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; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2414 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2414 * * 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_147), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2414; __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 = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_94)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_94)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_94)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("csamtools.PileupProxy.__init__"); __pyx_r = -1; __pyx_L0:; @@ -21461,7 +21779,7 @@ static int __pyx_pf_9csamtools_11PileupProxy_0__init__(PyObject *__pyx_v_self, P return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2416 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2416 * raise TypeError("This class cannot be instantiated from Python") * * def __str__(self): # <<<<<<<<<<<<<< @@ -21469,8 +21787,8 @@ static int __pyx_pf_9csamtools_11PileupProxy_0__init__(PyObject *__pyx_v_self, P * "\n" +\ */ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11PileupProxy___str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11PileupProxy___str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -21481,7 +21799,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_se __Pyx_RefNannySetupContext("__str__"); __Pyx_TraceCall("__str__", __pyx_f[0], 2416); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2417 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2417 * * def __str__(self): * return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ # <<<<<<<<<<<<<< @@ -21490,7 +21808,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_se */ __Pyx_XDECREF(__pyx_r); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2418 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2418 * def __str__(self): * return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ * "\n" +\ # <<<<<<<<<<<<<< @@ -21500,7 +21818,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_se __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2417 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2417 * * def __str__(self): * return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ # <<<<<<<<<<<<<< @@ -21514,7 +21832,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_se __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2417; __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 = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); @@ -21525,30 +21843,30 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_se __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 = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)(&PyString_Type)))); - __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_5)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)((PyObject*)&PyString_Type))); + __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __Pyx_GIVEREF(__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 = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_builtin_map, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 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 = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __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 = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2417; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2419 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2419 * return "\t".join( map(str, (self.tid, self.pos, self.n))) +\ * "\n" +\ * "\n".join( map(str, self.pileups) ) # <<<<<<<<<<<<<< @@ -21560,25 +21878,25 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_se __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pileups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2419; __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 = 2419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type)))); - __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type)))); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)&PyString_Type))); + __Pyx_GIVEREF(((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 = 2419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_map, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __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 = 2419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 2419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2419; __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_DECREF(__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 = 2418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -21604,7 +21922,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2423 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2423 * property tid: * '''the chromosome ID as is defined in the header''' * def __get__(self): return self.tid # <<<<<<<<<<<<<< @@ -21612,8 +21930,8 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1__str__(PyObject *__pyx_v_se * property n: */ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_3tid_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_3tid_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11PileupProxy_3tid___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11PileupProxy_3tid___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -21639,7 +21957,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_3tid_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2427 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2427 * property n: * '''number of reads mapping to this column.''' * def __get__(self): return self.n_pu # <<<<<<<<<<<<<< @@ -21647,8 +21965,8 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_3tid_0__get__(PyObject *__pyx * */ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_1n_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_1n_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11PileupProxy_1n___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11PileupProxy_1n___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -21674,7 +21992,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1n_0__get__(PyObject *__pyx_v return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2428 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2428 * '''number of reads mapping to this column.''' * def __get__(self): return self.n_pu * def __set__(self, n): self.n_pu = n # <<<<<<<<<<<<<< @@ -21682,8 +22000,8 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_1n_0__get__(PyObject *__pyx_v * property pos: */ -static int __pyx_pf_9csamtools_11PileupProxy_1n_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n); /*proto*/ -static int __pyx_pf_9csamtools_11PileupProxy_1n_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n) { +static int __pyx_pf_9csamtools_11PileupProxy_1n___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n); /*proto*/ +static int __pyx_pf_9csamtools_11PileupProxy_1n___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_n) { int __pyx_r; int __pyx_t_1; __Pyx_TraceDeclarations @@ -21703,7 +22021,7 @@ static int __pyx_pf_9csamtools_11PileupProxy_1n_1__set__(PyObject *__pyx_v_self, return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2431 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2431 * * property pos: * def __get__(self): return self.pos # <<<<<<<<<<<<<< @@ -21711,8 +22029,8 @@ static int __pyx_pf_9csamtools_11PileupProxy_1n_1__set__(PyObject *__pyx_v_self, * property pileups: */ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_3pos_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_3pos_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11PileupProxy_3pos___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11PileupProxy_3pos___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -21738,7 +22056,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_3pos_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2435 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2435 * property pileups: * '''list of reads (:class:`pysam.PileupRead`) aligned to this column''' * def __get__(self): # <<<<<<<<<<<<<< @@ -21746,8 +22064,8 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_3pos_0__get__(PyObject *__pyx * pileups = [] */ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups___get__(PyObject *__pyx_v_self) { int __pyx_v_x; PyObject *__pyx_v_pileups; PyObject *__pyx_r = NULL; @@ -21757,9 +22075,9 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups_0__get__(PyObject *_ __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2435); - __pyx_v_pileups = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_pileups = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2437 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2437 * def __get__(self): * cdef int x * pileups = [] # <<<<<<<<<<<<<< @@ -21772,7 +22090,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups_0__get__(PyObject *_ __pyx_v_pileups = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2440 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2440 * # warning: there could be problems if self.n and self.buf are * # out of sync. * for x from 0 <= x < self.n_pu: # <<<<<<<<<<<<<< @@ -21782,7 +22100,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups_0__get__(PyObject *_ __pyx_t_2 = ((struct __pyx_obj_9csamtools_PileupProxy *)__pyx_v_self)->n_pu; for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2441 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2441 * # out of sync. * for x from 0 <= x < self.n_pu: * pileups.append( makePileupRead( &(self.plp[x])) ) # <<<<<<<<<<<<<< @@ -21794,11 +22112,11 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups_0__get__(PyObject *_ } __pyx_t_1 = __pyx_f_9csamtools_makePileupRead((&(((struct __pyx_obj_9csamtools_PileupProxy *)__pyx_v_self)->plp[__pyx_v_x]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyList_Append(__pyx_v_pileups, __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_pileups), __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2442 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2442 * for x from 0 <= x < self.n_pu: * pileups.append( makePileupRead( &(self.plp[x])) ) * return pileups # <<<<<<<<<<<<<< @@ -21824,7 +22142,7 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups_0__get__(PyObject *_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2457 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2457 * uint32_t _is_tail * * def __init__(self): # <<<<<<<<<<<<<< @@ -21832,10 +22150,11 @@ static PyObject *__pyx_pf_9csamtools_11PileupProxy_7pileups_0__get__(PyObject *_ * */ -static int __pyx_pf_9csamtools_10PileupRead_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_10PileupRead_0__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_10PileupRead___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_10PileupRead___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__"); __Pyx_TraceCall("__init__", __pyx_f[0], 2457); @@ -21843,23 +22162,30 @@ static int __pyx_pf_9csamtools_10PileupRead_0__init__(PyObject *__pyx_v_self, Py __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; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2458 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2458 * * 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_148), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __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 = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_94)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_94)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_94)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("csamtools.PileupRead.__init__"); __pyx_r = -1; __pyx_L0:; @@ -21868,7 +22194,7 @@ static int __pyx_pf_9csamtools_10PileupRead_0__init__(PyObject *__pyx_v_self, Py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2460 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2460 * raise TypeError("This class cannot be instantiated from Python") * * def __str__(self): # <<<<<<<<<<<<<< @@ -21876,8 +22202,8 @@ static int __pyx_pf_9csamtools_10PileupRead_0__init__(PyObject *__pyx_v_self, Py * */ -static PyObject *__pyx_pf_9csamtools_10PileupRead_1__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_10PileupRead_1__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_10PileupRead___str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_10PileupRead___str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -21892,7 +22218,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_1__str__(PyObject *__pyx_v_sel __Pyx_RefNannySetupContext("__str__"); __Pyx_TraceCall("__str__", __pyx_f[0], 2460); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2461 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2461 * * 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 ) ) ) # <<<<<<<<<<<<<< @@ -21917,7 +22243,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_1__str__(PyObject *__pyx_v_sel __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__is_tail); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2461; __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 = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); + __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3); @@ -21940,25 +22266,25 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_1__str__(PyObject *__pyx_v_sel __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 = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); - __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)((PyObject*)(&PyString_Type)))); - __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_t_9)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)((PyObject*)&PyString_Type))); + __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9); + __Pyx_GIVEREF(__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 = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyObject_Call(__pyx_builtin_map, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; + __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 = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __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 = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2461; __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; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; @@ -21984,7 +22310,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_1__str__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2465 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2465 * property alignment: * """a :class:`pysam.AlignedRead` object of the aligned read""" * def __get__(self): # <<<<<<<<<<<<<< @@ -21992,14 +22318,14 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_1__str__(PyObject *__pyx_v_sel * property qpos: */ -static PyObject *__pyx_pf_9csamtools_10PileupRead_9alignment_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_10PileupRead_9alignment_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_10PileupRead_9alignment___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_10PileupRead_9alignment___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2465); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2466 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2466 * """a :class:`pysam.AlignedRead` object of the aligned read""" * def __get__(self): * return self._alignment # <<<<<<<<<<<<<< @@ -22019,7 +22345,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_9alignment_0__get__(PyObject * return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2469 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2469 * property qpos: * """position of the read base at the pileup site, 0-based""" * def __get__(self): # <<<<<<<<<<<<<< @@ -22027,15 +22353,15 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_9alignment_0__get__(PyObject * * property indel: */ -static PyObject *__pyx_pf_9csamtools_10PileupRead_4qpos_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_10PileupRead_4qpos_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_10PileupRead_4qpos___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_10PileupRead_4qpos___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2469); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2470 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2470 * """position of the read base at the pileup site, 0-based""" * def __get__(self): * return self._qpos # <<<<<<<<<<<<<< @@ -22062,7 +22388,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_4qpos_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2473 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2473 * property indel: * """indel length; 0 for no indel, positive for ins and negative for del""" * def __get__(self): # <<<<<<<<<<<<<< @@ -22070,15 +22396,15 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_4qpos_0__get__(PyObject *__pyx * property is_del: */ -static PyObject *__pyx_pf_9csamtools_10PileupRead_5indel_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_10PileupRead_5indel_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_10PileupRead_5indel___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_10PileupRead_5indel___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2473); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2474 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2474 * """indel length; 0 for no indel, positive for ins and negative for del""" * def __get__(self): * return self._indel # <<<<<<<<<<<<<< @@ -22105,7 +22431,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_5indel_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2477 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2477 * property is_del: * """1 iff the base on the padded read is a deletion""" * def __get__(self): # <<<<<<<<<<<<<< @@ -22113,15 +22439,15 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_5indel_0__get__(PyObject *__py * property is_head: */ -static PyObject *__pyx_pf_9csamtools_10PileupRead_6is_del_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_10PileupRead_6is_del_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_10PileupRead_6is_del___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_10PileupRead_6is_del___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2477); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2478 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2478 * """1 iff the base on the padded read is a deletion""" * def __get__(self): * return self._is_del # <<<<<<<<<<<<<< @@ -22148,7 +22474,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_6is_del_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2480 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2480 * return self._is_del * property is_head: * def __get__(self): # <<<<<<<<<<<<<< @@ -22156,15 +22482,15 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_6is_del_0__get__(PyObject *__p * property is_tail: */ -static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_head_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_head_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_head___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_head___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2480); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2481 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2481 * property is_head: * def __get__(self): * return self._is_head # <<<<<<<<<<<<<< @@ -22191,7 +22517,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_head_0__get__(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2483 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2483 * return self._is_head * property is_tail: * def __get__(self): # <<<<<<<<<<<<<< @@ -22199,15 +22525,15 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_head_0__get__(PyObject *__ * property level: */ -static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_tail_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_tail_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_tail___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_tail___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2483); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2484 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2484 * property is_tail: * def __get__(self): * return self._is_tail # <<<<<<<<<<<<<< @@ -22234,7 +22560,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_tail_0__get__(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2486 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2486 * return self._is_tail * property level: * def __get__(self): # <<<<<<<<<<<<<< @@ -22242,15 +22568,15 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_7is_tail_0__get__(PyObject *__ * */ -static PyObject *__pyx_pf_9csamtools_10PileupRead_5level_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_10PileupRead_5level_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_10PileupRead_5level___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_10PileupRead_5level___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2486); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2487 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2487 * property level: * def __get__(self): * return self._level # <<<<<<<<<<<<<< @@ -22277,7 +22603,7 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_5level_0__get__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2491 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2491 * class Outs: * '''http://mail.python.org/pipermail/python-list/2000-June/038406.html''' * def __init__(self, id = 1): # <<<<<<<<<<<<<< @@ -22285,9 +22611,9 @@ static PyObject *__pyx_pf_9csamtools_10PileupRead_5level_0__get__(PyObject *__py * self.id = id */ -static PyObject *__pyx_pf_9csamtools_4Outs_0__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_9csamtools_4Outs_0__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9csamtools_4Outs_0__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_9csamtools_4Outs_0__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_4Outs___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_9csamtools_4Outs___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9csamtools_4Outs___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pf_9csamtools_4Outs___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_id = 0; PyObject *__pyx_r = NULL; @@ -22341,7 +22667,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_0__init__(PyObject *__pyx_self, PyObj return NULL; __pyx_L4_argument_unpacking_done:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2492 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2492 * '''http://mail.python.org/pipermail/python-list/2000-June/038406.html''' * def __init__(self, id = 1): * self.streams = [] # <<<<<<<<<<<<<< @@ -22353,7 +22679,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_0__init__(PyObject *__pyx_self, PyObj if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__streams, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2493 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2493 * def __init__(self, id = 1): * self.streams = [] * self.id = id # <<<<<<<<<<<<<< @@ -22375,7 +22701,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_0__init__(PyObject *__pyx_self, PyObj return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2495 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2495 * self.id = id * * def setdevice(self, filename): # <<<<<<<<<<<<<< @@ -22383,10 +22709,10 @@ static PyObject *__pyx_pf_9csamtools_4Outs_0__init__(PyObject *__pyx_self, PyObj * fd = os.open(filename, os.O_WRONLY) */ -static PyObject *__pyx_pf_9csamtools_4Outs_1setdevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_4Outs_1setdevice[] = "open an existing file, like \"/dev/null\""; -static PyMethodDef __pyx_mdef_9csamtools_4Outs_1setdevice = {__Pyx_NAMESTR("setdevice"), (PyCFunction)__pyx_pf_9csamtools_4Outs_1setdevice, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_4Outs_1setdevice)}; -static PyObject *__pyx_pf_9csamtools_4Outs_1setdevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_4Outs_setdevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_4Outs_setdevice[] = "open an existing file, like \"/dev/null\""; +static PyMethodDef __pyx_mdef_9csamtools_4Outs_setdevice = {__Pyx_NAMESTR("setdevice"), (PyCFunction)__pyx_pf_9csamtools_4Outs_setdevice, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_4Outs_setdevice)}; +static PyObject *__pyx_pf_9csamtools_4Outs_setdevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_fd; @@ -22441,7 +22767,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_1setdevice(PyObject *__pyx_self, PyOb __pyx_L4_argument_unpacking_done:; __pyx_v_fd = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2497 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2497 * def setdevice(self, filename): * '''open an existing file, like "/dev/null"''' * fd = os.open(filename, os.O_WRONLY) # <<<<<<<<<<<<<< @@ -22459,22 +22785,22 @@ static PyObject *__pyx_pf_9csamtools_4Outs_1setdevice(PyObject *__pyx_self, PyOb __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 = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename); __Pyx_GIVEREF(__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 = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2497; __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_v_fd); __pyx_v_fd = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2498 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2498 * '''open an existing file, like "/dev/null"''' * fd = os.open(filename, os.O_WRONLY) * self.setfd(fd) # <<<<<<<<<<<<<< @@ -22484,14 +22810,14 @@ static PyObject *__pyx_pf_9csamtools_4Outs_1setdevice(PyObject *__pyx_self, PyOb __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__setfd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2498; __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 = 2498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __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 = 2498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2498; __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -22510,7 +22836,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_1setdevice(PyObject *__pyx_self, PyOb return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2500 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2500 * self.setfd(fd) * * def setfile(self, filename): # <<<<<<<<<<<<<< @@ -22518,10 +22844,10 @@ static PyObject *__pyx_pf_9csamtools_4Outs_1setdevice(PyObject *__pyx_self, PyOb * fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660); */ -static PyObject *__pyx_pf_9csamtools_4Outs_2setfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_4Outs_2setfile[] = "open a new file."; -static PyMethodDef __pyx_mdef_9csamtools_4Outs_2setfile = {__Pyx_NAMESTR("setfile"), (PyCFunction)__pyx_pf_9csamtools_4Outs_2setfile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_4Outs_2setfile)}; -static PyObject *__pyx_pf_9csamtools_4Outs_2setfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_4Outs_setfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_4Outs_setfile[] = "open a new file."; +static PyMethodDef __pyx_mdef_9csamtools_4Outs_setfile = {__Pyx_NAMESTR("setfile"), (PyCFunction)__pyx_pf_9csamtools_4Outs_setfile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_4Outs_setfile)}; +static PyObject *__pyx_pf_9csamtools_4Outs_setfile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_fd; @@ -22577,7 +22903,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_2setfile(PyObject *__pyx_self, PyObje __pyx_L4_argument_unpacking_done:; __pyx_v_fd = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2502 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2502 * def setfile(self, filename): * '''open a new file.''' * fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660); # <<<<<<<<<<<<<< @@ -22604,7 +22930,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_2setfile(PyObject *__pyx_self, PyObje __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 = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); @@ -22614,15 +22940,15 @@ static PyObject *__pyx_pf_9csamtools_4Outs_2setfile(PyObject *__pyx_self, PyObje 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 = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_v_fd); __pyx_v_fd = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2503 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2503 * '''open a new file.''' * fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660); * self.setfd(fd) # <<<<<<<<<<<<<< @@ -22632,14 +22958,14 @@ static PyObject *__pyx_pf_9csamtools_4Outs_2setfile(PyObject *__pyx_self, PyObje __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__setfd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2503; __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 = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __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 = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2503; __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; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -22659,7 +22985,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_2setfile(PyObject *__pyx_self, PyObje return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2505 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2505 * self.setfd(fd) * * def setfd(self, fd): # <<<<<<<<<<<<<< @@ -22667,9 +22993,9 @@ static PyObject *__pyx_pf_9csamtools_4Outs_2setfile(PyObject *__pyx_self, PyObje * self.streams.append(ofd) */ -static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_9csamtools_4Outs_3setfd = {__Pyx_NAMESTR("setfd"), (PyCFunction)__pyx_pf_9csamtools_4Outs_3setfd, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_4Outs_setfd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_9csamtools_4Outs_setfd = {__Pyx_NAMESTR("setfd"), (PyCFunction)__pyx_pf_9csamtools_4Outs_setfd, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pf_9csamtools_4Outs_setfd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fd = 0; PyObject *__pyx_v_ofd; @@ -22724,7 +23050,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject __pyx_L4_argument_unpacking_done:; __pyx_v_ofd = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2506 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2506 * * def setfd(self, fd): * ofd = os.dup(self.id) # Save old stream on new unit. # <<<<<<<<<<<<<< @@ -22739,19 +23065,19 @@ static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2506; __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 = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 2506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2506; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_v_ofd); __pyx_v_ofd = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2507 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2507 * def setfd(self, fd): * ofd = os.dup(self.id) # Save old stream on new unit. * self.streams.append(ofd) # <<<<<<<<<<<<<< @@ -22765,7 +23091,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2508 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2508 * ofd = os.dup(self.id) # Save old stream on new unit. * self.streams.append(ofd) * sys.stdout.flush() # Buffered data goes to old stream. # <<<<<<<<<<<<<< @@ -22785,7 +23111,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2509 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2509 * self.streams.append(ofd) * sys.stdout.flush() # Buffered data goes to old stream. * os.dup2(fd, self.id) # Open unit 1 on new stream. # <<<<<<<<<<<<<< @@ -22800,20 +23126,20 @@ static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_fd); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fd); __Pyx_GIVEREF(__pyx_v_fd); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __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_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2510 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2510 * sys.stdout.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.) # <<<<<<<<<<<<<< @@ -22826,14 +23152,14 @@ static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject __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 = 2510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __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_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2510; __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -22852,7 +23178,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2512 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2512 * os.close(fd) # Close other unit (look out, caller.) * * def restore(self): # <<<<<<<<<<<<<< @@ -22860,10 +23186,10 @@ static PyObject *__pyx_pf_9csamtools_4Outs_3setfd(PyObject *__pyx_self, PyObject * if self.streams: */ -static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_4Outs_4restore[] = "restore previous output stream"; -static PyMethodDef __pyx_mdef_9csamtools_4Outs_4restore = {__Pyx_NAMESTR("restore"), (PyCFunction)__pyx_pf_9csamtools_4Outs_4restore, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_4Outs_4restore)}; -static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_4Outs_restore(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_4Outs_restore[] = "restore previous output stream"; +static PyMethodDef __pyx_mdef_9csamtools_4Outs_restore = {__Pyx_NAMESTR("restore"), (PyCFunction)__pyx_pf_9csamtools_4Outs_restore, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_4Outs_restore)}; +static PyObject *__pyx_pf_9csamtools_4Outs_restore(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; int __pyx_t_2; @@ -22875,7 +23201,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObje __Pyx_TraceCall("restore", __pyx_f[0], 2512); __pyx_self = __pyx_self; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2514 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2514 * def restore(self): * '''restore previous output stream''' * if self.streams: # <<<<<<<<<<<<<< @@ -22888,7 +23214,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObje __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2517 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2517 * # the following was not sufficient, hence flush both stderr and stdout * # os.fsync( self.id ) * sys.stdout.flush() # <<<<<<<<<<<<<< @@ -22908,7 +23234,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObje __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2518 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2518 * # os.fsync( self.id ) * sys.stdout.flush() * sys.stderr.flush() # <<<<<<<<<<<<<< @@ -22928,7 +23254,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObje __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2519 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2519 * sys.stdout.flush() * sys.stderr.flush() * os.dup2(self.streams[-1], self.id) # <<<<<<<<<<<<<< @@ -22948,20 +23274,20 @@ static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObje __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2519; __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 = 2519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __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 = 2519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2519; __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_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2520 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2520 * sys.stderr.flush() * os.dup2(self.streams[-1], self.id) * os.close(self.streams[-1]) # <<<<<<<<<<<<<< @@ -22979,17 +23305,17 @@ static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObje __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 = 2520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __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 = 2520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2520; __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_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2521 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2521 * os.dup2(self.streams[-1], self.id) * os.close(self.streams[-1]) * del self.streams[-1] # <<<<<<<<<<<<<< @@ -23020,7 +23346,7 @@ static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObje return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2523 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2523 * del self.streams[-1] * * def _samtools_dispatch( method, # <<<<<<<<<<<<<< @@ -23028,10 +23354,9 @@ static PyObject *__pyx_pf_9csamtools_4Outs_4restore(PyObject *__pyx_self, PyObje * catch_stdout = True, */ -static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_0_samtools_dispatch[] = "call ``method`` in samtools providing arguments in args.\n \n .. note:: \n This method redirects stdout and stderr to capture it \n from samtools. If for some reason stdout/stderr disappears\n the reason might be in this method.\n\n .. note::\n The current implementation might only work on linux.\n \n .. note:: \n This method captures stdout and stderr using temporary files, \n which are then read into memory in their entirety. This method\n is slow and might cause large memory overhead. \n\n See http://bytes.com/topic/c/answers/487231-how-capture-stdout-temporarily\n on the topic of redirecting stderr/stdout.\n "; -static PyMethodDef __pyx_mdef_9csamtools_0_samtools_dispatch = {__Pyx_NAMESTR("_samtools_dispatch"), (PyCFunction)__pyx_pf_9csamtools_0_samtools_dispatch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_0_samtools_dispatch)}; -static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools__samtools_dispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools__samtools_dispatch[] = "call ``method`` in samtools providing arguments in args.\n \n .. note:: \n This method redirects stdout and stderr to capture it \n from samtools. If for some reason stdout/stderr disappears\n the reason might be in this method.\n\n .. note::\n The current implementation might only work on linux.\n \n .. note:: \n This method captures stdout and stderr using temporary files, \n which are then read into memory in their entirety. This method\n is slow and might cause large memory overhead. \n\n See http://bytes.com/topic/c/answers/487231-how-capture-stdout-temporarily\n on the topic of redirecting stderr/stdout.\n "; +static PyObject *__pyx_pf_9csamtools__samtools_dispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_method = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_catch_stdout = 0; @@ -23067,7 +23392,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[4] = {0,0,0,0}; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2524 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2524 * * def _samtools_dispatch( method, * args = (), # <<<<<<<<<<<<<< @@ -23075,8 +23400,8 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P * catch_stderr = False, */ values[1] = ((PyObject *)__pyx_empty_tuple); - values[2] = __pyx_k_149; - values[3] = __pyx_k_150; + values[2] = __pyx_k_95; + values[3] = __pyx_k_96; switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); @@ -23115,8 +23440,8 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_v_catch_stderr = values[3]; } else { __pyx_v_args = ((PyObject *)__pyx_empty_tuple); - __pyx_v_catch_stdout = __pyx_k_149; - __pyx_v_catch_stderr = __pyx_k_150; + __pyx_v_catch_stdout = __pyx_k_95; + __pyx_v_catch_stderr = __pyx_k_96; switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: __pyx_v_catch_stderr = PyTuple_GET_ITEM(__pyx_args, 3); case 3: __pyx_v_catch_stdout = PyTuple_GET_ITEM(__pyx_args, 2); @@ -23144,7 +23469,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_v_out_stdout = Py_None; __Pyx_INCREF(Py_None); __pyx_v_out_stderr = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2551 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2551 * * # some special cases * if method == "index": # <<<<<<<<<<<<<< @@ -23157,7 +23482,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2552 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2552 * # some special cases * if method == "index": * if not os.path.exists( args[0] ): # <<<<<<<<<<<<<< @@ -23175,20 +23500,20 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __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 = 2552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __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 = 2552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __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_DECREF(__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 = 2552; __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) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2553 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2553 * if method == "index": * if not os.path.exists( args[0] ): * raise IOError( "No such file or directory: '%s'" % args[0] ) # <<<<<<<<<<<<<< @@ -23197,17 +23522,17 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_151), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_97), __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __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 = 2553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 2553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -23218,7 +23543,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2556 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2556 * * # redirect stderr and stdout to file * if catch_stderr: # <<<<<<<<<<<<<< @@ -23228,7 +23553,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stderr); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2557 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2557 * # redirect stderr and stdout to file * if catch_stderr: * stderr_h, stderr_f = tempfile.mkstemp() # <<<<<<<<<<<<<< @@ -23272,7 +23597,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_1 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2558 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2558 * if catch_stderr: * stderr_h, stderr_f = tempfile.mkstemp() * stderr_save = Outs( sys.stderr.fileno() ) # <<<<<<<<<<<<<< @@ -23293,19 +23618,19 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __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 = 2558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __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_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2558; __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_v_stderr_save); __pyx_v_stderr_save = __pyx_t_3; __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2559 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2559 * stderr_h, stderr_f = tempfile.mkstemp() * stderr_save = Outs( sys.stderr.fileno() ) * stderr_save.setfd( stderr_h ) # <<<<<<<<<<<<<< @@ -23315,20 +23640,20 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_3 = PyObject_GetAttr(__pyx_v_stderr_save, __pyx_n_s__setfd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2559; __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 = 2559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_stderr_h); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_stderr_h); __Pyx_GIVEREF(__pyx_v_stderr_h); - __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8; } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2561 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2561 * stderr_save.setfd( stderr_h ) * * if catch_stdout: # <<<<<<<<<<<<<< @@ -23338,7 +23663,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2562 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2562 * * if catch_stdout: * stdout_h, stdout_f = tempfile.mkstemp() # <<<<<<<<<<<<<< @@ -23382,7 +23707,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_3 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2563 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2563 * if catch_stdout: * stdout_h, stdout_f = tempfile.mkstemp() * stdout_save = Outs( sys.stdout.fileno() ) # <<<<<<<<<<<<<< @@ -23403,19 +23728,19 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __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 = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_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_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_v_stdout_save); __pyx_v_stdout_save = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2564 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2564 * stdout_h, stdout_f = tempfile.mkstemp() * stdout_save = Outs( sys.stdout.fileno() ) * stdout_save.setfd( stdout_h ) # <<<<<<<<<<<<<< @@ -23425,17 +23750,17 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __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 = 2564; __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 = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2564; __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_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2569 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2569 * # samtools `view` closes stdout, from which I can not * # recover. Thus redirect output to file with -o option. * if method == "view": # <<<<<<<<<<<<<< @@ -23448,45 +23773,51 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2570 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2570 * # 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 = ((PySequence_Contains(__pyx_v_args, ((PyObject *)__pyx_kp_s_152)))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = ((PySequence_Contains(__pyx_v_args, ((PyObject *)__pyx_kp_s_98)))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { - __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_154), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __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 = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_99)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_99)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_99)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L11; } __pyx_L11:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2571 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2571 * if method == "view": * if "-o" in args: raise ValueError("option -o is forbidden in samtools view") * args = ( "-o", stdout_f ) + args # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_152)); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_152)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_152)); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_98)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_98)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_98)); __Pyx_INCREF(__pyx_v_stdout_f); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_stdout_f); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_stdout_f); __Pyx_GIVEREF(__pyx_v_stdout_f); - __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_4), __pyx_v_args); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_v_args); - __pyx_v_args = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_args = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L10; } __pyx_L10:; @@ -23494,7 +23825,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2578 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2578 * cdef int i, n, retval * * n = len(args) # <<<<<<<<<<<<<< @@ -23504,7 +23835,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_7 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_7; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2580 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2580 * n = len(args) * # allocate two more for first (dummy) argument (contains command) * cargs = calloc( n+2, sizeof( char *) ) # <<<<<<<<<<<<<< @@ -23513,7 +23844,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P */ __pyx_v_cargs = ((char **)calloc((__pyx_v_n + 2), (sizeof(char *)))); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2581 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2581 * # allocate two more for first (dummy) argument (contains command) * cargs = calloc( n+2, sizeof( char *) ) * cargs[0] = "samtools" # <<<<<<<<<<<<<< @@ -23522,7 +23853,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P */ (__pyx_v_cargs[0]) = __pyx_k__samtools; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2582 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2582 * cargs = calloc( n+2, sizeof( char *) ) * cargs[0] = "samtools" * cargs[1] = method # <<<<<<<<<<<<<< @@ -23532,7 +23863,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_8 = PyBytes_AsString(__pyx_v_method); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_cargs[1]) = __pyx_t_8; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2583 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2583 * cargs[0] = "samtools" * cargs[1] = method * for i from 0 <= i < n: cargs[i+2] = args[i] # <<<<<<<<<<<<<< @@ -23541,14 +23872,14 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P */ __pyx_t_9 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) { - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyBytes_AsString(__pyx_t_3); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_args, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyBytes_AsString(__pyx_t_4); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_cargs[(__pyx_v_i + 2)]) = __pyx_t_8; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2584 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2584 * cargs[1] = method * for i from 0 <= i < n: cargs[i+2] = args[i] * retval = pysam_dispatch(n+2, cargs) # <<<<<<<<<<<<<< @@ -23557,7 +23888,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P */ __pyx_v_retval = pysam_dispatch((__pyx_v_n + 2), __pyx_v_cargs); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2585 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2585 * for i from 0 <= i < n: cargs[i+2] = args[i] * retval = pysam_dispatch(n+2, cargs) * free( cargs ) # <<<<<<<<<<<<<< @@ -23566,7 +23897,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P */ free(__pyx_v_cargs); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2589 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2589 * # restore stdout/stderr. This will also flush, so * # needs to be before reading back the file contents * if catch_stdout: # <<<<<<<<<<<<<< @@ -23576,75 +23907,75 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stdout); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2590 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2590 * # needs to be before reading back the file contents * if catch_stdout: * stdout_save.restore() # <<<<<<<<<<<<<< * out_stdout = open( stdout_f, "r").readlines() * os.remove( stdout_f ) */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_stdout_save, __pyx_n_s__restore); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2590; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 2590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_GetAttr(__pyx_v_stdout_save, __pyx_n_s__restore); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2590; __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_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2591 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2591 * if catch_stdout: * stdout_save.restore() * out_stdout = open( stdout_f, "r").readlines() # <<<<<<<<<<<<<< * os.remove( stdout_f ) * else: */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_stdout_f); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stdout_f); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stdout_f); __Pyx_GIVEREF(__pyx_v_stdout_f); __Pyx_INCREF(((PyObject *)__pyx_n_s__r)); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((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_3 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__readlines); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __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 = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_v_out_stdout); - __pyx_v_out_stdout = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_out_stdout = __pyx_t_4; + __pyx_t_4 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2592 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2592 * stdout_save.restore() * out_stdout = open( stdout_f, "r").readlines() * os.remove( stdout_f ) # <<<<<<<<<<<<<< * else: * out_stdout = [] */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__remove); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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 = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__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 = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_INCREF(__pyx_v_stdout_f); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stdout_f); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stdout_f); __Pyx_GIVEREF(__pyx_v_stdout_f); - __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 = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2592; __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_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L14; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2594 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2594 * os.remove( stdout_f ) * else: * out_stdout = [] # <<<<<<<<<<<<<< @@ -23659,7 +23990,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P } __pyx_L14:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2596 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2596 * out_stdout = [] * * if catch_stderr: # <<<<<<<<<<<<<< @@ -23669,7 +24000,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_catch_stderr); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2597 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2597 * * if catch_stderr: * stderr_save.restore() # <<<<<<<<<<<<<< @@ -23678,40 +24009,40 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P */ __pyx_t_1 = PyObject_GetAttr(__pyx_v_stderr_save, __pyx_n_s__restore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2597; __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 = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __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 = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2598 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2598 * if catch_stderr: * stderr_save.restore() * out_stderr = open( stderr_f, "r").readlines() # <<<<<<<<<<<<<< * os.remove( stderr_f ) * else: */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_stderr_f); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stderr_f); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stderr_f); __Pyx_GIVEREF(__pyx_v_stderr_f); __Pyx_INCREF(((PyObject *)__pyx_n_s__r)); - PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__r)); + PyTuple_SET_ITEM(__pyx_t_4, 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 = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_open, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __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 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__readlines); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __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_GetAttr(__pyx_t_1, __pyx_n_s__readlines); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __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_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __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 = 2598; __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_DECREF(__pyx_v_out_stderr); __pyx_v_out_stderr = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2599 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2599 * stderr_save.restore() * out_stderr = open( stderr_f, "r").readlines() * os.remove( stderr_f ) # <<<<<<<<<<<<<< @@ -23720,39 +24051,39 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__remove); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __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 = 2599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __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_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __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; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L15; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2601 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2601 * os.remove( stderr_f ) * else: * out_stderr = [] # <<<<<<<<<<<<<< * * return retval, out_stderr, out_stdout */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_v_out_stderr); - __pyx_v_out_stderr = ((PyObject *)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_v_out_stderr = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; } __pyx_L15:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2603 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2603 * out_stderr = [] * * return retval, out_stderr, out_stdout # <<<<<<<<<<<<<< @@ -23760,20 +24091,20 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P * cdef class SNPCall: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_FromLong(__pyx_v_retval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_out_stderr); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_out_stderr); __Pyx_GIVEREF(__pyx_v_out_stderr); __Pyx_INCREF(__pyx_v_out_stdout); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_out_stdout); __Pyx_GIVEREF(__pyx_v_out_stdout); - __pyx_t_4 = 0; - __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; @@ -23802,7 +24133,7 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2618 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2618 * property tid: * '''the chromosome ID as is defined in the header''' * def __get__(self): # <<<<<<<<<<<<<< @@ -23810,15 +24141,15 @@ static PyObject *__pyx_pf_9csamtools_0_samtools_dispatch(PyObject *__pyx_self, P * */ -static PyObject *__pyx_pf_9csamtools_7SNPCall_3tid_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7SNPCall_3tid_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7SNPCall_3tid___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7SNPCall_3tid___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2618); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2619 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2619 * '''the chromosome ID as is defined in the header''' * def __get__(self): * return self._tid # <<<<<<<<<<<<<< @@ -23845,7 +24176,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_3tid_0__get__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2623 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2623 * property pos: * '''nucleotide position of SNP.''' * def __get__(self): return self._pos # <<<<<<<<<<<<<< @@ -23853,8 +24184,8 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_3tid_0__get__(PyObject *__pyx_v_se * property reference_base: */ -static PyObject *__pyx_pf_9csamtools_7SNPCall_3pos_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7SNPCall_3pos_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7SNPCall_3pos___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7SNPCall_3pos___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -23880,7 +24211,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_3pos_0__get__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2627 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2627 * property reference_base: * '''reference base at pos. ``N`` if no reference sequence supplied.''' * def __get__(self): return PyString_FromStringAndSize( &self._reference_base, 1 ) # <<<<<<<<<<<<<< @@ -23888,8 +24219,8 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_3pos_0__get__(PyObject *__pyx_v_se * property genotype: */ -static PyObject *__pyx_pf_9csamtools_7SNPCall_14reference_base_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7SNPCall_14reference_base_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7SNPCall_14reference_base___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7SNPCall_14reference_base___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -23915,7 +24246,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_14reference_base_0__get__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2631 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2631 * property genotype: * '''the genotype called.''' * def __get__(self): return PyString_FromStringAndSize( &self._genotype, 1 ) # <<<<<<<<<<<<<< @@ -23923,8 +24254,8 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_14reference_base_0__get__(PyObject * property consensus_quality: */ -static PyObject *__pyx_pf_9csamtools_7SNPCall_8genotype_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7SNPCall_8genotype_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7SNPCall_8genotype___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7SNPCall_8genotype___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -23950,7 +24281,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_8genotype_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2635 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2635 * property consensus_quality: * '''the genotype quality (Phred-scaled).''' * def __get__(self): return self._consensus_quality # <<<<<<<<<<<<<< @@ -23958,8 +24289,8 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_8genotype_0__get__(PyObject *__pyx * property snp_quality: */ -static PyObject *__pyx_pf_9csamtools_7SNPCall_17consensus_quality_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7SNPCall_17consensus_quality_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7SNPCall_17consensus_quality___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7SNPCall_17consensus_quality___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -23985,7 +24316,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_17consensus_quality_0__get__(PyObj return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2639 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2639 * property snp_quality: * '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.''' * def __get__(self): return self._snp_quality # <<<<<<<<<<<<<< @@ -23993,8 +24324,8 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_17consensus_quality_0__get__(PyObj * property mapping_quality: */ -static PyObject *__pyx_pf_9csamtools_7SNPCall_11snp_quality_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7SNPCall_11snp_quality_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7SNPCall_11snp_quality___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7SNPCall_11snp_quality___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -24020,7 +24351,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_11snp_quality_0__get__(PyObject *_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2643 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2643 * 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 # <<<<<<<<<<<<<< @@ -24028,8 +24359,8 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_11snp_quality_0__get__(PyObject *_ * property coverage: */ -static PyObject *__pyx_pf_9csamtools_7SNPCall_15mapping_quality_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7SNPCall_15mapping_quality_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7SNPCall_15mapping_quality___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7SNPCall_15mapping_quality___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -24055,7 +24386,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_15mapping_quality_0__get__(PyObjec return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2647 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2647 * property coverage: * '''coverage or read depth - the number of reads involved in the call.''' * def __get__(self): return self._coverage # <<<<<<<<<<<<<< @@ -24063,8 +24394,8 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_15mapping_quality_0__get__(PyObjec * def __str__(self): */ -static PyObject *__pyx_pf_9csamtools_7SNPCall_8coverage_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7SNPCall_8coverage_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7SNPCall_8coverage___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7SNPCall_8coverage___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -24090,7 +24421,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_8coverage_0__get__(PyObject *__pyx return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2649 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2649 * def __get__(self): return self._coverage * * def __str__(self): # <<<<<<<<<<<<<< @@ -24098,8 +24429,8 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_8coverage_0__get__(PyObject *__pyx * return "\t".join( map(str, ( */ -static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_7SNPCall___str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_7SNPCall___str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -24115,7 +24446,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __Pyx_RefNannySetupContext("__str__"); __Pyx_TraceCall("__str__", __pyx_f[0], 2649); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2651 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2651 * def __str__(self): * * return "\t".join( map(str, ( # <<<<<<<<<<<<<< @@ -24126,7 +24457,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2652 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2652 * * return "\t".join( map(str, ( * self.tid, # <<<<<<<<<<<<<< @@ -24136,7 +24467,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2653 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2653 * return "\t".join( map(str, ( * self.tid, * self.pos, # <<<<<<<<<<<<<< @@ -24146,7 +24477,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2654 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2654 * self.tid, * self.pos, * self.reference_base, # <<<<<<<<<<<<<< @@ -24156,7 +24487,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__reference_base); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2655 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2655 * self.pos, * self.reference_base, * self.genotype, # <<<<<<<<<<<<<< @@ -24166,7 +24497,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__genotype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2656 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2656 * self.reference_base, * self.genotype, * self.consensus_quality, # <<<<<<<<<<<<<< @@ -24176,7 +24507,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__consensus_quality); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2657 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2657 * self.genotype, * self.consensus_quality, * self.snp_quality, # <<<<<<<<<<<<<< @@ -24186,7 +24517,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__snp_quality); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2658 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2658 * self.consensus_quality, * self.snp_quality, * self.mapping_quality, # <<<<<<<<<<<<<< @@ -24196,7 +24527,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__mapping_quality); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2659 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2659 * self.snp_quality, * self.mapping_quality, * self.coverage ) ) ) # <<<<<<<<<<<<<< @@ -24206,7 +24537,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__coverage); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2659; __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 = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); + __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3); @@ -24232,25 +24563,25 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { __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 = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); - __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)((PyObject*)(&PyString_Type)))); - __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_t_10)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)((PyObject*)&PyString_Type))); + __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10); + __Pyx_GIVEREF(__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 = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyObject_Call(__pyx_builtin_map, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 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 = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); + __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 = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __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; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; @@ -24277,7 +24608,7 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2680 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2680 * cdef IteratorColumn iter * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -24285,8 +24616,8 @@ static PyObject *__pyx_pf_9csamtools_7SNPCall_0__str__(PyObject *__pyx_v_self) { * **kwargs ): */ -static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_13SNPCallerBase___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_13SNPCallerBase___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_IteratorColumn *__pyx_v_iterator_column = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -24335,7 +24666,7 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iterator_column), __pyx_ptype_9csamtools_IteratorColumn, 1, "iterator_column", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2684 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2684 * **kwargs ): * * self.iter = iterator_column # <<<<<<<<<<<<<< @@ -24348,7 +24679,7 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self __Pyx_DECREF(((PyObject *)((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->iter)); ((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->iter = __pyx_v_iterator_column; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2685 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2685 * * self.iter = iterator_column * self.c = bam_maqcns_init() # <<<<<<<<<<<<<< @@ -24357,7 +24688,7 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self */ ((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c = bam_maqcns_init(); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2691 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2691 * * # new default mode for samtools >0.1.10 * self.c.errmod = kwargs.get( "errmod", BAM_ERRMOD_MAQ2 ) # <<<<<<<<<<<<<< @@ -24376,7 +24707,7 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; ((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c->errmod = __pyx_t_3; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2693 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2693 * self.c.errmod = kwargs.get( "errmod", BAM_ERRMOD_MAQ2 ) * * self.c.min_baseQ = kwargs.get( "min_baseQ", 13 ) # <<<<<<<<<<<<<< @@ -24392,7 +24723,7 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; ((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c->min_baseQ = __pyx_t_3; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2695 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2695 * self.c.min_baseQ = kwargs.get( "min_baseQ", 13 ) * # self.c.capQ_thres = kwargs.get( "capQ_threshold", 60 ) * self.c.n_hap = kwargs.get( "n_haplotypes", 2 ) # <<<<<<<<<<<<<< @@ -24408,7 +24739,7 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; ((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c->n_hap = __pyx_t_3; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2696 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2696 * # self.c.capQ_thres = kwargs.get( "capQ_threshold", 60 ) * self.c.n_hap = kwargs.get( "n_haplotypes", 2 ) * self.c.het_rate = kwargs.get( "het_rate", 0.001 ) # <<<<<<<<<<<<<< @@ -24427,7 +24758,7 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; ((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c->het_rate = __pyx_t_4; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2697 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2697 * self.c.n_hap = kwargs.get( "n_haplotypes", 2 ) * self.c.het_rate = kwargs.get( "het_rate", 0.001 ) * self.c.theta = kwargs.get( "theta", 0.83 ) # <<<<<<<<<<<<<< @@ -24446,7 +24777,7 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; ((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c->theta = __pyx_t_4; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2699 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2699 * self.c.theta = kwargs.get( "theta", 0.83 ) * * if self.c.errmod != BAM_ERRMOD_MAQ2: # <<<<<<<<<<<<<< @@ -24456,19 +24787,19 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self __pyx_t_5 = (((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c->errmod != BAM_ERRMOD_MAQ2); if (__pyx_t_5) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2700 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2700 * * if self.c.errmod != BAM_ERRMOD_MAQ2: * self.c.theta += 0.02 # <<<<<<<<<<<<<< * * # call prepare AFTER setting parameters */ - ((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c->theta = (((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c->theta + 0.02); + ((struct __pyx_obj_9csamtools_SNPCallerBase *)__pyx_v_self)->c->theta += 0.02; goto __pyx_L6; } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2703 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2703 * * # call prepare AFTER setting parameters * bam_maqcns_prepare( self.c ) # <<<<<<<<<<<<<< @@ -24491,7 +24822,7 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2705 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2705 * bam_maqcns_prepare( self.c ) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -24499,13 +24830,13 @@ static int __pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(PyObject *__pyx_v_self * */ -static void __pyx_pf_9csamtools_13SNPCallerBase_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_9csamtools_13SNPCallerBase_1__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_9csamtools_13SNPCallerBase___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_9csamtools_13SNPCallerBase___dealloc__(PyObject *__pyx_v_self) { __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__dealloc__"); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 2705); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2706 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2706 * * def __dealloc__(self): * bam_maqcns_destroy( self.c ) # <<<<<<<<<<<<<< @@ -24518,7 +24849,7 @@ static void __pyx_pf_9csamtools_13SNPCallerBase_1__dealloc__(PyObject *__pyx_v_s __Pyx_RefNannyFinishContext(); } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2708 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2708 * bam_maqcns_destroy( self.c ) * * cdef __dump( self, glf1_t * g, uint32_t cns, int rb ): # <<<<<<<<<<<<<< @@ -24546,7 +24877,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __Pyx_RefNannySetupContext("__dump"); __Pyx_TraceCall("__dump", __pyx_f[0], 2708); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2711 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2711 * '''debugging output.''' * * pysam_dump_glf( g, self.c ); # <<<<<<<<<<<<<< @@ -24555,16 +24886,16 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs */ pysam_dump_glf(__pyx_v_g, __pyx_v_self->c); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2712 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2712 * * pysam_dump_glf( g, self.c ); * print "" # <<<<<<<<<<<<<< * for x in range(self.iter.n_plp): * print "--> read %i %s %i" % (x, */ - if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2713 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2713 * pysam_dump_glf( g, self.c ); * print "" * for x in range(self.iter.n_plp): # <<<<<<<<<<<<<< @@ -24575,7 +24906,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_x = __pyx_t_2; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2714 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2714 * print "" * for x in range(self.iter.n_plp): * print "--> read %i %s %i" % (x, # <<<<<<<<<<<<<< @@ -24585,7 +24916,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_3 = PyInt_FromLong(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2715 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2715 * for x in range(self.iter.n_plp): * print "--> read %i %s %i" % (x, * bam1_qname(self.iter.plp[x].b), # <<<<<<<<<<<<<< @@ -24595,7 +24926,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_4 = PyBytes_FromString(bam1_qname((__pyx_v_self->iter->plp[__pyx_v_x]).b)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2716 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2716 * print "--> read %i %s %i" % (x, * bam1_qname(self.iter.plp[x].b), * self.iter.plp[x].qpos, # <<<<<<<<<<<<<< @@ -24605,7 +24936,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_5 = __Pyx_PyInt_to_py_int32_t((__pyx_v_self->iter->plp[__pyx_v_x]).qpos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __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 = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_t_4)); @@ -24615,14 +24946,14 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_156), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_101), __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2720 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2720 * * print "pos=%i, cns=%i, q_r = %f, depth=%i, n=%i, rb=%i, cns-cq=%i %i %i %i" \ * % (self.iter.pos, # <<<<<<<<<<<<<< @@ -24632,7 +24963,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_5 = PyInt_FromLong(__pyx_v_self->iter->pos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2721 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2721 * print "pos=%i, cns=%i, q_r = %f, depth=%i, n=%i, rb=%i, cns-cq=%i %i %i %i" \ * % (self.iter.pos, * cns, # <<<<<<<<<<<<<< @@ -24642,7 +24973,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_cns); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2722 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2722 * % (self.iter.pos, * cns, * self.c.q_r, # <<<<<<<<<<<<<< @@ -24652,7 +24983,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->c->q_r); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2723 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2723 * cns, * self.c.q_r, * self.iter.n_plp, # <<<<<<<<<<<<<< @@ -24662,7 +24993,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_3 = PyInt_FromLong(__pyx_v_self->iter->n_plp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2724 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2724 * self.c.q_r, * self.iter.n_plp, * self.iter.n_plp, # <<<<<<<<<<<<<< @@ -24672,7 +25003,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_7 = PyInt_FromLong(__pyx_v_self->iter->n_plp); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2725 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2725 * self.iter.n_plp, * self.iter.n_plp, * rb, # <<<<<<<<<<<<<< @@ -24682,7 +25013,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_8 = PyInt_FromLong(__pyx_v_rb); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2726 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2726 * self.iter.n_plp, * rb, * cns >> 8 & 0xff, # <<<<<<<<<<<<<< @@ -24692,7 +25023,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_9 = PyInt_FromLong(((__pyx_v_cns >> 8) & 0xff)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2727 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2727 * rb, * cns >> 8 & 0xff, * cns >> 16 & 0xff, # <<<<<<<<<<<<<< @@ -24702,7 +25033,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_10 = PyInt_FromLong(((__pyx_v_cns >> 16) & 0xff)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2728 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2728 * cns >> 8 & 0xff, * cns >> 16 & 0xff, * cns & 0xff, # <<<<<<<<<<<<<< @@ -24712,7 +25043,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_11 = PyInt_FromLong((__pyx_v_cns & 0xff)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2729 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2729 * cns >> 16 & 0xff, * cns & 0xff, * cns >> 28, # <<<<<<<<<<<<<< @@ -24722,7 +25053,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_12 = PyInt_FromLong((__pyx_v_cns >> 28)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PyTuple_New(10); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_13)); + __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_6); @@ -24753,22 +25084,22 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; - __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_157), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_102), __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_12)); - __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_12)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2732 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2732 * ) * * printf("-------------------------------------\n"); # <<<<<<<<<<<<<< * sys.stdout.flush() * */ - printf(__pyx_k_158); + printf(__pyx_k_103); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2733 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2733 * * printf("-------------------------------------\n"); * sys.stdout.flush() # <<<<<<<<<<<<<< @@ -24811,7 +25142,7 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2749 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2749 * """ * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -24819,8 +25150,8 @@ static PyObject *__pyx_f_9csamtools_13SNPCallerBase___dump(struct __pyx_obj_9cs * **kwargs ): */ -static int __pyx_pf_9csamtools_16IteratorSNPCalls_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_16IteratorSNPCalls_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_16IteratorSNPCalls___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_16IteratorSNPCalls___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_IteratorColumn *__pyx_v_iterator_column = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -24867,14 +25198,14 @@ static int __pyx_pf_9csamtools_16IteratorSNPCalls_0__cinit__(PyObject *__pyx_v_s __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iterator_column), __pyx_ptype_9csamtools_IteratorColumn, 1, "iterator_column", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2753 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2753 * **kwargs ): * * assert self.iter.hasReference(), "IteratorSNPCalls requires an pileup iterator with reference sequence" # <<<<<<<<<<<<<< * * def __iter__(self): */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter), __pyx_n_s__hasReference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __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 = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -24883,7 +25214,7 @@ static int __pyx_pf_9csamtools_16IteratorSNPCalls_0__cinit__(PyObject *__pyx_v_s __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) { - PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_159)); + PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_104)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif @@ -24902,7 +25233,7 @@ static int __pyx_pf_9csamtools_16IteratorSNPCalls_0__cinit__(PyObject *__pyx_v_s return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2755 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2755 * assert self.iter.hasReference(), "IteratorSNPCalls requires an pileup iterator with reference sequence" * * def __iter__(self): # <<<<<<<<<<<<<< @@ -24910,14 +25241,14 @@ static int __pyx_pf_9csamtools_16IteratorSNPCalls_0__cinit__(PyObject *__pyx_v_s * */ -static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_1__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_1__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__iter__"); __Pyx_TraceCall("__iter__", __pyx_f[0], 2755); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2756 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2756 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -24937,7 +25268,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_1__iter__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2758 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2758 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -24945,10 +25276,10 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_1__iter__(PyObject *__py * """ */ -static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_16IteratorSNPCalls_2__next__[] = "python version of next().\n "; -struct wrapperbase __pyx_wrapperbase_9csamtools_16IteratorSNPCalls_2__next__; -static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_16IteratorSNPCalls___next__[] = "python version of next().\n "; +struct wrapperbase __pyx_wrapperbase_9csamtools_16IteratorSNPCalls___next__; +static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls___next__(PyObject *__pyx_v_self) { char *__pyx_v_seq; int __pyx_v_seq_len; int __pyx_v_rb; @@ -24958,15 +25289,15 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__next__"); __Pyx_TraceCall("__next__", __pyx_f[0], 2758); __pyx_v_call = ((struct __pyx_obj_9csamtools_SNPCall *)Py_None); __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2763 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2763 * * # the following code was adapted from bam_plcmd.c:pileup_func() * self.iter.cnext() # <<<<<<<<<<<<<< @@ -24975,7 +25306,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ ((struct __pyx_vtabstruct_9csamtools_IteratorColumn *)((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->__pyx_vtab)->cnext(((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2765 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2765 * self.iter.cnext() * * if self.iter.n_plp < 0: # <<<<<<<<<<<<<< @@ -24985,23 +25316,29 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->n_plp < 0); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2766 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2766 * * if self.iter.n_plp < 0: * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< * * if self.iter.plp == NULL: */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_160), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __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 = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_56)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_56)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_56)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2768 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2768 * raise ValueError("error during iteration" ) * * if self.iter.plp == NULL: # <<<<<<<<<<<<<< @@ -25011,7 +25348,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->plp == NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2769 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2769 * * if self.iter.plp == NULL: * raise StopIteration # <<<<<<<<<<<<<< @@ -25024,7 +25361,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2771 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2771 * raise StopIteration * * cdef char * seq = self.iter.getSequence() # <<<<<<<<<<<<<< @@ -25033,34 +25370,34 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_seq = ((struct __pyx_vtabstruct_9csamtools_IteratorColumn *)((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->__pyx_vtab)->getSequence(((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2772 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2772 * * cdef char * seq = self.iter.getSequence() * cdef int seq_len = self.iter.seq_len # <<<<<<<<<<<<<< * * assert seq != NULL */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter), __pyx_n_s__seq_len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __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 = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_seq_len = __pyx_t_3; + __pyx_t_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter), __pyx_n_s__seq_len); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __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 = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_seq_len = __pyx_t_4; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2774 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2774 * cdef int seq_len = self.iter.seq_len * * assert seq != NULL # <<<<<<<<<<<<<< * * # reference base */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_seq != NULL))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2777 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2777 * * # reference base * if self.iter.pos >= seq_len: # <<<<<<<<<<<<<< @@ -25070,44 +25407,44 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->pos >= __pyx_v_seq_len); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2778 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2778 * # reference base * if self.iter.pos >= seq_len: * raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) ) # <<<<<<<<<<<<<< * * cdef int rb = seq[self.iter.pos] */ - __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyInt_FromLong(__pyx_v_seq_len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyInt_FromLong(__pyx_v_seq_len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_3 = 0; __pyx_t_2 = 0; - __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_161), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_105), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_DECREF(__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 = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__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 = 2778; __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); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2780 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2780 * raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) ) * * cdef int rb = seq[self.iter.pos] # <<<<<<<<<<<<<< @@ -25116,7 +25453,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_rb = (__pyx_v_seq[((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->pos]); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2787 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2787 * self.iter.plp, * bam_nt16_table[rb], * self.c ) # <<<<<<<<<<<<<< @@ -25125,7 +25462,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_g = bam_maqcns_glfgen(((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->n_plp, ((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->plp, (bam_nt16_table[__pyx_v_rb]), ((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.c); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2789 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2789 * self.c ) * * if pysam_glf_depth( g ) == 0: # <<<<<<<<<<<<<< @@ -25135,19 +25472,19 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py __pyx_t_1 = (pysam_glf_depth(__pyx_v_g) == 0); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2790 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2790 * * if pysam_glf_depth( g ) == 0: * cns = 0xfu << 28 | 0xf << 24 # <<<<<<<<<<<<<< * else: * cns = glf2cns(g, (self.c.q_r + .499)) */ - __pyx_v_cns = 4278190080; + __pyx_v_cns = 4278190080U; goto __pyx_L8; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2792 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2792 * cns = 0xfu << 28 | 0xf << 24 * else: * cns = glf2cns(g, (self.c.q_r + .499)) # <<<<<<<<<<<<<< @@ -25158,7 +25495,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2794 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2794 * cns = glf2cns(g, (self.c.q_r + .499)) * * free(g) # <<<<<<<<<<<<<< @@ -25167,20 +25504,20 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ free(__pyx_v_g); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2798 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2798 * cdef SNPCall call * * call = SNPCall() # <<<<<<<<<<<<<< * call._tid = self.iter.tid * call._pos = self.iter.pos */ - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_SNPCall)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_SNPCall)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_v_call)); - __pyx_v_call = ((struct __pyx_obj_9csamtools_SNPCall *)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_v_call = ((struct __pyx_obj_9csamtools_SNPCall *)__pyx_t_2); + __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2799 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2799 * * call = SNPCall() * call._tid = self.iter.tid # <<<<<<<<<<<<<< @@ -25189,7 +25526,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_call->_tid = ((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->tid; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2800 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2800 * call = SNPCall() * call._tid = self.iter.tid * call._pos = self.iter.pos # <<<<<<<<<<<<<< @@ -25198,7 +25535,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_call->_pos = ((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->pos; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2801 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2801 * call._tid = self.iter.tid * call._pos = self.iter.pos * call._reference_base = rb # <<<<<<<<<<<<<< @@ -25207,7 +25544,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_call->_reference_base = __pyx_v_rb; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2802 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2802 * call._pos = self.iter.pos * call._reference_base = rb * call._genotype = bam_nt16_rev_table[cns>>28] # <<<<<<<<<<<<<< @@ -25216,7 +25553,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_call->_genotype = (__pyx_v_9csamtools_bam_nt16_rev_table[(__pyx_v_cns >> 28)]); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2803 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2803 * call._reference_base = rb * call._genotype = bam_nt16_rev_table[cns>>28] * call._consensus_quality = cns >> 8 & 0xff # <<<<<<<<<<<<<< @@ -25225,7 +25562,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_call->_consensus_quality = ((__pyx_v_cns >> 8) & 0xff); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2804 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2804 * call._genotype = bam_nt16_rev_table[cns>>28] * call._consensus_quality = cns >> 8 & 0xff * call._snp_quality = cns & 0xff # <<<<<<<<<<<<<< @@ -25234,7 +25571,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_call->_snp_quality = (__pyx_v_cns & 0xff); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2805 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2805 * call._consensus_quality = cns >> 8 & 0xff * call._snp_quality = cns & 0xff * call._rms_mapping_quality = cns >> 16&0xff # <<<<<<<<<<<<<< @@ -25243,7 +25580,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_call->_rms_mapping_quality = ((__pyx_v_cns >> 16) & 0xff); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2806 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2806 * call._snp_quality = cns & 0xff * call._rms_mapping_quality = cns >> 16&0xff * call._coverage = self.iter.n_plp # <<<<<<<<<<<<<< @@ -25252,7 +25589,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py */ __pyx_v_call->_coverage = ((struct __pyx_obj_9csamtools_IteratorSNPCalls *)__pyx_v_self)->__pyx_base.iter->n_plp; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2808 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2808 * call._coverage = self.iter.n_plp * * return call # <<<<<<<<<<<<<< @@ -25268,7 +25605,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("csamtools.IteratorSNPCalls.__next__"); __pyx_r = NULL; @@ -25280,7 +25617,7 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2824 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2824 * * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -25288,8 +25625,8 @@ static PyObject *__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__(PyObject *__py * **kwargs ): */ -static int __pyx_pf_9csamtools_9SNPCaller_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_9SNPCaller_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_9SNPCaller___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_9SNPCaller___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_IteratorColumn *__pyx_v_iterator_column = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -25345,7 +25682,7 @@ static int __pyx_pf_9csamtools_9SNPCaller_0__cinit__(PyObject *__pyx_v_self, PyO return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2830 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2830 * pass * * def call(self, reference, int pos ): # <<<<<<<<<<<<<< @@ -25353,9 +25690,9 @@ static int __pyx_pf_9csamtools_9SNPCaller_0__cinit__(PyObject *__pyx_v_self, PyO * and position *pos*. */ -static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_9SNPCaller_1call[] = "call a snp on chromosome *reference*\n and position *pos*.\n\n returns a :class:`SNPCall` object.\n "; -static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_9SNPCaller_call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_9SNPCaller_call[] = "call a snp on chromosome *reference*\n and position *pos*.\n\n returns a :class:`SNPCall` object.\n "; +static PyObject *__pyx_pf_9csamtools_9SNPCaller_call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reference = 0; int __pyx_v_pos; int __pyx_v_tid; @@ -25418,7 +25755,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __pyx_L4_argument_unpacking_done:; __pyx_v_call = ((struct __pyx_obj_9csamtools_SNPCall *)Py_None); __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2837 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2837 * """ * * cdef int tid = self.iter.samfile.gettid( reference ) # <<<<<<<<<<<<<< @@ -25428,19 +25765,19 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->samfile), __pyx_n_s__gettid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_reference); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); - __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 = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __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_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 = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_tid = __pyx_t_4; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2839 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2839 * cdef int tid = self.iter.samfile.gettid( reference ) * * self.iter.reset( tid, pos, pos + 1 ) # <<<<<<<<<<<<<< @@ -25460,7 +25797,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2841 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2841 * self.iter.reset( tid, pos, pos + 1 ) * * while 1: # <<<<<<<<<<<<<< @@ -25470,7 +25807,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py while (1) { if (!1) break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2842 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2842 * * while 1: * self.iter.cnext() # <<<<<<<<<<<<<< @@ -25479,7 +25816,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ ((struct __pyx_vtabstruct_9csamtools_IteratorColumn *)((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->__pyx_vtab)->cnext(((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2844 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2844 * self.iter.cnext() * * if self.iter.n_plp < 0: # <<<<<<<<<<<<<< @@ -25489,23 +25826,29 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __pyx_t_6 = (((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->n_plp < 0); if (__pyx_t_6) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2845 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2845 * * if self.iter.n_plp < 0: * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< * * if self.iter.plp == NULL: */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_162), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __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 = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_56)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_56)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_56)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2847 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2847 * raise ValueError("error during iteration" ) * * if self.iter.plp == NULL: # <<<<<<<<<<<<<< @@ -25515,15 +25858,21 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __pyx_t_6 = (((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->plp == NULL); if (__pyx_t_6) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2848 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2848 * * if self.iter.plp == NULL: * raise ValueError( "no reads in region - no call" ) # <<<<<<<<<<<<<< * * if self.iter.pos == pos: break */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_164), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2848; __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 = 2848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_106)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_106)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_106)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -25531,7 +25880,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2850 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2850 * raise ValueError( "no reads in region - no call" ) * * if self.iter.pos == pos: break # <<<<<<<<<<<<<< @@ -25547,7 +25896,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py } __pyx_L7_break:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2852 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2852 * if self.iter.pos == pos: break * * cdef char * seq = self.iter.getSequence() # <<<<<<<<<<<<<< @@ -25556,7 +25905,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_seq = ((struct __pyx_vtabstruct_9csamtools_IteratorColumn *)((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->__pyx_vtab)->getSequence(((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2853 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2853 * * cdef char * seq = self.iter.getSequence() * cdef int seq_len = self.iter.seq_len # <<<<<<<<<<<<<< @@ -25569,21 +25918,21 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_seq_len = __pyx_t_4; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2855 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2855 * cdef int seq_len = self.iter.seq_len * * assert seq != NULL # <<<<<<<<<<<<<< * * # reference base */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_seq != NULL))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2858 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2858 * * # reference base * if self.iter.pos >= seq_len: # <<<<<<<<<<<<<< @@ -25593,7 +25942,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __pyx_t_6 = (((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->pos >= __pyx_v_seq_len); if (__pyx_t_6) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2859 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2859 * # reference base * if self.iter.pos >= seq_len: * raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) ) # <<<<<<<<<<<<<< @@ -25605,24 +25954,24 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __pyx_t_1 = PyInt_FromLong(__pyx_v_seq_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_161), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_105), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __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_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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 = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __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_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -25630,7 +25979,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py } __pyx_L11:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2861 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2861 * raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) ) * * cdef int rb = seq[self.iter.pos] # <<<<<<<<<<<<<< @@ -25639,7 +25988,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_rb = (__pyx_v_seq[((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->pos]); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2868 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2868 * self.iter.plp, * bam_nt16_table[rb], * self.c ) # <<<<<<<<<<<<<< @@ -25648,7 +25997,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_g = bam_maqcns_glfgen(((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->n_plp, ((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->plp, (bam_nt16_table[__pyx_v_rb]), ((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.c); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2871 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2871 * * * if pysam_glf_depth( g ) == 0: # <<<<<<<<<<<<<< @@ -25658,19 +26007,19 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __pyx_t_6 = (pysam_glf_depth(__pyx_v_g) == 0); if (__pyx_t_6) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2872 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2872 * * if pysam_glf_depth( g ) == 0: * cns = 0xfu << 28 | 0xf << 24 # <<<<<<<<<<<<<< * else: * cns = glf2cns(g, (self.c.q_r + .499)) */ - __pyx_v_cns = 4278190080; + __pyx_v_cns = 4278190080U; goto __pyx_L12; } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2874 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2874 * cns = 0xfu << 28 | 0xf << 24 * else: * cns = glf2cns(g, (self.c.q_r + .499)) # <<<<<<<<<<<<<< @@ -25681,7 +26030,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py } __pyx_L12:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2876 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2876 * cns = glf2cns(g, (self.c.q_r + .499)) * * free(g) # <<<<<<<<<<<<<< @@ -25690,7 +26039,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ free(__pyx_v_g); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2880 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2880 * cdef SNPCall call * * call = SNPCall() # <<<<<<<<<<<<<< @@ -25703,7 +26052,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py __pyx_v_call = ((struct __pyx_obj_9csamtools_SNPCall *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2881 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2881 * * call = SNPCall() * call._tid = self.iter.tid # <<<<<<<<<<<<<< @@ -25712,7 +26061,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_call->_tid = ((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->tid; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2882 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2882 * call = SNPCall() * call._tid = self.iter.tid * call._pos = self.iter.pos # <<<<<<<<<<<<<< @@ -25721,7 +26070,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_call->_pos = ((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->pos; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2883 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2883 * call._tid = self.iter.tid * call._pos = self.iter.pos * call._reference_base = rb # <<<<<<<<<<<<<< @@ -25730,7 +26079,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_call->_reference_base = __pyx_v_rb; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2884 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2884 * call._pos = self.iter.pos * call._reference_base = rb * call._genotype = bam_nt16_rev_table[cns>>28] # <<<<<<<<<<<<<< @@ -25739,7 +26088,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_call->_genotype = (__pyx_v_9csamtools_bam_nt16_rev_table[(__pyx_v_cns >> 28)]); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2885 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2885 * call._reference_base = rb * call._genotype = bam_nt16_rev_table[cns>>28] * call._consensus_quality = cns >> 8 & 0xff # <<<<<<<<<<<<<< @@ -25748,7 +26097,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_call->_consensus_quality = ((__pyx_v_cns >> 8) & 0xff); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2886 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2886 * call._genotype = bam_nt16_rev_table[cns>>28] * call._consensus_quality = cns >> 8 & 0xff * call._snp_quality = cns & 0xff # <<<<<<<<<<<<<< @@ -25757,7 +26106,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_call->_snp_quality = (__pyx_v_cns & 0xff); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2887 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2887 * call._consensus_quality = cns >> 8 & 0xff * call._snp_quality = cns & 0xff * call._rms_mapping_quality = cns >> 16&0xff # <<<<<<<<<<<<<< @@ -25766,7 +26115,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_call->_rms_mapping_quality = ((__pyx_v_cns >> 16) & 0xff); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2888 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2888 * call._snp_quality = cns & 0xff * call._rms_mapping_quality = cns >> 16&0xff * call._coverage = self.iter.n_plp # <<<<<<<<<<<<<< @@ -25775,7 +26124,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py */ __pyx_v_call->_coverage = ((struct __pyx_obj_9csamtools_SNPCaller *)__pyx_v_self)->__pyx_base.iter->n_plp; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2890 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2890 * call._coverage = self.iter.n_plp * * return call # <<<<<<<<<<<<<< @@ -25804,7 +26153,7 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2900 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2900 * cdef bam_maqindel_ret_t * _r * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -25812,8 +26161,8 @@ static PyObject *__pyx_pf_9csamtools_9SNPCaller_1call(PyObject *__pyx_v_self, Py * #self._r = r */ -static int __pyx_pf_9csamtools_9IndelCall_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_9IndelCall_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_9IndelCall___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_9IndelCall___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__cinit__"); @@ -25828,7 +26177,7 @@ static int __pyx_pf_9csamtools_9IndelCall_0__cinit__(PyObject *__pyx_v_self, PyO return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2907 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2907 * property tid: * '''the chromosome ID as is defined in the header''' * def __get__(self): # <<<<<<<<<<<<<< @@ -25836,15 +26185,15 @@ static int __pyx_pf_9csamtools_9IndelCall_0__cinit__(PyObject *__pyx_v_self, PyO * */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_3tid_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_3tid_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_3tid___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_3tid___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__"); __Pyx_TraceCall("__get__", __pyx_f[0], 2907); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2908 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2908 * '''the chromosome ID as is defined in the header''' * def __get__(self): * return self._tid # <<<<<<<<<<<<<< @@ -25871,7 +26220,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_3tid_0__get__(PyObject *__pyx_v_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2912 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2912 * property pos: * '''nucleotide position of SNP.''' * def __get__(self): return self._pos # <<<<<<<<<<<<<< @@ -25879,8 +26228,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_3tid_0__get__(PyObject *__pyx_v_ * property genotype: */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_3pos_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_3pos_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_3pos___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_3pos___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -25906,7 +26255,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_3pos_0__get__(PyObject *__pyx_v_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2916 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2916 * property genotype: * '''the genotype called.''' * def __get__(self): # <<<<<<<<<<<<<< @@ -25914,8 +26263,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_3pos_0__get__(PyObject *__pyx_v_ * s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1) */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype___get__(PyObject *__pyx_v_self) { PyObject *__pyx_v_s; PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; @@ -25926,25 +26275,17 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__p __Pyx_TraceCall("__get__", __pyx_f[0], 2916); __pyx_v_s = Py_None; __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2920 - * s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1) - * return "%s/%s" % (s,s) - * elif self._r.gt == 1: # <<<<<<<<<<<<<< - * s = PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1) - * return "%s/%s" % (s,s) - */ - switch (((struct __pyx_obj_9csamtools_IndelCall *)__pyx_v_self)->_r->gt) { - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2917 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2917 * '''the genotype called.''' * def __get__(self): * if self._r.gt == 0: # <<<<<<<<<<<<<< * s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1) * return "%s/%s" % (s,s) */ + switch (((struct __pyx_obj_9csamtools_IndelCall *)__pyx_v_self)->_r->gt) { case 0: - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2918 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2918 * def __get__(self): * if self._r.gt == 0: * s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1) # <<<<<<<<<<<<<< @@ -25957,7 +26298,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__p __pyx_v_s = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2919 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2919 * if self._r.gt == 0: * s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1) * return "%s/%s" % (s,s) # <<<<<<<<<<<<<< @@ -25966,22 +26307,22 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__p */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_165), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_107), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2920 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2920 * s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1) * return "%s/%s" % (s,s) * elif self._r.gt == 1: # <<<<<<<<<<<<<< @@ -25990,7 +26331,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__p */ case 1: - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2921 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2921 * return "%s/%s" % (s,s) * elif self._r.gt == 1: * s = PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1) # <<<<<<<<<<<<<< @@ -26003,7 +26344,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__p __pyx_v_s = __pyx_t_2; __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2922 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2922 * elif self._r.gt == 1: * s = PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1) * return "%s/%s" % (s,s) # <<<<<<<<<<<<<< @@ -26012,23 +26353,23 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__p */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_165), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_107), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2922; __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_t_2); __pyx_t_2 = 0; __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; break; default: - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2924 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2924 * return "%s/%s" % (s,s) * else: * return "%s/%s" % (self.first_allele, self.second_allele ) # <<<<<<<<<<<<<< @@ -26041,16 +26382,16 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__p __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__second_allele); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; __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 = 2924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_165), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_107), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; @@ -26073,7 +26414,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2928 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2928 * property consensus_quality: * '''the genotype quality (Phred-scaled).''' * def __get__(self): return self._r.q_cns # <<<<<<<<<<<<<< @@ -26081,8 +26422,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(PyObject *__p * property snp_quality: */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_17consensus_quality_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_17consensus_quality_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_17consensus_quality___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_17consensus_quality___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -26108,7 +26449,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_17consensus_quality_0__get__(PyO return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2932 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2932 * property snp_quality: * '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.''' * def __get__(self): return self._r.q_ref # <<<<<<<<<<<<<< @@ -26116,8 +26457,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_17consensus_quality_0__get__(PyO * property mapping_quality: */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_11snp_quality_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_11snp_quality_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_11snp_quality___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_11snp_quality___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -26143,7 +26484,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_11snp_quality_0__get__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2936 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2936 * 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 # <<<<<<<<<<<<<< @@ -26151,8 +26492,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_11snp_quality_0__get__(PyObject * property coverage: */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_15mapping_quality_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_15mapping_quality_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_15mapping_quality___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_15mapping_quality___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -26178,7 +26519,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_15mapping_quality_0__get__(PyObj return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2940 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2940 * property coverage: * '''coverage or read depth - the number of reads involved in the call.''' * def __get__(self): return self._coverage # <<<<<<<<<<<<<< @@ -26186,8 +26527,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_15mapping_quality_0__get__(PyObj * property first_allele: */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_8coverage_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_8coverage_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_8coverage___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_8coverage___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -26213,7 +26554,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8coverage_0__get__(PyObject *__p return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2944 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2944 * property first_allele: * '''sequence of first allele.''' * def __get__(self): return PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1) # <<<<<<<<<<<<<< @@ -26221,8 +26562,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_8coverage_0__get__(PyObject *__p * property second_allele: */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_12first_allele_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_12first_allele_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_12first_allele___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_12first_allele___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -26248,7 +26589,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_12first_allele_0__get__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2948 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2948 * property second_allele: * '''sequence of second allele.''' * def __get__(self): return PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1) # <<<<<<<<<<<<<< @@ -26256,8 +26597,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_12first_allele_0__get__(PyObject * property reads_first: */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_13second_allele_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_13second_allele_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_13second_allele___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_13second_allele___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -26283,7 +26624,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_13second_allele_0__get__(PyObjec return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2952 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2952 * property reads_first: * '''reads supporting first allele.''' * def __get__(self): return self._r.cnt1 # <<<<<<<<<<<<<< @@ -26291,8 +26632,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_13second_allele_0__get__(PyObjec * property reads_second: */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_11reads_first_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_11reads_first_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_11reads_first___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_11reads_first___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -26318,7 +26659,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_11reads_first_0__get__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2956 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2956 * property reads_second: * '''reads supporting first allele.''' * def __get__(self): return self._r.cnt2 # <<<<<<<<<<<<<< @@ -26326,8 +26667,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_11reads_first_0__get__(PyObject * property reads_diff: */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_12reads_second_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_12reads_second_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_12reads_second___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_12reads_second___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -26353,7 +26694,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_12reads_second_0__get__(PyObject return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2960 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2960 * property reads_diff: * '''reads supporting first allele.''' * def __get__(self): return self._r.cnt_anti # <<<<<<<<<<<<<< @@ -26361,8 +26702,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_12reads_second_0__get__(PyObject * def __str__(self): */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_10reads_diff_0__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_10reads_diff_0__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall_10reads_diff___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall_10reads_diff___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_TraceDeclarations @@ -26388,7 +26729,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_10reads_diff_0__get__(PyObject * return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2962 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2962 * def __get__(self): return self._r.cnt_anti * * def __str__(self): # <<<<<<<<<<<<<< @@ -26396,8 +26737,8 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_10reads_diff_0__get__(PyObject * * return "\t".join( map(str, ( */ -static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_9IndelCall___str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_9IndelCall___str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -26417,7 +26758,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __Pyx_RefNannySetupContext("__str__"); __Pyx_TraceCall("__str__", __pyx_f[0], 2962); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2964 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2964 * def __str__(self): * * return "\t".join( map(str, ( # <<<<<<<<<<<<<< @@ -26428,7 +26769,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); 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); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2965 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2965 * * return "\t".join( map(str, ( * self.tid, # <<<<<<<<<<<<<< @@ -26438,7 +26779,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2966 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2966 * return "\t".join( map(str, ( * self.tid, * self.pos, # <<<<<<<<<<<<<< @@ -26448,7 +26789,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2967 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2967 * self.tid, * self.pos, * self.genotype, # <<<<<<<<<<<<<< @@ -26458,7 +26799,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__genotype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2968 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2968 * self.pos, * self.genotype, * self.consensus_quality, # <<<<<<<<<<<<<< @@ -26468,7 +26809,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__consensus_quality); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2969 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2969 * self.genotype, * self.consensus_quality, * self.snp_quality, # <<<<<<<<<<<<<< @@ -26478,7 +26819,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__snp_quality); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2970 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2970 * self.consensus_quality, * self.snp_quality, * self.mapping_quality, # <<<<<<<<<<<<<< @@ -26488,7 +26829,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__mapping_quality); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2971 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2971 * self.snp_quality, * self.mapping_quality, * self.coverage, # <<<<<<<<<<<<<< @@ -26498,7 +26839,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__coverage); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2972 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2972 * self.mapping_quality, * self.coverage, * self.first_allele, # <<<<<<<<<<<<<< @@ -26508,7 +26849,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__first_allele); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2973 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2973 * self.coverage, * self.first_allele, * self.second_allele, # <<<<<<<<<<<<<< @@ -26518,7 +26859,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__second_allele); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2974 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2974 * self.first_allele, * self.second_allele, * self.reads_first, # <<<<<<<<<<<<<< @@ -26528,7 +26869,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__reads_first); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2975 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2975 * self.second_allele, * self.reads_first, * self.reads_second, # <<<<<<<<<<<<<< @@ -26538,7 +26879,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__reads_second); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2976 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2976 * self.reads_first, * self.reads_second, * self.reads_diff ) ) ) # <<<<<<<<<<<<<< @@ -26548,7 +26889,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__reads_diff); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyTuple_New(12); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_14)); + __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_3); @@ -26586,25 +26927,25 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_13)); - __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)((PyObject*)(&PyString_Type)))); - __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type)))); - PyTuple_SET_ITEM(__pyx_t_13, 1, ((PyObject *)__pyx_t_14)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_14)); + __Pyx_GOTREF(__pyx_t_13); + __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)((PyObject*)&PyString_Type))); + __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type))); + PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyObject_Call(__pyx_builtin_map, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_13)); + __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_r = __pyx_t_14; __pyx_t_14 = 0; goto __pyx_L0; @@ -26635,7 +26976,7 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2978 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2978 * self.reads_diff ) ) ) * * def __dealloc__(self ): # <<<<<<<<<<<<<< @@ -26643,13 +26984,13 @@ static PyObject *__pyx_pf_9csamtools_9IndelCall_1__str__(PyObject *__pyx_v_self) * */ -static void __pyx_pf_9csamtools_9IndelCall_2__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_9csamtools_9IndelCall_2__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_9csamtools_9IndelCall___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_9csamtools_9IndelCall___dealloc__(PyObject *__pyx_v_self) { __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__dealloc__"); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 2978); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2979 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2979 * * def __dealloc__(self ): * bam_maqindel_ret_destroy(self._r) # <<<<<<<<<<<<<< @@ -26662,7 +27003,7 @@ static void __pyx_pf_9csamtools_9IndelCall_2__dealloc__(PyObject *__pyx_v_self) __Pyx_RefNannyFinishContext(); } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3001 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3001 * cdef int max_depth * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -26670,8 +27011,8 @@ static void __pyx_pf_9csamtools_9IndelCall_2__dealloc__(PyObject *__pyx_v_self) * **kwargs ): */ -static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_15IndelCallerBase___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_15IndelCallerBase___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_IteratorColumn *__pyx_v_iterator_column = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -26720,7 +27061,7 @@ static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_se __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iterator_column), __pyx_ptype_9csamtools_IteratorColumn, 1, "iterator_column", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3006 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3006 * * * self.iter = iterator_column # <<<<<<<<<<<<<< @@ -26733,14 +27074,14 @@ static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_se __Pyx_DECREF(((PyObject *)((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter)); ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter = __pyx_v_iterator_column; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3008 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3008 * self.iter = iterator_column * * assert iterator_column.hasReference(), "IndelCallerBase requires an pileup iterator with reference sequence" # <<<<<<<<<<<<<< * * self.options = bam_maqindel_opt_init() */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_iterator_column), __pyx_n_s__hasReference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __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 = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -26749,12 +27090,12 @@ static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_se __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) { - PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_166)); + PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_108)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3010 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3010 * assert iterator_column.hasReference(), "IndelCallerBase requires an pileup iterator with reference sequence" * * self.options = bam_maqindel_opt_init() # <<<<<<<<<<<<<< @@ -26763,7 +27104,7 @@ static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_se */ ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->options = bam_maqindel_opt_init(); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3015 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3015 * # samtools * * self.options.r_indel = kwargs.get( "r_indel", 0.00015 ) # <<<<<<<<<<<<<< @@ -26782,7 +27123,7 @@ static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_se __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->options->r_indel = __pyx_t_4; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3016 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3016 * * self.options.r_indel = kwargs.get( "r_indel", 0.00015 ) * self.options.q_indel = kwargs.get( "q_indel", 40 ) # <<<<<<<<<<<<<< @@ -26798,7 +27139,7 @@ static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_se __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->options->q_indel = __pyx_t_5; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3017 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3017 * self.options.r_indel = kwargs.get( "r_indel", 0.00015 ) * self.options.q_indel = kwargs.get( "q_indel", 40 ) * self.cap_mapQ = kwargs.get( "cap_mapQ", 60 ) # <<<<<<<<<<<<<< @@ -26814,7 +27155,7 @@ static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_se __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->cap_mapQ = __pyx_t_5; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3018 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3018 * self.options.q_indel = kwargs.get( "q_indel", 40 ) * self.cap_mapQ = kwargs.get( "cap_mapQ", 60 ) * self.max_depth = kwargs.get( "max_depth", 1024 ) # <<<<<<<<<<<<<< @@ -26844,7 +27185,7 @@ static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_se return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3020 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3020 * self.max_depth = kwargs.get( "max_depth", 1024 ) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -26852,13 +27193,13 @@ static int __pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(PyObject *__pyx_v_se * */ -static void __pyx_pf_9csamtools_15IndelCallerBase_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_9csamtools_15IndelCallerBase_1__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_9csamtools_15IndelCallerBase___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_9csamtools_15IndelCallerBase___dealloc__(PyObject *__pyx_v_self) { __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__dealloc__"); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 3020); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3021 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3021 * * def __dealloc__(self): * free( self.options ) # <<<<<<<<<<<<<< @@ -26871,7 +27212,7 @@ static void __pyx_pf_9csamtools_15IndelCallerBase_1__dealloc__(PyObject *__pyx_v __Pyx_RefNannyFinishContext(); } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3023 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3023 * free( self.options ) * * def _call( self ): # <<<<<<<<<<<<<< @@ -26879,8 +27220,8 @@ static void __pyx_pf_9csamtools_15IndelCallerBase_1__dealloc__(PyObject *__pyx_v * cdef char * seq = self.iter.getSequence() */ -static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pf_9csamtools_15IndelCallerBase__call(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pf_9csamtools_15IndelCallerBase__call(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { char *__pyx_v_seq; int __pyx_v_seq_len; bam_maqindel_ret_t *__pyx_v_r; @@ -26904,7 +27245,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ __Pyx_TraceCall("_call", __pyx_f[0], 3023); __pyx_v_call = ((struct __pyx_obj_9csamtools_IndelCall *)Py_None); __Pyx_INCREF(Py_None); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3025 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3025 * def _call( self ): * * cdef char * seq = self.iter.getSequence() # <<<<<<<<<<<<<< @@ -26913,7 +27254,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ */ __pyx_v_seq = ((struct __pyx_vtabstruct_9csamtools_IteratorColumn *)((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->__pyx_vtab)->getSequence(((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3026 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3026 * * cdef char * seq = self.iter.getSequence() * cdef int seq_len = self.iter.seq_len # <<<<<<<<<<<<<< @@ -26926,21 +27267,21 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seq_len = __pyx_t_2; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3028 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3028 * cdef int seq_len = self.iter.seq_len * * assert seq != NULL # <<<<<<<<<<<<<< * * # reference base */ - #ifndef CYTHON_WITHOUT_ASSERTIONS + #ifndef PYREX_WITHOUT_ASSERTIONS if (unlikely(!(__pyx_v_seq != NULL))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3031 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3031 * * # reference base * if self.iter.pos >= seq_len: # <<<<<<<<<<<<<< @@ -26950,7 +27291,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ __pyx_t_3 = (((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->pos >= __pyx_v_seq_len); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3032 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3032 * # reference base * if self.iter.pos >= seq_len: * raise ValueError( "position %i out of bounds on reference sequence (len=%i)" % (self.iter.pos, seq_len) ) # <<<<<<<<<<<<<< @@ -26962,24 +27303,24 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ __pyx_t_4 = PyInt_FromLong(__pyx_v_seq_len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_161), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_105), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__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 = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __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 = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -26987,7 +27328,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3036 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3036 * cdef bam_maqindel_ret_t * r * * cdef int m = min( self.max_depth, self.iter.n_plp ) # <<<<<<<<<<<<<< @@ -27003,7 +27344,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ } __pyx_v_m = __pyx_t_7; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3048 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3048 * seq, * 0, * NULL) # <<<<<<<<<<<<<< @@ -27012,7 +27353,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ */ __pyx_v_r = bam_maqindel(__pyx_v_m, ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->pos, ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->options, ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->plp, __pyx_v_seq, 0, NULL); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3050 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3050 * NULL) * * if r == NULL: return None # <<<<<<<<<<<<<< @@ -27029,7 +27370,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3053 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3053 * * cdef IndelCall call * call = IndelCall() # <<<<<<<<<<<<<< @@ -27042,7 +27383,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ __pyx_v_call = ((struct __pyx_obj_9csamtools_IndelCall *)__pyx_t_4); __pyx_t_4 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3054 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3054 * cdef IndelCall call * call = IndelCall() * call._r = r # <<<<<<<<<<<<<< @@ -27051,7 +27392,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ */ __pyx_v_call->_r = __pyx_v_r; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3055 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3055 * call = IndelCall() * call._r = r * call._tid = self.iter.tid # <<<<<<<<<<<<<< @@ -27060,7 +27401,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ */ __pyx_v_call->_tid = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->tid; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3056 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3056 * call._r = r * call._tid = self.iter.tid * call._pos = self.iter.pos # <<<<<<<<<<<<<< @@ -27069,7 +27410,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ */ __pyx_v_call->_pos = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->pos; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3057 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3057 * call._tid = self.iter.tid * call._pos = self.iter.pos * call._coverage = self.iter.n_plp # <<<<<<<<<<<<<< @@ -27078,7 +27419,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ */ __pyx_v_call->_coverage = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->n_plp; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3059 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3059 * call._coverage = self.iter.n_plp * * cdef uint64_t rms_aux = 0 # <<<<<<<<<<<<<< @@ -27087,7 +27428,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ */ __pyx_v_rms_aux = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3060 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3060 * * cdef uint64_t rms_aux = 0 * cdef int i = 0 # <<<<<<<<<<<<<< @@ -27096,7 +27437,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ */ __pyx_v_i = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3064 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3064 * cdef int tmp * * for i from 0 <= i < self.iter.n_plp: # <<<<<<<<<<<<<< @@ -27106,7 +27447,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ __pyx_t_7 = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->n_plp; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3065 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3065 * * for i from 0 <= i < self.iter.n_plp: * p = self.iter.plp + i # <<<<<<<<<<<<<< @@ -27115,7 +27456,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ */ __pyx_v_p = (((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->plp + __pyx_v_i); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3066 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3066 * for i from 0 <= i < self.iter.n_plp: * p = self.iter.plp + i * if p.b.core.qual < self.cap_mapQ: # <<<<<<<<<<<<<< @@ -27125,7 +27466,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ __pyx_t_3 = (__pyx_v_p->b->core.qual < ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->cap_mapQ); if (__pyx_t_3) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3067 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3067 * p = self.iter.plp + i * if p.b.core.qual < self.cap_mapQ: * tmp = p.b.core.qual # <<<<<<<<<<<<<< @@ -27137,7 +27478,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ } /*else*/ { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3069 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3069 * tmp = p.b.core.qual * else: * tmp = self.cap_mapQ # <<<<<<<<<<<<<< @@ -27148,17 +27489,17 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3070 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3070 * else: * tmp = self.cap_mapQ * rms_aux += tmp * tmp # <<<<<<<<<<<<<< * * call._rms_mapping_quality = (sqrt(rms_aux / self.iter.n_plp) + .499) */ - __pyx_v_rms_aux = (__pyx_v_rms_aux + (__pyx_v_tmp * __pyx_v_tmp)); + __pyx_v_rms_aux += (__pyx_v_tmp * __pyx_v_tmp); } - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3072 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3072 * rms_aux += tmp * tmp * * call._rms_mapping_quality = (sqrt(rms_aux / self.iter.n_plp) + .499) # <<<<<<<<<<<<<< @@ -27172,7 +27513,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ } __pyx_v_call->_rms_mapping_quality = ((uint64_t)(sqrt((__pyx_t_8 / ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->n_plp)) + .499)); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3074 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3074 * call._rms_mapping_quality = (sqrt(rms_aux / self.iter.n_plp) + .499) * * return call # <<<<<<<<<<<<<< @@ -27200,7 +27541,7 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3089 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3089 * ''' * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -27208,8 +27549,8 @@ static PyObject *__pyx_pf_9csamtools_15IndelCallerBase_2_call(PyObject *__pyx_v_ * **kwargs ): */ -static int __pyx_pf_9csamtools_11IndelCaller_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_11IndelCaller_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_11IndelCaller___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_11IndelCaller___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_IteratorColumn *__pyx_v_iterator_column = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -27265,7 +27606,7 @@ static int __pyx_pf_9csamtools_11IndelCaller_0__cinit__(PyObject *__pyx_v_self, return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3095 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3095 * pass * * def call(self, reference, int pos ): # <<<<<<<<<<<<<< @@ -27273,9 +27614,9 @@ static int __pyx_pf_9csamtools_11IndelCaller_0__cinit__(PyObject *__pyx_v_self, * and position *pos*. */ -static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_9csamtools_11IndelCaller_1call[] = "call a snp on chromosome *reference*\n and position *pos*.\n\n returns a :class:`SNPCall` object or None, if no indel call could be made.\n "; -static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_9csamtools_11IndelCaller_call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_9csamtools_11IndelCaller_call[] = "call a snp on chromosome *reference*\n and position *pos*.\n\n returns a :class:`SNPCall` object or None, if no indel call could be made.\n "; +static PyObject *__pyx_pf_9csamtools_11IndelCaller_call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reference = 0; int __pyx_v_pos; int __pyx_v_tid; @@ -27331,7 +27672,7 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, return NULL; __pyx_L4_argument_unpacking_done:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3102 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3102 * """ * * cdef int tid = self.iter.samfile.gettid( reference ) # <<<<<<<<<<<<<< @@ -27341,19 +27682,19 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter->samfile), __pyx_n_s__gettid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_reference); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); - __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 = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __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_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 = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_tid = __pyx_t_4; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3104 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3104 * cdef int tid = self.iter.samfile.gettid( reference ) * * self.iter.reset( tid, pos, pos + 1 ) # <<<<<<<<<<<<<< @@ -27373,7 +27714,7 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3106 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3106 * self.iter.reset( tid, pos, pos + 1 ) * * while 1: # <<<<<<<<<<<<<< @@ -27383,7 +27724,7 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, while (1) { if (!1) break; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3107 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3107 * * while 1: * self.iter.cnext() # <<<<<<<<<<<<<< @@ -27392,7 +27733,7 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, */ ((struct __pyx_vtabstruct_9csamtools_IteratorColumn *)((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter->__pyx_vtab)->cnext(((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3109 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3109 * self.iter.cnext() * * if self.iter.n_plp < 0: # <<<<<<<<<<<<<< @@ -27402,23 +27743,29 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, __pyx_t_6 = (((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter->n_plp < 0); if (__pyx_t_6) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3110 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3110 * * if self.iter.n_plp < 0: * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< * * if self.iter.plp == NULL: */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_167), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __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 = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_56)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_56)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_56)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3112 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3112 * raise ValueError("error during iteration" ) * * if self.iter.plp == NULL: # <<<<<<<<<<<<<< @@ -27428,15 +27775,21 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, __pyx_t_6 = (((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter->plp == NULL); if (__pyx_t_6) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3113 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3113 * * if self.iter.plp == NULL: * raise ValueError( "no reads in region - no call" ) # <<<<<<<<<<<<<< * * if self.iter.pos == pos: break */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_168), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3113; __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 = 3113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_106)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_106)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_106)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -27444,7 +27797,7 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, } __pyx_L9:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3115 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3115 * raise ValueError( "no reads in region - no call" ) * * if self.iter.pos == pos: break # <<<<<<<<<<<<<< @@ -27460,7 +27813,7 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, } __pyx_L7_break:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3117 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3117 * if self.iter.pos == pos: break * * return self._call() # <<<<<<<<<<<<<< @@ -27493,7 +27846,7 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3133 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3133 * """ * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -27501,8 +27854,8 @@ static PyObject *__pyx_pf_9csamtools_11IndelCaller_1call(PyObject *__pyx_v_self, * **kwargs ): */ -static int __pyx_pf_9csamtools_18IteratorIndelCalls_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_9csamtools_18IteratorIndelCalls_0__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_9csamtools_18IteratorIndelCalls___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_9csamtools_18IteratorIndelCalls___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_9csamtools_IteratorColumn *__pyx_v_iterator_column = 0; PyObject *__pyx_v_kwargs = 0; int __pyx_r; @@ -27558,7 +27911,7 @@ static int __pyx_pf_9csamtools_18IteratorIndelCalls_0__cinit__(PyObject *__pyx_v return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3139 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3139 * * * def __iter__(self): # <<<<<<<<<<<<<< @@ -27566,14 +27919,14 @@ static int __pyx_pf_9csamtools_18IteratorIndelCalls_0__cinit__(PyObject *__pyx_v * */ -static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_1__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_1__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__iter__"); __Pyx_TraceCall("__iter__", __pyx_f[0], 3139); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3140 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3140 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -27593,7 +27946,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_1__iter__(PyObject *__ return __pyx_r; } -/* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3142 +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3142 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -27601,10 +27954,10 @@ static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_1__iter__(PyObject *__ * """ */ -static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_2__next__(PyObject *__pyx_v_self); /*proto*/ -static char __pyx_doc_9csamtools_18IteratorIndelCalls_2__next__[] = "python version of next().\n "; -struct wrapperbase __pyx_wrapperbase_9csamtools_18IteratorIndelCalls_2__next__; -static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_2__next__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_9csamtools_18IteratorIndelCalls___next__[] = "python version of next().\n "; +struct wrapperbase __pyx_wrapperbase_9csamtools_18IteratorIndelCalls___next__; +static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls___next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -27613,7 +27966,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_2__next__(PyObject *__ __Pyx_RefNannySetupContext("__next__"); __Pyx_TraceCall("__next__", __pyx_f[0], 3142); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3147 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3147 * * # the following code was adapted from bam_plcmd.c:pileup_func() * self.iter.cnext() # <<<<<<<<<<<<<< @@ -27622,7 +27975,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_2__next__(PyObject *__ */ ((struct __pyx_vtabstruct_9csamtools_IteratorColumn *)((struct __pyx_obj_9csamtools_IteratorIndelCalls *)__pyx_v_self)->__pyx_base.iter->__pyx_vtab)->cnext(((struct __pyx_obj_9csamtools_IteratorIndelCalls *)__pyx_v_self)->__pyx_base.iter); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3149 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3149 * self.iter.cnext() * * if self.iter.n_plp < 0: # <<<<<<<<<<<<<< @@ -27632,23 +27985,29 @@ static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_2__next__(PyObject *__ __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorIndelCalls *)__pyx_v_self)->__pyx_base.iter->n_plp < 0); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3150 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3150 * * if self.iter.n_plp < 0: * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< * * if self.iter.plp == NULL: */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_169), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __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 = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_56)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_56)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_56)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3152 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3152 * raise ValueError("error during iteration" ) * * if self.iter.plp == NULL: # <<<<<<<<<<<<<< @@ -27658,7 +28017,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_2__next__(PyObject *__ __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorIndelCalls *)__pyx_v_self)->__pyx_base.iter->plp == NULL); if (__pyx_t_1) { - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3153 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3153 * * if self.iter.plp == NULL: * raise StopIteration # <<<<<<<<<<<<<< @@ -27671,7 +28030,7 @@ static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_2__next__(PyObject *__ } __pyx_L6:; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3155 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3155 * raise StopIteration * * return self._call() # <<<<<<<<<<<<<< @@ -27679,13 +28038,13 @@ static PyObject *__pyx_pf_9csamtools_18IteratorIndelCalls_2__next__(PyObject *__ * __all__ = ["Samfile", */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___call); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __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 = 3155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___call); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -27713,7 +28072,7 @@ static void __pyx_tp_dealloc_9csamtools_AlignedRead(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_9csamtools_11AlignedRead_1__dealloc__(o); + __pyx_pf_9csamtools_11AlignedRead___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -27722,12 +28081,12 @@ static void __pyx_tp_dealloc_9csamtools_AlignedRead(PyObject *o) { } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qname(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_5qname_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_5qname___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_qname(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_5qname_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_5qname___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27736,12 +28095,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_qname(PyObject *o, PyObject *v } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_cigar(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_5cigar_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_5cigar___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_cigar(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_5cigar_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_5cigar___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27750,12 +28109,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_cigar(PyObject *o, PyObject *v } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_seq(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_3seq_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_3seq___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_seq(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_3seq_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_3seq___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27764,12 +28123,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_seq(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qual(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4qual_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4qual___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_qual(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_4qual_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_4qual___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27778,32 +28137,32 @@ static int __pyx_setprop_9csamtools_11AlignedRead_qual(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_query(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_5query_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_5query___get__(o); } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qqual(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_5qqual_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_5qqual___get__(o); } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qstart(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_6qstart_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_6qstart___get__(o); } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qend(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4qend_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4qend___get__(o); } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qlen(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4qlen_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4qlen___get__(o); } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_tags(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4tags_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4tags___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_tags(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_4tags_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_4tags___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27812,12 +28171,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_tags(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_flag(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4flag_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4flag___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_flag(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_4flag_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_4flag___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27826,12 +28185,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_flag(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_rname(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_5rname_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_5rname___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_rname(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_5rname_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_5rname___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27840,12 +28199,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_rname(PyObject *o, PyObject *v } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_tid(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_3tid_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_3tid___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_tid(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_3tid_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_3tid___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27854,12 +28213,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_tid(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_pos(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_3pos_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_3pos___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_pos(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_3pos_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_3pos___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27868,12 +28227,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_pos(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_bin(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_3bin_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_3bin___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_bin(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_3bin_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_3bin___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27882,24 +28241,24 @@ static int __pyx_setprop_9csamtools_11AlignedRead_bin(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_rlen(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4rlen_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4rlen___get__(o); } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_aend(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4aend_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4aend___get__(o); } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_alen(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4alen_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4alen___get__(o); } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_mapq(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4mapq_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4mapq___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_mapq(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_4mapq_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_4mapq___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27908,12 +28267,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_mapq(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_mrnm(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4mrnm_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4mrnm___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_mrnm(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_4mrnm_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_4mrnm___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27922,12 +28281,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_mrnm(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_mpos(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_4mpos_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_4mpos___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_mpos(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_4mpos_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_4mpos___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27936,12 +28295,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_mpos(PyObject *o, PyObject *v, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_isize(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_5isize_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_5isize___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_isize(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_5isize_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_5isize___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27950,12 +28309,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_isize(PyObject *o, PyObject *v } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_paired(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_9is_paired_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_9is_paired___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_is_paired(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_9is_paired_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_9is_paired___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27964,12 +28323,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_is_paired(PyObject *o, PyObjec } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_proper_pair(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_is_proper_pair(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_14is_proper_pair___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27978,12 +28337,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_is_proper_pair(PyObject *o, Py } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_unmapped(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_11is_unmapped_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_11is_unmapped___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_is_unmapped(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_11is_unmapped_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_11is_unmapped___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -27992,12 +28351,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_is_unmapped(PyObject *o, PyObj } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_mate_is_unmapped(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_mate_is_unmapped(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_16mate_is_unmapped___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -28006,12 +28365,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_mate_is_unmapped(PyObject *o, } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_reverse(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_10is_reverse_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_10is_reverse___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_is_reverse(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_10is_reverse_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_10is_reverse___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -28020,12 +28379,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_is_reverse(PyObject *o, PyObje } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_mate_is_reverse(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_mate_is_reverse(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_15mate_is_reverse___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -28034,12 +28393,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_mate_is_reverse(PyObject *o, P } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_read1(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_8is_read1_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_8is_read1___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_is_read1(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_8is_read1_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_8is_read1___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -28048,12 +28407,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_is_read1(PyObject *o, PyObject } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_read2(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_8is_read2_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_8is_read2___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_is_read2(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_8is_read2_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_8is_read2___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -28062,12 +28421,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_is_read2(PyObject *o, PyObject } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_secondary(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_12is_secondary_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_12is_secondary___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_is_secondary(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_12is_secondary_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_12is_secondary___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -28076,12 +28435,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_is_secondary(PyObject *o, PyOb } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_qcfail(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_9is_qcfail_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_9is_qcfail___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_is_qcfail(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_9is_qcfail_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_9is_qcfail___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -28090,12 +28449,12 @@ static int __pyx_setprop_9csamtools_11AlignedRead_is_qcfail(PyObject *o, PyObjec } static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_duplicate(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11AlignedRead_12is_duplicate_0__get__(o); + return __pyx_pf_9csamtools_11AlignedRead_12is_duplicate___get__(o); } static int __pyx_setprop_9csamtools_11AlignedRead_is_duplicate(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11AlignedRead_12is_duplicate_1__set__(o, v); + return __pyx_pf_9csamtools_11AlignedRead_12is_duplicate___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -28104,46 +28463,46 @@ static int __pyx_setprop_9csamtools_11AlignedRead_is_duplicate(PyObject *o, PyOb } static PyMethodDef __pyx_methods_9csamtools_AlignedRead[] = { - {__Pyx_NAMESTR("compare"), (PyCFunction)__pyx_pf_9csamtools_11AlignedRead_3compare, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_11AlignedRead_3compare)}, - {__Pyx_NAMESTR("opt"), (PyCFunction)__pyx_pf_9csamtools_11AlignedRead_5opt, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_11AlignedRead_5opt)}, - {__Pyx_NAMESTR("fancy_str"), (PyCFunction)__pyx_pf_9csamtools_11AlignedRead_6fancy_str, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_11AlignedRead_6fancy_str)}, + {__Pyx_NAMESTR("compare"), (PyCFunction)__pyx_pf_9csamtools_11AlignedRead_compare, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_11AlignedRead_compare)}, + {__Pyx_NAMESTR("opt"), (PyCFunction)__pyx_pf_9csamtools_11AlignedRead_opt, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_11AlignedRead_opt)}, + {__Pyx_NAMESTR("fancy_str"), (PyCFunction)__pyx_pf_9csamtools_11AlignedRead_fancy_str, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_11AlignedRead_fancy_str)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9csamtools_AlignedRead[] = { - {(char *)"qname", __pyx_getprop_9csamtools_11AlignedRead_qname, __pyx_setprop_9csamtools_11AlignedRead_qname, __Pyx_DOCSTR(__pyx_k_170), 0}, - {(char *)"cigar", __pyx_getprop_9csamtools_11AlignedRead_cigar, __pyx_setprop_9csamtools_11AlignedRead_cigar, __Pyx_DOCSTR(__pyx_k_171), 0}, - {(char *)"seq", __pyx_getprop_9csamtools_11AlignedRead_seq, __pyx_setprop_9csamtools_11AlignedRead_seq, __Pyx_DOCSTR(__pyx_k_172), 0}, - {(char *)"qual", __pyx_getprop_9csamtools_11AlignedRead_qual, __pyx_setprop_9csamtools_11AlignedRead_qual, __Pyx_DOCSTR(__pyx_k_173), 0}, - {(char *)"query", __pyx_getprop_9csamtools_11AlignedRead_query, 0, __Pyx_DOCSTR(__pyx_k_174), 0}, - {(char *)"qqual", __pyx_getprop_9csamtools_11AlignedRead_qqual, 0, __Pyx_DOCSTR(__pyx_k_175), 0}, - {(char *)"qstart", __pyx_getprop_9csamtools_11AlignedRead_qstart, 0, __Pyx_DOCSTR(__pyx_k_176), 0}, - {(char *)"qend", __pyx_getprop_9csamtools_11AlignedRead_qend, 0, __Pyx_DOCSTR(__pyx_k_177), 0}, - {(char *)"qlen", __pyx_getprop_9csamtools_11AlignedRead_qlen, 0, __Pyx_DOCSTR(__pyx_k_178), 0}, - {(char *)"tags", __pyx_getprop_9csamtools_11AlignedRead_tags, __pyx_setprop_9csamtools_11AlignedRead_tags, __Pyx_DOCSTR(__pyx_k_179), 0}, - {(char *)"flag", __pyx_getprop_9csamtools_11AlignedRead_flag, __pyx_setprop_9csamtools_11AlignedRead_flag, __Pyx_DOCSTR(__pyx_k_180), 0}, - {(char *)"rname", __pyx_getprop_9csamtools_11AlignedRead_rname, __pyx_setprop_9csamtools_11AlignedRead_rname, __Pyx_DOCSTR(__pyx_k_181), 0}, - {(char *)"tid", __pyx_getprop_9csamtools_11AlignedRead_tid, __pyx_setprop_9csamtools_11AlignedRead_tid, __Pyx_DOCSTR(__pyx_k_182), 0}, - {(char *)"pos", __pyx_getprop_9csamtools_11AlignedRead_pos, __pyx_setprop_9csamtools_11AlignedRead_pos, __Pyx_DOCSTR(__pyx_k_183), 0}, - {(char *)"bin", __pyx_getprop_9csamtools_11AlignedRead_bin, __pyx_setprop_9csamtools_11AlignedRead_bin, __Pyx_DOCSTR(__pyx_k_184), 0}, - {(char *)"rlen", __pyx_getprop_9csamtools_11AlignedRead_rlen, 0, __Pyx_DOCSTR(__pyx_k_185), 0}, - {(char *)"aend", __pyx_getprop_9csamtools_11AlignedRead_aend, 0, __Pyx_DOCSTR(__pyx_k_186), 0}, - {(char *)"alen", __pyx_getprop_9csamtools_11AlignedRead_alen, 0, __Pyx_DOCSTR(__pyx_k_187), 0}, - {(char *)"mapq", __pyx_getprop_9csamtools_11AlignedRead_mapq, __pyx_setprop_9csamtools_11AlignedRead_mapq, __Pyx_DOCSTR(__pyx_k_188), 0}, - {(char *)"mrnm", __pyx_getprop_9csamtools_11AlignedRead_mrnm, __pyx_setprop_9csamtools_11AlignedRead_mrnm, __Pyx_DOCSTR(__pyx_k_189), 0}, - {(char *)"mpos", __pyx_getprop_9csamtools_11AlignedRead_mpos, __pyx_setprop_9csamtools_11AlignedRead_mpos, __Pyx_DOCSTR(__pyx_k_190), 0}, - {(char *)"isize", __pyx_getprop_9csamtools_11AlignedRead_isize, __pyx_setprop_9csamtools_11AlignedRead_isize, __Pyx_DOCSTR(__pyx_k_191), 0}, - {(char *)"is_paired", __pyx_getprop_9csamtools_11AlignedRead_is_paired, __pyx_setprop_9csamtools_11AlignedRead_is_paired, __Pyx_DOCSTR(__pyx_k_192), 0}, - {(char *)"is_proper_pair", __pyx_getprop_9csamtools_11AlignedRead_is_proper_pair, __pyx_setprop_9csamtools_11AlignedRead_is_proper_pair, __Pyx_DOCSTR(__pyx_k_193), 0}, - {(char *)"is_unmapped", __pyx_getprop_9csamtools_11AlignedRead_is_unmapped, __pyx_setprop_9csamtools_11AlignedRead_is_unmapped, __Pyx_DOCSTR(__pyx_k_194), 0}, - {(char *)"mate_is_unmapped", __pyx_getprop_9csamtools_11AlignedRead_mate_is_unmapped, __pyx_setprop_9csamtools_11AlignedRead_mate_is_unmapped, __Pyx_DOCSTR(__pyx_k_195), 0}, - {(char *)"is_reverse", __pyx_getprop_9csamtools_11AlignedRead_is_reverse, __pyx_setprop_9csamtools_11AlignedRead_is_reverse, __Pyx_DOCSTR(__pyx_k_196), 0}, - {(char *)"mate_is_reverse", __pyx_getprop_9csamtools_11AlignedRead_mate_is_reverse, __pyx_setprop_9csamtools_11AlignedRead_mate_is_reverse, __Pyx_DOCSTR(__pyx_k_197), 0}, - {(char *)"is_read1", __pyx_getprop_9csamtools_11AlignedRead_is_read1, __pyx_setprop_9csamtools_11AlignedRead_is_read1, __Pyx_DOCSTR(__pyx_k_198), 0}, - {(char *)"is_read2", __pyx_getprop_9csamtools_11AlignedRead_is_read2, __pyx_setprop_9csamtools_11AlignedRead_is_read2, __Pyx_DOCSTR(__pyx_k_199), 0}, - {(char *)"is_secondary", __pyx_getprop_9csamtools_11AlignedRead_is_secondary, __pyx_setprop_9csamtools_11AlignedRead_is_secondary, __Pyx_DOCSTR(__pyx_k_200), 0}, - {(char *)"is_qcfail", __pyx_getprop_9csamtools_11AlignedRead_is_qcfail, __pyx_setprop_9csamtools_11AlignedRead_is_qcfail, __Pyx_DOCSTR(__pyx_k_201), 0}, - {(char *)"is_duplicate", __pyx_getprop_9csamtools_11AlignedRead_is_duplicate, __pyx_setprop_9csamtools_11AlignedRead_is_duplicate, __Pyx_DOCSTR(__pyx_k_202), 0}, + {(char *)"qname", __pyx_getprop_9csamtools_11AlignedRead_qname, __pyx_setprop_9csamtools_11AlignedRead_qname, __Pyx_DOCSTR(__pyx_k_109), 0}, + {(char *)"cigar", __pyx_getprop_9csamtools_11AlignedRead_cigar, __pyx_setprop_9csamtools_11AlignedRead_cigar, __Pyx_DOCSTR(__pyx_k_110), 0}, + {(char *)"seq", __pyx_getprop_9csamtools_11AlignedRead_seq, __pyx_setprop_9csamtools_11AlignedRead_seq, __Pyx_DOCSTR(__pyx_k_111), 0}, + {(char *)"qual", __pyx_getprop_9csamtools_11AlignedRead_qual, __pyx_setprop_9csamtools_11AlignedRead_qual, __Pyx_DOCSTR(__pyx_k_112), 0}, + {(char *)"query", __pyx_getprop_9csamtools_11AlignedRead_query, 0, __Pyx_DOCSTR(__pyx_k_113), 0}, + {(char *)"qqual", __pyx_getprop_9csamtools_11AlignedRead_qqual, 0, __Pyx_DOCSTR(__pyx_k_114), 0}, + {(char *)"qstart", __pyx_getprop_9csamtools_11AlignedRead_qstart, 0, __Pyx_DOCSTR(__pyx_k_115), 0}, + {(char *)"qend", __pyx_getprop_9csamtools_11AlignedRead_qend, 0, __Pyx_DOCSTR(__pyx_k_116), 0}, + {(char *)"qlen", __pyx_getprop_9csamtools_11AlignedRead_qlen, 0, __Pyx_DOCSTR(__pyx_k_117), 0}, + {(char *)"tags", __pyx_getprop_9csamtools_11AlignedRead_tags, __pyx_setprop_9csamtools_11AlignedRead_tags, __Pyx_DOCSTR(__pyx_k_118), 0}, + {(char *)"flag", __pyx_getprop_9csamtools_11AlignedRead_flag, __pyx_setprop_9csamtools_11AlignedRead_flag, __Pyx_DOCSTR(__pyx_k_119), 0}, + {(char *)"rname", __pyx_getprop_9csamtools_11AlignedRead_rname, __pyx_setprop_9csamtools_11AlignedRead_rname, __Pyx_DOCSTR(__pyx_k_120), 0}, + {(char *)"tid", __pyx_getprop_9csamtools_11AlignedRead_tid, __pyx_setprop_9csamtools_11AlignedRead_tid, __Pyx_DOCSTR(__pyx_k_121), 0}, + {(char *)"pos", __pyx_getprop_9csamtools_11AlignedRead_pos, __pyx_setprop_9csamtools_11AlignedRead_pos, __Pyx_DOCSTR(__pyx_k_122), 0}, + {(char *)"bin", __pyx_getprop_9csamtools_11AlignedRead_bin, __pyx_setprop_9csamtools_11AlignedRead_bin, __Pyx_DOCSTR(__pyx_k_123), 0}, + {(char *)"rlen", __pyx_getprop_9csamtools_11AlignedRead_rlen, 0, __Pyx_DOCSTR(__pyx_k_124), 0}, + {(char *)"aend", __pyx_getprop_9csamtools_11AlignedRead_aend, 0, __Pyx_DOCSTR(__pyx_k_125), 0}, + {(char *)"alen", __pyx_getprop_9csamtools_11AlignedRead_alen, 0, __Pyx_DOCSTR(__pyx_k_126), 0}, + {(char *)"mapq", __pyx_getprop_9csamtools_11AlignedRead_mapq, __pyx_setprop_9csamtools_11AlignedRead_mapq, __Pyx_DOCSTR(__pyx_k_127), 0}, + {(char *)"mrnm", __pyx_getprop_9csamtools_11AlignedRead_mrnm, __pyx_setprop_9csamtools_11AlignedRead_mrnm, __Pyx_DOCSTR(__pyx_k_128), 0}, + {(char *)"mpos", __pyx_getprop_9csamtools_11AlignedRead_mpos, __pyx_setprop_9csamtools_11AlignedRead_mpos, __Pyx_DOCSTR(__pyx_k_129), 0}, + {(char *)"isize", __pyx_getprop_9csamtools_11AlignedRead_isize, __pyx_setprop_9csamtools_11AlignedRead_isize, __Pyx_DOCSTR(__pyx_k_130), 0}, + {(char *)"is_paired", __pyx_getprop_9csamtools_11AlignedRead_is_paired, __pyx_setprop_9csamtools_11AlignedRead_is_paired, __Pyx_DOCSTR(__pyx_k_131), 0}, + {(char *)"is_proper_pair", __pyx_getprop_9csamtools_11AlignedRead_is_proper_pair, __pyx_setprop_9csamtools_11AlignedRead_is_proper_pair, __Pyx_DOCSTR(__pyx_k_132), 0}, + {(char *)"is_unmapped", __pyx_getprop_9csamtools_11AlignedRead_is_unmapped, __pyx_setprop_9csamtools_11AlignedRead_is_unmapped, __Pyx_DOCSTR(__pyx_k_133), 0}, + {(char *)"mate_is_unmapped", __pyx_getprop_9csamtools_11AlignedRead_mate_is_unmapped, __pyx_setprop_9csamtools_11AlignedRead_mate_is_unmapped, __Pyx_DOCSTR(__pyx_k_134), 0}, + {(char *)"is_reverse", __pyx_getprop_9csamtools_11AlignedRead_is_reverse, __pyx_setprop_9csamtools_11AlignedRead_is_reverse, __Pyx_DOCSTR(__pyx_k_135), 0}, + {(char *)"mate_is_reverse", __pyx_getprop_9csamtools_11AlignedRead_mate_is_reverse, __pyx_setprop_9csamtools_11AlignedRead_mate_is_reverse, __Pyx_DOCSTR(__pyx_k_136), 0}, + {(char *)"is_read1", __pyx_getprop_9csamtools_11AlignedRead_is_read1, __pyx_setprop_9csamtools_11AlignedRead_is_read1, __Pyx_DOCSTR(__pyx_k_137), 0}, + {(char *)"is_read2", __pyx_getprop_9csamtools_11AlignedRead_is_read2, __pyx_setprop_9csamtools_11AlignedRead_is_read2, __Pyx_DOCSTR(__pyx_k_138), 0}, + {(char *)"is_secondary", __pyx_getprop_9csamtools_11AlignedRead_is_secondary, __pyx_setprop_9csamtools_11AlignedRead_is_secondary, __Pyx_DOCSTR(__pyx_k_139), 0}, + {(char *)"is_qcfail", __pyx_getprop_9csamtools_11AlignedRead_is_qcfail, __pyx_setprop_9csamtools_11AlignedRead_is_qcfail, __Pyx_DOCSTR(__pyx_k_140), 0}, + {(char *)"is_duplicate", __pyx_getprop_9csamtools_11AlignedRead_is_duplicate, __pyx_setprop_9csamtools_11AlignedRead_is_duplicate, __Pyx_DOCSTR(__pyx_k_141), 0}, {0, 0, 0, 0, 0} }; @@ -28263,13 +28622,13 @@ PyTypeObject __pyx_type_9csamtools_AlignedRead = { &__pyx_tp_as_number_AlignedRead, /*tp_as_number*/ &__pyx_tp_as_sequence_AlignedRead, /*tp_as_sequence*/ &__pyx_tp_as_mapping_AlignedRead, /*tp_as_mapping*/ - __pyx_pf_9csamtools_11AlignedRead_4__hash__, /*tp_hash*/ + __pyx_pf_9csamtools_11AlignedRead___hash__, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pf_9csamtools_11AlignedRead_2__str__, /*tp_str*/ + __pyx_pf_9csamtools_11AlignedRead___str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_AlignedRead, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ __Pyx_DOCSTR("\n Class representing an aligned read. see SAM format specification for meaning of fields (http://samtools.sourceforge.net/).\n\n This class stores a handle to the samtools C-structure representing\n an aligned read. Member read access is forwarded to the C-structure\n and converted into python objects. This implementation should be fast,\n as only the data needed is converted.\n\n For write access, the C-structure is updated in-place. This is\n not the most efficient way to build BAM entries, as the variable\n length data is concatenated and thus needs to resized if\n a field is updated. Furthermore, the BAM entry might be\n in an inconsistent state. The :meth:`~validate` method can\n be used to check if an entry is consistent.\n\n One issue to look out for is that the sequence should always\n be set *before* the quality scores. Setting the sequence will\n also erase any quality scores that were set previously.\n "), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -28285,7 +28644,7 @@ PyTypeObject __pyx_type_9csamtools_AlignedRead = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pf_9csamtools_11AlignedRead_0__init__, /*tp_init*/ + __pyx_pf_9csamtools_11AlignedRead___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9csamtools_AlignedRead, /*tp_new*/ 0, /*tp_free*/ @@ -28312,16 +28671,16 @@ static void __pyx_tp_dealloc_9csamtools_PileupProxy(PyObject *o) { } static PyObject *__pyx_getprop_9csamtools_11PileupProxy_tid(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11PileupProxy_3tid_0__get__(o); + return __pyx_pf_9csamtools_11PileupProxy_3tid___get__(o); } static PyObject *__pyx_getprop_9csamtools_11PileupProxy_n(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11PileupProxy_1n_0__get__(o); + return __pyx_pf_9csamtools_11PileupProxy_1n___get__(o); } static int __pyx_setprop_9csamtools_11PileupProxy_n(PyObject *o, PyObject *v, void *x) { if (v) { - return __pyx_pf_9csamtools_11PileupProxy_1n_1__set__(o, v); + return __pyx_pf_9csamtools_11PileupProxy_1n___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -28330,11 +28689,11 @@ static int __pyx_setprop_9csamtools_11PileupProxy_n(PyObject *o, PyObject *v, vo } static PyObject *__pyx_getprop_9csamtools_11PileupProxy_pos(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11PileupProxy_3pos_0__get__(o); + return __pyx_pf_9csamtools_11PileupProxy_3pos___get__(o); } static PyObject *__pyx_getprop_9csamtools_11PileupProxy_pileups(PyObject *o, void *x) { - return __pyx_pf_9csamtools_11PileupProxy_7pileups_0__get__(o); + return __pyx_pf_9csamtools_11PileupProxy_7pileups___get__(o); } static PyMethodDef __pyx_methods_9csamtools_PileupProxy[] = { @@ -28342,10 +28701,10 @@ static PyMethodDef __pyx_methods_9csamtools_PileupProxy[] = { }; static struct PyGetSetDef __pyx_getsets_9csamtools_PileupProxy[] = { - {(char *)"tid", __pyx_getprop_9csamtools_11PileupProxy_tid, 0, __Pyx_DOCSTR(__pyx_k_203), 0}, - {(char *)"n", __pyx_getprop_9csamtools_11PileupProxy_n, __pyx_setprop_9csamtools_11PileupProxy_n, __Pyx_DOCSTR(__pyx_k_204), 0}, + {(char *)"tid", __pyx_getprop_9csamtools_11PileupProxy_tid, 0, __Pyx_DOCSTR(__pyx_k_142), 0}, + {(char *)"n", __pyx_getprop_9csamtools_11PileupProxy_n, __pyx_setprop_9csamtools_11PileupProxy_n, __Pyx_DOCSTR(__pyx_k_143), 0}, {(char *)"pos", __pyx_getprop_9csamtools_11PileupProxy_pos, 0, 0, 0}, - {(char *)"pileups", __pyx_getprop_9csamtools_11PileupProxy_pileups, 0, __Pyx_DOCSTR(__pyx_k_205), 0}, + {(char *)"pileups", __pyx_getprop_9csamtools_11PileupProxy_pileups, 0, __Pyx_DOCSTR(__pyx_k_144), 0}, {0, 0, 0, 0, 0} }; @@ -28467,11 +28826,11 @@ PyTypeObject __pyx_type_9csamtools_PileupProxy = { &__pyx_tp_as_mapping_PileupProxy, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pf_9csamtools_11PileupProxy_1__str__, /*tp_str*/ + __pyx_pf_9csamtools_11PileupProxy___str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_PileupProxy, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ __Pyx_DOCSTR("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\n This class is a proxy for results returned by the samtools pileup engine.\n If the underlying engine iterator advances, the results of this column\n will change.\n "), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -28487,7 +28846,7 @@ PyTypeObject __pyx_type_9csamtools_PileupProxy = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pf_9csamtools_11PileupProxy_0__init__, /*tp_init*/ + __pyx_pf_9csamtools_11PileupProxy___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9csamtools_PileupProxy, /*tp_new*/ 0, /*tp_free*/ @@ -28537,31 +28896,31 @@ static int __pyx_tp_clear_9csamtools_PileupRead(PyObject *o) { } static PyObject *__pyx_getprop_9csamtools_10PileupRead_alignment(PyObject *o, void *x) { - return __pyx_pf_9csamtools_10PileupRead_9alignment_0__get__(o); + return __pyx_pf_9csamtools_10PileupRead_9alignment___get__(o); } static PyObject *__pyx_getprop_9csamtools_10PileupRead_qpos(PyObject *o, void *x) { - return __pyx_pf_9csamtools_10PileupRead_4qpos_0__get__(o); + return __pyx_pf_9csamtools_10PileupRead_4qpos___get__(o); } static PyObject *__pyx_getprop_9csamtools_10PileupRead_indel(PyObject *o, void *x) { - return __pyx_pf_9csamtools_10PileupRead_5indel_0__get__(o); + return __pyx_pf_9csamtools_10PileupRead_5indel___get__(o); } static PyObject *__pyx_getprop_9csamtools_10PileupRead_is_del(PyObject *o, void *x) { - return __pyx_pf_9csamtools_10PileupRead_6is_del_0__get__(o); + return __pyx_pf_9csamtools_10PileupRead_6is_del___get__(o); } static PyObject *__pyx_getprop_9csamtools_10PileupRead_is_head(PyObject *o, void *x) { - return __pyx_pf_9csamtools_10PileupRead_7is_head_0__get__(o); + return __pyx_pf_9csamtools_10PileupRead_7is_head___get__(o); } static PyObject *__pyx_getprop_9csamtools_10PileupRead_is_tail(PyObject *o, void *x) { - return __pyx_pf_9csamtools_10PileupRead_7is_tail_0__get__(o); + return __pyx_pf_9csamtools_10PileupRead_7is_tail___get__(o); } static PyObject *__pyx_getprop_9csamtools_10PileupRead_level(PyObject *o, void *x) { - return __pyx_pf_9csamtools_10PileupRead_5level_0__get__(o); + return __pyx_pf_9csamtools_10PileupRead_5level___get__(o); } static PyMethodDef __pyx_methods_9csamtools_PileupRead[] = { @@ -28569,10 +28928,10 @@ static PyMethodDef __pyx_methods_9csamtools_PileupRead[] = { }; static struct PyGetSetDef __pyx_getsets_9csamtools_PileupRead[] = { - {(char *)"alignment", __pyx_getprop_9csamtools_10PileupRead_alignment, 0, __Pyx_DOCSTR(__pyx_k_206), 0}, - {(char *)"qpos", __pyx_getprop_9csamtools_10PileupRead_qpos, 0, __Pyx_DOCSTR(__pyx_k_207), 0}, - {(char *)"indel", __pyx_getprop_9csamtools_10PileupRead_indel, 0, __Pyx_DOCSTR(__pyx_k_208), 0}, - {(char *)"is_del", __pyx_getprop_9csamtools_10PileupRead_is_del, 0, __Pyx_DOCSTR(__pyx_k_209), 0}, + {(char *)"alignment", __pyx_getprop_9csamtools_10PileupRead_alignment, 0, __Pyx_DOCSTR(__pyx_k_145), 0}, + {(char *)"qpos", __pyx_getprop_9csamtools_10PileupRead_qpos, 0, __Pyx_DOCSTR(__pyx_k_146), 0}, + {(char *)"indel", __pyx_getprop_9csamtools_10PileupRead_indel, 0, __Pyx_DOCSTR(__pyx_k_147), 0}, + {(char *)"is_del", __pyx_getprop_9csamtools_10PileupRead_is_del, 0, __Pyx_DOCSTR(__pyx_k_148), 0}, {(char *)"is_head", __pyx_getprop_9csamtools_10PileupRead_is_head, 0, 0, 0}, {(char *)"is_tail", __pyx_getprop_9csamtools_10PileupRead_is_tail, 0, 0, 0}, {(char *)"level", __pyx_getprop_9csamtools_10PileupRead_level, 0, 0, 0}, @@ -28697,11 +29056,11 @@ PyTypeObject __pyx_type_9csamtools_PileupRead = { &__pyx_tp_as_mapping_PileupRead, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pf_9csamtools_10PileupRead_1__str__, /*tp_str*/ + __pyx_pf_9csamtools_10PileupRead___str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_PileupRead, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("A read aligned to a column.\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_PileupRead, /*tp_traverse*/ __pyx_tp_clear_9csamtools_PileupRead, /*tp_clear*/ @@ -28717,7 +29076,7 @@ PyTypeObject __pyx_type_9csamtools_PileupRead = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pf_9csamtools_10PileupRead_0__init__, /*tp_init*/ + __pyx_pf_9csamtools_10PileupRead___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9csamtools_PileupRead, /*tp_new*/ 0, /*tp_free*/ @@ -28740,7 +29099,7 @@ static PyObject *__pyx_tp_new_9csamtools_Fastafile(PyTypeObject *t, PyObject *a, if (!o) return 0; p = ((struct __pyx_obj_9csamtools_Fastafile *)o); p->__pyx_vtab = __pyx_vtabptr_9csamtools_Fastafile; - if (__pyx_pf_9csamtools_9Fastafile_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_9Fastafile___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; @@ -28751,7 +29110,7 @@ static void __pyx_tp_dealloc_9csamtools_Fastafile(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_9csamtools_9Fastafile_5__dealloc__(o); + __pyx_pf_9csamtools_9Fastafile___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -28760,19 +29119,19 @@ static void __pyx_tp_dealloc_9csamtools_Fastafile(PyObject *o) { } static PyObject *__pyx_getprop_9csamtools_9Fastafile_filename(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9Fastafile_8filename_0__get__(o); + return __pyx_pf_9csamtools_9Fastafile_8filename___get__(o); } static PyMethodDef __pyx_methods_9csamtools_Fastafile[] = { - {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pf_9csamtools_9Fastafile_1_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_9Fastafile_1_isOpen)}, - {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pf_9csamtools_9Fastafile_3_open, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_9Fastafile_3_open)}, - {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pf_9csamtools_9Fastafile_4close, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pf_9csamtools_9Fastafile_6fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_9Fastafile_6fetch)}, + {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pf_9csamtools_9Fastafile__isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_9Fastafile__isOpen)}, + {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pf_9csamtools_9Fastafile__open, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_9Fastafile__open)}, + {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pf_9csamtools_9Fastafile_close, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pf_9csamtools_9Fastafile_fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_9Fastafile_fetch)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9csamtools_Fastafile[] = { - {(char *)"filename", __pyx_getprop_9csamtools_9Fastafile_filename, 0, __Pyx_DOCSTR(__pyx_k_210), 0}, + {(char *)"filename", __pyx_getprop_9csamtools_9Fastafile_filename, 0, __Pyx_DOCSTR(__pyx_k_149), 0}, {0, 0, 0, 0, 0} }; @@ -28835,7 +29194,7 @@ static PyNumberMethods __pyx_tp_as_number_Fastafile = { }; static PySequenceMethods __pyx_tp_as_sequence_Fastafile = { - __pyx_pf_9csamtools_9Fastafile_2__len__, /*sq_length*/ + __pyx_pf_9csamtools_9Fastafile___len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ @@ -28848,7 +29207,7 @@ static PySequenceMethods __pyx_tp_as_sequence_Fastafile = { }; static PyMappingMethods __pyx_tp_as_mapping_Fastafile = { - __pyx_pf_9csamtools_9Fastafile_2__len__, /*mp_length*/ + __pyx_pf_9csamtools_9Fastafile___len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; @@ -28898,7 +29257,7 @@ PyTypeObject __pyx_type_9csamtools_Fastafile = { 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*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*/ @@ -28937,7 +29296,7 @@ static PyObject *__pyx_tp_new_9csamtools_Samfile(PyTypeObject *t, PyObject *a, P if (!o) return 0; p = ((struct __pyx_obj_9csamtools_Samfile *)o); p->__pyx_vtab = __pyx_vtabptr_9csamtools_Samfile; - if (__pyx_pf_9csamtools_7Samfile_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_7Samfile___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; @@ -28948,7 +29307,7 @@ static void __pyx_tp_dealloc_9csamtools_Samfile(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_9csamtools_7Samfile_14__dealloc__(o); + __pyx_pf_9csamtools_7Samfile___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -28957,58 +29316,58 @@ static void __pyx_tp_dealloc_9csamtools_Samfile(PyObject *o) { } static PyObject *__pyx_getprop_9csamtools_7Samfile_filename(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7Samfile_8filename_0__get__(o); + return __pyx_pf_9csamtools_7Samfile_8filename___get__(o); } static PyObject *__pyx_getprop_9csamtools_7Samfile_nreferences(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7Samfile_11nreferences_0__get__(o); + return __pyx_pf_9csamtools_7Samfile_11nreferences___get__(o); } static PyObject *__pyx_getprop_9csamtools_7Samfile_references(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7Samfile_10references_0__get__(o); + return __pyx_pf_9csamtools_7Samfile_10references___get__(o); } static PyObject *__pyx_getprop_9csamtools_7Samfile_lengths(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7Samfile_7lengths_0__get__(o); + return __pyx_pf_9csamtools_7Samfile_7lengths___get__(o); } static PyObject *__pyx_getprop_9csamtools_7Samfile_text(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7Samfile_4text_0__get__(o); + return __pyx_pf_9csamtools_7Samfile_4text___get__(o); } static PyObject *__pyx_getprop_9csamtools_7Samfile_header(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7Samfile_6header_0__get__(o); + return __pyx_pf_9csamtools_7Samfile_6header___get__(o); } static PyMethodDef __pyx_methods_9csamtools_Samfile[] = { - {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_1_isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_1_isOpen)}, - {__Pyx_NAMESTR("_hasIndex"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_2_hasIndex, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_2_hasIndex)}, - {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_3_open, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_3_open)}, - {__Pyx_NAMESTR("getrname"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_4getrname, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_4getrname)}, - {__Pyx_NAMESTR("gettid"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_5gettid, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_5gettid)}, - {__Pyx_NAMESTR("_parseRegion"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_6_parseRegion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_6_parseRegion)}, - {__Pyx_NAMESTR("seek"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_7seek, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_7seek)}, - {__Pyx_NAMESTR("tell"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_8tell, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_8tell)}, - {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_9fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_9fetch)}, - {__Pyx_NAMESTR("mate"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_10mate, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_10mate)}, - {__Pyx_NAMESTR("count"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_11count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_11count)}, - {__Pyx_NAMESTR("pileup"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_12pileup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_12pileup)}, - {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_13close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_13close)}, - {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_15write, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_15write)}, - {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_16__enter__, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_17__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("_buildLine"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_18_buildLine, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_18_buildLine)}, - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_20__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_20__next__)}, + {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pf_9csamtools_7Samfile__isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile__isOpen)}, + {__Pyx_NAMESTR("_hasIndex"), (PyCFunction)__pyx_pf_9csamtools_7Samfile__hasIndex, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile__hasIndex)}, + {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pf_9csamtools_7Samfile__open, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile__open)}, + {__Pyx_NAMESTR("getrname"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_getrname, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_getrname)}, + {__Pyx_NAMESTR("gettid"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_gettid, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_gettid)}, + {__Pyx_NAMESTR("_parseRegion"), (PyCFunction)__pyx_pf_9csamtools_7Samfile__parseRegion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile__parseRegion)}, + {__Pyx_NAMESTR("seek"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_seek, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_seek)}, + {__Pyx_NAMESTR("tell"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_tell, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_tell)}, + {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_fetch)}, + {__Pyx_NAMESTR("mate"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_mate, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_mate)}, + {__Pyx_NAMESTR("count"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_count)}, + {__Pyx_NAMESTR("pileup"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_pileup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_pileup)}, + {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_close)}, + {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_write, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_write)}, + {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pf_9csamtools_7Samfile___enter__, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pf_9csamtools_7Samfile___exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("_buildLine"), (PyCFunction)__pyx_pf_9csamtools_7Samfile__buildLine, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile__buildLine)}, + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_7Samfile___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile___next__)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9csamtools_Samfile[] = { - {(char *)"filename", __pyx_getprop_9csamtools_7Samfile_filename, 0, __Pyx_DOCSTR(__pyx_k_210), 0}, - {(char *)"nreferences", __pyx_getprop_9csamtools_7Samfile_nreferences, 0, __Pyx_DOCSTR(__pyx_k_211), 0}, - {(char *)"references", __pyx_getprop_9csamtools_7Samfile_references, 0, __Pyx_DOCSTR(__pyx_k_212), 0}, - {(char *)"lengths", __pyx_getprop_9csamtools_7Samfile_lengths, 0, __Pyx_DOCSTR(__pyx_k_213), 0}, - {(char *)"text", __pyx_getprop_9csamtools_7Samfile_text, 0, __Pyx_DOCSTR(__pyx_k_214), 0}, - {(char *)"header", __pyx_getprop_9csamtools_7Samfile_header, 0, __Pyx_DOCSTR(__pyx_k_215), 0}, + {(char *)"filename", __pyx_getprop_9csamtools_7Samfile_filename, 0, __Pyx_DOCSTR(__pyx_k_149), 0}, + {(char *)"nreferences", __pyx_getprop_9csamtools_7Samfile_nreferences, 0, __Pyx_DOCSTR(__pyx_k_150), 0}, + {(char *)"references", __pyx_getprop_9csamtools_7Samfile_references, 0, __Pyx_DOCSTR(__pyx_k_151), 0}, + {(char *)"lengths", __pyx_getprop_9csamtools_7Samfile_lengths, 0, __Pyx_DOCSTR(__pyx_k_152), 0}, + {(char *)"text", __pyx_getprop_9csamtools_7Samfile_text, 0, __Pyx_DOCSTR(__pyx_k_153), 0}, + {(char *)"header", __pyx_getprop_9csamtools_7Samfile_header, 0, __Pyx_DOCSTR(__pyx_k_154), 0}, {0, 0, 0, 0, 0} }; @@ -29134,14 +29493,14 @@ PyTypeObject __pyx_type_9csamtools_Samfile = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Samfile, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ __Pyx_DOCSTR("*(filename, mode='r', template = None, referencenames = None, referencelengths = None, text = NULL, header = None)*\n \n A :term:`SAM`/:term:`BAM` formatted file. The file is automatically opened.\n \n *mode* should be ``r`` for reading or ``w`` for writing. The default is text mode so for binary \n (:term:`BAM`) I/O you should append ``b`` for compressed or ``u`` for uncompressed :term:`BAM` output. \n Use ``h`` to output header information in text (:term:`TAM`) mode.\n\n If ``b`` is present, it must immediately follow ``r`` or ``w``. \n Valid modes are ``r``, ``w``, ``wh``, ``rb``, ``wb`` and ``wbu``. For instance, to open \n a :term:`BAM` formatted file for reading, type::\n\n import pysam\n f = pysam.Samfile('ex1.bam','rb')\n\n If an index for a BAM file exists (.bai), it will be opened automatically. Without an index random\n access to reads via :meth:`fetch` and :meth:`pileup` is disabled.\n\n For writing, the header of a :term:`SAM` file/:term:`BAM` file can be constituted from several\n sources (see also the samtools format specification):\n\n 1. If *template* is given, the header is copied from a another *Samfile* \n (*template* must be of type *Samfile*).\n\n 2. If *header* is given, the header is built from a multi-level dictionary. The first level \n are the four types ('HD', 'SQ', ...). The second level are a list of lines, with each line \n being a list of tag-value pairs.\n\n 3. If *text* is given, new header text is copied from raw text.\n\n 4. The names (*referencenames*) and lengths (*referencelengths*) are supplied directly as lists. \n\n "), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_9csamtools_7Samfile_19__iter__, /*tp_iter*/ - __pyx_pf_9csamtools_7Samfile_20__next__, /*tp_iternext*/ + __pyx_pf_9csamtools_7Samfile___iter__, /*tp_iter*/ + __pyx_pf_9csamtools_7Samfile___next__, /*tp_iternext*/ __pyx_methods_9csamtools_Samfile, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9csamtools_Samfile, /*tp_getset*/ @@ -29302,7 +29661,7 @@ PyTypeObject __pyx_type_9csamtools_IteratorRow = { 0, /*tp_getattro*/ 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*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*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -29342,7 +29701,7 @@ static PyObject *__pyx_tp_new_9csamtools_IteratorRowRegion(PyTypeObject *t, PyOb p = ((struct __pyx_obj_9csamtools_IteratorRowRegion *)o); p->__pyx_vtab = __pyx_vtabptr_9csamtools_IteratorRowRegion; p->samfile = ((struct __pyx_obj_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None); - if (__pyx_pf_9csamtools_17IteratorRowRegion_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_17IteratorRowRegion___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; @@ -29354,7 +29713,7 @@ static void __pyx_tp_dealloc_9csamtools_IteratorRowRegion(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_9csamtools_17IteratorRowRegion_3__dealloc__(o); + __pyx_pf_9csamtools_17IteratorRowRegion___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -29388,7 +29747,7 @@ static int __pyx_tp_clear_9csamtools_IteratorRowRegion(PyObject *o) { } static PyMethodDef __pyx_methods_9csamtools_IteratorRowRegion[] = { - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_17IteratorRowRegion_2__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_17IteratorRowRegion_2__next__)}, + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_17IteratorRowRegion___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_17IteratorRowRegion___next__)}, {0, 0, 0, 0} }; @@ -29514,14 +29873,14 @@ PyTypeObject __pyx_type_9csamtools_IteratorRowRegion = { 0, /*tp_getattro*/ 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|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 if\n multiple operators work 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_tp_traverse_9csamtools_IteratorRowRegion, /*tp_traverse*/ __pyx_tp_clear_9csamtools_IteratorRowRegion, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_9csamtools_17IteratorRowRegion_1__iter__, /*tp_iter*/ - __pyx_pf_9csamtools_17IteratorRowRegion_2__next__, /*tp_iternext*/ + __pyx_pf_9csamtools_17IteratorRowRegion___iter__, /*tp_iter*/ + __pyx_pf_9csamtools_17IteratorRowRegion___next__, /*tp_iternext*/ __pyx_methods_9csamtools_IteratorRowRegion, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ @@ -29553,7 +29912,7 @@ static PyObject *__pyx_tp_new_9csamtools_IteratorRowAll(PyTypeObject *t, PyObjec if (!o) return 0; p = ((struct __pyx_obj_9csamtools_IteratorRowAll *)o); p->__pyx_vtab = __pyx_vtabptr_9csamtools_IteratorRowAll; - if (__pyx_pf_9csamtools_14IteratorRowAll_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_14IteratorRowAll___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; @@ -29564,7 +29923,7 @@ static void __pyx_tp_dealloc_9csamtools_IteratorRowAll(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_9csamtools_14IteratorRowAll_3__dealloc__(o); + __pyx_pf_9csamtools_14IteratorRowAll___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -29573,7 +29932,7 @@ static void __pyx_tp_dealloc_9csamtools_IteratorRowAll(PyObject *o) { } static PyMethodDef __pyx_methods_9csamtools_IteratorRowAll[] = { - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_14IteratorRowAll_2__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_14IteratorRowAll_2__next__)}, + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_14IteratorRowAll___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_14IteratorRowAll___next__)}, {0, 0, 0, 0} }; @@ -29699,14 +30058,14 @@ PyTypeObject __pyx_type_9csamtools_IteratorRowAll = { 0, /*tp_getattro*/ 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*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 if\n multiple operators work on the same file. Set *reopen* = False\n to not re-open *samfile*.\n "), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_9csamtools_14IteratorRowAll_1__iter__, /*tp_iter*/ - __pyx_pf_9csamtools_14IteratorRowAll_2__next__, /*tp_iternext*/ + __pyx_pf_9csamtools_14IteratorRowAll___iter__, /*tp_iter*/ + __pyx_pf_9csamtools_14IteratorRowAll___next__, /*tp_iternext*/ __pyx_methods_9csamtools_IteratorRowAll, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ @@ -29738,7 +30097,7 @@ static PyObject *__pyx_tp_new_9csamtools_IteratorRowAllRefs(PyTypeObject *t, PyO p = ((struct __pyx_obj_9csamtools_IteratorRowAllRefs *)o); p->samfile = ((struct __pyx_obj_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None); p->rowiter = ((struct __pyx_obj_9csamtools_IteratorRowRegion *)Py_None); Py_INCREF(Py_None); - if (__pyx_pf_9csamtools_18IteratorRowAllRefs_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_18IteratorRowAllRefs___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; @@ -29782,8 +30141,8 @@ static int __pyx_tp_clear_9csamtools_IteratorRowAllRefs(PyObject *o) { } static PyMethodDef __pyx_methods_9csamtools_IteratorRowAllRefs[] = { - {__Pyx_NAMESTR("nextiter"), (PyCFunction)__pyx_pf_9csamtools_18IteratorRowAllRefs_1nextiter, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_18IteratorRowAllRefs_3__next__)}, + {__Pyx_NAMESTR("nextiter"), (PyCFunction)__pyx_pf_9csamtools_18IteratorRowAllRefs_nextiter, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_18IteratorRowAllRefs___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_18IteratorRowAllRefs___next__)}, {0, 0, 0, 0} }; @@ -29909,14 +30268,14 @@ PyTypeObject __pyx_type_9csamtools_IteratorRowAllRefs = { 0, /*tp_getattro*/ 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("iterates over all mapped reads by chaining iterators over each reference\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_IteratorRowAllRefs, /*tp_traverse*/ __pyx_tp_clear_9csamtools_IteratorRowAllRefs, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_9csamtools_18IteratorRowAllRefs_2__iter__, /*tp_iter*/ - __pyx_pf_9csamtools_18IteratorRowAllRefs_3__next__, /*tp_iternext*/ + __pyx_pf_9csamtools_18IteratorRowAllRefs___iter__, /*tp_iter*/ + __pyx_pf_9csamtools_18IteratorRowAllRefs___next__, /*tp_iternext*/ __pyx_methods_9csamtools_IteratorRowAllRefs, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ @@ -29952,7 +30311,7 @@ static PyObject *__pyx_tp_new_9csamtools_IteratorColumn(PyTypeObject *t, PyObjec p->samfile = ((struct __pyx_obj_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None); p->fastafile = ((struct __pyx_obj_9csamtools_Fastafile *)Py_None); Py_INCREF(Py_None); p->stepper = Py_None; Py_INCREF(Py_None); - if (__pyx_pf_9csamtools_14IteratorColumn_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_14IteratorColumn___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; @@ -29964,7 +30323,7 @@ static void __pyx_tp_dealloc_9csamtools_IteratorColumn(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_9csamtools_14IteratorColumn_4__dealloc__(o); + __pyx_pf_9csamtools_14IteratorColumn___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -30013,17 +30372,17 @@ static int __pyx_tp_clear_9csamtools_IteratorColumn(PyObject *o) { } static PyObject *__pyx_getprop_9csamtools_14IteratorColumn_seq_len(PyObject *o, void *x) { - return __pyx_pf_9csamtools_14IteratorColumn_7seq_len_0__get__(o); + return __pyx_pf_9csamtools_14IteratorColumn_7seq_len___get__(o); } static PyMethodDef __pyx_methods_9csamtools_IteratorColumn[] = { - {__Pyx_NAMESTR("addReference"), (PyCFunction)__pyx_pf_9csamtools_14IteratorColumn_2addReference, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_14IteratorColumn_2addReference)}, - {__Pyx_NAMESTR("hasReference"), (PyCFunction)__pyx_pf_9csamtools_14IteratorColumn_3hasReference, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_14IteratorColumn_3hasReference)}, + {__Pyx_NAMESTR("addReference"), (PyCFunction)__pyx_pf_9csamtools_14IteratorColumn_addReference, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_14IteratorColumn_addReference)}, + {__Pyx_NAMESTR("hasReference"), (PyCFunction)__pyx_pf_9csamtools_14IteratorColumn_hasReference, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_14IteratorColumn_hasReference)}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9csamtools_IteratorColumn[] = { - {(char *)"seq_len", __pyx_getprop_9csamtools_14IteratorColumn_seq_len, 0, __Pyx_DOCSTR(__pyx_k_216), 0}, + {(char *)"seq_len", __pyx_getprop_9csamtools_14IteratorColumn_seq_len, 0, __Pyx_DOCSTR(__pyx_k_155), 0}, {0, 0, 0, 0, 0} }; @@ -30149,13 +30508,13 @@ PyTypeObject __pyx_type_9csamtools_IteratorColumn = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_IteratorColumn, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("abstract base class for iterators over columns.\n\n IteratorColumn objects wrap the pileup functionality of samtools.\n \n For reasons of efficiency, the iterator points to the current \n pileup buffer. The pileup buffer is updated at every iteration.\n This might cause some unexpected behavious. For example,\n consider the conversion to a list::\n \n f = Samfile(\"file.bam\", \"rb\")\n result = list( f.pileup() )\n\n Here, ``result`` will contain ``n`` objects of type :class:`PileupProxy` for ``n`` columns, \n but each object in ``result`` will contain the same information.\n \n The desired behaviour can be achieved by list comprehension::\n\n result = [ x.pileups() for x in f.pileup() ]\n\n ``result`` will be a list of ``n`` lists of objects of type :class:`PileupRead`.\n\n If the iterator is associated with a :class:`Fastafile` using the :meth:`addReference`\n method, then the iterator will export the current sequence via the methods :meth:`getSequence`\n and :meth:`seq_len`.\n\n Optional kwargs to the iterator\n\n stepper\n The stepper controlls how the iterator advances. \n Possible options for the stepper are \n \n all\n use all reads for pileup.\n samtools\n same filter and read processing as in :term:`csamtools` pileup\n fastafile\n A :class:`FastaFile` object\n mask\n Skip all reads with bits set in mask.\n \n \n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_IteratorColumn, /*tp_traverse*/ __pyx_tp_clear_9csamtools_IteratorColumn, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_9csamtools_14IteratorColumn_1__iter__, /*tp_iter*/ + __pyx_pf_9csamtools_14IteratorColumn___iter__, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9csamtools_IteratorColumn, /*tp_methods*/ 0, /*tp_members*/ @@ -30188,14 +30547,14 @@ static PyObject *__pyx_tp_new_9csamtools_IteratorColumnRegion(PyTypeObject *t, P if (!o) return 0; p = ((struct __pyx_obj_9csamtools_IteratorColumnRegion *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9csamtools_IteratorColumn*)__pyx_vtabptr_9csamtools_IteratorColumnRegion; - if (__pyx_pf_9csamtools_20IteratorColumnRegion_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_20IteratorColumnRegion___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static PyMethodDef __pyx_methods_9csamtools_IteratorColumnRegion[] = { - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_20IteratorColumnRegion_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_20IteratorColumnRegion_1__next__)}, + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_20IteratorColumnRegion___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_20IteratorColumnRegion___next__)}, {0, 0, 0, 0} }; @@ -30321,14 +30680,14 @@ PyTypeObject __pyx_type_9csamtools_IteratorColumnRegion = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_IteratorColumnRegion, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("iterates over a region only.\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_IteratorColumn, /*tp_traverse*/ __pyx_tp_clear_9csamtools_IteratorColumn, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ - __pyx_pf_9csamtools_20IteratorColumnRegion_1__next__, /*tp_iternext*/ + __pyx_pf_9csamtools_20IteratorColumnRegion___next__, /*tp_iternext*/ __pyx_methods_9csamtools_IteratorColumnRegion, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ @@ -30360,14 +30719,14 @@ static PyObject *__pyx_tp_new_9csamtools_IteratorColumnAllRefs(PyTypeObject *t, if (!o) return 0; p = ((struct __pyx_obj_9csamtools_IteratorColumnAllRefs *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9csamtools_IteratorColumn*)__pyx_vtabptr_9csamtools_IteratorColumnAllRefs; - if (__pyx_pf_9csamtools_21IteratorColumnAllRefs_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_21IteratorColumnAllRefs___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static PyMethodDef __pyx_methods_9csamtools_IteratorColumnAllRefs[] = { - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_21IteratorColumnAllRefs_1__next__)}, + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_21IteratorColumnAllRefs___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_21IteratorColumnAllRefs___next__)}, {0, 0, 0, 0} }; @@ -30493,14 +30852,14 @@ PyTypeObject __pyx_type_9csamtools_IteratorColumnAllRefs = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_IteratorColumnAllRefs, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("iterates over all columns by chaining iterators over each reference\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_IteratorColumn, /*tp_traverse*/ __pyx_tp_clear_9csamtools_IteratorColumn, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ - __pyx_pf_9csamtools_21IteratorColumnAllRefs_1__next__, /*tp_iternext*/ + __pyx_pf_9csamtools_21IteratorColumnAllRefs___next__, /*tp_iternext*/ __pyx_methods_9csamtools_IteratorColumnAllRefs, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ @@ -30536,35 +30895,35 @@ static void __pyx_tp_dealloc_9csamtools_SNPCall(PyObject *o) { } static PyObject *__pyx_getprop_9csamtools_7SNPCall_tid(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7SNPCall_3tid_0__get__(o); + return __pyx_pf_9csamtools_7SNPCall_3tid___get__(o); } static PyObject *__pyx_getprop_9csamtools_7SNPCall_pos(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7SNPCall_3pos_0__get__(o); + return __pyx_pf_9csamtools_7SNPCall_3pos___get__(o); } static PyObject *__pyx_getprop_9csamtools_7SNPCall_reference_base(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7SNPCall_14reference_base_0__get__(o); + return __pyx_pf_9csamtools_7SNPCall_14reference_base___get__(o); } static PyObject *__pyx_getprop_9csamtools_7SNPCall_genotype(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7SNPCall_8genotype_0__get__(o); + return __pyx_pf_9csamtools_7SNPCall_8genotype___get__(o); } static PyObject *__pyx_getprop_9csamtools_7SNPCall_consensus_quality(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7SNPCall_17consensus_quality_0__get__(o); + return __pyx_pf_9csamtools_7SNPCall_17consensus_quality___get__(o); } static PyObject *__pyx_getprop_9csamtools_7SNPCall_snp_quality(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7SNPCall_11snp_quality_0__get__(o); + return __pyx_pf_9csamtools_7SNPCall_11snp_quality___get__(o); } static PyObject *__pyx_getprop_9csamtools_7SNPCall_mapping_quality(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7SNPCall_15mapping_quality_0__get__(o); + return __pyx_pf_9csamtools_7SNPCall_15mapping_quality___get__(o); } static PyObject *__pyx_getprop_9csamtools_7SNPCall_coverage(PyObject *o, void *x) { - return __pyx_pf_9csamtools_7SNPCall_8coverage_0__get__(o); + return __pyx_pf_9csamtools_7SNPCall_8coverage___get__(o); } static PyMethodDef __pyx_methods_9csamtools_SNPCall[] = { @@ -30572,14 +30931,14 @@ static PyMethodDef __pyx_methods_9csamtools_SNPCall[] = { }; static struct PyGetSetDef __pyx_getsets_9csamtools_SNPCall[] = { - {(char *)"tid", __pyx_getprop_9csamtools_7SNPCall_tid, 0, __Pyx_DOCSTR(__pyx_k_203), 0}, - {(char *)"pos", __pyx_getprop_9csamtools_7SNPCall_pos, 0, __Pyx_DOCSTR(__pyx_k_217), 0}, - {(char *)"reference_base", __pyx_getprop_9csamtools_7SNPCall_reference_base, 0, __Pyx_DOCSTR(__pyx_k_218), 0}, - {(char *)"genotype", __pyx_getprop_9csamtools_7SNPCall_genotype, 0, __Pyx_DOCSTR(__pyx_k_219), 0}, - {(char *)"consensus_quality", __pyx_getprop_9csamtools_7SNPCall_consensus_quality, 0, __Pyx_DOCSTR(__pyx_k_220), 0}, - {(char *)"snp_quality", __pyx_getprop_9csamtools_7SNPCall_snp_quality, 0, __Pyx_DOCSTR(__pyx_k_221), 0}, - {(char *)"mapping_quality", __pyx_getprop_9csamtools_7SNPCall_mapping_quality, 0, __Pyx_DOCSTR(__pyx_k_222), 0}, - {(char *)"coverage", __pyx_getprop_9csamtools_7SNPCall_coverage, 0, __Pyx_DOCSTR(__pyx_k_223), 0}, + {(char *)"tid", __pyx_getprop_9csamtools_7SNPCall_tid, 0, __Pyx_DOCSTR(__pyx_k_142), 0}, + {(char *)"pos", __pyx_getprop_9csamtools_7SNPCall_pos, 0, __Pyx_DOCSTR(__pyx_k_156), 0}, + {(char *)"reference_base", __pyx_getprop_9csamtools_7SNPCall_reference_base, 0, __Pyx_DOCSTR(__pyx_k_157), 0}, + {(char *)"genotype", __pyx_getprop_9csamtools_7SNPCall_genotype, 0, __Pyx_DOCSTR(__pyx_k_158), 0}, + {(char *)"consensus_quality", __pyx_getprop_9csamtools_7SNPCall_consensus_quality, 0, __Pyx_DOCSTR(__pyx_k_159), 0}, + {(char *)"snp_quality", __pyx_getprop_9csamtools_7SNPCall_snp_quality, 0, __Pyx_DOCSTR(__pyx_k_160), 0}, + {(char *)"mapping_quality", __pyx_getprop_9csamtools_7SNPCall_mapping_quality, 0, __Pyx_DOCSTR(__pyx_k_161), 0}, + {(char *)"coverage", __pyx_getprop_9csamtools_7SNPCall_coverage, 0, __Pyx_DOCSTR(__pyx_k_162), 0}, {0, 0, 0, 0, 0} }; @@ -30701,11 +31060,11 @@ PyTypeObject __pyx_type_9csamtools_SNPCall = { &__pyx_tp_as_mapping_SNPCall, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pf_9csamtools_7SNPCall_0__str__, /*tp_str*/ + __pyx_pf_9csamtools_7SNPCall___str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_SNPCall, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ __Pyx_DOCSTR("the results of a SNP call."), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -30745,7 +31104,7 @@ static PyObject *__pyx_tp_new_9csamtools_SNPCallerBase(PyTypeObject *t, PyObject p = ((struct __pyx_obj_9csamtools_SNPCallerBase *)o); p->__pyx_vtab = __pyx_vtabptr_9csamtools_SNPCallerBase; p->iter = ((struct __pyx_obj_9csamtools_IteratorColumn *)Py_None); Py_INCREF(Py_None); - if (__pyx_pf_9csamtools_13SNPCallerBase_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_13SNPCallerBase___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; @@ -30757,7 +31116,7 @@ static void __pyx_tp_dealloc_9csamtools_SNPCallerBase(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_9csamtools_13SNPCallerBase_1__dealloc__(o); + __pyx_pf_9csamtools_13SNPCallerBase___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -30910,7 +31269,7 @@ PyTypeObject __pyx_type_9csamtools_SNPCallerBase = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_SNPCallerBase, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("Base class for SNP callers.\n\n *min_baseQ*\n minimum base quality (possibly capped by BAQ)\n *capQ_threshold*\n coefficient for adjusting mapQ of poor mappings\n *theta*\n theta in maq consensus calling model\n *n_haplotypes*\n number of haplotypes in the sample\n *het_rate*\n prior of a difference between two haplotypes\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_SNPCallerBase, /*tp_traverse*/ __pyx_tp_clear_9csamtools_SNPCallerBase, /*tp_clear*/ @@ -30949,14 +31308,14 @@ static PyObject *__pyx_tp_new_9csamtools_IteratorSNPCalls(PyTypeObject *t, PyObj if (!o) return 0; p = ((struct __pyx_obj_9csamtools_IteratorSNPCalls *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9csamtools_SNPCallerBase*)__pyx_vtabptr_9csamtools_IteratorSNPCalls; - if (__pyx_pf_9csamtools_16IteratorSNPCalls_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_16IteratorSNPCalls___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static PyMethodDef __pyx_methods_9csamtools_IteratorSNPCalls[] = { - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_16IteratorSNPCalls_2__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_16IteratorSNPCalls_2__next__)}, + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_16IteratorSNPCalls___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_16IteratorSNPCalls___next__)}, {0, 0, 0, 0} }; @@ -31082,14 +31441,14 @@ PyTypeObject __pyx_type_9csamtools_IteratorSNPCalls = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_IteratorSNPCalls, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("*(IteratorColumn iterator)*\n\n call SNPs within a region.\n\n *iterator* is a pileup iterator. SNPs will be called\n on all positions returned by this iterator.\n\n This caller is fast if SNPs are called over large continuous\n regions. It is slow, if instantiated frequently and in random\n order as the sequence will have to be reloaded.\n\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_SNPCallerBase, /*tp_traverse*/ __pyx_tp_clear_9csamtools_SNPCallerBase, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_9csamtools_16IteratorSNPCalls_1__iter__, /*tp_iter*/ - __pyx_pf_9csamtools_16IteratorSNPCalls_2__next__, /*tp_iternext*/ + __pyx_pf_9csamtools_16IteratorSNPCalls___iter__, /*tp_iter*/ + __pyx_pf_9csamtools_16IteratorSNPCalls___next__, /*tp_iternext*/ __pyx_methods_9csamtools_IteratorSNPCalls, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ @@ -31121,14 +31480,14 @@ static PyObject *__pyx_tp_new_9csamtools_SNPCaller(PyTypeObject *t, PyObject *a, if (!o) return 0; p = ((struct __pyx_obj_9csamtools_SNPCaller *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9csamtools_SNPCallerBase*)__pyx_vtabptr_9csamtools_SNPCaller; - if (__pyx_pf_9csamtools_9SNPCaller_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_9SNPCaller___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static PyMethodDef __pyx_methods_9csamtools_SNPCaller[] = { - {__Pyx_NAMESTR("call"), (PyCFunction)__pyx_pf_9csamtools_9SNPCaller_1call, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_9SNPCaller_1call)}, + {__Pyx_NAMESTR("call"), (PyCFunction)__pyx_pf_9csamtools_9SNPCaller_call, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_9SNPCaller_call)}, {0, 0, 0, 0} }; @@ -31254,7 +31613,7 @@ PyTypeObject __pyx_type_9csamtools_SNPCaller = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_SNPCaller, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("*(IteratorColumn iterator_column )*\n\n The samtools SNP caller.\n\n This object will call SNPs in *samfile* against the reference\n sequence in *fasta*.\n\n This caller is fast for calling few SNPs in selected regions.\n\n It is slow, if called over large genomic regions.\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_SNPCallerBase, /*tp_traverse*/ __pyx_tp_clear_9csamtools_SNPCallerBase, /*tp_clear*/ @@ -31289,7 +31648,7 @@ PyTypeObject __pyx_type_9csamtools_SNPCaller = { static PyObject *__pyx_tp_new_9csamtools_IndelCall(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; - if (__pyx_pf_9csamtools_9IndelCall_0__cinit__(o, __pyx_empty_tuple, NULL) < 0) { + if (__pyx_pf_9csamtools_9IndelCall___cinit__(o, __pyx_empty_tuple, NULL) < 0) { Py_DECREF(o); o = 0; } return o; @@ -31300,7 +31659,7 @@ static void __pyx_tp_dealloc_9csamtools_IndelCall(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_9csamtools_9IndelCall_2__dealloc__(o); + __pyx_pf_9csamtools_9IndelCall___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -31309,51 +31668,51 @@ static void __pyx_tp_dealloc_9csamtools_IndelCall(PyObject *o) { } static PyObject *__pyx_getprop_9csamtools_9IndelCall_tid(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_3tid_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_3tid___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_pos(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_3pos_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_3pos___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_genotype(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_8genotype_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_8genotype___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_consensus_quality(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_17consensus_quality_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_17consensus_quality___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_snp_quality(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_11snp_quality_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_11snp_quality___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_mapping_quality(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_15mapping_quality_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_15mapping_quality___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_coverage(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_8coverage_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_8coverage___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_first_allele(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_12first_allele_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_12first_allele___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_second_allele(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_13second_allele_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_13second_allele___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_reads_first(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_11reads_first_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_11reads_first___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_reads_second(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_12reads_second_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_12reads_second___get__(o); } static PyObject *__pyx_getprop_9csamtools_9IndelCall_reads_diff(PyObject *o, void *x) { - return __pyx_pf_9csamtools_9IndelCall_10reads_diff_0__get__(o); + return __pyx_pf_9csamtools_9IndelCall_10reads_diff___get__(o); } static PyMethodDef __pyx_methods_9csamtools_IndelCall[] = { @@ -31361,18 +31720,18 @@ static PyMethodDef __pyx_methods_9csamtools_IndelCall[] = { }; static struct PyGetSetDef __pyx_getsets_9csamtools_IndelCall[] = { - {(char *)"tid", __pyx_getprop_9csamtools_9IndelCall_tid, 0, __Pyx_DOCSTR(__pyx_k_203), 0}, - {(char *)"pos", __pyx_getprop_9csamtools_9IndelCall_pos, 0, __Pyx_DOCSTR(__pyx_k_217), 0}, - {(char *)"genotype", __pyx_getprop_9csamtools_9IndelCall_genotype, 0, __Pyx_DOCSTR(__pyx_k_219), 0}, - {(char *)"consensus_quality", __pyx_getprop_9csamtools_9IndelCall_consensus_quality, 0, __Pyx_DOCSTR(__pyx_k_220), 0}, - {(char *)"snp_quality", __pyx_getprop_9csamtools_9IndelCall_snp_quality, 0, __Pyx_DOCSTR(__pyx_k_221), 0}, - {(char *)"mapping_quality", __pyx_getprop_9csamtools_9IndelCall_mapping_quality, 0, __Pyx_DOCSTR(__pyx_k_222), 0}, - {(char *)"coverage", __pyx_getprop_9csamtools_9IndelCall_coverage, 0, __Pyx_DOCSTR(__pyx_k_223), 0}, - {(char *)"first_allele", __pyx_getprop_9csamtools_9IndelCall_first_allele, 0, __Pyx_DOCSTR(__pyx_k_224), 0}, - {(char *)"second_allele", __pyx_getprop_9csamtools_9IndelCall_second_allele, 0, __Pyx_DOCSTR(__pyx_k_225), 0}, - {(char *)"reads_first", __pyx_getprop_9csamtools_9IndelCall_reads_first, 0, __Pyx_DOCSTR(__pyx_k_226), 0}, - {(char *)"reads_second", __pyx_getprop_9csamtools_9IndelCall_reads_second, 0, __Pyx_DOCSTR(__pyx_k_226), 0}, - {(char *)"reads_diff", __pyx_getprop_9csamtools_9IndelCall_reads_diff, 0, __Pyx_DOCSTR(__pyx_k_226), 0}, + {(char *)"tid", __pyx_getprop_9csamtools_9IndelCall_tid, 0, __Pyx_DOCSTR(__pyx_k_142), 0}, + {(char *)"pos", __pyx_getprop_9csamtools_9IndelCall_pos, 0, __Pyx_DOCSTR(__pyx_k_156), 0}, + {(char *)"genotype", __pyx_getprop_9csamtools_9IndelCall_genotype, 0, __Pyx_DOCSTR(__pyx_k_158), 0}, + {(char *)"consensus_quality", __pyx_getprop_9csamtools_9IndelCall_consensus_quality, 0, __Pyx_DOCSTR(__pyx_k_159), 0}, + {(char *)"snp_quality", __pyx_getprop_9csamtools_9IndelCall_snp_quality, 0, __Pyx_DOCSTR(__pyx_k_160), 0}, + {(char *)"mapping_quality", __pyx_getprop_9csamtools_9IndelCall_mapping_quality, 0, __Pyx_DOCSTR(__pyx_k_161), 0}, + {(char *)"coverage", __pyx_getprop_9csamtools_9IndelCall_coverage, 0, __Pyx_DOCSTR(__pyx_k_162), 0}, + {(char *)"first_allele", __pyx_getprop_9csamtools_9IndelCall_first_allele, 0, __Pyx_DOCSTR(__pyx_k_163), 0}, + {(char *)"second_allele", __pyx_getprop_9csamtools_9IndelCall_second_allele, 0, __Pyx_DOCSTR(__pyx_k_164), 0}, + {(char *)"reads_first", __pyx_getprop_9csamtools_9IndelCall_reads_first, 0, __Pyx_DOCSTR(__pyx_k_165), 0}, + {(char *)"reads_second", __pyx_getprop_9csamtools_9IndelCall_reads_second, 0, __Pyx_DOCSTR(__pyx_k_165), 0}, + {(char *)"reads_diff", __pyx_getprop_9csamtools_9IndelCall_reads_diff, 0, __Pyx_DOCSTR(__pyx_k_165), 0}, {0, 0, 0, 0, 0} }; @@ -31494,11 +31853,11 @@ PyTypeObject __pyx_type_9csamtools_IndelCall = { &__pyx_tp_as_mapping_IndelCall, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pf_9csamtools_9IndelCall_1__str__, /*tp_str*/ + __pyx_pf_9csamtools_9IndelCall___str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_IndelCall, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ __Pyx_DOCSTR("the results of an indel call."), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -31536,7 +31895,7 @@ static PyObject *__pyx_tp_new_9csamtools_IndelCallerBase(PyTypeObject *t, PyObje if (!o) return 0; p = ((struct __pyx_obj_9csamtools_IndelCallerBase *)o); p->iter = ((struct __pyx_obj_9csamtools_IteratorColumn *)Py_None); Py_INCREF(Py_None); - if (__pyx_pf_9csamtools_15IndelCallerBase_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_15IndelCallerBase___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; @@ -31548,7 +31907,7 @@ static void __pyx_tp_dealloc_9csamtools_IndelCallerBase(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_9csamtools_15IndelCallerBase_1__dealloc__(o); + __pyx_pf_9csamtools_15IndelCallerBase___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -31576,7 +31935,7 @@ static int __pyx_tp_clear_9csamtools_IndelCallerBase(PyObject *o) { } static PyMethodDef __pyx_methods_9csamtools_IndelCallerBase[] = { - {__Pyx_NAMESTR("_call"), (PyCFunction)__pyx_pf_9csamtools_15IndelCallerBase_2_call, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("_call"), (PyCFunction)__pyx_pf_9csamtools_15IndelCallerBase__call, METH_NOARGS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; @@ -31702,7 +32061,7 @@ PyTypeObject __pyx_type_9csamtools_IndelCallerBase = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_IndelCallerBase, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("Base class for SNP callers.\n\n *min_baseQ*\n minimum base quality (possibly capped by BAQ)\n *capQ_threshold*\n coefficient for adjusting mapQ of poor mappings\n *theta*\n theta in maq consensus calling model\n *n_haplotypes*\n number of haplotypes in the sample\n *het_rate*\n prior of a difference between two haplotypes\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_IndelCallerBase, /*tp_traverse*/ __pyx_tp_clear_9csamtools_IndelCallerBase, /*tp_clear*/ @@ -31737,14 +32096,14 @@ PyTypeObject __pyx_type_9csamtools_IndelCallerBase = { static PyObject *__pyx_tp_new_9csamtools_IndelCaller(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_9csamtools_IndelCallerBase(t, a, k); if (!o) return 0; - if (__pyx_pf_9csamtools_11IndelCaller_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_11IndelCaller___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static PyMethodDef __pyx_methods_9csamtools_IndelCaller[] = { - {__Pyx_NAMESTR("call"), (PyCFunction)__pyx_pf_9csamtools_11IndelCaller_1call, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_11IndelCaller_1call)}, + {__Pyx_NAMESTR("call"), (PyCFunction)__pyx_pf_9csamtools_11IndelCaller_call, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_11IndelCaller_call)}, {0, 0, 0, 0} }; @@ -31870,7 +32229,7 @@ PyTypeObject __pyx_type_9csamtools_IndelCaller = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_IndelCaller, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("*(IteratorColumn iterator_column )*\n\n The samtools SNP caller.\n\n This object will call SNPs in *samfile* against the reference\n sequence in *fasta*.\n\n This caller is fast for calling few SNPs in selected regions.\n\n It is slow, if called over large genomic regions.\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_IndelCallerBase, /*tp_traverse*/ __pyx_tp_clear_9csamtools_IndelCallerBase, /*tp_clear*/ @@ -31905,14 +32264,14 @@ PyTypeObject __pyx_type_9csamtools_IndelCaller = { static PyObject *__pyx_tp_new_9csamtools_IteratorIndelCalls(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_9csamtools_IndelCallerBase(t, a, k); if (!o) return 0; - if (__pyx_pf_9csamtools_18IteratorIndelCalls_0__cinit__(o, a, k) < 0) { + if (__pyx_pf_9csamtools_18IteratorIndelCalls___cinit__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static PyMethodDef __pyx_methods_9csamtools_IteratorIndelCalls[] = { - {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_18IteratorIndelCalls_2__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_18IteratorIndelCalls_2__next__)}, + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_18IteratorIndelCalls___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_18IteratorIndelCalls___next__)}, {0, 0, 0, 0} }; @@ -32038,14 +32397,14 @@ PyTypeObject __pyx_type_9csamtools_IteratorIndelCalls = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_IteratorIndelCalls, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("*(IteratorColumn iterator)*\n\n call indels within a region.\n\n *iterator* is a pileup iterator. SNPs will be called\n on all positions returned by this iterator.\n\n This caller is fast if SNPs are called over large continuous\n regions. It is slow, if instantiated frequently and in random\n order as the sequence will have to be reloaded.\n\n "), /*tp_doc*/ __pyx_tp_traverse_9csamtools_IndelCallerBase, /*tp_traverse*/ __pyx_tp_clear_9csamtools_IndelCallerBase, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pf_9csamtools_18IteratorIndelCalls_1__iter__, /*tp_iter*/ - __pyx_pf_9csamtools_18IteratorIndelCalls_2__next__, /*tp_iternext*/ + __pyx_pf_9csamtools_18IteratorIndelCalls___iter__, /*tp_iter*/ + __pyx_pf_9csamtools_18IteratorIndelCalls___next__, /*tp_iternext*/ __pyx_methods_9csamtools_IteratorIndelCalls, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ @@ -32071,6 +32430,7 @@ PyTypeObject __pyx_type_9csamtools_IteratorIndelCalls = { }; static PyMethodDef __pyx_methods[] = { + {__Pyx_NAMESTR("_samtools_dispatch"), (PyCFunction)__pyx_pf_9csamtools__samtools_dispatch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools__samtools_dispatch)}, {0, 0, 0, 0} }; @@ -32090,107 +32450,147 @@ static struct PyModuleDef __pyx_moduledef = { static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, + {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, + {&__pyx_n_s_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 1, 1}, + {&__pyx_kp_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 0}, {&__pyx_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0}, - {&__pyx_kp_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 0}, + {&__pyx_kp_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 0}, {&__pyx_kp_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 0}, - {&__pyx_kp_s_109, __pyx_k_109, sizeof(__pyx_k_109), 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_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, - {&__pyx_kp_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 0}, - {&__pyx_n_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 1}, - {&__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_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 1, 0}, - {&__pyx_kp_s_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 0, 1, 0}, - {&__pyx_kp_s_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 1, 0}, - {&__pyx_kp_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 0}, {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 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_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 1, 0}, - {&__pyx_kp_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 0}, - {&__pyx_kp_s_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 1, 0}, - {&__pyx_kp_s_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 0, 1, 0}, - {&__pyx_kp_s_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 1, 0}, - {&__pyx_kp_s_129, __pyx_k_129, sizeof(__pyx_k_129), 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_132, __pyx_k_132, sizeof(__pyx_k_132), 0, 0, 1, 0}, - {&__pyx_kp_s_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 1, 0}, - {&__pyx_kp_s_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 1, 0}, - {&__pyx_kp_s_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 0, 1, 0}, - {&__pyx_kp_s_136, __pyx_k_136, sizeof(__pyx_k_136), 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_14, __pyx_k_14, sizeof(__pyx_k_14), 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_143, __pyx_k_143, sizeof(__pyx_k_143), 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_146, __pyx_k_146, sizeof(__pyx_k_146), 0, 0, 1, 0}, {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, - {&__pyx_kp_s_151, __pyx_k_151, sizeof(__pyx_k_151), 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_n_s_155, __pyx_k_155, sizeof(__pyx_k_155), 0, 0, 1, 1}, - {&__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_159, __pyx_k_159, sizeof(__pyx_k_159), 0, 0, 1, 0}, {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0}, - {&__pyx_kp_s_161, __pyx_k_161, sizeof(__pyx_k_161), 0, 0, 1, 0}, - {&__pyx_kp_s_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 0, 1, 0}, - {&__pyx_kp_s_165, __pyx_k_165, sizeof(__pyx_k_165), 0, 0, 1, 0}, - {&__pyx_kp_s_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 1, 0}, + {&__pyx_kp_s_167, __pyx_k_167, sizeof(__pyx_k_167), 0, 0, 1, 0}, + {&__pyx_kp_s_168, __pyx_k_168, sizeof(__pyx_k_168), 0, 0, 1, 0}, + {&__pyx_kp_s_169, __pyx_k_169, sizeof(__pyx_k_169), 0, 0, 1, 0}, + {&__pyx_kp_s_170, __pyx_k_170, sizeof(__pyx_k_170), 0, 0, 1, 0}, + {&__pyx_kp_u_171, __pyx_k_171, sizeof(__pyx_k_171), 0, 1, 0, 0}, + {&__pyx_kp_u_172, __pyx_k_172, sizeof(__pyx_k_172), 0, 1, 0, 0}, + {&__pyx_kp_u_173, __pyx_k_173, sizeof(__pyx_k_173), 0, 1, 0, 0}, + {&__pyx_kp_u_174, __pyx_k_174, sizeof(__pyx_k_174), 0, 1, 0, 0}, + {&__pyx_kp_u_175, __pyx_k_175, sizeof(__pyx_k_175), 0, 1, 0, 0}, + {&__pyx_kp_u_176, __pyx_k_176, sizeof(__pyx_k_176), 0, 1, 0, 0}, + {&__pyx_kp_u_177, __pyx_k_177, sizeof(__pyx_k_177), 0, 1, 0, 0}, + {&__pyx_kp_u_178, __pyx_k_178, sizeof(__pyx_k_178), 0, 1, 0, 0}, + {&__pyx_kp_u_179, __pyx_k_179, sizeof(__pyx_k_179), 0, 1, 0, 0}, + {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, + {&__pyx_kp_u_180, __pyx_k_180, sizeof(__pyx_k_180), 0, 1, 0, 0}, + {&__pyx_kp_u_181, __pyx_k_181, sizeof(__pyx_k_181), 0, 1, 0, 0}, + {&__pyx_kp_u_182, __pyx_k_182, sizeof(__pyx_k_182), 0, 1, 0, 0}, + {&__pyx_kp_u_183, __pyx_k_183, sizeof(__pyx_k_183), 0, 1, 0, 0}, + {&__pyx_kp_u_184, __pyx_k_184, sizeof(__pyx_k_184), 0, 1, 0, 0}, + {&__pyx_kp_u_185, __pyx_k_185, sizeof(__pyx_k_185), 0, 1, 0, 0}, + {&__pyx_kp_u_186, __pyx_k_186, sizeof(__pyx_k_186), 0, 1, 0, 0}, + {&__pyx_kp_u_187, __pyx_k_187, sizeof(__pyx_k_187), 0, 1, 0, 0}, + {&__pyx_kp_u_188, __pyx_k_188, sizeof(__pyx_k_188), 0, 1, 0, 0}, + {&__pyx_kp_u_189, __pyx_k_189, sizeof(__pyx_k_189), 0, 1, 0, 0}, {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0}, + {&__pyx_kp_u_190, __pyx_k_190, sizeof(__pyx_k_190), 0, 1, 0, 0}, + {&__pyx_kp_u_191, __pyx_k_191, sizeof(__pyx_k_191), 0, 1, 0, 0}, + {&__pyx_kp_u_192, __pyx_k_192, sizeof(__pyx_k_192), 0, 1, 0, 0}, + {&__pyx_kp_u_193, __pyx_k_193, sizeof(__pyx_k_193), 0, 1, 0, 0}, + {&__pyx_kp_u_194, __pyx_k_194, sizeof(__pyx_k_194), 0, 1, 0, 0}, + {&__pyx_kp_u_195, __pyx_k_195, sizeof(__pyx_k_195), 0, 1, 0, 0}, + {&__pyx_n_s_196, __pyx_k_196, sizeof(__pyx_k_196), 0, 0, 1, 1}, + {&__pyx_kp_u_197, __pyx_k_197, sizeof(__pyx_k_197), 0, 1, 0, 0}, + {&__pyx_n_s_198, __pyx_k_198, sizeof(__pyx_k_198), 0, 0, 1, 1}, + {&__pyx_kp_u_199, __pyx_k_199, sizeof(__pyx_k_199), 0, 1, 0, 0}, {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, + {&__pyx_kp_u_200, __pyx_k_200, sizeof(__pyx_k_200), 0, 1, 0, 0}, + {&__pyx_kp_u_201, __pyx_k_201, sizeof(__pyx_k_201), 0, 1, 0, 0}, + {&__pyx_kp_u_202, __pyx_k_202, sizeof(__pyx_k_202), 0, 1, 0, 0}, + {&__pyx_kp_u_203, __pyx_k_203, sizeof(__pyx_k_203), 0, 1, 0, 0}, + {&__pyx_kp_u_204, __pyx_k_204, sizeof(__pyx_k_204), 0, 1, 0, 0}, + {&__pyx_kp_u_205, __pyx_k_205, sizeof(__pyx_k_205), 0, 1, 0, 0}, + {&__pyx_kp_u_206, __pyx_k_206, sizeof(__pyx_k_206), 0, 1, 0, 0}, + {&__pyx_kp_u_207, __pyx_k_207, sizeof(__pyx_k_207), 0, 1, 0, 0}, + {&__pyx_kp_u_208, __pyx_k_208, sizeof(__pyx_k_208), 0, 1, 0, 0}, + {&__pyx_kp_u_209, __pyx_k_209, sizeof(__pyx_k_209), 0, 1, 0, 0}, + {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0}, + {&__pyx_kp_u_210, __pyx_k_210, sizeof(__pyx_k_210), 0, 1, 0, 0}, {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, - {&__pyx_kp_s_228, __pyx_k_228, sizeof(__pyx_k_228), 0, 0, 1, 0}, {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0}, - {&__pyx_kp_s_230, __pyx_k_230, sizeof(__pyx_k_230), 0, 0, 1, 0}, - {&__pyx_kp_s_231, __pyx_k_231, sizeof(__pyx_k_231), 0, 0, 1, 0}, - {&__pyx_kp_s_237, __pyx_k_237, sizeof(__pyx_k_237), 0, 0, 1, 0}, - {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, + {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, + {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0}, + {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0}, {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, + {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, + {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 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_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0}, + {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 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_4, __pyx_k_4, sizeof(__pyx_k_4), 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_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0}, + {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 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_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0}, {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0}, - {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0}, - {&__pyx_kp_s_57, __pyx_k_57, sizeof(__pyx_k_57), 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_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 0}, {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0}, + {&__pyx_n_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 1}, + {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0}, + {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0}, + {&__pyx_kp_s_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 0}, {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0}, + {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0}, + {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0}, {&__pyx_kp_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 0}, + {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0}, + {&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 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_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0}, {&__pyx_kp_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 0}, + {&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 0}, + {&__pyx_kp_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 0}, + {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 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_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, + {&__pyx_kp_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 0}, + {&__pyx_kp_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 0}, + {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0}, {&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0}, + {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0}, {&__pyx_kp_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 0}, + {&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0}, {&__pyx_kp_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 0}, {&__pyx_kp_s_88, __pyx_k_88, sizeof(__pyx_k_88), 0, 0, 1, 0}, + {&__pyx_kp_s_89, __pyx_k_89, sizeof(__pyx_k_89), 0, 0, 1, 0}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0}, {&__pyx_kp_s_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 1, 0}, {&__pyx_kp_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 0}, {&__pyx_kp_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 0}, {&__pyx_kp_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 0}, - {&__pyx_kp_s_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 0, 1, 0}, + {&__pyx_kp_s_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 0, 1, 0}, {&__pyx_kp_s_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 1, 0}, + {&__pyx_kp_s_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 1, 0}, {&__pyx_n_s__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1}, {&__pyx_n_s__AS, __pyx_k__AS, sizeof(__pyx_k__AS), 0, 0, 1, 1}, {&__pyx_n_s__AlignedRead, __pyx_k__AlignedRead, sizeof(__pyx_k__AlignedRead), 0, 0, 1, 1}, @@ -32215,6 +32615,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__IteratorColumn, __pyx_k__IteratorColumn, sizeof(__pyx_k__IteratorColumn), 0, 0, 1, 1}, {&__pyx_n_s__IteratorIndelCalls, __pyx_k__IteratorIndelCalls, sizeof(__pyx_k__IteratorIndelCalls), 0, 0, 1, 1}, {&__pyx_n_s__IteratorRow, __pyx_k__IteratorRow, sizeof(__pyx_k__IteratorRow), 0, 0, 1, 1}, + {&__pyx_n_s__IteratorRowAll, __pyx_k__IteratorRowAll, sizeof(__pyx_k__IteratorRowAll), 0, 0, 1, 1}, + {&__pyx_n_s__IteratorRowAllRefs, __pyx_k__IteratorRowAllRefs, sizeof(__pyx_k__IteratorRowAllRefs), 0, 0, 1, 1}, + {&__pyx_n_s__IteratorRowRegion, __pyx_k__IteratorRowRegion, sizeof(__pyx_k__IteratorRowRegion), 0, 0, 1, 1}, {&__pyx_n_s__IteratorSNPCalls, __pyx_k__IteratorSNPCalls, sizeof(__pyx_k__IteratorSNPCalls), 0, 0, 1, 1}, {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, {&__pyx_n_s__LB, __pyx_k__LB, sizeof(__pyx_k__LB), 0, 0, 1, 1}, @@ -32258,6 +32661,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s____getattribute__, __pyx_k____getattribute__, sizeof(__pyx_k____getattribute__), 0, 0, 1, 1}, {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1}, {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, + {&__pyx_n_s____next__, __pyx_k____next__, sizeof(__pyx_k____next__), 0, 0, 1, 1}, {&__pyx_n_s____str__, __pyx_k____str__, sizeof(__pyx_k____str__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, {&__pyx_n_s___alignment, __pyx_k___alignment, sizeof(__pyx_k___alignment), 0, 0, 1, 1}, @@ -32286,9 +32690,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s___samtools_dispatch, __pyx_k___samtools_dispatch, sizeof(__pyx_k___samtools_dispatch), 0, 0, 1, 1}, {&__pyx_n_s___snp_quality, __pyx_k___snp_quality, sizeof(__pyx_k___snp_quality), 0, 0, 1, 1}, {&__pyx_n_s___tid, __pyx_k___tid, sizeof(__pyx_k___tid), 0, 0, 1, 1}, + {&__pyx_n_s__addReference, __pyx_k__addReference, sizeof(__pyx_k__addReference), 0, 0, 1, 1}, {&__pyx_n_s__alignment, __pyx_k__alignment, sizeof(__pyx_k__alignment), 0, 0, 1, 1}, {&__pyx_n_s__all, __pyx_k__all, sizeof(__pyx_k__all), 0, 0, 1, 1}, - {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1}, {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1}, {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1}, {&__pyx_n_s__bam, __pyx_k__bam, sizeof(__pyx_k__bam), 0, 0, 1, 1}, @@ -32297,6 +32701,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__bqual, __pyx_k__bqual, sizeof(__pyx_k__bqual), 0, 0, 1, 1}, {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1}, {&__pyx_n_s__calcsize, __pyx_k__calcsize, sizeof(__pyx_k__calcsize), 0, 0, 1, 1}, + {&__pyx_n_s__call, __pyx_k__call, sizeof(__pyx_k__call), 0, 0, 1, 1}, {&__pyx_n_s__callback, __pyx_k__callback, sizeof(__pyx_k__callback), 0, 0, 1, 1}, {&__pyx_n_s__cap_mapQ, __pyx_k__cap_mapQ, sizeof(__pyx_k__cap_mapQ), 0, 0, 1, 1}, {&__pyx_n_s__catch_stderr, __pyx_k__catch_stderr, sizeof(__pyx_k__catch_stderr), 0, 0, 1, 1}, @@ -32310,10 +32715,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__cnt2, __pyx_k__cnt2, sizeof(__pyx_k__cnt2), 0, 0, 1, 1}, {&__pyx_n_s__cnt_anti, __pyx_k__cnt_anti, sizeof(__pyx_k__cnt_anti), 0, 0, 1, 1}, {&__pyx_n_s__collections, __pyx_k__collections, sizeof(__pyx_k__collections), 0, 0, 1, 1}, + {&__pyx_n_s__compare, __pyx_k__compare, sizeof(__pyx_k__compare), 0, 0, 1, 1}, {&__pyx_n_s__consensus_quality, __pyx_k__consensus_quality, sizeof(__pyx_k__consensus_quality), 0, 0, 1, 1}, {&__pyx_n_s__core, __pyx_k__core, sizeof(__pyx_k__core), 0, 0, 1, 1}, + {&__pyx_n_s__count, __pyx_k__count, sizeof(__pyx_k__count), 0, 0, 1, 1}, {&__pyx_n_s__coverage, __pyx_k__coverage, sizeof(__pyx_k__coverage), 0, 0, 1, 1}, - {&__pyx_n_s__csamtools, __pyx_k__csamtools, sizeof(__pyx_k__csamtools), 0, 0, 1, 1}, {&__pyx_n_s__ctypes, __pyx_k__ctypes, sizeof(__pyx_k__ctypes), 0, 0, 1, 1}, {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1}, {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1}, @@ -32326,8 +32732,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__exc_value, __pyx_k__exc_value, sizeof(__pyx_k__exc_value), 0, 0, 1, 1}, {&__pyx_n_s__exists, __pyx_k__exists, sizeof(__pyx_k__exists), 0, 0, 1, 1}, {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1}, + {&__pyx_n_s__fancy_str, __pyx_k__fancy_str, sizeof(__pyx_k__fancy_str), 0, 0, 1, 1}, {&__pyx_n_s__fastafile, __pyx_k__fastafile, sizeof(__pyx_k__fastafile), 0, 0, 1, 1}, {&__pyx_n_s__fd, __pyx_k__fd, sizeof(__pyx_k__fd), 0, 0, 1, 1}, + {&__pyx_n_s__fetch, __pyx_k__fetch, sizeof(__pyx_k__fetch), 0, 0, 1, 1}, {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1}, {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1}, {&__pyx_n_s__fileno, __pyx_k__fileno, sizeof(__pyx_k__fileno), 0, 0, 1, 1}, @@ -32337,8 +32745,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__fp, __pyx_k__fp, sizeof(__pyx_k__fp), 0, 0, 1, 1}, {&__pyx_n_s__genotype, __pyx_k__genotype, sizeof(__pyx_k__genotype), 0, 0, 1, 1}, {&__pyx_n_s__getSequence, __pyx_k__getSequence, sizeof(__pyx_k__getSequence), 0, 0, 1, 1}, + {&__pyx_n_s__getrname, __pyx_k__getrname, sizeof(__pyx_k__getrname), 0, 0, 1, 1}, {&__pyx_n_s__gettid, __pyx_k__gettid, sizeof(__pyx_k__gettid), 0, 0, 1, 1}, - {&__pyx_n_s__gt, __pyx_k__gt, sizeof(__pyx_k__gt), 0, 0, 1, 1}, {&__pyx_n_s__hasReference, __pyx_k__hasReference, sizeof(__pyx_k__hasReference), 0, 0, 1, 1}, {&__pyx_n_s__hash, __pyx_k__hash, sizeof(__pyx_k__hash), 0, 0, 1, 1}, {&__pyx_n_s__header, __pyx_k__header, sizeof(__pyx_k__header), 0, 0, 1, 1}, @@ -32392,10 +32800,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1}, {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1}, {&__pyx_n_s__open, __pyx_k__open, sizeof(__pyx_k__open), 0, 0, 1, 1}, + {&__pyx_n_s__opt, __pyx_k__opt, sizeof(__pyx_k__opt), 0, 0, 1, 1}, {&__pyx_n_s__options, __pyx_k__options, sizeof(__pyx_k__options), 0, 0, 1, 1}, {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1}, {&__pyx_n_s__pack_into, __pyx_k__pack_into, sizeof(__pyx_k__pack_into), 0, 0, 1, 1}, {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1}, + {&__pyx_n_s__pileup, __pyx_k__pileup, sizeof(__pyx_k__pileup), 0, 0, 1, 1}, {&__pyx_n_s__pileup_iter, __pyx_k__pileup_iter, sizeof(__pyx_k__pileup_iter), 0, 0, 1, 1}, {&__pyx_n_s__pileups, __pyx_k__pileups, sizeof(__pyx_k__pileups), 0, 0, 1, 1}, {&__pyx_n_s__plp, __pyx_k__plp, sizeof(__pyx_k__plp), 0, 0, 1, 1}, @@ -32439,6 +32849,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__samfile, __pyx_k__samfile, sizeof(__pyx_k__samfile), 0, 0, 1, 1}, {&__pyx_n_s__samtools, __pyx_k__samtools, sizeof(__pyx_k__samtools), 0, 0, 1, 1}, {&__pyx_n_s__second_allele, __pyx_k__second_allele, sizeof(__pyx_k__second_allele), 0, 0, 1, 1}, + {&__pyx_n_s__seek, __pyx_k__seek, sizeof(__pyx_k__seek), 0, 0, 1, 1}, {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1}, {&__pyx_n_s__seq, __pyx_k__seq, sizeof(__pyx_k__seq), 0, 0, 1, 1}, {&__pyx_n_s__seq_len, __pyx_k__seq_len, sizeof(__pyx_k__seq_len), 0, 0, 1, 1}, @@ -32463,6 +32874,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__tags, __pyx_k__tags, sizeof(__pyx_k__tags), 0, 0, 1, 1}, {&__pyx_n_s__target_len, __pyx_k__target_len, sizeof(__pyx_k__target_len), 0, 0, 1, 1}, {&__pyx_n_s__target_name, __pyx_k__target_name, sizeof(__pyx_k__target_name), 0, 0, 1, 1}, + {&__pyx_n_s__tell, __pyx_k__tell, sizeof(__pyx_k__tell), 0, 0, 1, 1}, {&__pyx_n_s__tempfile, __pyx_k__tempfile, sizeof(__pyx_k__tempfile), 0, 0, 1, 1}, {&__pyx_n_s__template, __pyx_k__template, sizeof(__pyx_k__template), 0, 0, 1, 1}, {&__pyx_n_s__text, __pyx_k__text, sizeof(__pyx_k__text), 0, 0, 1, 1}, @@ -32477,6 +32889,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__wbu, __pyx_k__wbu, sizeof(__pyx_k__wbu), 0, 0, 1, 1}, {&__pyx_n_s__wh, __pyx_k__wh, sizeof(__pyx_k__wh), 0, 0, 1, 1}, {&__pyx_n_s__where, __pyx_k__where, sizeof(__pyx_k__where), 0, 0, 1, 1}, + {&__pyx_n_s__write, __pyx_k__write, sizeof(__pyx_k__write), 0, 0, 1, 1}, {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; @@ -32498,1894 +32911,1372 @@ static int __Pyx_InitCachedBuiltins(void) { return -1; } -static int __Pyx_InitCachedConstants(void) { - __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants"); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":249 - * def __len__(self): - * if self.fastafile == NULL: - * raise ValueError( "calling len() on closed file" ) # <<<<<<<<<<<<<< - * - * return faidx_fetch_nseq(self.fastafile) - */ - __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_4)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); - PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":281 - * '''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_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_7)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":306 - * - * if not self._isOpen(): - * raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< - * - * cdef int length - */ - __pyx_k_tuple_8 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_8)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":312 - * - * 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_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_10)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_9)); - PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_kp_s_9)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":555 - * self.samfile = samopen( filename, mode, NULL ) - * if self.samfile == NULL: - * raise ValueError( "could not open file - is it SAM/BAM format?") # <<<<<<<<<<<<<< - * - * if self.samfile.header == NULL: - */ - __pyx_k_tuple_24 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_24)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_23)); - PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, ((PyObject *)__pyx_kp_s_23)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":558 - * - * if self.samfile.header == NULL: - * raise ValueError( "could not open file - is it SAM/BAM format?") # <<<<<<<<<<<<<< - * - * if self.samfile.header.n_targets == 0: - */ - __pyx_k_tuple_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_25)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_23)); - PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_kp_s_23)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":561 - * - * if self.samfile.header.n_targets == 0: - * raise ValueError( "could not open file - is it SAM/BAM format?") # <<<<<<<<<<<<<< - * - * if self.samfile == NULL: - */ - __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_26)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_23)); - PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_kp_s_23)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":585 - * ''' - * 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 out of range 0<=tid<%i" % self.samfile.header.n_targets ) - */ - __pyx_k_tuple_29 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_29)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":596 - * returns -1 if reference is not known. - * ''' - * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< - * return pysam_reference2tid( self.samfile.header, reference ) - * - */ - __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_31)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":634 - * if len(parts) >= 3: rend = int(parts[2]) - * - * if not reference: return 0, 0, 0, 0 # <<<<<<<<<<<<<< - * - * rtid = self.gettid( reference ) - */ - __pyx_k_tuple_33 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_33)); - __Pyx_INCREF(__pyx_int_0); - PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, __pyx_int_0); - __Pyx_GIVEREF(__pyx_int_0); - __Pyx_INCREF(__pyx_int_0); - PyTuple_SET_ITEM(__pyx_k_tuple_33, 1, __pyx_int_0); - __Pyx_GIVEREF(__pyx_int_0); - __Pyx_INCREF(__pyx_int_0); - PyTuple_SET_ITEM(__pyx_k_tuple_33, 2, __pyx_int_0); - __Pyx_GIVEREF(__pyx_int_0); - __Pyx_INCREF(__pyx_int_0); - PyTuple_SET_ITEM(__pyx_k_tuple_33, 3, __pyx_int_0); - __Pyx_GIVEREF(__pyx_int_0); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":650 - * - * 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_36 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_36)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_36, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":652 - * raise ValueError( "I/O operation on closed file" ) - * if not self.isbam: - * raise NotImplementedError("seek only available in bam files") # <<<<<<<<<<<<<< - * return bam_seek( self.samfile.x.bam, offset, where ) - * - */ - __pyx_k_tuple_38 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_38)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_37)); - PyTuple_SET_ITEM(__pyx_k_tuple_38, 0, ((PyObject *)__pyx_kp_s_37)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":660 - * ''' - * 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_39 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_39)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":662 - * 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_40 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_40)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_37)); - PyTuple_SET_ITEM(__pyx_k_tuple_40, 0, ((PyObject *)__pyx_kp_s_37)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40)); +static int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_512 = PyInt_FromLong(512); if (unlikely(!__pyx_int_512)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_neg_127 = PyInt_FromLong(-127); if (unlikely(!__pyx_int_neg_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_0660 = PyInt_FromLong(0660); if (unlikely(!__pyx_int_0660)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_1024 = PyInt_FromLong(1024); if (unlikely(!__pyx_int_1024)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_65535 = PyInt_FromLong(65535); if (unlikely(!__pyx_int_65535)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_neg_32767 = PyInt_FromLong(-32767); if (unlikely(!__pyx_int_neg_32767)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_536870912 = PyInt_FromLong(536870912); if (unlikely(!__pyx_int_536870912)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_4294967295 = PyInt_FromString((char *)"4294967295", 0, 0); if (unlikely(!__pyx_int_4294967295)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_neg_2147483648 = PyInt_FromLong(-2147483648); if (unlikely(!__pyx_int_neg_2147483648)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + return 0; + __pyx_L1_error:; + return -1; +} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":696 - * - * 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_42 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_42)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_42, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":702 - * 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_44 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_44)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_43)); - PyTuple_SET_ITEM(__pyx_k_tuple_44, 0, ((PyObject *)__pyx_kp_s_43)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44)); +#if PY_MAJOR_VERSION < 3 +PyMODINIT_FUNC initcsamtools(void); /*proto*/ +PyMODINIT_FUNC initcsamtools(void) +#else +PyMODINIT_FUNC PyInit_csamtools(void); /*proto*/ +PyMODINIT_FUNC PyInit_csamtools(void) +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + #if CYTHON_REFNANNY + void* __pyx_refnanny = NULL; + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_csamtools(void)", __LINE__, __FILE__); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #ifdef __pyx_binding_PyCFunctionType_USED + if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif + /*--- Module creation code ---*/ + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4(__Pyx_NAMESTR("csamtools"), __pyx_methods, 0, 0, PYTHON_API_VERSION); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + #if PY_MAJOR_VERSION < 3 + Py_INCREF(__pyx_m); + #endif + __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); + if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + /*--- Initialize various global constants etc. ---*/ + if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_module_is_main_csamtools) { + if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + } + /*--- Builtin init code ---*/ + if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Global init code ---*/ + /*--- Function export code ---*/ + /*--- Type init code ---*/ + __pyx_ptype_9csamtools_file = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "file", sizeof(PyFileObject), 0); if (unlikely(!__pyx_ptype_9csamtools_file)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_AlignedRead, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_9csamtools_11AlignedRead___str__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_9csamtools_11AlignedRead___str__.doc = __pyx_doc_9csamtools_11AlignedRead___str__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_11AlignedRead___str__; + } + } + if (__Pyx_SetAttrString(__pyx_m, "AlignedRead", (PyObject *)&__pyx_type_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_AlignedRead = &__pyx_type_9csamtools_AlignedRead; + if (PyType_Ready(&__pyx_type_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "PileupProxy", (PyObject *)&__pyx_type_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_PileupProxy = &__pyx_type_9csamtools_PileupProxy; + if (PyType_Ready(&__pyx_type_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "PileupRead", (PyObject *)&__pyx_type_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_PileupRead = &__pyx_type_9csamtools_PileupRead; + __pyx_vtabptr_9csamtools_Fastafile = &__pyx_vtable_9csamtools_Fastafile; + #if PY_MAJOR_VERSION >= 3 + __pyx_vtable_9csamtools_Fastafile._fetch = (char *(*)(struct __pyx_obj_9csamtools_Fastafile *, char *, int, int, int *))__pyx_f_9csamtools_9Fastafile__fetch; + #else + *(void(**)(void))&__pyx_vtable_9csamtools_Fastafile._fetch = (void(*)(void))__pyx_f_9csamtools_9Fastafile__fetch; + #endif + if (PyType_Ready(&__pyx_type_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_9csamtools_Fastafile.tp_dict, __pyx_vtabptr_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Fastafile", (PyObject *)&__pyx_type_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_Fastafile = &__pyx_type_9csamtools_Fastafile; + __pyx_vtabptr_9csamtools_Samfile = &__pyx_vtable_9csamtools_Samfile; + #if PY_MAJOR_VERSION >= 3 + __pyx_vtable_9csamtools_Samfile._buildHeader = (bam_header_t *(*)(struct __pyx_obj_9csamtools_Samfile *, PyObject *))__pyx_f_9csamtools_7Samfile__buildHeader; + __pyx_vtable_9csamtools_Samfile.getCurrent = (bam1_t *(*)(struct __pyx_obj_9csamtools_Samfile *))__pyx_f_9csamtools_7Samfile_getCurrent; + __pyx_vtable_9csamtools_Samfile.cnext = (int (*)(struct __pyx_obj_9csamtools_Samfile *))__pyx_f_9csamtools_7Samfile_cnext; + #else + *(void(**)(void))&__pyx_vtable_9csamtools_Samfile._buildHeader = (void(*)(void))__pyx_f_9csamtools_7Samfile__buildHeader; + *(void(**)(void))&__pyx_vtable_9csamtools_Samfile.getCurrent = (void(*)(void))__pyx_f_9csamtools_7Samfile_getCurrent; + *(void(**)(void))&__pyx_vtable_9csamtools_Samfile.cnext = (void(*)(void))__pyx_f_9csamtools_7Samfile_cnext; + #endif + if (PyType_Ready(&__pyx_type_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_Samfile, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_9csamtools_7Samfile___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_9csamtools_7Samfile___next__.doc = __pyx_doc_9csamtools_7Samfile___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_7Samfile___next__; + } + } + if (__Pyx_SetVtable(__pyx_type_9csamtools_Samfile.tp_dict, __pyx_vtabptr_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Samfile", (PyObject *)&__pyx_type_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_Samfile = &__pyx_type_9csamtools_Samfile; + if (PyType_Ready(&__pyx_type_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IteratorRow", (PyObject *)&__pyx_type_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IteratorRow = &__pyx_type_9csamtools_IteratorRow; + __pyx_vtabptr_9csamtools_IteratorRowRegion = &__pyx_vtable_9csamtools_IteratorRowRegion; + #if PY_MAJOR_VERSION >= 3 + __pyx_vtable_9csamtools_IteratorRowRegion.getCurrent = (bam1_t *(*)(struct __pyx_obj_9csamtools_IteratorRowRegion *))__pyx_f_9csamtools_17IteratorRowRegion_getCurrent; + __pyx_vtable_9csamtools_IteratorRowRegion.cnext = (int (*)(struct __pyx_obj_9csamtools_IteratorRowRegion *))__pyx_f_9csamtools_17IteratorRowRegion_cnext; + #else + *(void(**)(void))&__pyx_vtable_9csamtools_IteratorRowRegion.getCurrent = (void(*)(void))__pyx_f_9csamtools_17IteratorRowRegion_getCurrent; + *(void(**)(void))&__pyx_vtable_9csamtools_IteratorRowRegion.cnext = (void(*)(void))__pyx_f_9csamtools_17IteratorRowRegion_cnext; + #endif + __pyx_type_9csamtools_IteratorRowRegion.tp_base = __pyx_ptype_9csamtools_IteratorRow; + if (PyType_Ready(&__pyx_type_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorRowRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_9csamtools_17IteratorRowRegion___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_9csamtools_17IteratorRowRegion___next__.doc = __pyx_doc_9csamtools_17IteratorRowRegion___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_17IteratorRowRegion___next__; + } + } + if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorRowRegion.tp_dict, __pyx_vtabptr_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IteratorRowRegion", (PyObject *)&__pyx_type_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IteratorRowRegion = &__pyx_type_9csamtools_IteratorRowRegion; + __pyx_vtabptr_9csamtools_IteratorRowAll = &__pyx_vtable_9csamtools_IteratorRowAll; + #if PY_MAJOR_VERSION >= 3 + __pyx_vtable_9csamtools_IteratorRowAll.getCurrent = (bam1_t *(*)(struct __pyx_obj_9csamtools_IteratorRowAll *))__pyx_f_9csamtools_14IteratorRowAll_getCurrent; + __pyx_vtable_9csamtools_IteratorRowAll.cnext = (int (*)(struct __pyx_obj_9csamtools_IteratorRowAll *))__pyx_f_9csamtools_14IteratorRowAll_cnext; + #else + *(void(**)(void))&__pyx_vtable_9csamtools_IteratorRowAll.getCurrent = (void(*)(void))__pyx_f_9csamtools_14IteratorRowAll_getCurrent; + *(void(**)(void))&__pyx_vtable_9csamtools_IteratorRowAll.cnext = (void(*)(void))__pyx_f_9csamtools_14IteratorRowAll_cnext; + #endif + __pyx_type_9csamtools_IteratorRowAll.tp_base = __pyx_ptype_9csamtools_IteratorRow; + if (PyType_Ready(&__pyx_type_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorRowAll, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_9csamtools_14IteratorRowAll___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_9csamtools_14IteratorRowAll___next__.doc = __pyx_doc_9csamtools_14IteratorRowAll___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_14IteratorRowAll___next__; + } + } + if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorRowAll.tp_dict, __pyx_vtabptr_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAll", (PyObject *)&__pyx_type_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IteratorRowAll = &__pyx_type_9csamtools_IteratorRowAll; + __pyx_type_9csamtools_IteratorRowAllRefs.tp_base = __pyx_ptype_9csamtools_IteratorRow; + if (PyType_Ready(&__pyx_type_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorRowAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_9csamtools_18IteratorRowAllRefs___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_9csamtools_18IteratorRowAllRefs___next__.doc = __pyx_doc_9csamtools_18IteratorRowAllRefs___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_18IteratorRowAllRefs___next__; + } + } + if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAllRefs", (PyObject *)&__pyx_type_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IteratorRowAllRefs = &__pyx_type_9csamtools_IteratorRowAllRefs; + __pyx_vtabptr_9csamtools_IteratorColumn = &__pyx_vtable_9csamtools_IteratorColumn; + #if PY_MAJOR_VERSION >= 3 + __pyx_vtable_9csamtools_IteratorColumn.cnext = (int (*)(struct __pyx_obj_9csamtools_IteratorColumn *))__pyx_f_9csamtools_14IteratorColumn_cnext; + __pyx_vtable_9csamtools_IteratorColumn.getSequence = (char *(*)(struct __pyx_obj_9csamtools_IteratorColumn *))__pyx_f_9csamtools_14IteratorColumn_getSequence; + __pyx_vtable_9csamtools_IteratorColumn.setMask = (PyObject *(*)(struct __pyx_obj_9csamtools_IteratorColumn *, PyObject *))__pyx_f_9csamtools_14IteratorColumn_setMask; + __pyx_vtable_9csamtools_IteratorColumn.setupIteratorData = (PyObject *(*)(struct __pyx_obj_9csamtools_IteratorColumn *, int, int, int, struct __pyx_opt_args_9csamtools_14IteratorColumn_setupIteratorData *__pyx_optional_args))__pyx_f_9csamtools_14IteratorColumn_setupIteratorData; + __pyx_vtable_9csamtools_IteratorColumn.reset = (PyObject *(*)(struct __pyx_obj_9csamtools_IteratorColumn *, PyObject *, PyObject *, PyObject *))__pyx_f_9csamtools_14IteratorColumn_reset; + #else + *(void(**)(void))&__pyx_vtable_9csamtools_IteratorColumn.cnext = (void(*)(void))__pyx_f_9csamtools_14IteratorColumn_cnext; + *(void(**)(void))&__pyx_vtable_9csamtools_IteratorColumn.getSequence = (void(*)(void))__pyx_f_9csamtools_14IteratorColumn_getSequence; + *(void(**)(void))&__pyx_vtable_9csamtools_IteratorColumn.setMask = (void(*)(void))__pyx_f_9csamtools_14IteratorColumn_setMask; + *(void(**)(void))&__pyx_vtable_9csamtools_IteratorColumn.setupIteratorData = (void(*)(void))__pyx_f_9csamtools_14IteratorColumn_setupIteratorData; + *(void(**)(void))&__pyx_vtable_9csamtools_IteratorColumn.reset = (void(*)(void))__pyx_f_9csamtools_14IteratorColumn_reset; + #endif + if (PyType_Ready(&__pyx_type_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorColumn.tp_dict, __pyx_vtabptr_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IteratorColumn", (PyObject *)&__pyx_type_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IteratorColumn = &__pyx_type_9csamtools_IteratorColumn; + __pyx_vtabptr_9csamtools_IteratorColumnRegion = &__pyx_vtable_9csamtools_IteratorColumnRegion; + __pyx_vtable_9csamtools_IteratorColumnRegion.__pyx_base = *__pyx_vtabptr_9csamtools_IteratorColumn; + __pyx_type_9csamtools_IteratorColumnRegion.tp_base = __pyx_ptype_9csamtools_IteratorColumn; + if (PyType_Ready(&__pyx_type_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorColumnRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_9csamtools_20IteratorColumnRegion___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_9csamtools_20IteratorColumnRegion___next__.doc = __pyx_doc_9csamtools_20IteratorColumnRegion___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_20IteratorColumnRegion___next__; + } + } + if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorColumnRegion.tp_dict, __pyx_vtabptr_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnRegion", (PyObject *)&__pyx_type_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IteratorColumnRegion = &__pyx_type_9csamtools_IteratorColumnRegion; + __pyx_vtabptr_9csamtools_IteratorColumnAllRefs = &__pyx_vtable_9csamtools_IteratorColumnAllRefs; + __pyx_vtable_9csamtools_IteratorColumnAllRefs.__pyx_base = *__pyx_vtabptr_9csamtools_IteratorColumn; + __pyx_type_9csamtools_IteratorColumnAllRefs.tp_base = __pyx_ptype_9csamtools_IteratorColumn; + if (PyType_Ready(&__pyx_type_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorColumnAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_9csamtools_21IteratorColumnAllRefs___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_9csamtools_21IteratorColumnAllRefs___next__.doc = __pyx_doc_9csamtools_21IteratorColumnAllRefs___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_21IteratorColumnAllRefs___next__; + } + } + if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorColumnAllRefs.tp_dict, __pyx_vtabptr_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnAllRefs", (PyObject *)&__pyx_type_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IteratorColumnAllRefs = &__pyx_type_9csamtools_IteratorColumnAllRefs; + if (PyType_Ready(&__pyx_type_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "SNPCall", (PyObject *)&__pyx_type_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_SNPCall = &__pyx_type_9csamtools_SNPCall; + __pyx_vtabptr_9csamtools_SNPCallerBase = &__pyx_vtable_9csamtools_SNPCallerBase; + #if PY_MAJOR_VERSION >= 3 + __pyx_vtable_9csamtools_SNPCallerBase.__dump = (PyObject *(*)(struct __pyx_obj_9csamtools_SNPCallerBase *, glf1_t *, uint32_t, int))__pyx_f_9csamtools_13SNPCallerBase___dump; + #else + *(void(**)(void))&__pyx_vtable_9csamtools_SNPCallerBase.__dump = (void(*)(void))__pyx_f_9csamtools_13SNPCallerBase___dump; + #endif + if (PyType_Ready(&__pyx_type_9csamtools_SNPCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_9csamtools_SNPCallerBase.tp_dict, __pyx_vtabptr_9csamtools_SNPCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "SNPCallerBase", (PyObject *)&__pyx_type_9csamtools_SNPCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_SNPCallerBase = &__pyx_type_9csamtools_SNPCallerBase; + __pyx_vtabptr_9csamtools_IteratorSNPCalls = &__pyx_vtable_9csamtools_IteratorSNPCalls; + __pyx_vtable_9csamtools_IteratorSNPCalls.__pyx_base = *__pyx_vtabptr_9csamtools_SNPCallerBase; + __pyx_type_9csamtools_IteratorSNPCalls.tp_base = __pyx_ptype_9csamtools_SNPCallerBase; + if (PyType_Ready(&__pyx_type_9csamtools_IteratorSNPCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorSNPCalls, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_9csamtools_16IteratorSNPCalls___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_9csamtools_16IteratorSNPCalls___next__.doc = __pyx_doc_9csamtools_16IteratorSNPCalls___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_16IteratorSNPCalls___next__; + } + } + if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorSNPCalls.tp_dict, __pyx_vtabptr_9csamtools_IteratorSNPCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IteratorSNPCalls", (PyObject *)&__pyx_type_9csamtools_IteratorSNPCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IteratorSNPCalls = &__pyx_type_9csamtools_IteratorSNPCalls; + __pyx_vtabptr_9csamtools_SNPCaller = &__pyx_vtable_9csamtools_SNPCaller; + __pyx_vtable_9csamtools_SNPCaller.__pyx_base = *__pyx_vtabptr_9csamtools_SNPCallerBase; + __pyx_type_9csamtools_SNPCaller.tp_base = __pyx_ptype_9csamtools_SNPCallerBase; + if (PyType_Ready(&__pyx_type_9csamtools_SNPCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_9csamtools_SNPCaller.tp_dict, __pyx_vtabptr_9csamtools_SNPCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "SNPCaller", (PyObject *)&__pyx_type_9csamtools_SNPCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_SNPCaller = &__pyx_type_9csamtools_SNPCaller; + if (PyType_Ready(&__pyx_type_9csamtools_IndelCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IndelCall", (PyObject *)&__pyx_type_9csamtools_IndelCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IndelCall = &__pyx_type_9csamtools_IndelCall; + if (PyType_Ready(&__pyx_type_9csamtools_IndelCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IndelCallerBase", (PyObject *)&__pyx_type_9csamtools_IndelCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IndelCallerBase = &__pyx_type_9csamtools_IndelCallerBase; + __pyx_type_9csamtools_IndelCaller.tp_base = __pyx_ptype_9csamtools_IndelCallerBase; + if (PyType_Ready(&__pyx_type_9csamtools_IndelCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "IndelCaller", (PyObject *)&__pyx_type_9csamtools_IndelCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IndelCaller = &__pyx_type_9csamtools_IndelCaller; + __pyx_type_9csamtools_IteratorIndelCalls.tp_base = __pyx_ptype_9csamtools_IndelCallerBase; + if (PyType_Ready(&__pyx_type_9csamtools_IteratorIndelCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorIndelCalls, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_9csamtools_18IteratorIndelCalls___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_9csamtools_18IteratorIndelCalls___next__.doc = __pyx_doc_9csamtools_18IteratorIndelCalls___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_18IteratorIndelCalls___next__; + } + } + if (__Pyx_SetAttrString(__pyx_m, "IteratorIndelCalls", (PyObject *)&__pyx_type_9csamtools_IteratorIndelCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_9csamtools_IteratorIndelCalls = &__pyx_type_9csamtools_IteratorIndelCalls; + /*--- Type import code ---*/ + __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Function import code ---*/ + /*--- Execution code ---*/ - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":705 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":4 + * # cython: profile=True + * # adds doc-strings for sphinx + * import tempfile, os, sys, types, struct, ctypes, collections, re # <<<<<<<<<<<<<< * - * 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_46 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_46)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_45)); - PyTuple_SET_ITEM(__pyx_k_tuple_46, 0, ((PyObject *)__pyx_kp_s_45)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_45)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":706 - * 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, + * from cpython cimport PyString_FromStringAndSize, PyString_AS_STRING */ - __pyx_k_tuple_48 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_48)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_47)); - PyTuple_SET_ITEM(__pyx_k_tuple_48, 0, ((PyObject *)__pyx_kp_s_47)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_47)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":726 - * # this happens if a bamfile is opened with mode 'r' - * if self.samfile.header.n_targets == 0: - * raise ValueError( "fetch called for samfile without header") # <<<<<<<<<<<<<< - * - * if region != None: - */ - __pyx_k_tuple_50 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_50)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_49)); - PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_kp_s_49)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_49)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":729 - * - * if region != None: - * raise ValueError ("fetch for a region is not available for sam files" ) # <<<<<<<<<<<<<< - * if callback: - * raise NotImplementedError( "callback not implemented yet" ) - */ - __pyx_k_tuple_52 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_52)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_51)); - PyTuple_SET_ITEM(__pyx_k_tuple_52, 0, ((PyObject *)__pyx_kp_s_51)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_51)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":731 - * raise ValueError ("fetch for a region is not available for sam files" ) - * if callback: - * raise NotImplementedError( "callback not implemented yet" ) # <<<<<<<<<<<<<< - * else: - * return IteratorRowAll( self ) - */ - __pyx_k_tuple_54 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_54)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_53)); - PyTuple_SET_ITEM(__pyx_k_tuple_54, 0, ((PyObject *)__pyx_kp_s_53)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_53)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":749 - * ''' - * if not read.is_paired: - * raise ValueError( "read is unpaired" ) # <<<<<<<<<<<<<< - * if read.mate_is_unmapped: - * raise ValueError( "mate is unmapped" ) - */ - __pyx_k_tuple_56 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_56)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_55)); - PyTuple_SET_ITEM(__pyx_k_tuple_56, 0, ((PyObject *)__pyx_kp_s_55)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_55)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56)); + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__tempfile), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tempfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__types), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__struct), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__struct, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__collections), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__re), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":751 - * raise ValueError( "read is unpaired" ) - * if read.mate_is_unmapped: - * raise ValueError( "mate is unmapped" ) # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":52 + * ##################################################################### + * # hard-coded constants + * cdef char * bam_nt16_rev_table = "=ACMGRSVTWYHKDBN" # <<<<<<<<<<<<<< + * cdef int max_pos = 2 << 29 * - * cdef MateData mate_data */ - __pyx_k_tuple_58 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_58)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_57)); - PyTuple_SET_ITEM(__pyx_k_tuple_58, 0, ((PyObject *)__pyx_kp_s_57)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_57)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58)); + __pyx_v_9csamtools_bam_nt16_rev_table = __pyx_k_166; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":770 - * - * if mate_data.mate == NULL: - * raise ValueError( "mate not found" ) # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":53 + * # hard-coded constants + * cdef char * bam_nt16_rev_table = "=ACMGRSVTWYHKDBN" + * cdef int max_pos = 2 << 29 # <<<<<<<<<<<<<< * - * cdef AlignedRead dest = AlignedRead.__new__(AlignedRead) + * # redirect stderr to 0 */ - __pyx_k_tuple_60 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_60)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_59)); - PyTuple_SET_ITEM(__pyx_k_tuple_60, 0, ((PyObject *)__pyx_kp_s_59)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_59)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60)); + __pyx_v_9csamtools_max_pos = 1073741824; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":795 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":56 * - * if not self._isOpen(): - * raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< + * # redirect stderr to 0 + * _logfile = open("/dev/null", "w") # <<<<<<<<<<<<<< + * pysam_set_stderr( PyFile_AsFile( _logfile ) ) * - * region, rtid, rstart, rend = self._parseRegion( reference, start, end, region ) */ - __pyx_k_tuple_62 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_62)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_62, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62)); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_167)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_167)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_167)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__w)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__w)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__w)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s___logfile, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":804 - * if self.isbam: - * if not until_eof and not self._hasIndex() and not self.isremote: - * raise ValueError( "fetch called on bamfile without index" ) # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":57 + * # redirect stderr to 0 + * _logfile = open("/dev/null", "w") + * pysam_set_stderr( PyFile_AsFile( _logfile ) ) # <<<<<<<<<<<<<< * - * if not region: + * ##################################################################### */ - __pyx_k_tuple_63 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_63)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_43)); - PyTuple_SET_ITEM(__pyx_k_tuple_63, 0, ((PyObject *)__pyx_kp_s_43)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___logfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + pysam_set_stderr(PyFile_AsFile(__pyx_t_2)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":807 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":106 + * (f)(a) * - * 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, + * class PileupColumn(object): # <<<<<<<<<<<<<< + * '''A pileup column. A pileup column contains + * all the reads that map to a certain target base. */ - __pyx_k_tuple_65 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_65)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_64)); - PyTuple_SET_ITEM(__pyx_k_tuple_65, 0, ((PyObject *)__pyx_kp_s_64)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_64)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65)); + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_builtin_object); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object); + __Pyx_GIVEREF(__pyx_builtin_object); + if (PyDict_SetItemString(((PyObject *)__pyx_t_2), "__doc__", ((PyObject *)__pyx_kp_s_168)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_CreateClass(__pyx_t_1, ((PyObject *)__pyx_t_2), __pyx_n_s__PileupColumn, "csamtools"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":808 - * 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, + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":119 + * 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_66 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_66)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_47)); - PyTuple_SET_ITEM(__pyx_k_tuple_66, 0, ((PyObject *)__pyx_kp_s_47)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_47)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66)); + __pyx_t_1 = PyCFunction_New(&__pyx_mdef_9csamtools_12PileupColumn___str__, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyMethod_New(__pyx_t_1, 0, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s____str__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PileupColumn, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":818 - * return counter - * else: - * raise ValueError ("count for a region is not available for sam files" ) # <<<<<<<<<<<<<< - * + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":163 + * return 0 * + * class StderrStore(): # <<<<<<<<<<<<<< + * ''' + * stderr is captured. */ - __pyx_k_tuple_68 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_68)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_67)); - PyTuple_SET_ITEM(__pyx_k_tuple_68, 0, ((PyObject *)__pyx_kp_s_67)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_67)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68)); + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + if (PyDict_SetItemString(((PyObject *)__pyx_t_2), "__doc__", ((PyObject *)__pyx_kp_s_169)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2), __pyx_n_s__StderrStore, "csamtools"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":871 - * - * if not self._isOpen(): - * raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< - * - * has_coord, rtid, rstart, rend = self._parseRegion( reference, start, end, region ) + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":167 + * stderr is captured. + * ''' + * def __init__(self): # <<<<<<<<<<<<<< + * return + * self.stderr_h, self.stderr_f = tempfile.mkstemp() */ - __pyx_k_tuple_69 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_69)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_69, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69)); + __pyx_t_4 = PyCFunction_New(&__pyx_mdef_9csamtools_11StderrStore___init__, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyMethod_New(__pyx_t_4, 0, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":876 - * - * if self.isbam: - * if not self._hasIndex(): raise ValueError( "no index available for pileup" ) # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":173 + * self.stderr_save.setfd( self.stderr_h ) * - * if callback: + * def readAndRelease( self ): # <<<<<<<<<<<<<< + * return [] + * self.stderr_save.restore() */ - __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_71)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_70)); - PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_kp_s_70)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_70)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71)); + __pyx_t_1 = PyCFunction_New(&__pyx_mdef_9csamtools_11StderrStore_readAndRelease, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyMethod_New(__pyx_t_1, 0, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s__readAndRelease, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":879 - * - * if callback: - * if not has_coord: raise ValueError( "callback functionality requires a region/reference" ) # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":182 + * return lines * - * buf = bam_plbuf_init( pileup_callback, callback ) + * def release(self): # <<<<<<<<<<<<<< + * return + * self.stderr_save.restore() */ - __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_72)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_45)); - PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_kp_s_45)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_45)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72)); + __pyx_t_4 = PyCFunction_New(&__pyx_mdef_9csamtools_11StderrStore_release, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyMethod_New(__pyx_t_4, 0, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s__release, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":900 - * - * else: - * raise NotImplementedError( "pileup of samfiles not implemented yet" ) # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":188 + * os.remove( self.stderr_f ) * - * def close( self ): - */ - __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_74)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_73)); - PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_kp_s_73)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":925 - * ''' - * if not self._isOpen(): - * raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< + * def __del__(self): # <<<<<<<<<<<<<< + * self.release() * - * return samwrite( self.samfile, read._delegate ) */ - __pyx_k_tuple_75 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_75)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_75, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75)); + __pyx_t_1 = PyCFunction_New(&__pyx_mdef_9csamtools_11StderrStore___del__, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyMethod_New(__pyx_t_1, 0, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s____del__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStore, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":944 - * '''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 - * + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":195 + * ###################################################################### + * # valid types for sam headers + * VALID_HEADER_TYPES = { "HD" : dict, # <<<<<<<<<<<<<< + * "SQ" : list, + * "RG" : list, */ - __pyx_k_tuple_76 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_76)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_76, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76)); + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__HD), ((PyObject *)((PyObject*)&PyDict_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":950 - * '''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 - * + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":196 + * # valid types for sam headers + * VALID_HEADER_TYPES = { "HD" : dict, + * "SQ" : list, # <<<<<<<<<<<<<< + * "RG" : list, + * "PG" : list, */ - __pyx_k_tuple_77 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_77)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_77, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)((PyObject*)&PyList_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":956 - * """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: + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":197 + * VALID_HEADER_TYPES = { "HD" : dict, + * "SQ" : list, + * "RG" : list, # <<<<<<<<<<<<<< + * "PG" : list, + * "CO" : list } */ - __pyx_k_tuple_78 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_78)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_78, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__RG), ((PyObject *)((PyObject*)&PyList_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":967 - * """ - * 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: + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":198 + * "SQ" : list, + * "RG" : list, + * "PG" : list, # <<<<<<<<<<<<<< + * "CO" : list } + * */ - __pyx_k_tuple_79 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_79)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_79, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__PG), ((PyObject *)((PyObject*)&PyList_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":976 - * '''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 PyString_FromStringAndSize(self.samfile.header.text, self.samfile.header.l_text) + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":199 + * "RG" : list, + * "PG" : list, + * "CO" : list } # <<<<<<<<<<<<<< * + * # order of records within sam headers */ - __pyx_k_tuple_80 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_80)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_80, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__CO), ((PyObject *)((PyObject*)&PyList_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":984 - * ''' - * def __get__(self): - * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":202 * - * result = {} + * # order of records within sam headers + * VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO" ) # <<<<<<<<<<<<<< + * + * # type conversions within sam header records */ - __pyx_k_tuple_81 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_81)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_81, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":991 - * # 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_82 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_82)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_2)); - PyTuple_SET_ITEM(__pyx_k_tuple_82, 0, ((PyObject *)__pyx_kp_s_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":993 - * 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_84 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_84)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_83)); - PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_kp_s_83)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_83)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":994 - * 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_86 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_86)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_1)); - PyTuple_SET_ITEM(__pyx_k_tuple_86, 0, ((PyObject *)__pyx_kp_s_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1007 - * x = {} - * for field in fields[1:]: - * key, value = field.split(":",1) # <<<<<<<<<<<<<< - * if key not in VALID_HEADER_FIELDS[record]: - * raise ValueError( "unknown field code '%s' in record '%s'" % (key, record) ) - */ - __pyx_k_tuple_89 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_89)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_88)); - PyTuple_SET_ITEM(__pyx_k_tuple_89, 0, ((PyObject *)__pyx_kp_s_88)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_88)); - __Pyx_INCREF(__pyx_int_1); - PyTuple_SET_ITEM(__pyx_k_tuple_89, 1, __pyx_int_1); - __Pyx_GIVEREF(__pyx_int_1); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1098 - * ############################################################### - * def __iter__(self): - * if not self._isOpen(): raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< - * return self - * - */ - __pyx_k_tuple_96 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_96)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_96, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1173 - * - * if not samfile._isOpen(): - * raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< - * - * if not samfile._hasIndex(): - */ - __pyx_k_tuple_97 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_97)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1176 - * - * if not samfile._hasIndex(): - * raise ValueError( "no index available for iteration" ) # <<<<<<<<<<<<<< - * - * # makes sure that samfile stays alive as long as the - */ - __pyx_k_tuple_99 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_99)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_98)); - PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_kp_s_98)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_98)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1240 - * - * if not samfile._isOpen(): - * raise ValueError( "I/O operation on closed file" ) # <<<<<<<<<<<<<< - * - * if samfile.isbam: mode = "rb" - */ - __pyx_k_tuple_100 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_100)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_6)); - PyTuple_SET_ITEM(__pyx_k_tuple_100, 0, ((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1292 - * 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_101 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_101)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_47)); - PyTuple_SET_ITEM(__pyx_k_tuple_101, 0, ((PyObject *)__pyx_kp_s_47)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_47)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1586 - * self.cnext() - * if self.n_plp < 0: - * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< - * - * if self.plp == NULL: - */ - __pyx_k_tuple_106 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_106)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); - PyTuple_SET_ITEM(__pyx_k_tuple_106, 0, ((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1618 - * - * if self.n_plp < 0: - * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< - * - * # return result, if within same reference - */ - __pyx_k_tuple_107 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_107)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); - PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2139 - * size = struct.calcsize(fmt) - * if offset + size > max_size: - * raise NotImplementedError("tags field too large") # <<<<<<<<<<<<<< - * - * struct.pack_into( fmt, - */ - __pyx_k_tuple_123 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_123)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_122)); - PyTuple_SET_ITEM(__pyx_k_tuple_123, 0, ((PyObject *)__pyx_kp_s_122)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_122)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2414 - * - * def __init__(self): - * raise TypeError("This class cannot be instantiated from Python") # <<<<<<<<<<<<<< - * - * def __str__(self): - */ - __pyx_k_tuple_147 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_147)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_146)); - PyTuple_SET_ITEM(__pyx_k_tuple_147, 0, ((PyObject *)__pyx_kp_s_146)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_146)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_147)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2458 - * - * def __init__(self): - * raise TypeError("This class cannot be instantiated from Python") # <<<<<<<<<<<<<< - * - * def __str__(self): - */ - __pyx_k_tuple_148 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_148)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_146)); - PyTuple_SET_ITEM(__pyx_k_tuple_148, 0, ((PyObject *)__pyx_kp_s_146)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_146)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_148)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2570 - * # 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_154 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_154)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_153)); - PyTuple_SET_ITEM(__pyx_k_tuple_154, 0, ((PyObject *)__pyx_kp_s_153)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_153)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_154)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2766 - * - * if self.iter.n_plp < 0: - * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< - * - * if self.iter.plp == NULL: - */ - __pyx_k_tuple_160 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_160)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); - PyTuple_SET_ITEM(__pyx_k_tuple_160, 0, ((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_160)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2845 - * - * if self.iter.n_plp < 0: - * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< - * - * if self.iter.plp == NULL: - */ - __pyx_k_tuple_162 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_162)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_162)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); - PyTuple_SET_ITEM(__pyx_k_tuple_162, 0, ((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_162)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2848 - * - * if self.iter.plp == NULL: - * raise ValueError( "no reads in region - no call" ) # <<<<<<<<<<<<<< - * - * if self.iter.pos == pos: break - */ - __pyx_k_tuple_164 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_164)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_164)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_163)); - PyTuple_SET_ITEM(__pyx_k_tuple_164, 0, ((PyObject *)__pyx_kp_s_163)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_163)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_164)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3110 - * - * if self.iter.n_plp < 0: - * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< - * - * if self.iter.plp == NULL: - */ - __pyx_k_tuple_167 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_167)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_167)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); - PyTuple_SET_ITEM(__pyx_k_tuple_167, 0, ((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_167)); + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_n_s__HD)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__HD)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HD)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__SQ)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__SQ)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SQ)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__RG)); + PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_s__RG)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RG)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__PG)); + PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__PG)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PG)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__CO)); + PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_s__CO)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__CO)); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADERS, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3113 - * - * if self.iter.plp == NULL: - * raise ValueError( "no reads in region - no call" ) # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":205 * - * if self.iter.pos == pos: break + * # 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, }, */ - __pyx_k_tuple_168 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_168)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_163)); - PyTuple_SET_ITEM(__pyx_k_tuple_168, 0, ((PyObject *)__pyx_kp_s_163)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_163)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_168)); + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SO), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GO), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3150 - * - * if self.iter.n_plp < 0: - * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<< - * - * if self.iter.plp == NULL: + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":206 + * # 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, }, + * "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str }, } */ - __pyx_k_tuple_169 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_169)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_169)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_105)); - PyTuple_SET_ITEM(__pyx_k_tuple_169, 0, ((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_169)); + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SN), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__LN), ((PyObject *)((PyObject*)&PyInt_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__AS), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__M5), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__UR), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SP), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":56 - * - * # redirect stderr to 0 - * _logfile = open("/dev/null", "w") # <<<<<<<<<<<<<< - * pysam_set_stderr( PyFile_AsFile( _logfile ) ) + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":207 + * 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, }, # <<<<<<<<<<<<<< + * "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str }, } * */ - __pyx_k_tuple_229 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_229)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_229)); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_228)); - PyTuple_SET_ITEM(__pyx_k_tuple_229, 0, ((PyObject *)__pyx_kp_s_228)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_228)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__w)); - PyTuple_SET_ITEM(__pyx_k_tuple_229, 1, ((PyObject *)__pyx_n_s__w)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__w)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_229)); + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SM), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__LB), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__DS), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__PU), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__PI), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__CN), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__DT), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__PL), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":202 - * - * # order of records within sam headers - * VALID_HEADERS = ("HD", "SQ", "RG", "PG", "CO" ) # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":208 + * "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, }, + * "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str }, } # <<<<<<<<<<<<<< * - * # type conversions within sam header records + * # output order of fields within records */ - __pyx_k_tuple_232 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_232)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_232)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__HD)); - PyTuple_SET_ITEM(__pyx_k_tuple_232, 0, ((PyObject *)__pyx_n_s__HD)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HD)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__SQ)); - PyTuple_SET_ITEM(__pyx_k_tuple_232, 1, ((PyObject *)__pyx_n_s__SQ)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SQ)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__RG)); - PyTuple_SET_ITEM(__pyx_k_tuple_232, 2, ((PyObject *)__pyx_n_s__RG)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RG)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__PG)); - PyTuple_SET_ITEM(__pyx_k_tuple_232, 3, ((PyObject *)__pyx_n_s__PG)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PG)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__CO)); - PyTuple_SET_ITEM(__pyx_k_tuple_232, 4, ((PyObject *)__pyx_n_s__CO)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__CO)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_232)); + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__PN), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__CL), ((PyObject *)((PyObject*)&PyString_Type))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":211 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":211 * * # 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" ), */ - __pyx_k_tuple_233 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_233)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_233)); + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__VN)); - PyTuple_SET_ITEM(__pyx_k_tuple_233, 0, ((PyObject *)__pyx_n_s__VN)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__VN)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VN)); __Pyx_INCREF(((PyObject *)__pyx_n_s__SO)); - PyTuple_SET_ITEM(__pyx_k_tuple_233, 1, ((PyObject *)__pyx_n_s__SO)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__SO)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SO)); __Pyx_INCREF(((PyObject *)__pyx_n_s__GO)); - PyTuple_SET_ITEM(__pyx_k_tuple_233, 2, ((PyObject *)__pyx_n_s__GO)); + PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_n_s__GO)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GO)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_233)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__HD), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":212 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":212 * # 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" ), * "PG" : ( "PN", "ID", "VN", "CL" ), } */ - __pyx_k_tuple_234 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_234)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_234)); + __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__SN)); - PyTuple_SET_ITEM(__pyx_k_tuple_234, 0, ((PyObject *)__pyx_n_s__SN)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__SN)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SN)); __Pyx_INCREF(((PyObject *)__pyx_n_s__LN)); - PyTuple_SET_ITEM(__pyx_k_tuple_234, 1, ((PyObject *)__pyx_n_s__LN)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__LN)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__LN)); __Pyx_INCREF(((PyObject *)__pyx_n_s__AS)); - PyTuple_SET_ITEM(__pyx_k_tuple_234, 2, ((PyObject *)__pyx_n_s__AS)); + PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_n_s__AS)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__AS)); __Pyx_INCREF(((PyObject *)__pyx_n_s__M5)); - PyTuple_SET_ITEM(__pyx_k_tuple_234, 3, ((PyObject *)__pyx_n_s__M5)); + PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__M5)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__M5)); __Pyx_INCREF(((PyObject *)__pyx_n_s__UR)); - PyTuple_SET_ITEM(__pyx_k_tuple_234, 4, ((PyObject *)__pyx_n_s__UR)); + PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_n_s__UR)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__UR)); __Pyx_INCREF(((PyObject *)__pyx_n_s__SP)); - PyTuple_SET_ITEM(__pyx_k_tuple_234, 5, ((PyObject *)__pyx_n_s__SP)); + PyTuple_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_n_s__SP)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SP)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_234)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__SQ), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":213 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":213 * VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ), * "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ), * "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL" ), # <<<<<<<<<<<<<< * "PG" : ( "PN", "ID", "VN", "CL" ), } * */ - __pyx_k_tuple_235 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_235)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_235)); + __pyx_t_3 = PyTuple_New(9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_n_s__ID)); - PyTuple_SET_ITEM(__pyx_k_tuple_235, 0, ((PyObject *)__pyx_n_s__ID)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__ID)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ID)); __Pyx_INCREF(((PyObject *)__pyx_n_s__SM)); - PyTuple_SET_ITEM(__pyx_k_tuple_235, 1, ((PyObject *)__pyx_n_s__SM)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__SM)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SM)); __Pyx_INCREF(((PyObject *)__pyx_n_s__LB)); - PyTuple_SET_ITEM(__pyx_k_tuple_235, 2, ((PyObject *)__pyx_n_s__LB)); + PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_n_s__LB)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__LB)); __Pyx_INCREF(((PyObject *)__pyx_n_s__DS)); - PyTuple_SET_ITEM(__pyx_k_tuple_235, 3, ((PyObject *)__pyx_n_s__DS)); + PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__DS)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DS)); __Pyx_INCREF(((PyObject *)__pyx_n_s__PU)); - PyTuple_SET_ITEM(__pyx_k_tuple_235, 4, ((PyObject *)__pyx_n_s__PU)); + PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_n_s__PU)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PU)); __Pyx_INCREF(((PyObject *)__pyx_n_s__PI)); - PyTuple_SET_ITEM(__pyx_k_tuple_235, 5, ((PyObject *)__pyx_n_s__PI)); + PyTuple_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_n_s__PI)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PI)); __Pyx_INCREF(((PyObject *)__pyx_n_s__CN)); - PyTuple_SET_ITEM(__pyx_k_tuple_235, 6, ((PyObject *)__pyx_n_s__CN)); + PyTuple_SET_ITEM(__pyx_t_3, 6, ((PyObject *)__pyx_n_s__CN)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__CN)); __Pyx_INCREF(((PyObject *)__pyx_n_s__DT)); - PyTuple_SET_ITEM(__pyx_k_tuple_235, 7, ((PyObject *)__pyx_n_s__DT)); + PyTuple_SET_ITEM(__pyx_t_3, 7, ((PyObject *)__pyx_n_s__DT)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DT)); __Pyx_INCREF(((PyObject *)__pyx_n_s__PL)); - PyTuple_SET_ITEM(__pyx_k_tuple_235, 8, ((PyObject *)__pyx_n_s__PL)); + PyTuple_SET_ITEM(__pyx_t_3, 8, ((PyObject *)__pyx_n_s__PL)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PL)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_235)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__RG), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":214 + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":214 * "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ), * "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL" ), - * "PG" : ( "PN", "ID", "VN", "CL" ), } # <<<<<<<<<<<<<< - * - * - */ - __pyx_k_tuple_236 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_236)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_236)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__PN)); - PyTuple_SET_ITEM(__pyx_k_tuple_236, 0, ((PyObject *)__pyx_n_s__PN)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PN)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__ID)); - PyTuple_SET_ITEM(__pyx_k_tuple_236, 1, ((PyObject *)__pyx_n_s__ID)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ID)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__VN)); - PyTuple_SET_ITEM(__pyx_k_tuple_236, 2, ((PyObject *)__pyx_n_s__VN)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VN)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__CL)); - PyTuple_SET_ITEM(__pyx_k_tuple_236, 3, ((PyObject *)__pyx_n_s__CL)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__CL)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_236)); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; - __Pyx_RefNannyFinishContext(); - return -1; -} - -static int __Pyx_InitGlobals(void) { - if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_512 = PyInt_FromLong(512); if (unlikely(!__pyx_int_512)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_neg_127 = PyInt_FromLong(-127); if (unlikely(!__pyx_int_neg_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_0660 = PyInt_FromLong(0660); if (unlikely(!__pyx_int_0660)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_1024 = PyInt_FromLong(1024); if (unlikely(!__pyx_int_1024)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_65535 = PyInt_FromLong(65535); if (unlikely(!__pyx_int_65535)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_neg_32767 = PyInt_FromLong(-32767); if (unlikely(!__pyx_int_neg_32767)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_536870912 = PyInt_FromLong(536870912); if (unlikely(!__pyx_int_536870912)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_4294967295 = PyInt_FromString((char *)"4294967295", 0, 0); if (unlikely(!__pyx_int_4294967295)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_neg_2147483648 = PyInt_FromLong(-2147483648); if (unlikely(!__pyx_int_neg_2147483648)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - return 0; - __pyx_L1_error:; - return -1; -} - -#if PY_MAJOR_VERSION < 3 -PyMODINIT_FUNC initcsamtools(void); /*proto*/ -PyMODINIT_FUNC initcsamtools(void) -#else -PyMODINIT_FUNC PyInit_csamtools(void); /*proto*/ -PyMODINIT_FUNC PyInit_csamtools(void) -#endif -{ - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - #if CYTHON_REFNANNY - void* __pyx_refnanny = NULL; - __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); - if (!__Pyx_RefNanny) { - PyErr_Clear(); - __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); - if (!__Pyx_RefNanny) - Py_FatalError("failed to import 'refnanny' module"); - } - __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_csamtools(void)", __LINE__, __FILE__); - #endif - __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #ifdef __pyx_binding_PyCFunctionType_USED - if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ - #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - #ifdef WITH_THREAD /* Python build with threading support? */ - PyEval_InitThreads(); - #endif - #endif - /*--- Module creation code ---*/ - #if PY_MAJOR_VERSION < 3 - __pyx_m = Py_InitModule4(__Pyx_NAMESTR("csamtools"), __pyx_methods, 0, 0, PYTHON_API_VERSION); - #else - __pyx_m = PyModule_Create(&__pyx_moduledef); - #endif - if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - #if PY_MAJOR_VERSION < 3 - Py_INCREF(__pyx_m); - #endif - __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); - if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - /*--- Initialize various global constants etc. ---*/ - if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_module_is_main_csamtools) { - if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - } - /*--- Builtin init code ---*/ - if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /*--- Constants init code ---*/ - if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /*--- Global init code ---*/ - /*--- Function export code ---*/ - /*--- Type init code ---*/ - __pyx_ptype_9csamtools_file = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "file", sizeof(PyFileObject), 0); if (unlikely(!__pyx_ptype_9csamtools_file)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyType_Ready(&__pyx_type_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_AlignedRead, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_9csamtools_11AlignedRead_2__str__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_9csamtools_11AlignedRead_2__str__.doc = __pyx_doc_9csamtools_11AlignedRead_2__str__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_11AlignedRead_2__str__; - } - } - if (__Pyx_SetAttrString(__pyx_m, "AlignedRead", (PyObject *)&__pyx_type_9csamtools_AlignedRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_AlignedRead = &__pyx_type_9csamtools_AlignedRead; - if (PyType_Ready(&__pyx_type_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "PileupProxy", (PyObject *)&__pyx_type_9csamtools_PileupProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_PileupProxy = &__pyx_type_9csamtools_PileupProxy; - if (PyType_Ready(&__pyx_type_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "PileupRead", (PyObject *)&__pyx_type_9csamtools_PileupRead) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_PileupRead = &__pyx_type_9csamtools_PileupRead; - __pyx_vtabptr_9csamtools_Fastafile = &__pyx_vtable_9csamtools_Fastafile; - __pyx_vtable_9csamtools_Fastafile._fetch = (char *(*)(struct __pyx_obj_9csamtools_Fastafile *, char *, int, int, int *))__pyx_f_9csamtools_9Fastafile__fetch; - if (PyType_Ready(&__pyx_type_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_9csamtools_Fastafile.tp_dict, __pyx_vtabptr_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Fastafile", (PyObject *)&__pyx_type_9csamtools_Fastafile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_Fastafile = &__pyx_type_9csamtools_Fastafile; - __pyx_vtabptr_9csamtools_Samfile = &__pyx_vtable_9csamtools_Samfile; - __pyx_vtable_9csamtools_Samfile._buildHeader = (bam_header_t *(*)(struct __pyx_obj_9csamtools_Samfile *, PyObject *))__pyx_f_9csamtools_7Samfile__buildHeader; - __pyx_vtable_9csamtools_Samfile.getCurrent = (bam1_t *(*)(struct __pyx_obj_9csamtools_Samfile *))__pyx_f_9csamtools_7Samfile_getCurrent; - __pyx_vtable_9csamtools_Samfile.cnext = (int (*)(struct __pyx_obj_9csamtools_Samfile *))__pyx_f_9csamtools_7Samfile_cnext; - if (PyType_Ready(&__pyx_type_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_Samfile, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_9csamtools_7Samfile_20__next__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_9csamtools_7Samfile_20__next__.doc = __pyx_doc_9csamtools_7Samfile_20__next__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_7Samfile_20__next__; - } - } - if (__Pyx_SetVtable(__pyx_type_9csamtools_Samfile.tp_dict, __pyx_vtabptr_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Samfile", (PyObject *)&__pyx_type_9csamtools_Samfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_Samfile = &__pyx_type_9csamtools_Samfile; - if (PyType_Ready(&__pyx_type_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IteratorRow", (PyObject *)&__pyx_type_9csamtools_IteratorRow) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IteratorRow = &__pyx_type_9csamtools_IteratorRow; - __pyx_vtabptr_9csamtools_IteratorRowRegion = &__pyx_vtable_9csamtools_IteratorRowRegion; - __pyx_vtable_9csamtools_IteratorRowRegion.getCurrent = (bam1_t *(*)(struct __pyx_obj_9csamtools_IteratorRowRegion *))__pyx_f_9csamtools_17IteratorRowRegion_getCurrent; - __pyx_vtable_9csamtools_IteratorRowRegion.cnext = (int (*)(struct __pyx_obj_9csamtools_IteratorRowRegion *))__pyx_f_9csamtools_17IteratorRowRegion_cnext; - __pyx_type_9csamtools_IteratorRowRegion.tp_base = __pyx_ptype_9csamtools_IteratorRow; - if (PyType_Ready(&__pyx_type_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorRowRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_9csamtools_17IteratorRowRegion_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_9csamtools_17IteratorRowRegion_2__next__.doc = __pyx_doc_9csamtools_17IteratorRowRegion_2__next__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_17IteratorRowRegion_2__next__; - } - } - if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorRowRegion.tp_dict, __pyx_vtabptr_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IteratorRowRegion", (PyObject *)&__pyx_type_9csamtools_IteratorRowRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IteratorRowRegion = &__pyx_type_9csamtools_IteratorRowRegion; - __pyx_vtabptr_9csamtools_IteratorRowAll = &__pyx_vtable_9csamtools_IteratorRowAll; - __pyx_vtable_9csamtools_IteratorRowAll.getCurrent = (bam1_t *(*)(struct __pyx_obj_9csamtools_IteratorRowAll *))__pyx_f_9csamtools_14IteratorRowAll_getCurrent; - __pyx_vtable_9csamtools_IteratorRowAll.cnext = (int (*)(struct __pyx_obj_9csamtools_IteratorRowAll *))__pyx_f_9csamtools_14IteratorRowAll_cnext; - __pyx_type_9csamtools_IteratorRowAll.tp_base = __pyx_ptype_9csamtools_IteratorRow; - if (PyType_Ready(&__pyx_type_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorRowAll, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_9csamtools_14IteratorRowAll_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_9csamtools_14IteratorRowAll_2__next__.doc = __pyx_doc_9csamtools_14IteratorRowAll_2__next__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_14IteratorRowAll_2__next__; - } - } - if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorRowAll.tp_dict, __pyx_vtabptr_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAll", (PyObject *)&__pyx_type_9csamtools_IteratorRowAll) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IteratorRowAll = &__pyx_type_9csamtools_IteratorRowAll; - __pyx_type_9csamtools_IteratorRowAllRefs.tp_base = __pyx_ptype_9csamtools_IteratorRow; - if (PyType_Ready(&__pyx_type_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorRowAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_9csamtools_18IteratorRowAllRefs_3__next__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_9csamtools_18IteratorRowAllRefs_3__next__.doc = __pyx_doc_9csamtools_18IteratorRowAllRefs_3__next__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_18IteratorRowAllRefs_3__next__; - } - } - if (__Pyx_SetAttrString(__pyx_m, "IteratorRowAllRefs", (PyObject *)&__pyx_type_9csamtools_IteratorRowAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IteratorRowAllRefs = &__pyx_type_9csamtools_IteratorRowAllRefs; - __pyx_vtabptr_9csamtools_IteratorColumn = &__pyx_vtable_9csamtools_IteratorColumn; - __pyx_vtable_9csamtools_IteratorColumn.cnext = (int (*)(struct __pyx_obj_9csamtools_IteratorColumn *))__pyx_f_9csamtools_14IteratorColumn_cnext; - __pyx_vtable_9csamtools_IteratorColumn.getSequence = (char *(*)(struct __pyx_obj_9csamtools_IteratorColumn *))__pyx_f_9csamtools_14IteratorColumn_getSequence; - __pyx_vtable_9csamtools_IteratorColumn.setMask = (PyObject *(*)(struct __pyx_obj_9csamtools_IteratorColumn *, PyObject *))__pyx_f_9csamtools_14IteratorColumn_setMask; - __pyx_vtable_9csamtools_IteratorColumn.setupIteratorData = (PyObject *(*)(struct __pyx_obj_9csamtools_IteratorColumn *, int, int, int, struct __pyx_opt_args_9csamtools_14IteratorColumn_setupIteratorData *__pyx_optional_args))__pyx_f_9csamtools_14IteratorColumn_setupIteratorData; - __pyx_vtable_9csamtools_IteratorColumn.reset = (PyObject *(*)(struct __pyx_obj_9csamtools_IteratorColumn *, PyObject *, PyObject *, PyObject *))__pyx_f_9csamtools_14IteratorColumn_reset; - if (PyType_Ready(&__pyx_type_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorColumn.tp_dict, __pyx_vtabptr_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IteratorColumn", (PyObject *)&__pyx_type_9csamtools_IteratorColumn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IteratorColumn = &__pyx_type_9csamtools_IteratorColumn; - __pyx_vtabptr_9csamtools_IteratorColumnRegion = &__pyx_vtable_9csamtools_IteratorColumnRegion; - __pyx_vtable_9csamtools_IteratorColumnRegion.__pyx_base = *__pyx_vtabptr_9csamtools_IteratorColumn; - __pyx_type_9csamtools_IteratorColumnRegion.tp_base = __pyx_ptype_9csamtools_IteratorColumn; - if (PyType_Ready(&__pyx_type_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorColumnRegion, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_9csamtools_20IteratorColumnRegion_1__next__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_9csamtools_20IteratorColumnRegion_1__next__.doc = __pyx_doc_9csamtools_20IteratorColumnRegion_1__next__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_20IteratorColumnRegion_1__next__; - } - } - if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorColumnRegion.tp_dict, __pyx_vtabptr_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnRegion", (PyObject *)&__pyx_type_9csamtools_IteratorColumnRegion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IteratorColumnRegion = &__pyx_type_9csamtools_IteratorColumnRegion; - __pyx_vtabptr_9csamtools_IteratorColumnAllRefs = &__pyx_vtable_9csamtools_IteratorColumnAllRefs; - __pyx_vtable_9csamtools_IteratorColumnAllRefs.__pyx_base = *__pyx_vtabptr_9csamtools_IteratorColumn; - __pyx_type_9csamtools_IteratorColumnAllRefs.tp_base = __pyx_ptype_9csamtools_IteratorColumn; - if (PyType_Ready(&__pyx_type_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorColumnAllRefs, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_9csamtools_21IteratorColumnAllRefs_1__next__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_9csamtools_21IteratorColumnAllRefs_1__next__.doc = __pyx_doc_9csamtools_21IteratorColumnAllRefs_1__next__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_21IteratorColumnAllRefs_1__next__; - } - } - if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorColumnAllRefs.tp_dict, __pyx_vtabptr_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IteratorColumnAllRefs", (PyObject *)&__pyx_type_9csamtools_IteratorColumnAllRefs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IteratorColumnAllRefs = &__pyx_type_9csamtools_IteratorColumnAllRefs; - if (PyType_Ready(&__pyx_type_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "SNPCall", (PyObject *)&__pyx_type_9csamtools_SNPCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_SNPCall = &__pyx_type_9csamtools_SNPCall; - __pyx_vtabptr_9csamtools_SNPCallerBase = &__pyx_vtable_9csamtools_SNPCallerBase; - __pyx_vtable_9csamtools_SNPCallerBase.__dump = (PyObject *(*)(struct __pyx_obj_9csamtools_SNPCallerBase *, glf1_t *, uint32_t, int))__pyx_f_9csamtools_13SNPCallerBase___dump; - if (PyType_Ready(&__pyx_type_9csamtools_SNPCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_9csamtools_SNPCallerBase.tp_dict, __pyx_vtabptr_9csamtools_SNPCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "SNPCallerBase", (PyObject *)&__pyx_type_9csamtools_SNPCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_SNPCallerBase = &__pyx_type_9csamtools_SNPCallerBase; - __pyx_vtabptr_9csamtools_IteratorSNPCalls = &__pyx_vtable_9csamtools_IteratorSNPCalls; - __pyx_vtable_9csamtools_IteratorSNPCalls.__pyx_base = *__pyx_vtabptr_9csamtools_SNPCallerBase; - __pyx_type_9csamtools_IteratorSNPCalls.tp_base = __pyx_ptype_9csamtools_SNPCallerBase; - if (PyType_Ready(&__pyx_type_9csamtools_IteratorSNPCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorSNPCalls, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_9csamtools_16IteratorSNPCalls_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_9csamtools_16IteratorSNPCalls_2__next__.doc = __pyx_doc_9csamtools_16IteratorSNPCalls_2__next__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_16IteratorSNPCalls_2__next__; - } - } - if (__Pyx_SetVtable(__pyx_type_9csamtools_IteratorSNPCalls.tp_dict, __pyx_vtabptr_9csamtools_IteratorSNPCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IteratorSNPCalls", (PyObject *)&__pyx_type_9csamtools_IteratorSNPCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IteratorSNPCalls = &__pyx_type_9csamtools_IteratorSNPCalls; - __pyx_vtabptr_9csamtools_SNPCaller = &__pyx_vtable_9csamtools_SNPCaller; - __pyx_vtable_9csamtools_SNPCaller.__pyx_base = *__pyx_vtabptr_9csamtools_SNPCallerBase; - __pyx_type_9csamtools_SNPCaller.tp_base = __pyx_ptype_9csamtools_SNPCallerBase; - if (PyType_Ready(&__pyx_type_9csamtools_SNPCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_9csamtools_SNPCaller.tp_dict, __pyx_vtabptr_9csamtools_SNPCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "SNPCaller", (PyObject *)&__pyx_type_9csamtools_SNPCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_SNPCaller = &__pyx_type_9csamtools_SNPCaller; - if (PyType_Ready(&__pyx_type_9csamtools_IndelCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IndelCall", (PyObject *)&__pyx_type_9csamtools_IndelCall) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IndelCall = &__pyx_type_9csamtools_IndelCall; - if (PyType_Ready(&__pyx_type_9csamtools_IndelCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IndelCallerBase", (PyObject *)&__pyx_type_9csamtools_IndelCallerBase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IndelCallerBase = &__pyx_type_9csamtools_IndelCallerBase; - __pyx_type_9csamtools_IndelCaller.tp_base = __pyx_ptype_9csamtools_IndelCallerBase; - if (PyType_Ready(&__pyx_type_9csamtools_IndelCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "IndelCaller", (PyObject *)&__pyx_type_9csamtools_IndelCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IndelCaller = &__pyx_type_9csamtools_IndelCaller; - __pyx_type_9csamtools_IteratorIndelCalls.tp_base = __pyx_ptype_9csamtools_IndelCallerBase; - if (PyType_Ready(&__pyx_type_9csamtools_IteratorIndelCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_9csamtools_IteratorIndelCalls, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_9csamtools_18IteratorIndelCalls_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_9csamtools_18IteratorIndelCalls_2__next__.doc = __pyx_doc_9csamtools_18IteratorIndelCalls_2__next__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9csamtools_18IteratorIndelCalls_2__next__; - } - } - if (__Pyx_SetAttrString(__pyx_m, "IteratorIndelCalls", (PyObject *)&__pyx_type_9csamtools_IteratorIndelCalls) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_9csamtools_IteratorIndelCalls = &__pyx_type_9csamtools_IteratorIndelCalls; - /*--- Type import code ---*/ - __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /*--- Function import code ---*/ - /*--- Execution code ---*/ + * "PG" : ( "PN", "ID", "VN", "CL" ), } # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_n_s__PN)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__PN)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PN)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__ID)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__ID)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ID)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__VN)); + PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_n_s__VN)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VN)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__CL)); + PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__CL)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__CL)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__PG), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_ORDER, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":4 - * # cython: profile=True - * # adds doc-strings for sphinx - * import tempfile, os, sys, types, struct, ctypes, collections, re # <<<<<<<<<<<<<< + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":672 + * 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_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_k_27 = __pyx_t_2; + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":781 + * end = None, + * region = None, + * until_eof = False ): # <<<<<<<<<<<<<< + * '''*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)* * - * from cpython cimport PyString_FromStringAndSize, PyString_AS_STRING */ - __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__tempfile), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __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 = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_k_37 = __pyx_t_2; + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":1573 + * int tid = 0, + * int start = 0, + * int end = max_pos, # <<<<<<<<<<<<<< + * **kwargs ): + * + */ + __pyx_k_55 = __pyx_v_9csamtools_max_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2489 + * return self._level + * + * class Outs: # <<<<<<<<<<<<<< + * '''http://mail.python.org/pipermail/python-list/2000-June/038406.html''' + * def __init__(self, id = 1): + */ + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + if (PyDict_SetItemString(((PyObject *)__pyx_t_2), "__doc__", ((PyObject *)__pyx_kp_s_170)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2), __pyx_n_s__Outs, "csamtools"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2491 + * 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_4 = PyCFunction_New(&__pyx_mdef_9csamtools_4Outs___init__, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyMethod_New(__pyx_t_4, 0, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tempfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s____init__, __pyx_t_1) < 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; - __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2495 + * self.id = id + * + * def setdevice(self, filename): # <<<<<<<<<<<<<< + * '''open an existing file, like "/dev/null"''' + * fd = os.open(filename, os.O_WRONLY) + */ + __pyx_t_1 = PyCFunction_New(&__pyx_mdef_9csamtools_4Outs_setdevice, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyMethod_New(__pyx_t_1, 0, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s__setdevice, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2500 + * self.setfd(fd) + * + * def setfile(self, filename): # <<<<<<<<<<<<<< + * '''open a new file.''' + * fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660); + */ + __pyx_t_4 = PyCFunction_New(&__pyx_mdef_9csamtools_4Outs_setfile, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyMethod_New(__pyx_t_4, 0, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s__setfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__types), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2505 + * 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 = PyCFunction_New(&__pyx_mdef_9csamtools_4Outs_setfd, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyMethod_New(__pyx_t_1, 0, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__struct), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s__setfd, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2512 + * os.close(fd) # Close other unit (look out, caller.) + * + * def restore(self): # <<<<<<<<<<<<<< + * '''restore previous output stream''' + * if self.streams: + */ + __pyx_t_4 = PyCFunction_New(&__pyx_mdef_9csamtools_4Outs_restore, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyMethod_New(__pyx_t_4, 0, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__struct, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyObject_SetAttr(__pyx_t_3, __pyx_n_s__restore, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Outs, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2525 + * def _samtools_dispatch( method, + * args = (), + * catch_stdout = True, # <<<<<<<<<<<<<< + * catch_stderr = False, + * ): + */ + __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_k_95 = __pyx_t_2; + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2526 + * args = (), + * catch_stdout = True, + * catch_stderr = False, # <<<<<<<<<<<<<< + * ): + * '''call ``method`` in samtools providing arguments in args. + */ + __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_k_96 = __pyx_t_2; + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":3157 + * return self._call() + * + * __all__ = ["Samfile", # <<<<<<<<<<<<<< + * "Fastafile", + * "IteratorRow", + */ + __pyx_t_2 = PyList_New(12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__Samfile)); + PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__Samfile)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Samfile)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__Fastafile)); + PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__Fastafile)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Fastafile)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorRow)); + PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_s__IteratorRow)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorRow)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorColumn)); + PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__IteratorColumn)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorColumn)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__AlignedRead)); + PyList_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_s__AlignedRead)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__AlignedRead)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__PileupColumn)); + PyList_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_n_s__PileupColumn)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupColumn)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__PileupProxy)); + PyList_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_n_s__PileupProxy)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupProxy)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__PileupRead)); + PyList_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_n_s__PileupRead)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupRead)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorSNPCalls)); + PyList_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_s__IteratorSNPCalls)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorSNPCalls)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__SNPCaller)); + PyList_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_s__SNPCaller)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SNPCaller)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__IndelCaller)); + PyList_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_n_s__IndelCaller)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IndelCaller)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorIndelCalls)); + PyList_SET_ITEM(__pyx_t_2, 11, ((PyObject *)__pyx_n_s__IteratorIndelCalls)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorIndelCalls)); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/csamtools.pyx":2 + * # cython: embedsignature=True + * # cython: profile=True # <<<<<<<<<<<<<< + * # adds doc-strings for sphinx + * import tempfile, os, sys, types, struct, ctypes, collections, re + */ + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Fastafile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_171), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Fastafile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_172), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Fastafile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__fetch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_173), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_174), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___hasIndex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_175), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_176), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__getrname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_177), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__gettid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_178), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_179), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__seek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_180), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__tell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_181), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__fetch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_182), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__mate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_183), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_184), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__pileup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_Import(((PyObject *)__pyx_n_s__collections), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_185), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_Import(((PyObject *)__pyx_n_s__re), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_186), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":52 - * ##################################################################### - * # hard-coded constants - * cdef char * bam_nt16_rev_table = "=ACMGRSVTWYHKDBN" # <<<<<<<<<<<<<< - * cdef int max_pos = 2 << 29 - * - */ - __pyx_v_9csamtools_bam_nt16_rev_table = __pyx_k_227; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":53 - * # hard-coded constants - * cdef char * bam_nt16_rev_table = "=ACMGRSVTWYHKDBN" - * cdef int max_pos = 2 << 29 # <<<<<<<<<<<<<< - * - * # redirect stderr to 0 - */ - __pyx_v_9csamtools_max_pos = 1073741824; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":56 - * - * # redirect stderr to 0 - * _logfile = open("/dev/null", "w") # <<<<<<<<<<<<<< - * pysam_set_stderr( PyFile_AsFile( _logfile ) ) - * - */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_k_tuple_229), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_187), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___buildLine); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___logfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":57 - * # redirect stderr to 0 - * _logfile = open("/dev/null", "w") - * pysam_set_stderr( PyFile_AsFile( _logfile ) ) # <<<<<<<<<<<<<< - * - * ##################################################################### - */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___logfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_188), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Samfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____next__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - pysam_set_stderr(PyFile_AsFile(__pyx_t_1)); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":106 - * (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 = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":119 - * 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_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_12PileupColumn_0__str__, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __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 = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":106 - * (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 = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__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_230)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s__PileupColumn, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PileupColumn, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_189), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":163 - * return 0 - * - * class StderrStore(): # <<<<<<<<<<<<<< - * ''' - * stderr is captured. - */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":167 - * stderr is captured. - * ''' - * def __init__(self): # <<<<<<<<<<<<<< - * return - * self.stderr_h, self.stderr_f = tempfile.mkstemp() - */ - __pyx_t_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_11StderrStore_0__init__, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__IteratorRowRegion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____next__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":173 - * self.stderr_save.setfd( self.stderr_h ) - * - * def readAndRelease( self ): # <<<<<<<<<<<<<< - * return [] - * self.stderr_save.restore() - */ - __pyx_t_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_11StderrStore_1readAndRelease, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__readAndRelease, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_190), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":182 - * return lines - * - * def release(self): # <<<<<<<<<<<<<< - * return - * self.stderr_save.restore() - */ - __pyx_t_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_11StderrStore_2release, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__IteratorRowAll); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__release, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____next__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":188 - * os.remove( self.stderr_f ) - * - * def __del__(self): # <<<<<<<<<<<<<< - * self.release() - * - */ - __pyx_t_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_11StderrStore_3__del__, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____del__, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_191), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":163 - * return 0 - * - * class StderrStore(): # <<<<<<<<<<<<<< - * ''' - * stderr is captured. - */ - if (PyDict_SetItemString(((PyObject *)__pyx_t_1), "__doc__", ((PyObject *)__pyx_kp_s_231)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s__StderrStore, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__IteratorRowAllRefs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__StderrStore, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____next__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_1)); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":195 - * ###################################################################### - * # valid types for sam headers - * VALID_HEADER_TYPES = { "HD" : dict, # <<<<<<<<<<<<<< - * "SQ" : list, - * "RG" : list, - */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__HD), ((PyObject *)((PyObject*)(&PyDict_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":196 - * # valid types for sam headers - * VALID_HEADER_TYPES = { "HD" : dict, - * "SQ" : list, # <<<<<<<<<<<<<< - * "RG" : list, - * "PG" : list, - */ - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":197 - * VALID_HEADER_TYPES = { "HD" : dict, - * "SQ" : list, - * "RG" : list, # <<<<<<<<<<<<<< - * "PG" : list, - * "CO" : list } - */ - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__RG), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":198 - * "SQ" : list, - * "RG" : list, - * "PG" : list, # <<<<<<<<<<<<<< - * "CO" : list } - * - */ - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PG), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":199 - * "RG" : list, - * "PG" : list, - * "CO" : list } # <<<<<<<<<<<<<< - * - * # order of records within sam headers - */ - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__CO), ((PyObject *)((PyObject*)(&PyList_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_TYPES, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":202 - * - * # 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_232)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":205 - * - * # 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, }, - */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__GO), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":206 - * # 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, }, - * "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str }, } - */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__LN), ((PyObject *)((PyObject*)(&PyInt_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__AS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__M5), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__UR), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SP), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":207 - * 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, }, # <<<<<<<<<<<<<< - * "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str }, } - * - */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__SM), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__LB), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__DS), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__PU), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__PI), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__CN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__DT), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__PL), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":208 - * "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, }, - * "PG" : { "PN" : str, "ID" : str, "VN" : str, "CL" : str }, } # <<<<<<<<<<<<<< - * - * # output order of fields within records - */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__PN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__ID), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__VN), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__CL), ((PyObject *)((PyObject*)(&PyString_Type)))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_FIELDS, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":211 - * - * # 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" ), - */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__HD), ((PyObject *)__pyx_k_tuple_233)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":212 - * # 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" ), - * "PG" : ( "PN", "ID", "VN", "CL" ), } - */ - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__SQ), ((PyObject *)__pyx_k_tuple_234)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":213 - * VALID_HEADER_ORDER = { "HD" : ( "VN", "SO", "GO" ), - * "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ), - * "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL" ), # <<<<<<<<<<<<<< - * "PG" : ( "PN", "ID", "VN", "CL" ), } - * - */ - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__RG), ((PyObject *)__pyx_k_tuple_235)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":214 - * "SQ" : ( "SN", "LN", "AS", "M5" , "UR" , "SP" ), - * "RG" : ( "ID", "SM", "LB", "DS" , "PU" , "PI" , "CN" , "DT", "PL" ), - * "PG" : ( "PN", "ID", "VN", "CL" ), } # <<<<<<<<<<<<<< - * - * - */ - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__PG), ((PyObject *)__pyx_k_tuple_236)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALID_HEADER_ORDER, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":672 - * 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_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_192), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__IteratorColumn); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addReference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_41 = __pyx_t_1; - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":781 - * end = None, - * region = None, - * until_eof = False ): # <<<<<<<<<<<<<< - * '''*(reference = None, start = None, end = None, region = None, callback = None, until_eof = False)* - * - */ - __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_193), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__IteratorColumn); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__hasReference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_61 = __pyx_t_1; - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":1573 - * int tid = 0, - * int start = 0, - * int end = max_pos, # <<<<<<<<<<<<<< - * **kwargs ): - * - */ - __pyx_k_104 = __pyx_v_9csamtools_max_pos; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2489 - * return self._level - * - * class Outs: # <<<<<<<<<<<<<< - * '''http://mail.python.org/pipermail/python-list/2000-June/038406.html''' - * def __init__(self, id = 1): - */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2491 - * 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_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_4Outs_0__init__, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s____init__, __pyx_t_3) < 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 (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_194), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2495 - * self.id = id - * - * def setdevice(self, filename): # <<<<<<<<<<<<<< - * '''open an existing file, like "/dev/null"''' - * fd = os.open(filename, os.O_WRONLY) - */ - __pyx_t_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_4Outs_1setdevice, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s_196); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__setdevice, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____next__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2500 - * self.setfd(fd) - * - * def setfile(self, filename): # <<<<<<<<<<<<<< - * '''open a new file.''' - * fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0660); - */ - __pyx_t_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_4Outs_2setfile, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__setfile, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_195), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2505 - * self.setfd(fd) - * - * def setfd(self, fd): # <<<<<<<<<<<<<< - * ofd = os.dup(self.id) # Save old stream on new unit. - * self.streams.append(ofd) - */ - __pyx_t_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_4Outs_3setfd, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s_198); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__setfd, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____next__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2512 - * os.close(fd) # Close other unit (look out, caller.) - * - * def restore(self): # <<<<<<<<<<<<<< - * '''restore previous output stream''' - * if self.streams: - */ - __pyx_t_3 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9csamtools_4Outs_4restore, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetItem(__pyx_t_1, __pyx_n_s__restore, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_197), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2489 - * 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_1), "__doc__", ((PyObject *)__pyx_kp_s_237)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1), __pyx_n_s__Outs, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__AlignedRead); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Outs, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____str__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_1)); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2525 - * def _samtools_dispatch( method, - * args = (), - * catch_stdout = True, # <<<<<<<<<<<<<< - * catch_stderr = False, - * ): - */ - __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_199), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__AlignedRead); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__compare); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_149 = __pyx_t_1; - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2526 - * args = (), - * catch_stdout = True, - * catch_stderr = False, # <<<<<<<<<<<<<< - * ): - * '''call ``method`` in samtools providing arguments in args. - */ - __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_200), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__AlignedRead); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__opt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_150 = __pyx_t_1; - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2523 - * del self.streams[-1] - * - * def _samtools_dispatch( method, # <<<<<<<<<<<<<< - * args = (), - * catch_stdout = True, - */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9csamtools_0_samtools_dispatch, NULL, __pyx_n_s__csamtools); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_201), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__AlignedRead); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__fancy_str); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s___samtools_dispatch, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_202), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Outs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__setdevice); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_203), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Outs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__setfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_204), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Outs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__restore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_1, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_205), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s___samtools_dispatch); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_206), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_GetAttr(__pyx_m, __pyx_n_s__IteratorSNPCalls); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____next__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_207), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_GetAttr(__pyx_m, __pyx_n_s__SNPCaller); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__call); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_208), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_GetAttr(__pyx_m, __pyx_n_s__IndelCaller); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__call); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_209), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_GetAttr(__pyx_m, __pyx_n_s__IteratorIndelCalls); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____next__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __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_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_210), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":3157 - * return self._call() - * - * __all__ = ["Samfile", # <<<<<<<<<<<<<< - * "Fastafile", - * "IteratorRow", - */ - __pyx_t_1 = PyList_New(12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__Samfile)); - PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Samfile)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Samfile)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__Fastafile)); - PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__Fastafile)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Fastafile)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorRow)); - PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__IteratorRow)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorRow)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorColumn)); - PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__IteratorColumn)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorColumn)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__AlignedRead)); - PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_s__AlignedRead)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__AlignedRead)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__PileupColumn)); - PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_s__PileupColumn)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupColumn)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__PileupProxy)); - PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_s__PileupProxy)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupProxy)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__PileupRead)); - PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_s__PileupRead)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PileupRead)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorSNPCalls)); - PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_s__IteratorSNPCalls)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorSNPCalls)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__SNPCaller)); - PyList_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_n_s__SNPCaller)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SNPCaller)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__IndelCaller)); - PyList_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_n_s__IndelCaller)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IndelCaller)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__IteratorIndelCalls)); - PyList_SET_ITEM(__pyx_t_1, 11, ((PyObject *)__pyx_n_s__IteratorIndelCalls)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IteratorIndelCalls)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - - /* "/home/andreas/pysam/pysam/pysam/csamtools.pyx":2 - * # cython: embedsignature=True - * # cython: profile=True # <<<<<<<<<<<<<< - * # adds doc-strings for sphinx - * import tempfile, os, sys, types, struct, ctypes, collections, re - */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - - /* "/usr/lib64/python2.7/site-packages/Cython/Includes/cpython/iterator.pxd":1 + /* "/cpp-software/lib/python2.6/site-packages/Cython/Includes/cpython/iterator.pxd":1 * cdef extern from "Python.h": # <<<<<<<<<<<<<< * * ############################################################################ @@ -34395,6 +34286,7 @@ PyMODINIT_FUNC PyInit_csamtools(void) __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); if (__pyx_m) { __Pyx_AddTraceback("init csamtools"); Py_DECREF(__pyx_m); __pyx_m = 0; @@ -34481,10 +34373,10 @@ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const cha __pyx_empty_bytes /*PyObject *lnotab*/ ); -bad: +bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); - + return py_code; } @@ -34748,6 +34640,10 @@ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed } +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable"); } @@ -34869,92 +34765,31 @@ bad: return module; } -static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { - PyObject *metaclass; - /* Default metaclass */ -#if PY_MAJOR_VERSION < 3 - if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { - PyObject *base = PyTuple_GET_ITEM(bases, 0); - metaclass = PyObject_GetAttrString(base, "__class__"); - if (!metaclass) { - PyErr_Clear(); - metaclass = (PyObject*) Py_TYPE(base); - } - } else { - metaclass = (PyObject *) &PyClass_Type; - } -#else - if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { - PyObject *base = PyTuple_GET_ITEM(bases, 0); - metaclass = (PyObject*) Py_TYPE(base); - } else { - metaclass = (PyObject *) &PyType_Type; - } -#endif - Py_INCREF(metaclass); - return metaclass; -} - -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *modname) { - PyObject *result; - PyObject *metaclass; - - if (PyDict_SetItemString(dict, "__module__", modname) < 0) - return NULL; +static PyObject *__Pyx_CreateClass( + PyObject *bases, PyObject *dict, PyObject *name, const char *modname) +{ + PyObject *py_modname; + PyObject *result = 0; - /* Python2 __metaclass__ */ - metaclass = PyDict_GetItemString(dict, "__metaclass__"); - if (metaclass) { - Py_INCREF(metaclass); - } else { - metaclass = __Pyx_FindPy2Metaclass(bases); - } - result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); - Py_DECREF(metaclass); + #if PY_MAJOR_VERSION < 3 + py_modname = PyString_FromString(modname); + #else + py_modname = PyUnicode_FromString(modname); + #endif + if (!py_modname) + goto bad; + if (PyDict_SetItemString(dict, "__module__", py_modname) < 0) + goto bad; + #if PY_MAJOR_VERSION < 3 + result = PyClass_New(bases, dict, name); + #else + result = PyObject_CallFunctionObjArgs((PyObject *)&PyType_Type, name, bases, dict, NULL); + #endif +bad: + Py_XDECREF(py_modname); return result; } - -PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) { - __pyx_binding_PyCFunctionType_object *op = PyObject_GC_New(__pyx_binding_PyCFunctionType_object, __pyx_binding_PyCFunctionType); - if (op == NULL) - return NULL; - op->func.m_ml = ml; - Py_XINCREF(self); - op->func.m_self = self; - Py_XINCREF(module); - op->func.m_module = module; - PyObject_GC_Track(op); - return (PyObject *)op; -} - -static void __pyx_binding_PyCFunctionType_dealloc(__pyx_binding_PyCFunctionType_object *m) { - PyObject_GC_UnTrack(m); - Py_XDECREF(m->func.m_self); - Py_XDECREF(m->func.m_module); - PyObject_GC_Del(m); -} - -static PyObject *__pyx_binding_PyCFunctionType_descr_get(PyObject *func, PyObject *obj, PyObject *type) { - if (obj == Py_None) - obj = NULL; - return PyMethod_New(func, obj, type); -} - -int __pyx_binding_PyCFunctionType_init(void) { - __pyx_binding_PyCFunctionType_type = PyCFunction_Type; - __pyx_binding_PyCFunctionType_type.tp_name = __Pyx_NAMESTR("cython_binding_builtin_function_or_method"); - __pyx_binding_PyCFunctionType_type.tp_dealloc = (destructor)__pyx_binding_PyCFunctionType_dealloc; - __pyx_binding_PyCFunctionType_type.tp_descr_get = __pyx_binding_PyCFunctionType_descr_get; - if (PyType_Ready(&__pyx_binding_PyCFunctionType_type) < 0) { - return -1; - } - __pyx_binding_PyCFunctionType = &__pyx_binding_PyCFunctionType_type; - return 0; - -} - static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t val) { const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0; const int is_unsigned = const_zero < neg_one; @@ -34975,7 +34810,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t val) { } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; - return _PyLong_FromByteArray(bytes, sizeof(uint32_t), + return _PyLong_FromByteArray(bytes, sizeof(uint32_t), little, !is_unsigned); } } @@ -35162,7 +34997,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int32_t(int32_t val) { } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; - return _PyLong_FromByteArray(bytes, sizeof(int32_t), + return _PyLong_FromByteArray(bytes, sizeof(int32_t), little, !is_unsigned); } } @@ -35187,7 +35022,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int64_t(int64_t val) { } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; - return _PyLong_FromByteArray(bytes, sizeof(int64_t), + return _PyLong_FromByteArray(bytes, sizeof(int64_t), little, !is_unsigned); } } @@ -35264,7 +35099,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint8_t(uint8_t val) { } else { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; - return _PyLong_FromByteArray(bytes, sizeof(uint8_t), + return _PyLong_FromByteArray(bytes, sizeof(uint8_t), little, !is_unsigned); } } @@ -35904,13 +35739,13 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class if (!result) goto bad; if (!PyType_Check(result)) { - PyErr_Format(PyExc_TypeError, + PyErr_Format(PyExc_TypeError, "%s.%s is not a type object", module_name, class_name); goto bad; } if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) { - PyOS_snprintf(warning, sizeof(warning), + PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility", module_name, class_name); #if PY_VERSION_HEX < 0x02050000 @@ -35920,7 +35755,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class #endif } else if (((PyTypeObject *)result)->tp_basicsize != size) { - PyErr_Format(PyExc_ValueError, + PyErr_Format(PyExc_ValueError, "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; diff --git a/pysam/ctabix.c b/pysam/ctabix.c new file mode 100644 index 0000000..e0866c8 --- /dev/null +++ b/pysam/ctabix.c @@ -0,0 +1,12808 @@ +/* Generated by Cython 0.13 on Fri Feb 11 09:01:45 2011 */ + +#define PY_SSIZE_T_CLEAN +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#else + +#include /* For offsetof */ +#ifndef offsetof +#define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif + +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif + +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif + +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif + +#if PY_VERSION_HEX < 0x02040000 + #define METH_COEXIST 0 + #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) + #define PyDict_Contains(d,o) PySequence_Contains(d,o) +#endif + +#if PY_VERSION_HEX < 0x02050000 + typedef int Py_ssize_t; + #define PY_SSIZE_T_MAX INT_MAX + #define PY_SSIZE_T_MIN INT_MIN + #define PY_FORMAT_SIZE_T "" + #define PyInt_FromSsize_t(z) PyInt_FromLong(z) + #define PyInt_AsSsize_t(o) PyInt_AsLong(o) + #define PyNumber_Index(o) PyNumber_Int(o) + #define PyIndex_Check(o) PyNumber_Check(o) + #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) +#endif + +#if PY_VERSION_HEX < 0x02060000 + #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) + #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) + #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) + #define PyVarObject_HEAD_INIT(type, size) \ + PyObject_HEAD_INIT(type) size, + #define PyType_Modified(t) + + typedef struct { + void *buf; + PyObject *obj; + Py_ssize_t len; + Py_ssize_t itemsize; + int readonly; + int ndim; + char *format; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + void *internal; + } Py_buffer; + + #define PyBUF_SIMPLE 0 + #define PyBUF_WRITABLE 0x0001 + #define PyBUF_FORMAT 0x0004 + #define PyBUF_ND 0x0008 + #define PyBUF_STRIDES (0x0010 | PyBUF_ND) + #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) + #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) + #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) + #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) + +#endif + +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#endif + +#if PY_MAJOR_VERSION >= 3 + #define Py_TPFLAGS_CHECKTYPES 0 + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif + +#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif + +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#endif + +#if PY_VERSION_HEX < 0x02060000 + #define PyBytesObject PyStringObject + #define PyBytes_Type PyString_Type + #define PyBytes_Check PyString_Check + #define PyBytes_CheckExact PyString_CheckExact + #define PyBytes_FromString PyString_FromString + #define PyBytes_FromStringAndSize PyString_FromStringAndSize + #define PyBytes_FromFormat PyString_FromFormat + #define PyBytes_DecodeEscape PyString_DecodeEscape + #define PyBytes_AsString PyString_AsString + #define PyBytes_AsStringAndSize PyString_AsStringAndSize + #define PyBytes_Size PyString_Size + #define PyBytes_AS_STRING PyString_AS_STRING + #define PyBytes_GET_SIZE PyString_GET_SIZE + #define PyBytes_Repr PyString_Repr + #define PyBytes_Concat PyString_Concat + #define PyBytes_ConcatAndDel PyString_ConcatAndDel + #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) + #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) +#endif + +#ifndef PySet_CheckExact +# define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif + +#if PY_MAJOR_VERSION >= 3 + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask +#endif + +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif + + +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif + +#if PY_MAJOR_VERSION >= 3 + #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) +#endif + +#if PY_VERSION_HEX < 0x02050000 + #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) + #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) + #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) +#else + #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) + #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) + #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) +#endif + +#if PY_VERSION_HEX < 0x02050000 + #define __Pyx_NAMESTR(n) ((char *)(n)) + #define __Pyx_DOCSTR(n) ((char *)(n)) +#else + #define __Pyx_NAMESTR(n) (n) + #define __Pyx_DOCSTR(n) (n) +#endif + +#ifdef __cplusplus +#define __PYX_EXTERN_C extern "C" +#else +#define __PYX_EXTERN_C extern +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) +#define _USE_MATH_DEFINES +#endif +#include +#define __PYX_HAVE_API__ctabix +#include "string.h" +#include "stdlib.h" +#include "stdio.h" +#include "ctype.h" +#include "sys/types.h" +#include "sys/stat.h" +#include "fcntl.h" +#include "unistd.h" +#include "stdint.h" +#include "bgzf.h" +#include "tabix.h" + +/* inline attribute */ +#ifndef CYTHON_INLINE + #if defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +/* unused attribute */ +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || defined(__INTEL_COMPILER) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif + +typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ + + +/* Type Conversion Predeclarations */ + +#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) +#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) + +#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); + +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); + +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) + + +#ifdef __GNUC__ +/* Test for GCC > 2.95 */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) +#define likely(x) __builtin_expect(!!(x), 1) +#define unlikely(x) __builtin_expect(!!(x), 0) +#else /* __GNUC__ > 2 ... */ +#define likely(x) (x) +#define unlikely(x) (x) +#endif /* __GNUC__ > 2 ... */ +#else /* __GNUC__ */ +#define likely(x) (x) +#define unlikely(x) (x) +#endif /* __GNUC__ */ + +static PyObject *__pyx_m; +static PyObject *__pyx_b; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + + +static const char *__pyx_f[] = { + "ctabix.pyx", +}; + +/* Type declarations */ + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":215 + * return str(v) + * + * cdef class TupleProxy: # <<<<<<<<<<<<<< + * '''Proxy class for access to parsed row as a tuple. + * + */ + +struct __pyx_obj_6ctabix_TupleProxy { + PyObject_HEAD + struct __pyx_vtabstruct_6ctabix_TupleProxy *__pyx_vtab; + char *data; + char **fields; + int nfields; + int index; +}; + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":668 + * self.fromDict( r ) + * + * cdef class Parser: # <<<<<<<<<<<<<< + * pass + * + */ + +struct __pyx_obj_6ctabix_Parser { + PyObject_HEAD +}; + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":156 + * return result + * + * cdef class TabixIterator: # <<<<<<<<<<<<<< + * """iterates over rows in *tabixfile* in region + * given by *tid*, *start* and *end*. + */ + +struct __pyx_obj_6ctabix_TabixIterator { + PyObject_HEAD + ti_iter_t iterator; + tabix_t *tabixfile; +}; + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":689 + * return r + * + * cdef class TabixIteratorParsed: # <<<<<<<<<<<<<< + * """iterates over mapped reads in a region. + * """ + */ + +struct __pyx_obj_6ctabix_TabixIteratorParsed { + PyObject_HEAD + ti_iter_t iterator; + tabix_t *tabixfile; + struct __pyx_obj_6ctabix_Parser *parser; +}; + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":6 + * import tempfile, os, sys, types, itertools, struct, ctypes + * + * cdef class Tabixfile: # <<<<<<<<<<<<<< + * '''*(filename, mode='r')* + * + */ + +struct __pyx_obj_6ctabix_Tabixfile { + PyObject_HEAD + char *filename; + tabix_t *tabixfile; +}; + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":326 + * return self.fields[self.index-1] + * + * cdef class GTFProxy: # <<<<<<<<<<<<<< + * '''Proxy class for access to GTF fields. + * + */ + +struct __pyx_obj_6ctabix_GTFProxy { + PyObject_HEAD + struct __pyx_vtabstruct_6ctabix_GTFProxy *__pyx_vtab; + char *contig; + char *source; + char *feature; + uint32_t start; + uint32_t end; + char *score; + char *strand; + char *frame; + char *attributes; + int nbytes; + char *data; + int isModified; + int hasOwnAttributes; +}; + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":681 + * return r + * + * cdef class asGTF(Parser): # <<<<<<<<<<<<<< + * '''converts a :term:`tabix row` into a GTF record.''' + * def __call__(self, char * buffer, int len): + */ + +struct __pyx_obj_6ctabix_asGTF { + struct __pyx_obj_6ctabix_Parser __pyx_base; +}; + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":671 + * pass + * + * cdef class asTuple(Parser): # <<<<<<<<<<<<<< + * '''converts a :term:`tabix row` into a python tuple.''' + * def __call__(self, char * buffer, int len): + */ + +struct __pyx_obj_6ctabix_asTuple { + struct __pyx_obj_6ctabix_Parser __pyx_base; +}; + + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":215 + * return str(v) + * + * cdef class TupleProxy: # <<<<<<<<<<<<<< + * '''Proxy class for access to parsed row as a tuple. + * + */ + +struct __pyx_vtabstruct_6ctabix_TupleProxy { + PyObject *(*take)(struct __pyx_obj_6ctabix_TupleProxy *, char *, size_t); + PyObject *(*present)(struct __pyx_obj_6ctabix_TupleProxy *, char *, size_t); + PyObject *(*copy)(struct __pyx_obj_6ctabix_TupleProxy *, char *, size_t); + PyObject *(*update)(struct __pyx_obj_6ctabix_TupleProxy *, char *, size_t); +}; +static struct __pyx_vtabstruct_6ctabix_TupleProxy *__pyx_vtabptr_6ctabix_TupleProxy; + + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":326 + * return self.fields[self.index-1] + * + * cdef class GTFProxy: # <<<<<<<<<<<<<< + * '''Proxy class for access to GTF fields. + * + */ + +struct __pyx_vtabstruct_6ctabix_GTFProxy { + PyObject *(*take)(struct __pyx_obj_6ctabix_GTFProxy *, char *, size_t); + PyObject *(*present)(struct __pyx_obj_6ctabix_GTFProxy *, char *, size_t); + PyObject *(*copy)(struct __pyx_obj_6ctabix_GTFProxy *, char *, size_t); + PyObject *(*update)(struct __pyx_obj_6ctabix_GTFProxy *, char *, size_t); +}; +static struct __pyx_vtabstruct_6ctabix_GTFProxy *__pyx_vtabptr_6ctabix_GTFProxy; + +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif + +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule((char *)modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); + end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; + } + #define __Pyx_RefNannySetupContext(name) void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) + #define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0) +#else + #define __Pyx_RefNannySetupContext(name) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) +#endif /* CYTHON_REFNANNY */ +#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0) +#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0) + +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ + +static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, + const char* function_name, int kw_allowed); /*proto*/ + +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, PyObject* kw_name); /*proto*/ + +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ + +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/ + + +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} + + +#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_List_Fast(o, i) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) + +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) { + if (likely(o != Py_None)) { + if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { + PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); + Py_INCREF(r); + return r; + } + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_Tuple_Fast(o, i) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) + +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) { + if (likely(o != Py_None)) { + if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { + PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); + Py_INCREF(r); + return r; + } + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + + +#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_Fast(o, i) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) + +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) { + PyObject *r; + if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) { + r = PyList_GET_ITEM(o, i); + Py_INCREF(r); + } + else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { + r = PyTuple_GET_ITEM(o, i); + Py_INCREF(r); + } + else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) { + r = PySequence_GetItem(o, i); + } + else { + r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); + } + return r; +} + +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ +static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/ + +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact); /*proto*/ + +static CYTHON_INLINE long __Pyx_NegateNonNeg(long b) { return unlikely(b < 0) ? b : !b; } +static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) { + return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b); +} + +static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ + +#define __Pyx_PyObject_AsDouble(obj) \ + ((likely(PyFloat_CheckExact(obj))) ? \ + PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) + +static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void); + + +#if PY_MAJOR_VERSION >= 3 +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + if (unlikely(d == Py_None)) { + __Pyx_RaiseNoneIndexingError(); + return NULL; + } + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) + PyErr_SetObject(PyExc_KeyError, key); + return NULL; + } + Py_INCREF(value); + return value; +} +#else + #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#endif + +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ + +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ + +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + +static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t); + +static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject *); + +static CYTHON_INLINE int32_t __Pyx_PyInt_from_py_int32_t(PyObject *); + +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); + +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); + +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); + +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); + +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); + +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); + +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); + +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); + +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); + +static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); + +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); + +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); + +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); + +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); + +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); + +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); + +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ + +static void __Pyx_AddTraceback(const char *funcname); /*proto*/ + +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ +/* Module declarations from ctabix */ + +static PyTypeObject *__pyx_ptype_6ctabix_Tabixfile = 0; +static PyTypeObject *__pyx_ptype_6ctabix_TabixIterator = 0; +static PyTypeObject *__pyx_ptype_6ctabix_TupleProxy = 0; +static PyTypeObject *__pyx_ptype_6ctabix_GTFProxy = 0; +static PyTypeObject *__pyx_ptype_6ctabix_Parser = 0; +static PyTypeObject *__pyx_ptype_6ctabix_asTuple = 0; +static PyTypeObject *__pyx_ptype_6ctabix_asGTF = 0; +static PyTypeObject *__pyx_ptype_6ctabix_TabixIteratorParsed = 0; +#define __Pyx_MODULE_NAME "ctabix" +int __pyx_module_is_main_ctabix = 0; + +/* Implementation of ctabix */ +static PyObject *__pyx_builtin_IOError; +static PyObject *__pyx_builtin_ValueError; +static PyObject *__pyx_builtin_StopIteration; +static PyObject *__pyx_builtin_IndexError; +static PyObject *__pyx_builtin_TypeError; +static PyObject *__pyx_builtin_AttributeError; +static PyObject *__pyx_builtin_OSError; +static PyObject *__pyx_builtin_ord; +static PyObject *__pyx_builtin_KeyError; +static char __pyx_k_1[] = "invalid file opening mode `%s`"; +static char __pyx_k_2[] = ".tbi"; +static char __pyx_k_3[] = "file `%s` not found"; +static char __pyx_k_4[] = "index `%s` not found"; +static char __pyx_k_5[] = "could not open file `%s`"; +static char __pyx_k_6[] = "%s:%i-%i"; +static char __pyx_k_7[] = "invalid region `%s`"; +static char __pyx_k_8[] = "invalid region: start (%i) > end (%i)"; +static char __pyx_k_9[] = "start out of range (%i)"; +static char __pyx_k_10[] = "end out of range (%i)"; +static char __pyx_k_11[] = "I/O operation on closed file"; +static char __pyx_k_12[] = "malformatted query or wrong sequence name.\n"; +static char __pyx_k_13[] = "."; +static char __pyx_k_14[] = "\"%s\""; +static char __pyx_k_15[] = "incomplete line at %s"; +static char __pyx_k_16[] = "row too large - more than %i fields"; +static char __pyx_k_17[] = "list index out of range"; +static char __pyx_k_18[] = "malformatted entry at %s"; +static char __pyx_k_19[] = ";"; +static char __pyx_k_20[] = " "; +static char __pyx_k_21[] = "\""; +static char __pyx_k_22[] = "%s \"%s\""; +static char __pyx_k_23[] = "%s %s"; +static char __pyx_k_24[] = "; "; +static char __pyx_k_25[] = "\t"; +static char __pyx_k_26[] = ""; +static char __pyx_k_27[] = "'GTFProxy' has no attribute '%s'"; +static char __pyx_k_29[] = "Filename '%s' already exists, use *force* to overwrite"; +static char __pyx_k_30[] = "could not open '%s' for writing"; +static char __pyx_k_31[] = "could not open '%s' for reading"; +static char __pyx_k_32[] = "writing failed"; +static char __pyx_k_34[] = "#"; +static char __pyx_k_36[] = "No such file '%s'"; +static char __pyx_k_37[] = ".gz"; +static char __pyx_k_38[] = "Filename '%s.tbi' already exists, use *force* to overwrite"; +static char __pyx_k_39[] = "unknown preset '%s', valid presets are '%s'"; +static char __pyx_k_40[] = ","; +static char __pyx_k_41[] = "chromosome names"; +static char __pyx_k_42[] = "contig of feature."; +static char __pyx_k_43[] = "feature name."; +static char __pyx_k_44[] = "feature source."; +static char __pyx_k_45[] = "feature start (in 0-based open/closed coordinates)."; +static char __pyx_k_46[] = "feature end (in 0-based open/closed coordinates)."; +static char __pyx_k_47[] = "feature score."; +static char __pyx_k_48[] = "feature strand."; +static char __pyx_k_49[] = "feature frame."; +static char __pyx_k_50[] = "feature attributes (as a string)."; +static char __pyx_k_51[] = "Tabixfile._isOpen (line 22)"; +static char __pyx_k_52[] = "Tabixfile._open (line 26)"; +static char __pyx_k_53[] = "Tabixfile._parseRegion (line 60)"; +static char __pyx_k_54[] = "Tabixfile.fetch (line 105)"; +static char __pyx_k_55[] = "TabixIterator.__next__ (line 187)"; +static char __pyx_k_56[] = "toDot (line 203)"; +static char __pyx_k_57[] = "quote (line 208)"; +static char __pyx_k_58[] = "TupleProxy.__next__ (line 318)"; +static char __pyx_k_59[] = "GTFProxy.asDict (line 521)"; +static char __pyx_k_60[] = "GTFProxy.fromDict (line 556)"; +static char __pyx_k_61[] = "GTFProxy.invert (line 605)"; +static char __pyx_k_62[] = "GTFProxy.keys (line 616)"; +static char __pyx_k_63[] = "GTFProxy.__getattr__ (line 630)"; +static char __pyx_k_64[] = "GTFProxy.setAttribute (line 662)"; +static char __pyx_k_65[] = "TabixIteratorParsed.__next__ (line 725)"; +static char __pyx_k_66[] = "tabix_compress (line 741)"; +static char __pyx_k_67[] = "tabix_index (line 786)"; +static char __pyx_k__r[] = "r"; +static char __pyx_k__w[] = "w"; +static char __pyx_k__bc[] = "bc"; +static char __pyx_k__ec[] = "ec"; +static char __pyx_k__fp[] = "fp"; +static char __pyx_k__os[] = "os"; +static char __pyx_k__sc[] = "sc"; +static char __pyx_k__bed[] = "bed"; +static char __pyx_k__end[] = "end"; +static char __pyx_k__gff[] = "gff"; +static char __pyx_k__idx[] = "idx"; +static char __pyx_k__len[] = "len"; +static char __pyx_k__ord[] = "ord"; +static char __pyx_k__sam[] = "sam"; +static char __pyx_k__sys[] = "sys"; +static char __pyx_k__tid[] = "tid"; +static char __pyx_k__vcf[] = "vcf"; +static char __pyx_k__copy[] = "copy"; +static char __pyx_k__data[] = "data"; +static char __pyx_k__join[] = "join"; +static char __pyx_k__keys[] = "keys"; +static char __pyx_k__mode[] = "mode"; +static char __pyx_k__name[] = "name"; +static char __pyx_k__path[] = "path"; +static char __pyx_k___open[] = "_open"; +static char __pyx_k__asGTF[] = "asGTF"; +static char __pyx_k__close[] = "close"; +static char __pyx_k__fetch[] = "fetch"; +static char __pyx_k__force[] = "force"; +static char __pyx_k__frame[] = "frame"; +static char __pyx_k__index[] = "index"; +static char __pyx_k__items[] = "items"; +static char __pyx_k__quote[] = "quote"; +static char __pyx_k__score[] = "score"; +static char __pyx_k__split[] = "split"; +static char __pyx_k__start[] = "start"; +static char __pyx_k__strip[] = "strip"; +static char __pyx_k__toDot[] = "toDot"; +static char __pyx_k__types[] = "types"; +static char __pyx_k__value[] = "value"; +static char __pyx_k__asDict[] = "asDict"; +static char __pyx_k__buffer[] = "buffer"; +static char __pyx_k__contig[] = "contig"; +static char __pyx_k__ctypes[] = "ctypes"; +static char __pyx_k__exists[] = "exists"; +static char __pyx_k__fields[] = "fields"; +static char __pyx_k__invert[] = "invert"; +static char __pyx_k__nbytes[] = "nbytes"; +static char __pyx_k__parser[] = "parser"; +static char __pyx_k__pileup[] = "pileup"; +static char __pyx_k__preset[] = "preset"; +static char __pyx_k__psltbl[] = "psltbl"; +static char __pyx_k__region[] = "region"; +static char __pyx_k__source[] = "source"; +static char __pyx_k__strand[] = "strand"; +static char __pyx_k__struct[] = "struct"; +static char __pyx_k__unlink[] = "unlink"; +static char __pyx_k__update[] = "update"; +static char __pyx_k__IOError[] = "IOError"; +static char __pyx_k__OSError[] = "OSError"; +static char __pyx_k____all__[] = "__all__"; +static char __pyx_k___isOpen[] = "_isOpen"; +static char __pyx_k__asTuple[] = "asTuple"; +static char __pyx_k__end_col[] = "end_col"; +static char __pyx_k__feature[] = "feature"; +static char __pyx_k__nfields[] = "nfields"; +static char __pyx_k__seq_col[] = "seq_col"; +static char __pyx_k__GTFProxy[] = "GTFProxy"; +static char __pyx_k__KeyError[] = "KeyError"; +static char __pyx_k__O_RDONLY[] = "O_RDONLY"; +static char __pyx_k____main__[] = "__main__"; +static char __pyx_k____next__[] = "__next__"; +static char __pyx_k____test__[] = "__test__"; +static char __pyx_k__endswith[] = "endswith"; +static char __pyx_k__filename[] = "filename"; +static char __pyx_k__fromDict[] = "fromDict"; +static char __pyx_k__iterator[] = "iterator"; +static char __pyx_k__tempfile[] = "tempfile"; +static char __pyx_k__Tabixfile[] = "Tabixfile"; +static char __pyx_k__TypeError[] = "TypeError"; +static char __pyx_k__itertools[] = "itertools"; +static char __pyx_k__line_skip[] = "line_skip"; +static char __pyx_k__meta_char[] = "meta_char"; +static char __pyx_k__reference[] = "reference"; +static char __pyx_k__start_col[] = "start_col"; +static char __pyx_k__tabixfile[] = "tabixfile"; +static char __pyx_k__zerobased[] = "zerobased"; +static char __pyx_k__IndexError[] = "IndexError"; +static char __pyx_k__StringType[] = "StringType"; +static char __pyx_k__TupleProxy[] = "TupleProxy"; +static char __pyx_k__ValueError[] = "ValueError"; +static char __pyx_k__attributes[] = "attributes"; +static char __pyx_k__isModified[] = "isModified"; +static char __pyx_k__StringTypes[] = "StringTypes"; +static char __pyx_k____getattr__[] = "__getattr__"; +static char __pyx_k__filename_in[] = "filename_in"; +static char __pyx_k__tabix_index[] = "tabix_index"; +static char __pyx_k___parseRegion[] = "_parseRegion"; +static char __pyx_k__filename_out[] = "filename_out"; +static char __pyx_k__setAttribute[] = "setAttribute"; +static char __pyx_k__StopIteration[] = "StopIteration"; +static char __pyx_k__TabixIterator[] = "TabixIterator"; +static char __pyx_k__AttributeError[] = "AttributeError"; +static char __pyx_k__tabix_compress[] = "tabix_compress"; +static char __pyx_k__hasOwnAttributes[] = "hasOwnAttributes"; +static char __pyx_k__TabixIteratorParsed[] = "TabixIteratorParsed"; +static PyObject *__pyx_kp_s_1; +static PyObject *__pyx_kp_s_10; +static PyObject *__pyx_kp_s_11; +static PyObject *__pyx_kp_s_12; +static PyObject *__pyx_kp_s_13; +static PyObject *__pyx_kp_s_14; +static PyObject *__pyx_kp_s_15; +static PyObject *__pyx_kp_s_16; +static PyObject *__pyx_kp_s_17; +static PyObject *__pyx_kp_s_18; +static PyObject *__pyx_kp_s_19; +static PyObject *__pyx_kp_s_2; +static PyObject *__pyx_kp_s_20; +static PyObject *__pyx_kp_s_21; +static PyObject *__pyx_kp_s_22; +static PyObject *__pyx_kp_s_23; +static PyObject *__pyx_kp_s_24; +static PyObject *__pyx_kp_s_25; +static PyObject *__pyx_kp_s_26; +static PyObject *__pyx_kp_s_27; +static PyObject *__pyx_kp_s_29; +static PyObject *__pyx_kp_s_3; +static PyObject *__pyx_kp_s_30; +static PyObject *__pyx_kp_s_31; +static PyObject *__pyx_kp_s_32; +static PyObject *__pyx_kp_s_34; +static PyObject *__pyx_kp_s_36; +static PyObject *__pyx_kp_s_37; +static PyObject *__pyx_kp_s_38; +static PyObject *__pyx_kp_s_39; +static PyObject *__pyx_kp_s_4; +static PyObject *__pyx_kp_s_40; +static PyObject *__pyx_kp_s_5; +static PyObject *__pyx_kp_u_51; +static PyObject *__pyx_kp_u_52; +static PyObject *__pyx_kp_u_53; +static PyObject *__pyx_kp_u_54; +static PyObject *__pyx_kp_u_55; +static PyObject *__pyx_kp_u_56; +static PyObject *__pyx_kp_u_57; +static PyObject *__pyx_kp_u_58; +static PyObject *__pyx_kp_u_59; +static PyObject *__pyx_kp_s_6; +static PyObject *__pyx_kp_u_60; +static PyObject *__pyx_kp_u_61; +static PyObject *__pyx_kp_u_62; +static PyObject *__pyx_kp_u_63; +static PyObject *__pyx_kp_u_64; +static PyObject *__pyx_kp_u_65; +static PyObject *__pyx_kp_u_66; +static PyObject *__pyx_kp_u_67; +static PyObject *__pyx_kp_s_7; +static PyObject *__pyx_kp_s_8; +static PyObject *__pyx_kp_s_9; +static PyObject *__pyx_n_s__AttributeError; +static PyObject *__pyx_n_s__GTFProxy; +static PyObject *__pyx_n_s__IOError; +static PyObject *__pyx_n_s__IndexError; +static PyObject *__pyx_n_s__KeyError; +static PyObject *__pyx_n_s__OSError; +static PyObject *__pyx_n_s__O_RDONLY; +static PyObject *__pyx_n_s__StopIteration; +static PyObject *__pyx_n_s__StringType; +static PyObject *__pyx_n_s__StringTypes; +static PyObject *__pyx_n_s__TabixIterator; +static PyObject *__pyx_n_s__TabixIteratorParsed; +static PyObject *__pyx_n_s__Tabixfile; +static PyObject *__pyx_n_s__TupleProxy; +static PyObject *__pyx_n_s__TypeError; +static PyObject *__pyx_n_s__ValueError; +static PyObject *__pyx_n_s____all__; +static PyObject *__pyx_n_s____getattr__; +static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____next__; +static PyObject *__pyx_n_s____test__; +static PyObject *__pyx_n_s___isOpen; +static PyObject *__pyx_n_s___open; +static PyObject *__pyx_n_s___parseRegion; +static PyObject *__pyx_n_s__asDict; +static PyObject *__pyx_n_s__asGTF; +static PyObject *__pyx_n_s__asTuple; +static PyObject *__pyx_n_s__attributes; +static PyObject *__pyx_n_s__bc; +static PyObject *__pyx_n_s__bed; +static PyObject *__pyx_n_s__buffer; +static PyObject *__pyx_n_s__close; +static PyObject *__pyx_n_s__contig; +static PyObject *__pyx_n_s__copy; +static PyObject *__pyx_n_s__ctypes; +static PyObject *__pyx_n_s__data; +static PyObject *__pyx_n_s__ec; +static PyObject *__pyx_n_s__end; +static PyObject *__pyx_n_s__end_col; +static PyObject *__pyx_n_s__endswith; +static PyObject *__pyx_n_s__exists; +static PyObject *__pyx_n_s__feature; +static PyObject *__pyx_n_s__fetch; +static PyObject *__pyx_n_s__fields; +static PyObject *__pyx_n_s__filename; +static PyObject *__pyx_n_s__filename_in; +static PyObject *__pyx_n_s__filename_out; +static PyObject *__pyx_n_s__force; +static PyObject *__pyx_n_s__fp; +static PyObject *__pyx_n_s__frame; +static PyObject *__pyx_n_s__fromDict; +static PyObject *__pyx_n_s__gff; +static PyObject *__pyx_n_s__hasOwnAttributes; +static PyObject *__pyx_n_s__idx; +static PyObject *__pyx_n_s__index; +static PyObject *__pyx_n_s__invert; +static PyObject *__pyx_n_s__isModified; +static PyObject *__pyx_n_s__items; +static PyObject *__pyx_n_s__iterator; +static PyObject *__pyx_n_s__itertools; +static PyObject *__pyx_n_s__join; +static PyObject *__pyx_n_s__keys; +static PyObject *__pyx_n_s__len; +static PyObject *__pyx_n_s__line_skip; +static PyObject *__pyx_n_s__meta_char; +static PyObject *__pyx_n_s__mode; +static PyObject *__pyx_n_s__name; +static PyObject *__pyx_n_s__nbytes; +static PyObject *__pyx_n_s__nfields; +static PyObject *__pyx_n_s__ord; +static PyObject *__pyx_n_s__os; +static PyObject *__pyx_n_s__parser; +static PyObject *__pyx_n_s__path; +static PyObject *__pyx_n_s__pileup; +static PyObject *__pyx_n_s__preset; +static PyObject *__pyx_n_s__psltbl; +static PyObject *__pyx_n_s__quote; +static PyObject *__pyx_n_s__r; +static PyObject *__pyx_n_s__reference; +static PyObject *__pyx_n_s__region; +static PyObject *__pyx_n_s__sam; +static PyObject *__pyx_n_s__sc; +static PyObject *__pyx_n_s__score; +static PyObject *__pyx_n_s__seq_col; +static PyObject *__pyx_n_s__setAttribute; +static PyObject *__pyx_n_s__source; +static PyObject *__pyx_n_s__split; +static PyObject *__pyx_n_s__start; +static PyObject *__pyx_n_s__start_col; +static PyObject *__pyx_n_s__strand; +static PyObject *__pyx_n_s__strip; +static PyObject *__pyx_n_s__struct; +static PyObject *__pyx_n_s__sys; +static PyObject *__pyx_n_s__tabix_compress; +static PyObject *__pyx_n_s__tabix_index; +static PyObject *__pyx_n_s__tabixfile; +static PyObject *__pyx_n_s__tempfile; +static PyObject *__pyx_n_s__tid; +static PyObject *__pyx_n_s__toDot; +static PyObject *__pyx_n_s__types; +static PyObject *__pyx_n_s__unlink; +static PyObject *__pyx_n_s__update; +static PyObject *__pyx_n_s__value; +static PyObject *__pyx_n_s__vcf; +static PyObject *__pyx_n_s__w; +static PyObject *__pyx_n_s__zerobased; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_3; +static PyObject *__pyx_int_4; +static PyObject *__pyx_int_5; +static PyObject *__pyx_int_neg_1; +static PyObject *__pyx_int_15; +static PyObject *__pyx_int_17; +static PyObject *__pyx_int_18; +static PyObject *__pyx_int_0x10000; +static PyObject *__pyx_k_28; +static PyObject *__pyx_k_33; +static PyObject *__pyx_k_35; + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":18 + * cdef tabix_t * tabixfile + * + * def __cinit__(self, *args, **kwargs ): # <<<<<<<<<<<<<< + * self.tabixfile = NULL + * self._open( *args, **kwargs ) + */ + +static int __pyx_pf_6ctabix_9Tabixfile___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_6ctabix_9Tabixfile___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; + int __pyx_r; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__cinit__"); + 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; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":19 + * + * def __cinit__(self, *args, **kwargs ): + * self.tabixfile = NULL # <<<<<<<<<<<<<< + * self._open( *args, **kwargs ) + * + */ + ((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile = NULL; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":20 + * def __cinit__(self, *args, **kwargs ): + * self.tabixfile = NULL + * self._open( *args, **kwargs ) # <<<<<<<<<<<<<< + * + * def _isOpen( self ): + */ + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __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 = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_kwargs)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __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; + + __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_AddTraceback("ctabix.Tabixfile.__cinit__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_args); + __Pyx_DECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":22 + * self._open( *args, **kwargs ) + * + * def _isOpen( self ): # <<<<<<<<<<<<<< + * '''return true if samfile has been opened.''' + * return self.tabixfile != NULL + */ + +static PyObject *__pyx_pf_6ctabix_9Tabixfile__isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6ctabix_9Tabixfile__isOpen[] = "Tabixfile._isOpen(self)\nreturn true if samfile has been opened."; +static PyObject *__pyx_pf_6ctabix_9Tabixfile__isOpen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("_isOpen"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":24 + * def _isOpen( self ): + * '''return true if samfile has been opened.''' + * return self.tabixfile != NULL # <<<<<<<<<<<<<< + * + * def _open( self, + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong((((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile != NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __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("ctabix.Tabixfile._isOpen"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":26 + * return self.tabixfile != NULL + * + * def _open( self, # <<<<<<<<<<<<<< + * char * filename, + * mode ='r', + */ + +static PyObject *__pyx_pf_6ctabix_9Tabixfile__open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6ctabix_9Tabixfile__open[] = "Tabixfile._open(self, char *filename, mode='r')\nopen a :term:`tabix file` for reading.\n "; +static PyObject *__pyx_pf_6ctabix_9Tabixfile__open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_filename; + PyObject *__pyx_v_mode = 0; + PyObject *__pyx_v_filename_index; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + char *__pyx_t_6; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__mode,0}; + __Pyx_RefNannySetupContext("_open"); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[2] = {0,0}; + values[1] = ((PyObject *)__pyx_n_s__r); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename); + if (likely(values[0])) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mode); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_open") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_filename = PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_filename) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_mode = values[1]; + } else { + __pyx_v_mode = ((PyObject *)__pyx_n_s__r); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: __pyx_v_mode = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: __pyx_v_filename = PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_filename) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + break; + default: goto __pyx_L5_argtuple_error; + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.Tabixfile._open"); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_v_filename_index = Py_None; __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":33 + * ''' + * + * assert mode in ( "r",), "invalid file opening mode `%s`" % mode # <<<<<<<<<<<<<< + * + * # close a previously opened file + */ + #ifndef PYREX_WITHOUT_ASSERTIONS + __Pyx_INCREF(__pyx_v_mode); + __pyx_t_1 = __pyx_v_mode; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__r), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) { + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), __pyx_v_mode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __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 = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #endif + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":36 + * + * # close a previously opened file + * if self.tabixfile != NULL: self.close() # <<<<<<<<<<<<<< + * self.tabixfile = NULL + * + */ + __pyx_t_3 = (((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile != NULL); + if (__pyx_t_3) { + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __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 = 36; __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_L6; + } + __pyx_L6:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":37 + * # close a previously opened file + * if self.tabixfile != NULL: self.close() + * self.tabixfile = NULL # <<<<<<<<<<<<<< + * + * self.filename = filename + */ + ((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile = NULL; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":39 + * self.tabixfile = NULL + * + * self.filename = filename # <<<<<<<<<<<<<< + * filename_index = filename + ".tbi" + * + */ + ((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->filename = __pyx_v_filename; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":40 + * + * self.filename = filename + * filename_index = filename + ".tbi" # <<<<<<<<<<<<<< + * + * if mode[0] == 'w': + */ + __pyx_t_2 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __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_v_filename_index); + __pyx_v_filename_index = __pyx_t_1; + __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":42 + * filename_index = filename + ".tbi" + * + * if mode[0] == 'w': # <<<<<<<<<<<<<< + * # open file for writing + * pass + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__w), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __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 = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + goto __pyx_L7; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":46 + * pass + * + * elif mode[0] == "r": # <<<<<<<<<<<<<< + * # open file for reading + * if not os.path.exists( self.filename ): + */ + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_mode, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__r), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __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 = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":48 + * elif mode[0] == "r": + * # open file for reading + * if not os.path.exists( self.filename ): # <<<<<<<<<<<<<< + * raise IOError( "file `%s` not found" % self.filename) + * + */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __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 = 48; __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 = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __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_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_3); + if (__pyx_t_5) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":49 + * # open file for reading + * if not os.path.exists( self.filename ): + * raise IOError( "file `%s` not found" % self.filename) # <<<<<<<<<<<<<< + * + * if not os.path.exists( filename_index ): + */ + __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __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 = 49; __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_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L8; + } + __pyx_L8:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":51 + * raise IOError( "file `%s` not found" % self.filename) + * + * if not os.path.exists( filename_index ): # <<<<<<<<<<<<<< + * raise IOError( "index `%s` not found" % filename_index) + * + */ + __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__exists); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __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 = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_filename_index); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename_index); + __Pyx_GIVEREF(__pyx_v_filename_index); + __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (!__pyx_t_5); + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":52 + * + * if not os.path.exists( filename_index ): + * raise IOError( "index `%s` not found" % filename_index) # <<<<<<<<<<<<<< + * + * # open file and load index + */ + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), __pyx_v_filename_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __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 = 52; __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_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L9; + } + __pyx_L9:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":55 + * + * # open file and load index + * self.tabixfile = ti_open( self.filename, filename_index ) # <<<<<<<<<<<<<< + * + * if self.tabixfile == NULL: + */ + __pyx_t_6 = PyBytes_AsString(__pyx_v_filename_index); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile = ti_open(((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->filename, __pyx_t_6); + goto __pyx_L7; + } + __pyx_L7:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":57 + * self.tabixfile = ti_open( self.filename, filename_index ) + * + * if self.tabixfile == NULL: # <<<<<<<<<<<<<< + * raise IOError("could not open file `%s`" % filename ) + * + */ + __pyx_t_3 = (((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile == NULL); + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":58 + * + * if self.tabixfile == NULL: + * raise IOError("could not open file `%s`" % filename ) # <<<<<<<<<<<<<< + * + * def _parseRegion( self, + */ + __pyx_t_1 = PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __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 = 58; __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_IOError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L10; + } + __pyx_L10:; + + __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_4); + __Pyx_AddTraceback("ctabix.Tabixfile._open"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_filename_index); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":60 + * raise IOError("could not open file `%s`" % filename ) + * + * def _parseRegion( self, # <<<<<<<<<<<<<< + * reference = None, + * start = None, + */ + +static PyObject *__pyx_pf_6ctabix_9Tabixfile__parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6ctabix_9Tabixfile__parseRegion[] = "Tabixfile._parseRegion(self, reference=None, start=None, end=None, region=None)\nparse region information.\n\n raise ValueError for for invalid regions.\n\n returns a tuple of region, tid, start and end. Region\n is a valid samtools :term:`region` or None if the region\n extends over the whole file.\n\n Note that regions are 1-based, while start,end are python coordinates.\n "; +static PyObject *__pyx_pf_6ctabix_9Tabixfile__parseRegion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_reference = 0; + PyObject *__pyx_v_start = 0; + PyObject *__pyx_v_end = 0; + PyObject *__pyx_v_region = 0; + int __pyx_v_rtid; + int __pyx_v_rstart; + int __pyx_v_rend; + int __pyx_v_max_pos; + PyObject *__pyx_r = NULL; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + char *__pyx_t_7; + PyObject *__pyx_t_8 = NULL; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,0}; + __Pyx_RefNannySetupContext("_parseRegion"); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[4] = {0,0,0,0}; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":61 + * + * def _parseRegion( self, + * reference = None, # <<<<<<<<<<<<<< + * start = None, + * end = None, + */ + values[0] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":62 + * def _parseRegion( self, + * reference = None, + * start = None, # <<<<<<<<<<<<<< + * end = None, + * region = None ): + */ + values[1] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":63 + * reference = None, + * start = None, + * end = None, # <<<<<<<<<<<<<< + * region = None ): + * '''parse region information. + */ + values[2] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":64 + * start = None, + * end = None, + * region = None ): # <<<<<<<<<<<<<< + * '''parse region information. + * + */ + values[3] = ((PyObject *)Py_None); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference); + if (value) { values[0] = value; kw_args--; } + } + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end); + if (value) { values[2] = value; kw_args--; } + } + case 3: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_parseRegion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_reference = values[0]; + __pyx_v_start = values[1]; + __pyx_v_end = values[2]; + __pyx_v_region = values[3]; + } else { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":61 + * + * def _parseRegion( self, + * reference = None, # <<<<<<<<<<<<<< + * start = None, + * end = None, + */ + __pyx_v_reference = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":62 + * def _parseRegion( self, + * reference = None, + * start = None, # <<<<<<<<<<<<<< + * end = None, + * region = None ): + */ + __pyx_v_start = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":63 + * reference = None, + * start = None, + * end = None, # <<<<<<<<<<<<<< + * region = None ): + * '''parse region information. + */ + __pyx_v_end = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":64 + * start = None, + * end = None, + * region = None ): # <<<<<<<<<<<<<< + * '''parse region information. + * + */ + __pyx_v_region = ((PyObject *)Py_None); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: __pyx_v_region = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: __pyx_v_end = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: __pyx_v_start = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: __pyx_v_reference = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + 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 = 60; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.Tabixfile._parseRegion"); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __Pyx_INCREF(__pyx_v_region); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":75 + * Note that regions are 1-based, while start,end are python coordinates. + * ''' + * ti_lazy_index_load( self.tabixfile ) # <<<<<<<<<<<<<< + * + * cdef int rtid + */ + ti_lazy_index_load(((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":81 + * cdef int rend + * cdef int max_pos + * max_pos = 2 << 29 # <<<<<<<<<<<<<< + * + * rtid = rstart = rend = 0 + */ + __pyx_v_max_pos = 1073741824; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":83 + * max_pos = 2 << 29 + * + * rtid = rstart = rend = 0 # <<<<<<<<<<<<<< + * + * # translate to a region + */ + __pyx_v_rtid = 0; + __pyx_v_rstart = 0; + __pyx_v_rend = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":86 + * + * # translate to a region + * if reference: # <<<<<<<<<<<<<< + * if start != None and end != None: + * region = "%s:%i-%i" % (reference, start+1, end) + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":87 + * # translate to a region + * if reference: + * if start != None and end != None: # <<<<<<<<<<<<<< + * region = "%s:%i-%i" % (reference, start+1, end) + * elif start == None and end != None: + */ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __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 = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + __pyx_t_2 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_t_3; + } else { + __pyx_t_4 = __pyx_t_1; + } + if (__pyx_t_4) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":88 + * if reference: + * if start != None and end != None: + * region = "%s:%i-%i" % (reference, start+1, end) # <<<<<<<<<<<<<< + * elif start == None and end != None: + * region = "%s:%i-%i" % (reference, 1, end) + */ + __pyx_t_2 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_reference); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_reference); + __Pyx_GIVEREF(__pyx_v_reference); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_end); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_end); + __Pyx_GIVEREF(__pyx_v_end); + __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_v_region); + __pyx_v_region = ((PyObject *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L7; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":89 + * if start != None and end != None: + * region = "%s:%i-%i" % (reference, start+1, end) + * elif start == None and end != None: # <<<<<<<<<<<<<< + * region = "%s:%i-%i" % (reference, 1, end) + * elif end == None and start != None: + */ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_4) { + __pyx_t_2 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __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 = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __pyx_t_1; + } else { + __pyx_t_3 = __pyx_t_4; + } + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":90 + * region = "%s:%i-%i" % (reference, start+1, end) + * elif start == None and end != None: + * region = "%s:%i-%i" % (reference, 1, end) # <<<<<<<<<<<<<< + * elif end == None and start != None: + * region = "%s:%i-%i" % (reference, start+1, max_pos-1) + */ + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __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); + __Pyx_GIVEREF(__pyx_v_reference); + __Pyx_INCREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + __Pyx_INCREF(__pyx_v_end); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end); + __Pyx_GIVEREF(__pyx_v_end); + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_v_region); + __pyx_v_region = ((PyObject *)__pyx_t_5); + __pyx_t_5 = 0; + goto __pyx_L7; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":91 + * elif start == None and end != None: + * region = "%s:%i-%i" % (reference, 1, end) + * elif end == None and start != None: # <<<<<<<<<<<<<< + * region = "%s:%i-%i" % (reference, start+1, max_pos-1) + * else: + */ + __pyx_t_5 = PyObject_RichCompare(__pyx_v_end, Py_None, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_3) { + __pyx_t_5 = PyObject_RichCompare(__pyx_v_start, Py_None, Py_NE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_4; + } else { + __pyx_t_1 = __pyx_t_3; + } + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":92 + * region = "%s:%i-%i" % (reference, 1, end) + * elif end == None and start != None: + * region = "%s:%i-%i" % (reference, start+1, max_pos-1) # <<<<<<<<<<<<<< + * else: + * region = reference + */ + __pyx_t_5 = PyNumber_Add(__pyx_v_start, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyInt_FromLong((__pyx_v_max_pos - 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_reference); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_reference); + __Pyx_GIVEREF(__pyx_v_reference); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_v_region); + __pyx_v_region = ((PyObject *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L7; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":94 + * region = "%s:%i-%i" % (reference, start+1, max_pos-1) + * else: + * region = reference # <<<<<<<<<<<<<< + * + * if region: + */ + __Pyx_INCREF(__pyx_v_reference); + __Pyx_DECREF(__pyx_v_region); + __pyx_v_region = __pyx_v_reference; + } + __pyx_L7:; + goto __pyx_L6; + } + __pyx_L6:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":96 + * region = reference + * + * if region: # <<<<<<<<<<<<<< + * ti_parse_region( self.tabixfile.idx, region, &rtid, &rstart, &rend) + * if rtid < 0: raise ValueError( "invalid region `%s`" % region ) + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":97 + * + * if region: + * ti_parse_region( self.tabixfile.idx, region, &rtid, &rstart, &rend) # <<<<<<<<<<<<<< + * if rtid < 0: raise ValueError( "invalid region `%s`" % region ) + * if rstart > rend: raise ValueError( 'invalid region: start (%i) > end (%i)' % (rstart, rend) ) + */ + __pyx_t_7 = PyBytes_AsString(__pyx_v_region); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ti_parse_region(((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile->idx, __pyx_t_7, (&__pyx_v_rtid), (&__pyx_v_rstart), (&__pyx_v_rend)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":98 + * if region: + * ti_parse_region( self.tabixfile.idx, region, &rtid, &rstart, &rend) + * if rtid < 0: raise ValueError( "invalid region `%s`" % region ) # <<<<<<<<<<<<<< + * if rstart > rend: raise ValueError( 'invalid region: start (%i) > end (%i)' % (rstart, rend) ) + * if not 0 <= rstart < max_pos: raise ValueError( 'start out of range (%i)' % rstart ) + */ + __pyx_t_1 = (__pyx_v_rtid < 0); + if (__pyx_t_1) { + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), __pyx_v_region); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L9; + } + __pyx_L9:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":99 + * ti_parse_region( self.tabixfile.idx, region, &rtid, &rstart, &rend) + * if rtid < 0: raise ValueError( "invalid region `%s`" % region ) + * if rstart > rend: raise ValueError( 'invalid region: 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_1 = (__pyx_v_rstart > __pyx_v_rend); + if (__pyx_t_1) { + __pyx_t_2 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __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); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_6 = 0; + __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_DECREF(__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 = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L10; + } + __pyx_L10:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":100 + * if rtid < 0: raise ValueError( "invalid region `%s`" % region ) + * if rstart > rend: raise ValueError( 'invalid region: 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_1 = (0 <= __pyx_v_rstart); + if (__pyx_t_1) { + __pyx_t_1 = (__pyx_v_rstart < __pyx_v_max_pos); + } + __pyx_t_3 = (!__pyx_t_1); + if (__pyx_t_3) { + __pyx_t_6 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_DECREF(__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 = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L11; + } + __pyx_L11:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":101 + * if rstart > rend: raise ValueError( 'invalid region: 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 ) # <<<<<<<<<<<<<< + * + * return region, rtid, rstart, rend + */ + __pyx_t_3 = (0 <= __pyx_v_rend); + if (__pyx_t_3) { + __pyx_t_3 = (__pyx_v_rend < __pyx_v_max_pos); + } + __pyx_t_1 = (!__pyx_t_3); + if (__pyx_t_1) { + __pyx_t_5 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_DECREF(__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 = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L12; + } + __pyx_L12:; + goto __pyx_L8; + } + __pyx_L8:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":103 + * if not 0 <= rend < max_pos: raise ValueError( 'end out of range (%i)' % rend ) + * + * return region, rtid, rstart, rend # <<<<<<<<<<<<<< + * + * def fetch( self, + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyInt_FromLong(__pyx_v_rtid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyInt_FromLong(__pyx_v_rstart); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyInt_FromLong(__pyx_v_rend); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_region); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_region); + __Pyx_GIVEREF(__pyx_v_region); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_6 = 0; + __pyx_t_5 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("ctabix.Tabixfile._parseRegion"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_region); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":105 + * return region, rtid, rstart, rend + * + * def fetch( self, # <<<<<<<<<<<<<< + * reference = None, + * start = None, + */ + +static PyObject *__pyx_pf_6ctabix_9Tabixfile_fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6ctabix_9Tabixfile_fetch[] = "Tabixfile.fetch(self, reference=None, start=None, end=None, region=None, parser=None)\n\n \n fetch one or more rows in a :term:`region` using 0-based indexing. The region is specified by\n :term:`reference`, *start* and *end*. Alternatively, a samtools :term:`region` string can be supplied.\n\n Without *reference* or *region* all entries will be fetched. \n \n If only *reference* is set, all reads matching on *reference* will be fetched.\n\n If *parser* is None, the results are returned as an unparsed string.\n Otherwise, *parser* is assumed to be a functor that will return parsed \n data (see for example :meth:`asTuple` and :meth:`asGTF`).\n "; +static PyObject *__pyx_pf_6ctabix_9Tabixfile_fetch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_reference = 0; + PyObject *__pyx_v_start = 0; + PyObject *__pyx_v_end = 0; + PyObject *__pyx_v_region = 0; + PyObject *__pyx_v_parser = 0; + PyObject *__pyx_v_rtid; + PyObject *__pyx_v_rstart; + PyObject *__pyx_v_rend; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,&__pyx_n_s__parser,0}; + __Pyx_RefNannySetupContext("fetch"); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[5] = {0,0,0,0,0}; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":106 + * + * def fetch( self, + * reference = None, # <<<<<<<<<<<<<< + * start = None, + * end = None, + */ + values[0] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":107 + * def fetch( self, + * reference = None, + * start = None, # <<<<<<<<<<<<<< + * end = None, + * region = None, + */ + values[1] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":108 + * reference = None, + * start = None, + * end = None, # <<<<<<<<<<<<<< + * region = None, + * parser = None ): + */ + values[2] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":109 + * start = None, + * end = None, + * region = None, # <<<<<<<<<<<<<< + * parser = None ): + * ''' + */ + values[3] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":110 + * end = None, + * region = None, + * parser = None ): # <<<<<<<<<<<<<< + * ''' + * + */ + values[4] = ((PyObject *)Py_None); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference); + if (value) { values[0] = value; kw_args--; } + } + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end); + if (value) { values[2] = value; kw_args--; } + } + case 3: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region); + if (value) { values[3] = value; kw_args--; } + } + case 4: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_reference = values[0]; + __pyx_v_start = values[1]; + __pyx_v_end = values[2]; + __pyx_v_region = values[3]; + __pyx_v_parser = values[4]; + } else { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":106 + * + * def fetch( self, + * reference = None, # <<<<<<<<<<<<<< + * start = None, + * end = None, + */ + __pyx_v_reference = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":107 + * def fetch( self, + * reference = None, + * start = None, # <<<<<<<<<<<<<< + * end = None, + * region = None, + */ + __pyx_v_start = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":108 + * reference = None, + * start = None, + * end = None, # <<<<<<<<<<<<<< + * region = None, + * parser = None ): + */ + __pyx_v_end = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":109 + * start = None, + * end = None, + * region = None, # <<<<<<<<<<<<<< + * parser = None ): + * ''' + */ + __pyx_v_region = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":110 + * end = None, + * region = None, + * parser = None ): # <<<<<<<<<<<<<< + * ''' + * + */ + __pyx_v_parser = ((PyObject *)Py_None); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: __pyx_v_region = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: __pyx_v_end = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: __pyx_v_start = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: __pyx_v_reference = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.Tabixfile.fetch"); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __Pyx_INCREF(__pyx_v_region); + __pyx_v_rtid = Py_None; __Pyx_INCREF(Py_None); + __pyx_v_rstart = Py_None; __Pyx_INCREF(Py_None); + __pyx_v_rend = Py_None; __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":124 + * data (see for example :meth:`asTuple` and :meth:`asGTF`). + * ''' + * ti_lazy_index_load( self.tabixfile ) # <<<<<<<<<<<<<< + * + * if not self._isOpen(): + */ + ti_lazy_index_load(((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":126 + * ti_lazy_index_load( self.tabixfile ) + * + * if not self._isOpen(): # <<<<<<<<<<<<<< + * raise ValueError( "I/O operation on closed file" ) + * + */ + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __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 = 126; __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 = 126; __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) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":127 + * + * 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 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_11)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_11)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":129 + * raise ValueError( "I/O operation on closed file" ) + * + * region, rtid, rstart, rend = self._parseRegion( reference, start, end, region ) # <<<<<<<<<<<<<< + * + * if parser == None: + */ + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __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 = 129; __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); + __Pyx_GIVEREF(__pyx_v_reference); + __Pyx_INCREF(__pyx_v_start); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_start); + __Pyx_GIVEREF(__pyx_v_start); + __Pyx_INCREF(__pyx_v_end); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end); + __Pyx_GIVEREF(__pyx_v_end); + __Pyx_INCREF(__pyx_v_region); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_region); + __Pyx_GIVEREF(__pyx_v_region); + __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 4)) { + PyObject* tuple = __pyx_t_5; + __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1); + __pyx_t_6 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = PyTuple_GET_ITEM(tuple, 3); __Pyx_INCREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_v_region); + __pyx_v_region = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_v_rtid); + __pyx_v_rtid = __pyx_t_1; + __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_v_rstart); + __pyx_v_rstart = __pyx_t_6; + __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_v_rend); + __pyx_v_rend = __pyx_t_7; + __pyx_t_7 = 0; + } else { + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_8, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_8, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_8, 2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_8, 3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_EndUnpack(__pyx_t_8, 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_v_region); + __pyx_v_region = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_v_rtid); + __pyx_v_rtid = __pyx_t_1; + __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_v_rstart); + __pyx_v_rstart = __pyx_t_6; + __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_v_rend); + __pyx_v_rend = __pyx_t_7; + __pyx_t_7 = 0; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":131 + * region, rtid, rstart, rend = self._parseRegion( reference, start, end, region ) + * + * if parser == None: # <<<<<<<<<<<<<< + * if region: + * return TabixIterator( self, rtid, rstart, rend ) + */ + __pyx_t_5 = PyObject_RichCompare(__pyx_v_parser, Py_None, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_4) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":132 + * + * if parser == None: + * if region: # <<<<<<<<<<<<<< + * return TabixIterator( self, rtid, rstart, rend ) + * else: + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_4) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":133 + * if parser == None: + * if region: + * return TabixIterator( self, rtid, rstart, rend ) # <<<<<<<<<<<<<< + * else: + * return TabixIterator( self, -1, 0, 0 ) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + __Pyx_INCREF(__pyx_v_rtid); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_rtid); + __Pyx_GIVEREF(__pyx_v_rtid); + __Pyx_INCREF(__pyx_v_rstart); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_rstart); + __Pyx_GIVEREF(__pyx_v_rstart); + __Pyx_INCREF(__pyx_v_rend); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_rend); + __Pyx_GIVEREF(__pyx_v_rend); + __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6ctabix_TabixIterator)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + goto __pyx_L8; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":135 + * return TabixIterator( self, rtid, rstart, rend ) + * else: + * return TabixIterator( self, -1, 0, 0 ) # <<<<<<<<<<<<<< + * else: + * if region: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + __Pyx_INCREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6ctabix_TabixIterator)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + } + __pyx_L8:; + goto __pyx_L7; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":137 + * return TabixIterator( self, -1, 0, 0 ) + * else: + * if region: # <<<<<<<<<<<<<< + * return TabixIteratorParsed( self, rtid, rstart, rend, parser ) + * else: + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_region); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_4) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":138 + * else: + * if region: + * return TabixIteratorParsed( self, rtid, rstart, rend, parser ) # <<<<<<<<<<<<<< + * else: + * return TabixIteratorParsed( self, -1, 0, 0, parser ) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + __Pyx_INCREF(__pyx_v_rtid); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_rtid); + __Pyx_GIVEREF(__pyx_v_rtid); + __Pyx_INCREF(__pyx_v_rstart); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_rstart); + __Pyx_GIVEREF(__pyx_v_rstart); + __Pyx_INCREF(__pyx_v_rend); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_rend); + __Pyx_GIVEREF(__pyx_v_rend); + __Pyx_INCREF(__pyx_v_parser); + PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_v_parser); + __Pyx_GIVEREF(__pyx_v_parser); + __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6ctabix_TabixIteratorParsed)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + goto __pyx_L9; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":140 + * return TabixIteratorParsed( self, rtid, rstart, rend, parser ) + * else: + * return TabixIteratorParsed( self, -1, 0, 0, parser ) # <<<<<<<<<<<<<< + * + * property contigs: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + __Pyx_INCREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_INCREF(__pyx_v_parser); + PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_parser); + __Pyx_GIVEREF(__pyx_v_parser); + __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6ctabix_TabixIteratorParsed)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + } + __pyx_L9:; + } + __pyx_L7:; + + __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_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("ctabix.Tabixfile.fetch"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_rtid); + __Pyx_DECREF(__pyx_v_rstart); + __Pyx_DECREF(__pyx_v_rend); + __Pyx_DECREF(__pyx_v_region); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":144 + * property contigs: + * '''chromosome names''' + * def __get__(self): # <<<<<<<<<<<<<< + * cdef char ** sequences + * cdef int nsequences + */ + +static PyObject *__pyx_pf_6ctabix_9Tabixfile_7contigs___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_9Tabixfile_7contigs___get__(PyObject *__pyx_v_self) { + char **__pyx_v_sequences; + int __pyx_v_nsequences; + int __pyx_v_x; + PyObject *__pyx_v_result; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + __Pyx_RefNannySetupContext("__get__"); + __pyx_v_result = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":148 + * cdef int nsequences + * + * ti_lazy_index_load( self.tabixfile ) # <<<<<<<<<<<<<< + * sequences = ti_seqname( self.tabixfile.idx, &nsequences ) + * cdef int x + */ + ti_lazy_index_load(((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":149 + * + * ti_lazy_index_load( self.tabixfile ) + * sequences = ti_seqname( self.tabixfile.idx, &nsequences ) # <<<<<<<<<<<<<< + * cdef int x + * result = [] + */ + __pyx_v_sequences = ti_seqname(((struct __pyx_obj_6ctabix_Tabixfile *)__pyx_v_self)->tabixfile->idx, (&__pyx_v_nsequences)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":151 + * sequences = ti_seqname( self.tabixfile.idx, &nsequences ) + * cdef int x + * result = [] # <<<<<<<<<<<<<< + * for x from 0 <= x < nsequences: + * result.append( sequences[x] ) + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_v_result)); + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":152 + * cdef int x + * result = [] + * for x from 0 <= x < nsequences: # <<<<<<<<<<<<<< + * result.append( sequences[x] ) + * return result + */ + __pyx_t_2 = __pyx_v_nsequences; + for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":153 + * result = [] + * for x from 0 <= x < nsequences: + * result.append( sequences[x] ) # <<<<<<<<<<<<<< + * return result + * + */ + if (unlikely(__pyx_v_result == Py_None)) { + PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = PyBytes_FromString((__pyx_v_sequences[__pyx_v_x])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":154 + * for x from 0 <= x < nsequences: + * result.append( sequences[x] ) + * return result # <<<<<<<<<<<<<< + * + * cdef class TabixIterator: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ctabix.Tabixfile.contigs.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":164 + * cdef tabix_t * tabixfile + * + * def __cinit__(self, Tabixfile tabixfile, # <<<<<<<<<<<<<< + * int tid, int start, int end ): + * + */ + +static int __pyx_pf_6ctabix_13TabixIterator___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_6ctabix_13TabixIterator___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_6ctabix_Tabixfile *__pyx_v_tabixfile = 0; + int __pyx_v_tid; + int __pyx_v_start; + int __pyx_v_end; + int __pyx_r; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tabixfile,&__pyx_n_s__tid,&__pyx_n_s__start,&__pyx_n_s__end,0}; + __Pyx_RefNannySetupContext("__cinit__"); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[4] = {0,0,0,0}; + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tabixfile); + if (likely(values[0])) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tid); + if (likely(values[1])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start); + if (likely(values[2])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 3: + values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end); + if (likely(values[3])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_tabixfile = ((struct __pyx_obj_6ctabix_Tabixfile *)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 = 165; __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 = 165; __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 = 165; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { + goto __pyx_L5_argtuple_error; + } else { + __pyx_v_tabixfile = ((struct __pyx_obj_6ctabix_Tabixfile *)PyTuple_GET_ITEM(__pyx_args, 0)); + __pyx_v_tid = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_start = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_end = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.TabixIterator.__cinit__"); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tabixfile), __pyx_ptype_6ctabix_Tabixfile, 1, "tabixfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":167 + * int tid, int start, int end ): + * + * assert tabixfile._isOpen() # <<<<<<<<<<<<<< + * + * # makes sure that samfile stays alive as long as the + */ + #ifndef PYREX_WITHOUT_ASSERTIONS + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_tabixfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __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 = 167; __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 = 167; __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 = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #endif + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":171 + * # makes sure that samfile stays alive as long as the + * # iterator is alive. + * self.tabixfile = tabixfile.tabixfile # <<<<<<<<<<<<<< + * + * if tid < 0: + */ + ((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->tabixfile = __pyx_v_tabixfile->tabixfile; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":173 + * self.tabixfile = tabixfile.tabixfile + * + * if tid < 0: # <<<<<<<<<<<<<< + * # seek to start of file to ensure iteration is over + * # all entries. + */ + __pyx_t_3 = (__pyx_v_tid < 0); + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":176 + * # seek to start of file to ensure iteration is over + * # all entries. + * bgzf_seek( self.tabixfile.fp, 0, 0) # <<<<<<<<<<<<<< + * self.iterator = ti_iter_first() + * else: + */ + bgzf_seek(((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->tabixfile->fp, 0, 0); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":177 + * # all entries. + * bgzf_seek( self.tabixfile.fp, 0, 0) + * self.iterator = ti_iter_first() # <<<<<<<<<<<<<< + * else: + * self.iterator = ti_queryi(self.tabixfile, tid, start, end) + */ + ((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->iterator = ti_iter_first(); + goto __pyx_L6; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":179 + * self.iterator = ti_iter_first() + * else: + * self.iterator = ti_queryi(self.tabixfile, tid, start, end) # <<<<<<<<<<<<<< + * + * if self.iterator == NULL: + */ + ((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->iterator = ti_queryi(((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->tabixfile, __pyx_v_tid, __pyx_v_start, __pyx_v_end); + } + __pyx_L6:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":181 + * self.iterator = ti_queryi(self.tabixfile, tid, start, end) + * + * if self.iterator == NULL: # <<<<<<<<<<<<<< + * raise ValueError("malformatted query or wrong sequence name.\n") + * + */ + __pyx_t_3 = (((void *)((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->iterator) == NULL); + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":182 + * + * if self.iterator == NULL: + * raise ValueError("malformatted query or wrong sequence name.\n") # <<<<<<<<<<<<<< + * + * def __iter__(self): + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_12)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_12)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_12)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L7; + } + __pyx_L7:; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("ctabix.TabixIterator.__cinit__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":184 + * raise ValueError("malformatted query or wrong sequence name.\n") + * + * def __iter__(self): # <<<<<<<<<<<<<< + * return self + * + */ + +static PyObject *__pyx_pf_6ctabix_13TabixIterator___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_13TabixIterator___iter__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannySetupContext("__iter__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":185 + * + * def __iter__(self): + * return self # <<<<<<<<<<<<<< + * + * def __next__(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":187 + * return self + * + * def __next__(self): # <<<<<<<<<<<<<< + * """python version of next(). + * + */ + +static PyObject *__pyx_pf_6ctabix_13TabixIterator___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_6ctabix_13TabixIterator___next__[] = "python version of next().\n\n pyrex uses this non-standard name instead of next()\n "; +struct wrapperbase __pyx_wrapperbase_6ctabix_13TabixIterator___next__; +static PyObject *__pyx_pf_6ctabix_13TabixIterator___next__(PyObject *__pyx_v_self) { + char *__pyx_v_s; + int __pyx_v_len; + PyObject *__pyx_r = NULL; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__next__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":195 + * cdef char * s + * cdef int len + * s = ti_read(self.tabixfile, self.iterator, &len) # <<<<<<<<<<<<<< + * if s == NULL: raise StopIteration + * return s + */ + __pyx_v_s = ti_read(((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->tabixfile, ((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->iterator, (&__pyx_v_len)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":196 + * cdef int len + * s = ti_read(self.tabixfile, self.iterator, &len) + * if s == NULL: raise StopIteration # <<<<<<<<<<<<<< + * return s + * + */ + __pyx_t_1 = (__pyx_v_s == NULL); + if (__pyx_t_1) { + __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":197 + * s = ti_read(self.tabixfile, self.iterator, &len) + * if s == NULL: raise StopIteration + * return s # <<<<<<<<<<<<<< + * + * def __dealloc__(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __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_2); + __Pyx_AddTraceback("ctabix.TabixIterator.__next__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":199 + * return s + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.iterator != NULL: + * ti_iter_destroy(self.iterator) + */ + +static void __pyx_pf_6ctabix_13TabixIterator___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_6ctabix_13TabixIterator___dealloc__(PyObject *__pyx_v_self) { + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":200 + * + * def __dealloc__(self): + * if self.iterator != NULL: # <<<<<<<<<<<<<< + * ti_iter_destroy(self.iterator) + * + */ + __pyx_t_1 = (((void *)((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->iterator) != NULL); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":201 + * def __dealloc__(self): + * if self.iterator != NULL: + * ti_iter_destroy(self.iterator) # <<<<<<<<<<<<<< + * + * def toDot( v ): + */ + ti_iter_destroy(((struct __pyx_obj_6ctabix_TabixIterator *)__pyx_v_self)->iterator); + goto __pyx_L5; + } + __pyx_L5:; + + __Pyx_RefNannyFinishContext(); +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":203 + * ti_iter_destroy(self.iterator) + * + * def toDot( v ): # <<<<<<<<<<<<<< + * '''convert value to '.' if None''' + * if v == None: return "." + */ + +static PyObject *__pyx_pf_6ctabix_toDot(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/ +static char __pyx_doc_6ctabix_toDot[] = "toDot(v)\nconvert value to '.' if None"; +static PyObject *__pyx_pf_6ctabix_toDot(PyObject *__pyx_self, PyObject *__pyx_v_v) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("toDot"); + __pyx_self = __pyx_self; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":205 + * def toDot( v ): + * '''convert value to '.' if None''' + * if v == None: return "." # <<<<<<<<<<<<<< + * else: return str(v) + * + */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __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 = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_13)); + __pyx_r = ((PyObject *)__pyx_kp_s_13); + goto __pyx_L0; + goto __pyx_L5; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":206 + * '''convert value to '.' if None''' + * if v == None: return "." + * else: return str(v) # <<<<<<<<<<<<<< + * + * def quote( v ): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + __pyx_L5:; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("ctabix.toDot"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":208 + * else: return str(v) + * + * def quote( v ): # <<<<<<<<<<<<<< + * '''return a quoted attribute.''' + * if type(v) in types.StringTypes: + */ + +static PyObject *__pyx_pf_6ctabix_quote(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/ +static char __pyx_doc_6ctabix_quote[] = "quote(v)\nreturn a quoted attribute."; +static PyObject *__pyx_pf_6ctabix_quote(PyObject *__pyx_self, PyObject *__pyx_v_v) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("quote"); + __pyx_self = __pyx_self; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":210 + * def quote( v ): + * '''return a quoted attribute.''' + * if type(v) in types.StringTypes: # <<<<<<<<<<<<<< + * return '"%s"' % v + * else: + */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__StringTypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = ((PySequence_Contains(__pyx_t_2, ((PyObject *)Py_TYPE(__pyx_v_v))))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":211 + * '''return a quoted attribute.''' + * if type(v) in types.StringTypes: + * return '"%s"' % v # <<<<<<<<<<<<<< + * else: + * return str(v) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __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; + goto __pyx_L5; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":213 + * return '"%s"' % v + * else: + * return str(v) # <<<<<<<<<<<<<< + * + * cdef class TupleProxy: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + __pyx_L5:; + + __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("ctabix.quote"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":227 + * int index + * + * def __cinit__(self ): # <<<<<<<<<<<<<< + * + * self.data = NULL + */ + +static int __pyx_pf_6ctabix_10TupleProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_6ctabix_10TupleProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannySetupContext("__cinit__"); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 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, "__cinit__", 0))) return -1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":229 + * def __cinit__(self ): + * + * self.data = NULL # <<<<<<<<<<<<<< + * self.fields = NULL + * self.index = 0 + */ + ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->data = NULL; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":230 + * + * self.data = NULL + * self.fields = NULL # <<<<<<<<<<<<<< + * self.index = 0 + * + */ + ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->fields = NULL; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":231 + * self.data = NULL + * self.fields = NULL + * self.index = 0 # <<<<<<<<<<<<<< + * + * cdef take( self, char * buffer, size_t nbytes ): + */ + ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->index = 0; + + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":233 + * self.index = 0 + * + * cdef take( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<< + * '''start presenting buffer. + * + */ + +static PyObject *__pyx_f_6ctabix_10TupleProxy_take(struct __pyx_obj_6ctabix_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("take"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":238 + * Take ownership of the pointer. + * ''' + * self.data = buffer # <<<<<<<<<<<<<< + * self.update( buffer, nbytes ) + * + */ + __pyx_v_self->data = __pyx_v_buffer; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":239 + * ''' + * self.data = buffer + * self.update( buffer, nbytes ) # <<<<<<<<<<<<<< + * + * cdef present( self, char * buffer, size_t nbytes ): + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6ctabix_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ctabix.TupleProxy.take"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":241 + * self.update( buffer, nbytes ) + * + * cdef present( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<< + * '''start presenting buffer. + * + */ + +static PyObject *__pyx_f_6ctabix_10TupleProxy_present(struct __pyx_obj_6ctabix_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("present"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":246 + * Do not take ownership of the pointer. + * ''' + * self.update( buffer, nbytes ) # <<<<<<<<<<<<<< + * + * cdef copy( self, char * buffer, size_t nbytes ): + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6ctabix_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ctabix.TupleProxy.present"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":248 + * self.update( buffer, nbytes ) + * + * cdef copy( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<< + * '''start presenting buffer. + * + */ + +static PyObject *__pyx_f_6ctabix_10TupleProxy_copy(struct __pyx_obj_6ctabix_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { + int __pyx_v_s; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("copy"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":255 + * cdef int s + * # +1 for '\0' + * s = sizeof(char) * (nbytes + 1) # <<<<<<<<<<<<<< + * self.data = malloc( s ) + * memcpy( self.data, buffer, s ) + */ + __pyx_v_s = ((sizeof(char)) * (__pyx_v_nbytes + 1)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":256 + * # +1 for '\0' + * s = sizeof(char) * (nbytes + 1) + * self.data = malloc( s ) # <<<<<<<<<<<<<< + * memcpy( self.data, buffer, s ) + * self.update( self.data, nbytes ) + */ + __pyx_v_self->data = ((char *)malloc(__pyx_v_s)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":257 + * s = sizeof(char) * (nbytes + 1) + * self.data = malloc( s ) + * memcpy( self.data, buffer, s ) # <<<<<<<<<<<<<< + * self.update( self.data, nbytes ) + * + */ + memcpy(__pyx_v_self->data, __pyx_v_buffer, __pyx_v_s); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":258 + * self.data = malloc( s ) + * memcpy( self.data, buffer, s ) + * self.update( self.data, nbytes ) # <<<<<<<<<<<<<< + * + * cdef update( self, char * buffer, size_t nbytes ): + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6ctabix_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_self->data, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ctabix.TupleProxy.copy"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":260 + * self.update( self.data, nbytes ) + * + * cdef update( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<< + * '''update internal data.''' + * cdef char * pos + */ + +static PyObject *__pyx_f_6ctabix_10TupleProxy_update(struct __pyx_obj_6ctabix_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { + char *__pyx_v_pos; + char *__pyx_v_old_pos; + int __pyx_v_field; + int __pyx_v_max_fields; + PyObject *__pyx_r = NULL; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("update"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":266 + * cdef int field + * cdef int max_fields + * field = 0 # <<<<<<<<<<<<<< + * + * if buffer[nbytes] != 0: + */ + __pyx_v_field = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":268 + * field = 0 + * + * if buffer[nbytes] != 0: # <<<<<<<<<<<<<< + * raise ValueError( "incomplete line at %s" % buffer ) + * + */ + __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":269 + * + * if buffer[nbytes] != 0: + * raise ValueError( "incomplete line at %s" % buffer ) # <<<<<<<<<<<<<< + * + * if self.fields != NULL: + */ + __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 269; __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_ValueError, __pyx_t_2, NULL); 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_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":271 + * raise ValueError( "incomplete line at %s" % buffer ) + * + * if self.fields != NULL: # <<<<<<<<<<<<<< + * free(self.fields) + * + */ + __pyx_t_1 = (__pyx_v_self->fields != NULL); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":272 + * + * if self.fields != NULL: + * free(self.fields) # <<<<<<<<<<<<<< + * + * max_fields = nbytes / 4 + */ + free(__pyx_v_self->fields); + goto __pyx_L4; + } + __pyx_L4:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":274 + * free(self.fields) + * + * max_fields = nbytes / 4 # <<<<<<<<<<<<<< + * self.fields = calloc( max_fields, sizeof(char *) ) + * + */ + __pyx_v_max_fields = (__pyx_v_nbytes / 4); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":275 + * + * max_fields = nbytes / 4 + * self.fields = calloc( max_fields, sizeof(char *) ) # <<<<<<<<<<<<<< + * + * pos = buffer + */ + __pyx_v_self->fields = ((char **)calloc(__pyx_v_max_fields, (sizeof(char *)))); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":277 + * self.fields = calloc( max_fields, sizeof(char *) ) + * + * pos = buffer # <<<<<<<<<<<<<< + * self.fields[0] = pos + * field += 1 + */ + __pyx_v_pos = __pyx_v_buffer; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":278 + * + * pos = buffer + * self.fields[0] = pos # <<<<<<<<<<<<<< + * field += 1 + * old_pos = pos + */ + (__pyx_v_self->fields[0]) = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":279 + * pos = buffer + * self.fields[0] = pos + * field += 1 # <<<<<<<<<<<<<< + * old_pos = pos + * + */ + __pyx_v_field += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":280 + * self.fields[0] = pos + * field += 1 + * old_pos = pos # <<<<<<<<<<<<<< + * + * while 1: + */ + __pyx_v_old_pos = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":282 + * old_pos = pos + * + * while 1: # <<<<<<<<<<<<<< + * + * pos = memchr( pos, '\t', nbytes ) + */ + while (1) { + if (!1) break; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":284 + * while 1: + * + * pos = memchr( pos, '\t', nbytes ) # <<<<<<<<<<<<<< + * if pos == NULL: break + * pos[0] = '\0' + */ + __pyx_v_pos = ((char *)memchr(__pyx_v_pos, '\t', __pyx_v_nbytes)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":285 + * + * pos = memchr( pos, '\t', nbytes ) + * if pos == NULL: break # <<<<<<<<<<<<<< + * pos[0] = '\0' + * pos += 1 + */ + __pyx_t_1 = (__pyx_v_pos == NULL); + if (__pyx_t_1) { + goto __pyx_L6_break; + goto __pyx_L7; + } + __pyx_L7:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":286 + * pos = memchr( pos, '\t', nbytes ) + * if pos == NULL: break + * pos[0] = '\0' # <<<<<<<<<<<<<< + * pos += 1 + * self.fields[field] = pos + */ + (__pyx_v_pos[0]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":287 + * if pos == NULL: break + * pos[0] = '\0' + * pos += 1 # <<<<<<<<<<<<<< + * self.fields[field] = pos + * field += 1 + */ + __pyx_v_pos += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":288 + * pos[0] = '\0' + * pos += 1 + * self.fields[field] = pos # <<<<<<<<<<<<<< + * field += 1 + * if field >= max_fields: + */ + (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":289 + * pos += 1 + * self.fields[field] = pos + * field += 1 # <<<<<<<<<<<<<< + * if field >= max_fields: + * raise ValueError("row too large - more than %i fields" % max_fields ) + */ + __pyx_v_field += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":290 + * self.fields[field] = pos + * field += 1 + * if field >= max_fields: # <<<<<<<<<<<<<< + * raise ValueError("row too large - more than %i fields" % max_fields ) + * nbytes -= pos - old_pos + */ + __pyx_t_1 = (__pyx_v_field >= __pyx_v_max_fields); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":291 + * field += 1 + * if field >= max_fields: + * raise ValueError("row too large - more than %i fields" % max_fields ) # <<<<<<<<<<<<<< + * nbytes -= pos - old_pos + * if nbytes < 0: break + */ + __pyx_t_3 = PyInt_FromLong(__pyx_v_max_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__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 = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); 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); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L8; + } + __pyx_L8:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":292 + * if field >= max_fields: + * raise ValueError("row too large - more than %i fields" % max_fields ) + * nbytes -= pos - old_pos # <<<<<<<<<<<<<< + * if nbytes < 0: break + * old_pos = pos + */ + __pyx_v_nbytes -= (__pyx_v_pos - __pyx_v_old_pos); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":293 + * raise ValueError("row too large - more than %i fields" % max_fields ) + * nbytes -= pos - old_pos + * if nbytes < 0: break # <<<<<<<<<<<<<< + * old_pos = pos + * + */ + __pyx_t_1 = (__pyx_v_nbytes < 0); + if (__pyx_t_1) { + goto __pyx_L6_break; + goto __pyx_L9; + } + __pyx_L9:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":294 + * nbytes -= pos - old_pos + * if nbytes < 0: break + * old_pos = pos # <<<<<<<<<<<<<< + * + * self.nfields = field + */ + __pyx_v_old_pos = __pyx_v_pos; + } + __pyx_L6_break:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":296 + * old_pos = pos + * + * self.nfields = field # <<<<<<<<<<<<<< + * + * def __getitem__( self, key ): + */ + __pyx_v_self->nfields = __pyx_v_field; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("ctabix.TupleProxy.update"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":298 + * self.nfields = field + * + * def __getitem__( self, key ): # <<<<<<<<<<<<<< + * + * cdef int i + */ + +static PyObject *__pyx_pf_6ctabix_10TupleProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ +static PyObject *__pyx_pf_6ctabix_10TupleProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { + int __pyx_v_i; + PyObject *__pyx_r = NULL; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("__getitem__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":301 + * + * cdef int i + * i = key # <<<<<<<<<<<<<< + * if i < 0: i += self.nfields + * if i >= self.nfields or i < 0: + */ + __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_key); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_i = __pyx_t_1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":302 + * cdef int i + * i = key + * if i < 0: i += self.nfields # <<<<<<<<<<<<<< + * if i >= self.nfields or i < 0: + * raise IndexError( "list index out of range" ) + */ + __pyx_t_2 = (__pyx_v_i < 0); + if (__pyx_t_2) { + __pyx_v_i += ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->nfields; + goto __pyx_L5; + } + __pyx_L5:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":303 + * i = key + * if i < 0: i += self.nfields + * if i >= self.nfields or i < 0: # <<<<<<<<<<<<<< + * raise IndexError( "list index out of range" ) + * return self.fields[i] + */ + __pyx_t_2 = (__pyx_v_i >= ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->nfields); + if (!__pyx_t_2) { + __pyx_t_3 = (__pyx_v_i < 0); + __pyx_t_4 = __pyx_t_3; + } else { + __pyx_t_4 = __pyx_t_2; + } + if (__pyx_t_4) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":304 + * if i < 0: i += self.nfields + * if i >= self.nfields or i < 0: + * raise IndexError( "list index out of range" ) # <<<<<<<<<<<<<< + * return self.fields[i] + * + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_17)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_17)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_17)); + __pyx_t_6 = PyObject_Call(__pyx_builtin_IndexError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":305 + * if i >= self.nfields or i < 0: + * raise IndexError( "list index out of range" ) + * return self.fields[i] # <<<<<<<<<<<<<< + * + * def __len__(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyBytes_FromString((((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->fields[__pyx_v_i])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_r = ((PyObject *)__pyx_t_6); + __pyx_t_6 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("ctabix.TupleProxy.__getitem__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":307 + * return self.fields[i] + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.nfields + * + */ + +static Py_ssize_t __pyx_pf_6ctabix_10TupleProxy___len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pf_6ctabix_10TupleProxy___len__(PyObject *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannySetupContext("__len__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":308 + * + * def __len__(self): + * return self.nfields # <<<<<<<<<<<<<< + * + * def __dealloc__(self): + */ + __pyx_r = ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->nfields; + goto __pyx_L0; + + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":310 + * return self.nfields + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.data != NULL: + * free(self.data) + */ + +static void __pyx_pf_6ctabix_10TupleProxy___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_6ctabix_10TupleProxy___dealloc__(PyObject *__pyx_v_self) { + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":311 + * + * def __dealloc__(self): + * if self.data != NULL: # <<<<<<<<<<<<<< + * free(self.data) + * + */ + __pyx_t_1 = (((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->data != NULL); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":312 + * def __dealloc__(self): + * if self.data != NULL: + * free(self.data) # <<<<<<<<<<<<<< + * + * def __iter__(self): + */ + free(((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->data); + goto __pyx_L5; + } + __pyx_L5:; + + __Pyx_RefNannyFinishContext(); +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":314 + * free(self.data) + * + * def __iter__(self): # <<<<<<<<<<<<<< + * self.index = 0 + * return self + */ + +static PyObject *__pyx_pf_6ctabix_10TupleProxy___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_10TupleProxy___iter__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannySetupContext("__iter__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":315 + * + * def __iter__(self): + * self.index = 0 # <<<<<<<<<<<<<< + * return self + * + */ + ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->index = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":316 + * def __iter__(self): + * self.index = 0 + * return self # <<<<<<<<<<<<<< + * + * def __next__(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":318 + * return self + * + * def __next__(self): # <<<<<<<<<<<<<< + * """python version of next(). + * """ + */ + +static PyObject *__pyx_pf_6ctabix_10TupleProxy___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_6ctabix_10TupleProxy___next__[] = "python version of next().\n "; +struct wrapperbase __pyx_wrapperbase_6ctabix_10TupleProxy___next__; +static PyObject *__pyx_pf_6ctabix_10TupleProxy___next__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__next__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":321 + * """python version of next(). + * """ + * if self.index >= self.nfields: # <<<<<<<<<<<<<< + * raise StopIteration + * self.index += 1 + */ + __pyx_t_1 = (((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->index >= ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->nfields); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":322 + * """ + * if self.index >= self.nfields: + * raise StopIteration # <<<<<<<<<<<<<< + * self.index += 1 + * return self.fields[self.index-1] + */ + __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":323 + * if self.index >= self.nfields: + * raise StopIteration + * self.index += 1 # <<<<<<<<<<<<<< + * return self.fields[self.index-1] + * + */ + ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->index += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":324 + * raise StopIteration + * self.index += 1 + * return self.fields[self.index-1] # <<<<<<<<<<<<<< + * + * cdef class GTFProxy: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyBytes_FromString((((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->fields[(((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_v_self)->index - 1)])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __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_2); + __Pyx_AddTraceback("ctabix.TupleProxy.__next__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":355 + * cdef bint hasOwnAttributes + * + * def __cinit__(self ): # <<<<<<<<<<<<<< + * self.data = NULL + * self.isModified = False + */ + +static int __pyx_pf_6ctabix_8GTFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannySetupContext("__cinit__"); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 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, "__cinit__", 0))) return -1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":356 + * + * def __cinit__(self ): + * self.data = NULL # <<<<<<<<<<<<<< + * self.isModified = False + * self.hasOwnAttributes = False + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->data = NULL; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":357 + * def __cinit__(self ): + * self.data = NULL + * self.isModified = False # <<<<<<<<<<<<<< + * self.hasOwnAttributes = False + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":358 + * self.data = NULL + * self.isModified = False + * self.hasOwnAttributes = False # <<<<<<<<<<<<<< + * + * cdef take( self, char * buffer, size_t nbytes ): + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->hasOwnAttributes = 0; + + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":360 + * self.hasOwnAttributes = False + * + * cdef take( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<< + * '''start presenting buffer. + * + */ + +static PyObject *__pyx_f_6ctabix_8GTFProxy_take(struct __pyx_obj_6ctabix_GTFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("take"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":365 + * Take ownership of the pointer. + * ''' + * self.data = buffer # <<<<<<<<<<<<<< + * self.update( buffer, nbytes ) + * self.isModified = False + */ + __pyx_v_self->data = __pyx_v_buffer; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":366 + * ''' + * self.data = buffer + * self.update( buffer, nbytes ) # <<<<<<<<<<<<<< + * self.isModified = False + * + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6ctabix_GTFProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":367 + * self.data = buffer + * self.update( buffer, nbytes ) + * self.isModified = False # <<<<<<<<<<<<<< + * + * cdef present( self, char * buffer, size_t nbytes ): + */ + __pyx_v_self->isModified = 0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ctabix.GTFProxy.take"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":369 + * self.isModified = False + * + * cdef present( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<< + * '''start presenting buffer. + * + */ + +static PyObject *__pyx_f_6ctabix_8GTFProxy_present(struct __pyx_obj_6ctabix_GTFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("present"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":374 + * Do not take ownership of the pointer. + * ''' + * self.update( buffer, nbytes ) # <<<<<<<<<<<<<< + * self.isModified = False + * + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6ctabix_GTFProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":375 + * ''' + * self.update( buffer, nbytes ) + * self.isModified = False # <<<<<<<<<<<<<< + * + * cdef copy( self, char * buffer, size_t nbytes ): + */ + __pyx_v_self->isModified = 0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ctabix.GTFProxy.present"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":377 + * self.isModified = False + * + * cdef copy( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<< + * '''start presenting buffer. + * + */ + +static PyObject *__pyx_f_6ctabix_8GTFProxy_copy(struct __pyx_obj_6ctabix_GTFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { + int __pyx_v_s; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("copy"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":384 + * cdef int s + * # +1 for '\0' + * s = sizeof(char) * (nbytes + 1) # <<<<<<<<<<<<<< + * self.data = malloc( s ) + * memcpy( self.data, buffer, s ) + */ + __pyx_v_s = ((sizeof(char)) * (__pyx_v_nbytes + 1)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":385 + * # +1 for '\0' + * s = sizeof(char) * (nbytes + 1) + * self.data = malloc( s ) # <<<<<<<<<<<<<< + * memcpy( self.data, buffer, s ) + * self.update( self.data, nbytes ) + */ + __pyx_v_self->data = ((char *)malloc(__pyx_v_s)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":386 + * s = sizeof(char) * (nbytes + 1) + * self.data = malloc( s ) + * memcpy( self.data, buffer, s ) # <<<<<<<<<<<<<< + * self.update( self.data, nbytes ) + * self.isModified = False + */ + memcpy(__pyx_v_self->data, __pyx_v_buffer, __pyx_v_s); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":387 + * self.data = malloc( s ) + * memcpy( self.data, buffer, s ) + * self.update( self.data, nbytes ) # <<<<<<<<<<<<<< + * self.isModified = False + * + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6ctabix_GTFProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_self->data, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":388 + * memcpy( self.data, buffer, s ) + * self.update( self.data, nbytes ) + * self.isModified = False # <<<<<<<<<<<<<< + * + * cdef update( self, char * buffer, size_t nbytes ): + */ + __pyx_v_self->isModified = 0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ctabix.GTFProxy.copy"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":390 + * self.isModified = False + * + * cdef update( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<< + * '''update internal data. + * + */ + +static PyObject *__pyx_f_6ctabix_8GTFProxy_update(struct __pyx_obj_6ctabix_GTFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) { + char *__pyx_v_cstart; + char *__pyx_v_cend; + char *__pyx_v_pos; + PyObject *__pyx_r = NULL; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("update"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":397 + * cdef int end + * cdef char * cstart, * cend, * cscore + * self.contig = buffer # <<<<<<<<<<<<<< + * self.nbytes = nbytes + * cdef char * pos + */ + __pyx_v_self->contig = __pyx_v_buffer; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":398 + * cdef char * cstart, * cend, * cscore + * self.contig = buffer + * self.nbytes = nbytes # <<<<<<<<<<<<<< + * cdef char * pos + * + */ + __pyx_v_self->nbytes = __pyx_v_nbytes; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":401 + * cdef char * pos + * + * if buffer[nbytes] != 0: # <<<<<<<<<<<<<< + * raise ValueError( "incomplete line at %s" % buffer ) + * + */ + __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":402 + * + * if buffer[nbytes] != 0: + * raise ValueError( "incomplete line at %s" % buffer ) # <<<<<<<<<<<<<< + * + * pos = strchr( buffer, '\t' ) + */ + __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 402; __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_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":404 + * raise ValueError( "incomplete line at %s" % buffer ) + * + * pos = strchr( buffer, '\t' ) # <<<<<<<<<<<<<< + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + */ + __pyx_v_pos = strchr(__pyx_v_buffer, '\t'); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":405 + * + * pos = strchr( buffer, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) # <<<<<<<<<<<<<< + * pos[0] = '\0' + * pos += 1 + */ + __pyx_t_1 = (__pyx_v_pos == NULL); + if (__pyx_t_1) { + __pyx_t_3 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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 = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, 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_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":406 + * pos = strchr( buffer, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' # <<<<<<<<<<<<<< + * pos += 1 + * self.source = pos + */ + (__pyx_v_pos[0]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":407 + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + * pos += 1 # <<<<<<<<<<<<<< + * self.source = pos + * + */ + __pyx_v_pos += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":408 + * pos[0] = '\0' + * pos += 1 + * self.source = pos # <<<<<<<<<<<<<< + * + * pos = strchr( pos, '\t' ) + */ + __pyx_v_self->source = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":410 + * self.source = pos + * + * pos = strchr( pos, '\t' ) # <<<<<<<<<<<<<< + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + */ + __pyx_v_pos = strchr(__pyx_v_pos, '\t'); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":411 + * + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) # <<<<<<<<<<<<<< + * pos[0] = '\0' + * pos += 1 + */ + __pyx_t_1 = (__pyx_v_pos == NULL); + if (__pyx_t_1) { + __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 411; __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_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":412 + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' # <<<<<<<<<<<<<< + * pos += 1 + * self.feature = pos + */ + (__pyx_v_pos[0]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":413 + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + * pos += 1 # <<<<<<<<<<<<<< + * self.feature = pos + * + */ + __pyx_v_pos += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":414 + * pos[0] = '\0' + * pos += 1 + * self.feature = pos # <<<<<<<<<<<<<< + * + * pos = strchr( pos, '\t' ) + */ + __pyx_v_self->feature = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":416 + * self.feature = pos + * + * pos = strchr( pos, '\t' ) # <<<<<<<<<<<<<< + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + */ + __pyx_v_pos = strchr(__pyx_v_pos, '\t'); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":417 + * + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) # <<<<<<<<<<<<<< + * pos[0] = '\0' + * pos += 1 + */ + __pyx_t_1 = (__pyx_v_pos == NULL); + if (__pyx_t_1) { + __pyx_t_3 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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 = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":418 + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' # <<<<<<<<<<<<<< + * pos += 1 + * cstart = pos + */ + (__pyx_v_pos[0]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":419 + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + * pos += 1 # <<<<<<<<<<<<<< + * cstart = pos + * + */ + __pyx_v_pos += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":420 + * pos[0] = '\0' + * pos += 1 + * cstart = pos # <<<<<<<<<<<<<< + * + * pos = strchr( pos, '\t' ) + */ + __pyx_v_cstart = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":422 + * cstart = pos + * + * pos = strchr( pos, '\t' ) # <<<<<<<<<<<<<< + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + */ + __pyx_v_pos = strchr(__pyx_v_pos, '\t'); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":423 + * + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) # <<<<<<<<<<<<<< + * pos[0] = '\0' + * pos += 1 + */ + __pyx_t_1 = (__pyx_v_pos == NULL); + if (__pyx_t_1) { + __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 423; __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_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L7; + } + __pyx_L7:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":424 + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' # <<<<<<<<<<<<<< + * pos += 1 + * cend = pos + */ + (__pyx_v_pos[0]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":425 + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + * pos += 1 # <<<<<<<<<<<<<< + * cend = pos + * + */ + __pyx_v_pos += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":426 + * pos[0] = '\0' + * pos += 1 + * cend = pos # <<<<<<<<<<<<<< + * + * pos = strchr( pos, '\t' ) + */ + __pyx_v_cend = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":428 + * cend = pos + * + * pos = strchr( pos, '\t' ) # <<<<<<<<<<<<<< + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + */ + __pyx_v_pos = strchr(__pyx_v_pos, '\t'); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":429 + * + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) # <<<<<<<<<<<<<< + * pos[0] = '\0' + * pos += 1 + */ + __pyx_t_1 = (__pyx_v_pos == NULL); + if (__pyx_t_1) { + __pyx_t_3 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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 = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L8; + } + __pyx_L8:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":430 + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' # <<<<<<<<<<<<<< + * pos += 1 + * self.score = pos + */ + (__pyx_v_pos[0]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":431 + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + * pos += 1 # <<<<<<<<<<<<<< + * self.score = pos + * + */ + __pyx_v_pos += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":432 + * pos[0] = '\0' + * pos += 1 + * self.score = pos # <<<<<<<<<<<<<< + * + * pos = strchr( pos, '\t' ) + */ + __pyx_v_self->score = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":434 + * self.score = pos + * + * pos = strchr( pos, '\t' ) # <<<<<<<<<<<<<< + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + */ + __pyx_v_pos = strchr(__pyx_v_pos, '\t'); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":435 + * + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) # <<<<<<<<<<<<<< + * pos[0] = '\0' + * pos += 1 + */ + __pyx_t_1 = (__pyx_v_pos == NULL); + if (__pyx_t_1) { + __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 435; __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_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L9; + } + __pyx_L9:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":436 + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' # <<<<<<<<<<<<<< + * pos += 1 + * self.strand = pos + */ + (__pyx_v_pos[0]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":437 + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + * pos += 1 # <<<<<<<<<<<<<< + * self.strand = pos + * + */ + __pyx_v_pos += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":438 + * pos[0] = '\0' + * pos += 1 + * self.strand = pos # <<<<<<<<<<<<<< + * + * pos = strchr( pos, '\t' ) + */ + __pyx_v_self->strand = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":440 + * self.strand = pos + * + * pos = strchr( pos, '\t' ) # <<<<<<<<<<<<<< + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + */ + __pyx_v_pos = strchr(__pyx_v_pos, '\t'); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":441 + * + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) # <<<<<<<<<<<<<< + * pos[0] = '\0' + * pos += 1 + */ + __pyx_t_1 = (__pyx_v_pos == NULL); + if (__pyx_t_1) { + __pyx_t_3 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __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 = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L10; + } + __pyx_L10:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":442 + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' # <<<<<<<<<<<<<< + * pos += 1 + * self.frame = pos + */ + (__pyx_v_pos[0]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":443 + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + * pos += 1 # <<<<<<<<<<<<<< + * self.frame = pos + * + */ + __pyx_v_pos += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":444 + * pos[0] = '\0' + * pos += 1 + * self.frame = pos # <<<<<<<<<<<<<< + * + * pos = strchr( pos, '\t' ) + */ + __pyx_v_self->frame = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":446 + * self.frame = pos + * + * pos = strchr( pos, '\t' ) # <<<<<<<<<<<<<< + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + */ + __pyx_v_pos = strchr(__pyx_v_pos, '\t'); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":447 + * + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) # <<<<<<<<<<<<<< + * pos[0] = '\0' + * pos += 1 + */ + __pyx_t_1 = (__pyx_v_pos == NULL); + if (__pyx_t_1) { + __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __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 = 447; __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_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L11; + } + __pyx_L11:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":448 + * pos = strchr( pos, '\t' ) + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' # <<<<<<<<<<<<<< + * pos += 1 + * self.attributes = pos + */ + (__pyx_v_pos[0]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":449 + * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) + * pos[0] = '\0' + * pos += 1 # <<<<<<<<<<<<<< + * self.attributes = pos + * self.start = atoi( cstart ) - 1 + */ + __pyx_v_pos += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":450 + * pos[0] = '\0' + * pos += 1 + * self.attributes = pos # <<<<<<<<<<<<<< + * self.start = atoi( cstart ) - 1 + * self.end = atoi( cend ) + */ + __pyx_v_self->attributes = __pyx_v_pos; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":451 + * pos += 1 + * self.attributes = pos + * self.start = atoi( cstart ) - 1 # <<<<<<<<<<<<<< + * self.end = atoi( cend ) + * + */ + __pyx_v_self->start = (atoi(__pyx_v_cstart) - 1); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":452 + * self.attributes = pos + * self.start = atoi( cstart ) - 1 + * self.end = atoi( cend ) # <<<<<<<<<<<<<< + * + * property contig: + */ + __pyx_v_self->end = atoi(__pyx_v_cend); + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("ctabix.GTFProxy.update"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":456 + * property contig: + * '''contig of feature.''' + * def __get__( self ): return self.contig # <<<<<<<<<<<<<< + * def __set__( self, value ): + * self.isModified = True + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_6contig___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy_6contig___get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__"); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __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("ctabix.GTFProxy.contig.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":457 + * '''contig of feature.''' + * def __get__( self ): return self.contig + * def __set__( self, value ): # <<<<<<<<<<<<<< + * self.isModified = True + * self.contig = value + */ + +static int __pyx_pf_6ctabix_8GTFProxy_6contig___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy_6contig___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + char *__pyx_t_1; + __Pyx_RefNannySetupContext("__set__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":458 + * def __get__( self ): return self.contig + * def __set__( self, value ): + * self.isModified = True # <<<<<<<<<<<<<< + * self.contig = value + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":459 + * def __set__( self, value ): + * self.isModified = True + * self.contig = value # <<<<<<<<<<<<<< + * + * property feature: + */ + __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->contig = __pyx_t_1; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.contig.__set__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":463 + * property feature: + * '''feature name.''' + * def __get__( self ): return self.feature # <<<<<<<<<<<<<< + * def __set__( self, value ): + * self.isModified = True + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_7feature___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy_7feature___get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__"); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __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("ctabix.GTFProxy.feature.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":464 + * '''feature name.''' + * def __get__( self ): return self.feature + * def __set__( self, value ): # <<<<<<<<<<<<<< + * self.isModified = True + * self.feature = value + */ + +static int __pyx_pf_6ctabix_8GTFProxy_7feature___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy_7feature___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + char *__pyx_t_1; + __Pyx_RefNannySetupContext("__set__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":465 + * def __get__( self ): return self.feature + * def __set__( self, value ): + * self.isModified = True # <<<<<<<<<<<<<< + * self.feature = value + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":466 + * def __set__( self, value ): + * self.isModified = True + * self.feature = value # <<<<<<<<<<<<<< + * + * property source: + */ + __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->feature = __pyx_t_1; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.feature.__set__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":470 + * property source: + * '''feature source.''' + * def __get__( self ): return self.source # <<<<<<<<<<<<<< + * def __set__( self, value ): + * self.isModified = True + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_6source___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy_6source___get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__"); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __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("ctabix.GTFProxy.source.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":471 + * '''feature source.''' + * def __get__( self ): return self.source + * def __set__( self, value ): # <<<<<<<<<<<<<< + * self.isModified = True + * self.source = value + */ + +static int __pyx_pf_6ctabix_8GTFProxy_6source___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy_6source___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + char *__pyx_t_1; + __Pyx_RefNannySetupContext("__set__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":472 + * def __get__( self ): return self.source + * def __set__( self, value ): + * self.isModified = True # <<<<<<<<<<<<<< + * self.source = value + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":473 + * def __set__( self, value ): + * self.isModified = True + * self.source = value # <<<<<<<<<<<<<< + * + * property start: + */ + __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->source = __pyx_t_1; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.source.__set__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":477 + * property start: + * '''feature start (in 0-based open/closed coordinates).''' + * def __get__( self ): return self.start # <<<<<<<<<<<<<< + * def __set__( self, value ): + * self.isModified = True + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_5start___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy_5start___get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__"); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->start); 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_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("ctabix.GTFProxy.start.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":478 + * '''feature start (in 0-based open/closed coordinates).''' + * def __get__( self ): return self.start + * def __set__( self, value ): # <<<<<<<<<<<<<< + * self.isModified = True + * self.start = value + */ + +static int __pyx_pf_6ctabix_8GTFProxy_5start___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy_5start___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + uint32_t __pyx_t_1; + __Pyx_RefNannySetupContext("__set__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":479 + * def __get__( self ): return self.start + * def __set__( self, value ): + * self.isModified = True # <<<<<<<<<<<<<< + * self.start = value + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":480 + * def __set__( self, value ): + * self.isModified = True + * self.start = value # <<<<<<<<<<<<<< + * + * property end: + */ + __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->start = __pyx_t_1; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.start.__set__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":484 + * property end: + * '''feature end (in 0-based open/closed coordinates).''' + * def __get__( self ): return self.end # <<<<<<<<<<<<<< + * def __set__( self, value ): + * self.isModified = True + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_3end___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy_3end___get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__"); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __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("ctabix.GTFProxy.end.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":485 + * '''feature end (in 0-based open/closed coordinates).''' + * def __get__( self ): return self.end + * def __set__( self, value ): # <<<<<<<<<<<<<< + * self.isModified = True + * self.end = value + */ + +static int __pyx_pf_6ctabix_8GTFProxy_3end___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy_3end___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + uint32_t __pyx_t_1; + __Pyx_RefNannySetupContext("__set__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":486 + * def __get__( self ): return self.end + * def __set__( self, value ): + * self.isModified = True # <<<<<<<<<<<<<< + * self.end = value + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":487 + * def __set__( self, value ): + * self.isModified = True + * self.end = value # <<<<<<<<<<<<<< + * + * property score: + */ + __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->end = __pyx_t_1; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.end.__set__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":491 + * property score: + * '''feature score.''' + * def __get__( self ): # <<<<<<<<<<<<<< + * if self.score[0] == '.' and self.score[1] == '\0' : + * return None + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_5score___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy_5score___get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("__get__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":492 + * '''feature score.''' + * def __get__( self ): + * if self.score[0] == '.' and self.score[1] == '\0' : # <<<<<<<<<<<<<< + * return None + * else: + */ + __pyx_t_1 = ((((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->score[0]) == '.'); + if (__pyx_t_1) { + __pyx_t_2 = ((((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->score[1]) == '\x00'); + __pyx_t_3 = __pyx_t_2; + } else { + __pyx_t_3 = __pyx_t_1; + } + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":493 + * def __get__( self ): + * if self.score[0] == '.' and self.score[1] == '\0' : + * return None # <<<<<<<<<<<<<< + * else: + * return atof(self.score) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + goto __pyx_L5; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":495 + * return None + * else: + * return atof(self.score) # <<<<<<<<<<<<<< + * def __set__( self, value ): + * self.isModified = True + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyFloat_FromDouble(atof(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->score)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __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_L5:; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("ctabix.GTFProxy.score.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":496 + * else: + * return atof(self.score) + * def __set__( self, value ): # <<<<<<<<<<<<<< + * self.isModified = True + * self.score = value + */ + +static int __pyx_pf_6ctabix_8GTFProxy_5score___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy_5score___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + char *__pyx_t_1; + __Pyx_RefNannySetupContext("__set__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":497 + * return atof(self.score) + * def __set__( self, value ): + * self.isModified = True # <<<<<<<<<<<<<< + * self.score = value + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":498 + * def __set__( self, value ): + * self.isModified = True + * self.score = value # <<<<<<<<<<<<<< + * + * property strand: + */ + __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->score = __pyx_t_1; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.score.__set__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":502 + * property strand: + * '''feature strand.''' + * def __get__( self ): return self.strand # <<<<<<<<<<<<<< + * def __set__( self, value ): + * self.isModified = True + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_6strand___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy_6strand___get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__"); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __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("ctabix.GTFProxy.strand.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":503 + * '''feature strand.''' + * def __get__( self ): return self.strand + * def __set__( self, value ): # <<<<<<<<<<<<<< + * self.isModified = True + * self.strand = value + */ + +static int __pyx_pf_6ctabix_8GTFProxy_6strand___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy_6strand___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + char *__pyx_t_1; + __Pyx_RefNannySetupContext("__set__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":504 + * def __get__( self ): return self.strand + * def __set__( self, value ): + * self.isModified = True # <<<<<<<<<<<<<< + * self.strand = value + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":505 + * def __set__( self, value ): + * self.isModified = True + * self.strand = value # <<<<<<<<<<<<<< + * + * property frame: + */ + __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->strand = __pyx_t_1; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.strand.__set__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":509 + * property frame: + * '''feature frame.''' + * def __get__( self ): return self.frame # <<<<<<<<<<<<<< + * def __set__( self, value ): + * self.isModified = True + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_5frame___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy_5frame___get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__"); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __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("ctabix.GTFProxy.frame.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":510 + * '''feature frame.''' + * def __get__( self ): return self.frame + * def __set__( self, value ): # <<<<<<<<<<<<<< + * self.isModified = True + * self.frame = value + */ + +static int __pyx_pf_6ctabix_8GTFProxy_5frame___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy_5frame___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + char *__pyx_t_1; + __Pyx_RefNannySetupContext("__set__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":511 + * def __get__( self ): return self.frame + * def __set__( self, value ): + * self.isModified = True # <<<<<<<<<<<<<< + * self.frame = value + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":512 + * def __set__( self, value ): + * self.isModified = True + * self.frame = value # <<<<<<<<<<<<<< + * + * property attributes: + */ + __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->frame = __pyx_t_1; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.frame.__set__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":516 + * property attributes: + * '''feature attributes (as a string).''' + * def __get__( self ): return self.attributes # <<<<<<<<<<<<<< + * def __set__( self, value ): + * self.isModified = True + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_10attributes___get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy_10attributes___get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__get__"); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __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("ctabix.GTFProxy.attributes.__get__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":517 + * '''feature attributes (as a string).''' + * def __get__( self ): return self.attributes + * def __set__( self, value ): # <<<<<<<<<<<<<< + * self.isModified = True + * self.attributes = value + */ + +static int __pyx_pf_6ctabix_8GTFProxy_10attributes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pf_6ctabix_8GTFProxy_10attributes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + char *__pyx_t_1; + __Pyx_RefNannySetupContext("__set__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":518 + * def __get__( self ): return self.attributes + * def __set__( self, value ): + * self.isModified = True # <<<<<<<<<<<<<< + * self.attributes = value + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":519 + * def __set__( self, value ): + * self.isModified = True + * self.attributes = value # <<<<<<<<<<<<<< + * + * def asDict( self ): + */ + __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes = __pyx_t_1; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.attributes.__set__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":521 + * self.attributes = value + * + * def asDict( self ): # <<<<<<<<<<<<<< + * """parse attributes - return as dict + * """ + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6ctabix_8GTFProxy_asDict[] = "GTFProxy.asDict(self)\nparse attributes - return as dict\n "; +static PyObject *__pyx_pf_6ctabix_8GTFProxy_asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + char *__pyx_v_attributes; + PyObject *__pyx_v_fields; + PyObject *__pyx_v_result; + PyObject *__pyx_v_f; + PyObject *__pyx_v_d; + PyObject *__pyx_v_n; + PyObject *__pyx_v_v; + PyObject *__pyx_v_x; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + double __pyx_t_11; + int __pyx_t_12; + __Pyx_RefNannySetupContext("asDict"); + __pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_result = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_f = Py_None; __Pyx_INCREF(Py_None); + __pyx_v_d = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_n = Py_None; __Pyx_INCREF(Py_None); + __pyx_v_v = Py_None; __Pyx_INCREF(Py_None); + __pyx_v_x = Py_None; __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":526 + * + * # remove comments + * attributes = self.attributes # <<<<<<<<<<<<<< + * + * # separate into fields + */ + __pyx_v_attributes = ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":529 + * + * # separate into fields + * fields = [ x.strip() for x in attributes.split(";")[:-1]] # <<<<<<<<<<<<<< + * + * result = {} + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_3 = PyBytes_FromString(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __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 = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_19)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_19)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19)); + __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PySequence_GetSlice(__pyx_t_5, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); + } else { + __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break; + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; + } else if (likely(PyTuple_CheckExact(__pyx_t_5))) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; + } else { + __pyx_t_3 = PyIter_Next(__pyx_t_5); + if (!__pyx_t_3) { + if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_v_x); + __pyx_v_x = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_v_fields)); + __pyx_v_fields = __pyx_t_1; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":531 + * fields = [ x.strip() for x in attributes.split(";")[:-1]] + * + * result = {} # <<<<<<<<<<<<<< + * + * for f in fields: + */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_v_result)); + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":533 + * result = {} + * + * for f in fields: # <<<<<<<<<<<<<< + * + * d = [ x.strip() for x in f.split(" ")] + */ + if (likely(((PyObject *)__pyx_v_fields) != Py_None)) { + __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_fields); __Pyx_INCREF(__pyx_t_1); + } else { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + for (;;) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; + __Pyx_DECREF(__pyx_v_f); + __pyx_v_f = __pyx_t_5; + __pyx_t_5 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":535 + * for f in fields: + * + * d = [ x.strip() for x in f.split(" ")] # <<<<<<<<<<<<<< + * + * n,v = d[0], d[1] + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __pyx_t_4 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_20)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_20)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20)); + __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) { + __pyx_t_6 = 0; __pyx_t_3 = __pyx_t_7; __Pyx_INCREF(__pyx_t_3); + } else { + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + for (;;) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; + } else if (likely(PyTuple_CheckExact(__pyx_t_3))) { + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; + } else { + __pyx_t_7 = PyIter_Next(__pyx_t_3); + if (!__pyx_t_7) { + if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + __Pyx_GOTREF(__pyx_t_7); + } + __Pyx_DECREF(__pyx_v_x); + __pyx_v_x = __pyx_t_7; + __pyx_t_7 = 0; + __pyx_t_7 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_INCREF(((PyObject *)__pyx_t_5)); + __Pyx_DECREF(((PyObject *)__pyx_v_d)); + __pyx_v_d = __pyx_t_5; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":537 + * d = [ x.strip() for x in f.split(" ")] + * + * n,v = d[0], d[1] # <<<<<<<<<<<<<< + * if len(d) > 2: v = d[1:] + * + */ + __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_v_n); + __pyx_v_n = __pyx_t_5; + __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_v_v); + __pyx_v_v = __pyx_t_3; + __pyx_t_3 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":538 + * + * n,v = d[0], d[1] + * if len(d) > 2: v = d[1:] # <<<<<<<<<<<<<< + * + * if v[0] == '"' and v[-1] == '"': + */ + if (unlikely(__pyx_v_d == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = PyList_GET_SIZE(((PyObject *)__pyx_v_d)); + __pyx_t_8 = (__pyx_t_6 > 2); + if (__pyx_t_8) { + __pyx_t_3 = PySequence_GetSlice(((PyObject *)__pyx_v_d), 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_v_v); + __pyx_v_v = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L11; + } + __pyx_L11:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":540 + * if len(d) > 2: v = d[1:] + * + * if v[0] == '"' and v[-1] == '"': # <<<<<<<<<<<<<< + * v = v[1:-1] + * else: + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_kp_s_21), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_8) { + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_v, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_21), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_10 = __pyx_t_9; + } else { + __pyx_t_10 = __pyx_t_8; + } + if (__pyx_t_10) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":541 + * + * if v[0] == '"' and v[-1] == '"': + * v = v[1:-1] # <<<<<<<<<<<<<< + * else: + * ## try to convert to a value + */ + __pyx_t_3 = PySequence_GetSlice(__pyx_v_v, 1, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_v_v); + __pyx_v_v = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L12; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":544 + * else: + * ## try to convert to a value + * try: # <<<<<<<<<<<<<< + * v = float( v ) + * v = int( v ) + */ + { + PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb; + __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb); + __Pyx_XGOTREF(__pyx_save_exc_type); + __Pyx_XGOTREF(__pyx_save_exc_value); + __Pyx_XGOTREF(__pyx_save_exc_tb); + /*try:*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":545 + * ## try to convert to a value + * try: + * v = float( v ) # <<<<<<<<<<<<<< + * v = int( v ) + * except ValueError: + */ + __pyx_t_11 = __Pyx_PyObject_AsDouble(__pyx_v_v); if (unlikely(__pyx_t_11 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __pyx_t_3 = PyFloat_FromDouble(__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_v_v); + __pyx_v_v = __pyx_t_3; + __pyx_t_3 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":546 + * try: + * v = float( v ) + * v = int( v ) # <<<<<<<<<<<<<< + * except ValueError: + * pass + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_v_v); + __pyx_v_v = __pyx_t_5; + __pyx_t_5 = 0; + } + __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0; + __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0; + __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0; + goto __pyx_L20_try_end; + __pyx_L13_error:; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":547 + * v = float( v ) + * v = int( v ) + * except ValueError: # <<<<<<<<<<<<<< + * pass + * except TypeError: + */ + __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); + if (__pyx_t_12) { + PyErr_Restore(0,0,0); + goto __pyx_L14_exception_handled; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":549 + * except ValueError: + * pass + * except TypeError: # <<<<<<<<<<<<<< + * pass + * + */ + __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_TypeError); + if (__pyx_t_12) { + PyErr_Restore(0,0,0); + goto __pyx_L14_exception_handled; + } + __Pyx_XGIVEREF(__pyx_save_exc_type); + __Pyx_XGIVEREF(__pyx_save_exc_value); + __Pyx_XGIVEREF(__pyx_save_exc_tb); + __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb); + goto __pyx_L1_error; + __pyx_L14_exception_handled:; + __Pyx_XGIVEREF(__pyx_save_exc_type); + __Pyx_XGIVEREF(__pyx_save_exc_value); + __Pyx_XGIVEREF(__pyx_save_exc_tb); + __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb); + __pyx_L20_try_end:; + } + } + __pyx_L12:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":552 + * pass + * + * result[n] = v # <<<<<<<<<<<<<< + * + * return result + */ + if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_n, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":554 + * result[n] = v + * + * return result # <<<<<<<<<<<<<< + * + * def fromDict( self, d ): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + 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_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("ctabix.GTFProxy.asDict"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_fields); + __Pyx_DECREF(__pyx_v_result); + __Pyx_DECREF(__pyx_v_f); + __Pyx_DECREF(__pyx_v_d); + __Pyx_DECREF(__pyx_v_n); + __Pyx_DECREF(__pyx_v_v); + __Pyx_DECREF(__pyx_v_x); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":556 + * return result + * + * def fromDict( self, d ): # <<<<<<<<<<<<<< + * '''set attributes from a dictionary.''' + * cdef char * p + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d); /*proto*/ +static char __pyx_doc_6ctabix_8GTFProxy_fromDict[] = "GTFProxy.fromDict(self, d)\nset attributes from a dictionary."; +static PyObject *__pyx_pf_6ctabix_8GTFProxy_fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d) { + char *__pyx_v_p; + int __pyx_v_l; + PyObject *__pyx_v_aa; + PyObject *__pyx_v_k; + PyObject *__pyx_v_v; + PyObject *__pyx_v_a; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + char *__pyx_t_9; + __Pyx_RefNannySetupContext("fromDict"); + __pyx_v_aa = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_k = Py_None; __Pyx_INCREF(Py_None); + __pyx_v_v = Py_None; __Pyx_INCREF(Py_None); + __pyx_v_a = Py_None; __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":562 + * + * # clean up if this field is set twice + * if self.hasOwnAttributes: # <<<<<<<<<<<<<< + * free(self.attributes) + * + */ + if (((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->hasOwnAttributes) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":563 + * # clean up if this field is set twice + * if self.hasOwnAttributes: + * free(self.attributes) # <<<<<<<<<<<<<< + * + * aa = [] + */ + free(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes); + goto __pyx_L5; + } + __pyx_L5:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":565 + * free(self.attributes) + * + * aa = [] # <<<<<<<<<<<<<< + * for k,v in d.items(): + * if type(v) == types.StringType: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_v_aa)); + __pyx_v_aa = __pyx_t_1; + __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":566 + * + * aa = [] + * for k,v in d.items(): # <<<<<<<<<<<<<< + * if type(v) == types.StringType: + * aa.append( '%s "%s"' % (k,v) ) + */ + __pyx_t_1 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __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 = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; + } else if (likely(PyTuple_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; + } else { + __pyx_t_3 = PyIter_Next(__pyx_t_1); + if (!__pyx_t_3) { + if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) { + PyObject* tuple = __pyx_t_3; + __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4); + __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_v_k); + __pyx_v_k = __pyx_t_4; + __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_v_v); + __pyx_v_v = __pyx_t_5; + __pyx_t_5 = 0; + } else { + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_v_k); + __pyx_v_k = __pyx_t_4; + __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_v_v); + __pyx_v_v = __pyx_t_5; + __pyx_t_5 = 0; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":567 + * aa = [] + * for k,v in d.items(): + * if type(v) == types.StringType: # <<<<<<<<<<<<<< + * aa.append( '%s "%s"' % (k,v) ) + * else: + */ + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__StringType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":568 + * for k,v in d.items(): + * if type(v) == types.StringType: + * aa.append( '%s "%s"' % (k,v) ) # <<<<<<<<<<<<<< + * else: + * aa.append( '%s %s' % (k,str(v)) ) + */ + if (unlikely(__pyx_v_aa == Py_None)) { + PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __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 = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_k); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_k); + __Pyx_GIVEREF(__pyx_v_k); + __Pyx_INCREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_aa), ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + goto __pyx_L8; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":570 + * aa.append( '%s "%s"' % (k,v) ) + * else: + * aa.append( '%s %s' % (k,str(v)) ) # <<<<<<<<<<<<<< + * + * a = "; ".join( aa ) + ";" + */ + if (unlikely(__pyx_v_aa == Py_None)) { + PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __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 = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_v); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v); + __Pyx_GIVEREF(__pyx_v_v); + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_5, 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(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_k); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_k); + __Pyx_GIVEREF(__pyx_v_k); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), __pyx_t_5); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_aa), ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + } + __pyx_L8:; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":572 + * aa.append( '%s %s' % (k,str(v)) ) + * + * a = "; ".join( aa ) + ";" # <<<<<<<<<<<<<< + * p = a + * l = len(a) + */ + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_24), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __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 = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_v_aa)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_aa)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_aa)); + __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_19)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_v_a); + __pyx_v_a = __pyx_t_3; + __pyx_t_3 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":573 + * + * a = "; ".join( aa ) + ";" + * p = a # <<<<<<<<<<<<<< + * l = len(a) + * self.attributes = calloc( l + 1, sizeof(char) ) + */ + __pyx_t_9 = PyBytes_AsString(__pyx_v_a); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_p = __pyx_t_9; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":574 + * a = "; ".join( aa ) + ";" + * p = a + * l = len(a) # <<<<<<<<<<<<<< + * self.attributes = calloc( l + 1, sizeof(char) ) + * memcpy( self.attributes, p, l ) + */ + __pyx_t_2 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_l = __pyx_t_2; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":575 + * p = a + * l = len(a) + * self.attributes = calloc( l + 1, sizeof(char) ) # <<<<<<<<<<<<<< + * memcpy( self.attributes, p, l ) + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes = ((char *)calloc((__pyx_v_l + 1), (sizeof(char)))); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":576 + * l = len(a) + * self.attributes = calloc( l + 1, sizeof(char) ) + * memcpy( self.attributes, p, l ) # <<<<<<<<<<<<<< + * + * self.hasOwnAttributes = True + */ + memcpy(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes, __pyx_v_p, __pyx_v_l); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":578 + * memcpy( self.attributes, p, l ) + * + * self.hasOwnAttributes = True # <<<<<<<<<<<<<< + * self.isModified = True + * + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->hasOwnAttributes = 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":579 + * + * self.hasOwnAttributes = True + * self.isModified = True # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified = 1; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("ctabix.GTFProxy.fromDict"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_aa); + __Pyx_DECREF(__pyx_v_k); + __Pyx_DECREF(__pyx_v_v); + __Pyx_DECREF(__pyx_v_a); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":581 + * self.isModified = True + * + * def __str__(self): # <<<<<<<<<<<<<< + * cdef char * cpy + * cdef int x + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy___str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy___str__(PyObject *__pyx_v_self) { + char *__pyx_v_cpy; + int __pyx_v_x; + char *__pyx_v_result; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + __Pyx_RefNannySetupContext("__str__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":585 + * cdef int x + * + * if self.isModified: # <<<<<<<<<<<<<< + * return "\t".join( + * (self.contig, + */ + if (((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->isModified) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":586 + * + * if self.isModified: + * return "\t".join( # <<<<<<<<<<<<<< + * (self.contig, + * self.source, + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_25), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":587 + * if self.isModified: + * return "\t".join( + * (self.contig, # <<<<<<<<<<<<<< + * self.source, + * self.feature, + */ + __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":588 + * return "\t".join( + * (self.contig, + * self.source, # <<<<<<<<<<<<<< + * self.feature, + * str(self.start+1), + */ + __pyx_t_3 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":589 + * (self.contig, + * self.source, + * self.feature, # <<<<<<<<<<<<<< + * str(self.start+1), + * str(self.end), + */ + __pyx_t_4 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":590 + * self.source, + * self.feature, + * str(self.start+1), # <<<<<<<<<<<<<< + * str(self.end), + * toDot(self.score), + */ + __pyx_t_5 = PyInt_FromLong((((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->start + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":591 + * self.feature, + * str(self.start+1), + * str(self.end), # <<<<<<<<<<<<<< + * toDot(self.score), + * self.strand, + */ + __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":592 + * str(self.start+1), + * str(self.end), + * toDot(self.score), # <<<<<<<<<<<<<< + * self.strand, + * self.frame, + */ + __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__toDot); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->score); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __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 = 592; __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_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __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_9); __pyx_t_9 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":593 + * str(self.end), + * toDot(self.score), + * self.strand, # <<<<<<<<<<<<<< + * self.frame, + * self.attributes ) ) + */ + __pyx_t_9 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_9)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":594 + * toDot(self.score), + * self.strand, + * self.frame, # <<<<<<<<<<<<<< + * self.attributes ) ) + * else: + */ + __pyx_t_7 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_7)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":595 + * self.strand, + * self.frame, + * self.attributes ) ) # <<<<<<<<<<<<<< + * else: + * cpy = calloc( sizeof(char), self.nbytes+1 ) + */ + __pyx_t_10 = PyBytes_FromString(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_10)); + __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_11, 6, ((PyObject *)__pyx_t_9)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); + PyTuple_SET_ITEM(__pyx_t_11, 7, ((PyObject *)__pyx_t_7)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); + PyTuple_SET_ITEM(__pyx_t_11, 8, ((PyObject *)__pyx_t_10)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_t_8 = 0; + __pyx_t_9 = 0; + __pyx_t_7 = 0; + __pyx_t_10 = 0; + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_11); + __pyx_t_11 = 0; + __pyx_t_11 = PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + goto __pyx_L5; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":597 + * self.attributes ) ) + * else: + * cpy = calloc( sizeof(char), self.nbytes+1 ) # <<<<<<<<<<<<<< + * memcpy( cpy, self.data, self.nbytes+1) + * for x from 0 <= x < self.nbytes: + */ + __pyx_v_cpy = ((char *)calloc((sizeof(char)), (((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->nbytes + 1))); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":598 + * else: + * cpy = calloc( sizeof(char), self.nbytes+1 ) + * memcpy( cpy, self.data, self.nbytes+1) # <<<<<<<<<<<<<< + * for x from 0 <= x < self.nbytes: + * if cpy[x] == '\0': cpy[x] = '\t' + */ + memcpy(__pyx_v_cpy, ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->data, (((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->nbytes + 1)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":599 + * cpy = calloc( sizeof(char), self.nbytes+1 ) + * memcpy( cpy, self.data, self.nbytes+1) + * for x from 0 <= x < self.nbytes: # <<<<<<<<<<<<<< + * if cpy[x] == '\0': cpy[x] = '\t' + * result = cpy + */ + __pyx_t_12 = ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->nbytes; + for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_12; __pyx_v_x++) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":600 + * memcpy( cpy, self.data, self.nbytes+1) + * for x from 0 <= x < self.nbytes: + * if cpy[x] == '\0': cpy[x] = '\t' # <<<<<<<<<<<<<< + * result = cpy + * free(cpy) + */ + __pyx_t_13 = ((__pyx_v_cpy[__pyx_v_x]) == '\x00'); + if (__pyx_t_13) { + (__pyx_v_cpy[__pyx_v_x]) = '\t'; + goto __pyx_L8; + } + __pyx_L8:; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":601 + * for x from 0 <= x < self.nbytes: + * if cpy[x] == '\0': cpy[x] = '\t' + * result = cpy # <<<<<<<<<<<<<< + * free(cpy) + * return result + */ + __pyx_v_result = __pyx_v_cpy; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":602 + * if cpy[x] == '\0': cpy[x] = '\t' + * result = cpy + * free(cpy) # <<<<<<<<<<<<<< + * return result + * + */ + free(__pyx_v_cpy); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":603 + * result = cpy + * free(cpy) + * return result # <<<<<<<<<<<<<< + * + * def invert( self, int lcontig ): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_11 = PyBytes_FromString(__pyx_v_result); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_11)); + __pyx_r = ((PyObject *)__pyx_t_11); + __pyx_t_11 = 0; + goto __pyx_L0; + } + __pyx_L5:; + + __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_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("ctabix.GTFProxy.__str__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":605 + * return result + * + * def invert( self, int lcontig ): # <<<<<<<<<<<<<< + * '''invert coordinates to negative strand coordinates + * + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig); /*proto*/ +static char __pyx_doc_6ctabix_8GTFProxy_invert[] = "GTFProxy.invert(self, int lcontig)\ninvert coordinates to negative strand coordinates\n \n This method will only act if the feature is on the\n negative strand."; +static PyObject *__pyx_pf_6ctabix_8GTFProxy_invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig) { + int __pyx_v_lcontig; + PyObject *__pyx_v_start; + PyObject *__pyx_v_end; + PyObject *__pyx_r = NULL; + int __pyx_t_1; + uint32_t __pyx_t_2; + uint32_t __pyx_t_3; + uint32_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + __Pyx_RefNannySetupContext("invert"); + assert(__pyx_arg_lcontig); { + __pyx_v_lcontig = __Pyx_PyInt_AsInt(__pyx_arg_lcontig); if (unlikely((__pyx_v_lcontig == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.invert"); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_v_start = Py_None; __Pyx_INCREF(Py_None); + __pyx_v_end = Py_None; __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":611 + * negative strand.''' + * + * if self.strand[0] == '-': # <<<<<<<<<<<<<< + * start = min(self.start, self.end) + * end = max(self.start, self.end) + */ + __pyx_t_1 = ((((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->strand[0]) == '-'); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":612 + * + * if self.strand[0] == '-': + * start = min(self.start, self.end) # <<<<<<<<<<<<<< + * end = max(self.start, self.end) + * self.start, self.end = lcontig - end, lcontig - start + */ + __pyx_t_2 = ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->end; + __pyx_t_3 = ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->start; + if ((__pyx_t_2 < __pyx_t_3)) { + __pyx_t_4 = __pyx_t_2; + } else { + __pyx_t_4 = __pyx_t_3; + } + __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_v_start); + __pyx_v_start = __pyx_t_5; + __pyx_t_5 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":613 + * if self.strand[0] == '-': + * start = min(self.start, self.end) + * end = max(self.start, self.end) # <<<<<<<<<<<<<< + * self.start, self.end = lcontig - end, lcontig - start + * + */ + __pyx_t_4 = ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->end; + __pyx_t_2 = ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->start; + if ((__pyx_t_4 > __pyx_t_2)) { + __pyx_t_3 = __pyx_t_4; + } else { + __pyx_t_3 = __pyx_t_2; + } + __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_v_end); + __pyx_v_end = __pyx_t_5; + __pyx_t_5 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":614 + * start = min(self.start, self.end) + * end = max(self.start, self.end) + * self.start, self.end = lcontig - end, lcontig - start # <<<<<<<<<<<<<< + * + * def keys( self ): + */ + __pyx_t_5 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyNumber_Subtract(__pyx_t_5, __pyx_v_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyNumber_Subtract(__pyx_t_6, __pyx_v_start); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_4 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->start = __pyx_t_3; + ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->end = __pyx_t_4; + goto __pyx_L5; + } + __pyx_L5:; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("ctabix.GTFProxy.invert"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_start); + __Pyx_DECREF(__pyx_v_end); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":616 + * self.start, self.end = lcontig - end, lcontig - start + * + * def keys( self ): # <<<<<<<<<<<<<< + * '''return a list of attributes defined in this entry.''' + * r = self.attributes + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6ctabix_8GTFProxy_keys[] = "GTFProxy.keys(self)\nreturn a list of attributes defined in this entry."; +static PyObject *__pyx_pf_6ctabix_8GTFProxy_keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + char *__pyx_v_r; + PyObject *__pyx_v_x; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("keys"); + __pyx_v_x = Py_None; __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":618 + * def keys( self ): + * '''return a list of attributes defined in this entry.''' + * r = self.attributes # <<<<<<<<<<<<<< + * return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ] + * + */ + __pyx_v_r = ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":619 + * '''return a list of attributes defined in this entry.''' + * r = self.attributes + * return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ] # <<<<<<<<<<<<<< + * + * def __getitem__(self, item): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_3 = PyBytes_FromString(__pyx_v_r); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __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 = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_19)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_19)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19)); + __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); + } else { + __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + for (;;) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; + } else if (likely(PyTuple_CheckExact(__pyx_t_3))) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; + } else { + __pyx_t_5 = PyIter_Next(__pyx_t_3); + if (!__pyx_t_5) { + if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_DECREF(__pyx_v_x); + __pyx_v_x = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_s_26), Py_NE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { + __pyx_t_5 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __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 = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_20)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_20)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20)); + __pyx_t_7 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L7; + } + __pyx_L7:; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); + __Pyx_DECREF(((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_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("ctabix.GTFProxy.keys"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_x); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":621 + * return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ] + * + * def __getitem__(self, item): # <<<<<<<<<<<<<< + * return self.__getattr__( item ) + * + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ +static PyObject *__pyx_pf_6ctabix_8GTFProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__getitem__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":622 + * + * def __getitem__(self, item): + * return self.__getattr__( item ) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____getattr__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_item); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_item); + __Pyx_GIVEREF(__pyx_v_item); + __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __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_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 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_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("ctabix.GTFProxy.__getitem__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":624 + * return self.__getattr__( item ) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.data != NULL: + * free(self.data) + */ + +static void __pyx_pf_6ctabix_8GTFProxy___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_6ctabix_8GTFProxy___dealloc__(PyObject *__pyx_v_self) { + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":625 + * + * def __dealloc__(self): + * if self.data != NULL: # <<<<<<<<<<<<<< + * free(self.data) + * if self.hasOwnAttributes: + */ + __pyx_t_1 = (((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->data != NULL); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":626 + * def __dealloc__(self): + * if self.data != NULL: + * free(self.data) # <<<<<<<<<<<<<< + * if self.hasOwnAttributes: + * free(self.attributes) + */ + free(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->data); + goto __pyx_L5; + } + __pyx_L5:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":627 + * if self.data != NULL: + * free(self.data) + * if self.hasOwnAttributes: # <<<<<<<<<<<<<< + * free(self.attributes) + * + */ + if (((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->hasOwnAttributes) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":628 + * free(self.data) + * if self.hasOwnAttributes: + * free(self.attributes) # <<<<<<<<<<<<<< + * + * def __getattr__(self, item ): + */ + free(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes); + goto __pyx_L6; + } + __pyx_L6:; + + __Pyx_RefNannyFinishContext(); +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":630 + * free(self.attributes) + * + * def __getattr__(self, item ): # <<<<<<<<<<<<<< + * """Generic lookup of attribute from GFF/GTF attributes + * Only called if there *isn't* an attribute with this name + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ +static char __pyx_doc_6ctabix_8GTFProxy___getattr__[] = "Generic lookup of attribute from GFF/GTF attributes \n Only called if there *isn't* an attribute with this name\n "; +struct wrapperbase __pyx_wrapperbase_6ctabix_8GTFProxy___getattr__; +static PyObject *__pyx_pf_6ctabix_8GTFProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { + char *__pyx_v_start; + char *__pyx_v_query; + char *__pyx_v_cpy; + char *__pyx_v_end; + int __pyx_v_l; + char *__pyx_v_result; + PyObject *__pyx_r = NULL; + char *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + __Pyx_RefNannySetupContext("__getattr__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":639 + * cdef char * end + * cdef int l + * query = item # <<<<<<<<<<<<<< + * + * start = strstr( self.attributes, query) + */ + __pyx_t_1 = PyBytes_AsString(__pyx_v_item); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_query = __pyx_t_1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":641 + * query = item + * + * start = strstr( self.attributes, query) # <<<<<<<<<<<<<< + * if start == NULL: + * raise AttributeError("'GTFProxy' has no attribute '%s'" % item ) + */ + __pyx_v_start = strstr(((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_v_self)->attributes, __pyx_v_query); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":642 + * + * start = strstr( self.attributes, query) + * if start == NULL: # <<<<<<<<<<<<<< + * raise AttributeError("'GTFProxy' has no attribute '%s'" % item ) + * + */ + __pyx_t_2 = (__pyx_v_start == NULL); + if (__pyx_t_2) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":643 + * start = strstr( self.attributes, query) + * if start == NULL: + * raise AttributeError("'GTFProxy' has no attribute '%s'" % item ) # <<<<<<<<<<<<<< + * + * start += strlen(query) + 1 + */ + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_27), __pyx_v_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __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_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":645 + * raise AttributeError("'GTFProxy' has no attribute '%s'" % item ) + * + * start += strlen(query) + 1 # <<<<<<<<<<<<<< + * # skip gaps before + * while start[0] == " ": start += 1 + */ + __pyx_v_start += (strlen(__pyx_v_query) + 1); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":647 + * start += strlen(query) + 1 + * # skip gaps before + * while start[0] == " ": start += 1 # <<<<<<<<<<<<<< + * if start[0] == '"': + * start += 1 + */ + while (1) { + __pyx_t_2 = ((__pyx_v_start[0]) == ' '); + if (!__pyx_t_2) break; + __pyx_v_start += 1; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":648 + * # skip gaps before + * while start[0] == " ": start += 1 + * if start[0] == '"': # <<<<<<<<<<<<<< + * start += 1 + * end = start + */ + __pyx_t_2 = ((__pyx_v_start[0]) == '"'); + if (__pyx_t_2) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":649 + * while start[0] == " ": start += 1 + * if start[0] == '"': + * start += 1 # <<<<<<<<<<<<<< + * end = start + * while end[0] != '\0' and end[0] != '"': end += 1 + */ + __pyx_v_start += 1; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":650 + * if start[0] == '"': + * start += 1 + * end = start # <<<<<<<<<<<<<< + * while end[0] != '\0' and end[0] != '"': end += 1 + * l = end - start + 1 + */ + __pyx_v_end = __pyx_v_start; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":651 + * start += 1 + * end = start + * while end[0] != '\0' and end[0] != '"': end += 1 # <<<<<<<<<<<<<< + * l = end - start + 1 + * cpy = calloc( l, sizeof(char ) ) + */ + while (1) { + __pyx_t_2 = ((__pyx_v_end[0]) != '\x00'); + if (__pyx_t_2) { + __pyx_t_5 = ((__pyx_v_end[0]) != '"'); + __pyx_t_6 = __pyx_t_5; + } else { + __pyx_t_6 = __pyx_t_2; + } + if (!__pyx_t_6) break; + __pyx_v_end += 1; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":652 + * end = start + * while end[0] != '\0' and end[0] != '"': end += 1 + * l = end - start + 1 # <<<<<<<<<<<<<< + * cpy = calloc( l, sizeof(char ) ) + * memcpy( cpy, start, l ) + */ + __pyx_v_l = ((__pyx_v_end - __pyx_v_start) + 1); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":653 + * while end[0] != '\0' and end[0] != '"': end += 1 + * l = end - start + 1 + * cpy = calloc( l, sizeof(char ) ) # <<<<<<<<<<<<<< + * memcpy( cpy, start, l ) + * cpy[l-1] = '\0' + */ + __pyx_v_cpy = ((char *)calloc(__pyx_v_l, (sizeof(char)))); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":654 + * l = end - start + 1 + * cpy = calloc( l, sizeof(char ) ) + * memcpy( cpy, start, l ) # <<<<<<<<<<<<<< + * cpy[l-1] = '\0' + * result = cpy + */ + memcpy(__pyx_v_cpy, __pyx_v_start, __pyx_v_l); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":655 + * cpy = calloc( l, sizeof(char ) ) + * memcpy( cpy, start, l ) + * cpy[l-1] = '\0' # <<<<<<<<<<<<<< + * result = cpy + * free(cpy) + */ + (__pyx_v_cpy[(__pyx_v_l - 1)]) = '\x00'; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":656 + * memcpy( cpy, start, l ) + * cpy[l-1] = '\0' + * result = cpy # <<<<<<<<<<<<<< + * free(cpy) + * return result + */ + __pyx_v_result = __pyx_v_cpy; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":657 + * cpy[l-1] = '\0' + * result = cpy + * free(cpy) # <<<<<<<<<<<<<< + * return result + * else: + */ + free(__pyx_v_cpy); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":658 + * result = cpy + * free(cpy) + * return result # <<<<<<<<<<<<<< + * else: + * return start + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyBytes_FromString(__pyx_v_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + goto __pyx_L8; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":660 + * return result + * else: + * return start # <<<<<<<<<<<<<< + * + * def setAttribute( self, name, value ): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyBytes_FromString(__pyx_v_start); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + } + __pyx_L8:; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("ctabix.GTFProxy.__getattr__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":662 + * return start + * + * def setAttribute( self, name, value ): # <<<<<<<<<<<<<< + * '''convenience method to set an attribute.''' + * r = self.asDict() + */ + +static PyObject *__pyx_pf_6ctabix_8GTFProxy_setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6ctabix_8GTFProxy_setAttribute[] = "GTFProxy.setAttribute(self, name, value)\nconvenience method to set an attribute."; +static PyObject *__pyx_pf_6ctabix_8GTFProxy_setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_name = 0; + PyObject *__pyx_v_value = 0; + PyObject *__pyx_v_r; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__value,0}; + __Pyx_RefNannySetupContext("setAttribute"); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[2] = {0,0}; + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name); + if (likely(values[0])) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value); + if (likely(values[1])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "setAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_name = values[0]; + __pyx_v_value = values[1]; + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + __pyx_v_name = PyTuple_GET_ITEM(__pyx_args, 0); + __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.GTFProxy.setAttribute"); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_v_r = Py_None; __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":664 + * def setAttribute( self, name, value ): + * '''convenience method to set an attribute.''' + * r = self.asDict() # <<<<<<<<<<<<<< + * r[name] = value + * self.fromDict( r ) + */ + __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__asDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __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 = 664; __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_r); + __pyx_v_r = __pyx_t_2; + __pyx_t_2 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":665 + * '''convenience method to set an attribute.''' + * r = self.asDict() + * r[name] = value # <<<<<<<<<<<<<< + * self.fromDict( r ) + * + */ + if (PyObject_SetItem(__pyx_v_r, __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":666 + * r = self.asDict() + * r[name] = value + * self.fromDict( r ) # <<<<<<<<<<<<<< + * + * cdef class Parser: + */ + __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fromDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __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 = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_r); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r); + __Pyx_GIVEREF(__pyx_v_r); + __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __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_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + __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("ctabix.GTFProxy.setAttribute"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_r); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":673 + * cdef class asTuple(Parser): + * '''converts a :term:`tabix row` into a python tuple.''' + * def __call__(self, char * buffer, int len): # <<<<<<<<<<<<<< + * cdef TupleProxy r + * r = TupleProxy() + */ + +static PyObject *__pyx_pf_6ctabix_7asTuple___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pf_6ctabix_7asTuple___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_buffer; + int __pyx_v_len; + struct __pyx_obj_6ctabix_TupleProxy *__pyx_v_r; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__buffer,&__pyx_n_s__len,0}; + __Pyx_RefNannySetupContext("__call__"); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[2] = {0,0}; + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buffer); + if (likely(values[0])) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__len); + if (likely(values[1])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_buffer = PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_len = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_len == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + __pyx_v_buffer = PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_len = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_len == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.asTuple.__call__"); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_v_r = ((struct __pyx_obj_6ctabix_TupleProxy *)Py_None); __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":675 + * def __call__(self, char * buffer, int len): + * cdef TupleProxy r + * r = TupleProxy() # <<<<<<<<<<<<<< + * # need to copy - there were some + * # persistence issues with "present" + */ + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6ctabix_TupleProxy)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_v_r)); + __pyx_v_r = ((struct __pyx_obj_6ctabix_TupleProxy *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":678 + * # need to copy - there were some + * # persistence issues with "present" + * r.copy( buffer, len ) # <<<<<<<<<<<<<< + * return r + * + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6ctabix_TupleProxy *)__pyx_v_r->__pyx_vtab)->copy(__pyx_v_r, __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":679 + * # persistence issues with "present" + * r.copy( buffer, len ) + * return r # <<<<<<<<<<<<<< + * + * cdef class asGTF(Parser): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_r)); + __pyx_r = ((PyObject *)__pyx_v_r); + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ctabix.asTuple.__call__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF((PyObject *)__pyx_v_r); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":683 + * cdef class asGTF(Parser): + * '''converts a :term:`tabix row` into a GTF record.''' + * def __call__(self, char * buffer, int len): # <<<<<<<<<<<<<< + * cdef GTFProxy r + * r = GTFProxy() + */ + +static PyObject *__pyx_pf_6ctabix_5asGTF___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pf_6ctabix_5asGTF___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_buffer; + int __pyx_v_len; + struct __pyx_obj_6ctabix_GTFProxy *__pyx_v_r; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__buffer,&__pyx_n_s__len,0}; + __Pyx_RefNannySetupContext("__call__"); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[2] = {0,0}; + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buffer); + if (likely(values[0])) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__len); + if (likely(values[1])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_buffer = PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_len = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_len == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + __pyx_v_buffer = PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_len = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_len == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.asGTF.__call__"); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_v_r = ((struct __pyx_obj_6ctabix_GTFProxy *)Py_None); __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":685 + * def __call__(self, char * buffer, int len): + * cdef GTFProxy r + * r = GTFProxy() # <<<<<<<<<<<<<< + * r.copy( buffer, len ) + * return r + */ + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6ctabix_GTFProxy)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_v_r)); + __pyx_v_r = ((struct __pyx_obj_6ctabix_GTFProxy *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":686 + * cdef GTFProxy r + * r = GTFProxy() + * r.copy( buffer, len ) # <<<<<<<<<<<<<< + * return r + * + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_6ctabix_GTFProxy *)__pyx_v_r->__pyx_vtab)->copy(__pyx_v_r, __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":687 + * r = GTFProxy() + * r.copy( buffer, len ) + * return r # <<<<<<<<<<<<<< + * + * cdef class TabixIteratorParsed: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_r)); + __pyx_r = ((PyObject *)__pyx_v_r); + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("ctabix.asGTF.__call__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF((PyObject *)__pyx_v_r); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":697 + * cdef Parser parser + * + * def __cinit__(self, # <<<<<<<<<<<<<< + * Tabixfile tabixfile, + * int tid, + */ + +static int __pyx_pf_6ctabix_19TabixIteratorParsed___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_6ctabix_19TabixIteratorParsed___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_6ctabix_Tabixfile *__pyx_v_tabixfile = 0; + int __pyx_v_tid; + int __pyx_v_start; + int __pyx_v_end; + struct __pyx_obj_6ctabix_Parser *__pyx_v_parser = 0; + int __pyx_r; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tabixfile,&__pyx_n_s__tid,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__parser,0}; + __Pyx_RefNannySetupContext("__cinit__"); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[5] = {0,0,0,0,0}; + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tabixfile); + if (likely(values[0])) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tid); + if (likely(values[1])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start); + if (likely(values[2])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 3: + values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end); + if (likely(values[3])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 4: + values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser); + if (likely(values[4])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_tabixfile = ((struct __pyx_obj_6ctabix_Tabixfile *)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 = 699; __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 = 700; __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 = 701; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_parser = ((struct __pyx_obj_6ctabix_Parser *)values[4]); + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + __pyx_v_tabixfile = ((struct __pyx_obj_6ctabix_Tabixfile *)PyTuple_GET_ITEM(__pyx_args, 0)); + __pyx_v_tid = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_tid == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_start = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_start == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_end = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_end == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_parser = ((struct __pyx_obj_6ctabix_Parser *)PyTuple_GET_ITEM(__pyx_args, 4)); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.TabixIteratorParsed.__cinit__"); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tabixfile), __pyx_ptype_6ctabix_Tabixfile, 1, "tabixfile", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_6ctabix_Parser, 1, "parser", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":704 + * Parser parser ): + * + * assert tabixfile._isOpen() # <<<<<<<<<<<<<< + * self.parser = parser + * + */ + #ifndef PYREX_WITHOUT_ASSERTIONS + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_tabixfile), __pyx_n_s___isOpen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __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 = 704; __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 = 704; __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 = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #endif + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":705 + * + * assert tabixfile._isOpen() + * self.parser = parser # <<<<<<<<<<<<<< + * + * # makes sure that samfile stays alive as long as the + */ + __Pyx_INCREF(((PyObject *)__pyx_v_parser)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_parser)); + __Pyx_GOTREF(((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->parser); + __Pyx_DECREF(((PyObject *)((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->parser)); + ((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->parser = __pyx_v_parser; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":709 + * # makes sure that samfile stays alive as long as the + * # iterator is alive. + * self.tabixfile = tabixfile.tabixfile # <<<<<<<<<<<<<< + * + * if tid < 0: + */ + ((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->tabixfile = __pyx_v_tabixfile->tabixfile; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":711 + * self.tabixfile = tabixfile.tabixfile + * + * if tid < 0: # <<<<<<<<<<<<<< + * # seek to start of file to ensure iteration is over + * # all entries. + */ + __pyx_t_3 = (__pyx_v_tid < 0); + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":714 + * # seek to start of file to ensure iteration is over + * # all entries. + * bgzf_seek( self.tabixfile.fp, 0, 0) # <<<<<<<<<<<<<< + * self.iterator = ti_iter_first() + * else: + */ + bgzf_seek(((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->tabixfile->fp, 0, 0); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":715 + * # all entries. + * bgzf_seek( self.tabixfile.fp, 0, 0) + * self.iterator = ti_iter_first() # <<<<<<<<<<<<<< + * else: + * self.iterator = ti_queryi(self.tabixfile, tid, start, end) + */ + ((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->iterator = ti_iter_first(); + goto __pyx_L6; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":717 + * self.iterator = ti_iter_first() + * else: + * self.iterator = ti_queryi(self.tabixfile, tid, start, end) # <<<<<<<<<<<<<< + * + * if self.iterator == NULL: + */ + ((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->iterator = ti_queryi(((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->tabixfile, __pyx_v_tid, __pyx_v_start, __pyx_v_end); + } + __pyx_L6:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":719 + * self.iterator = ti_queryi(self.tabixfile, tid, start, end) + * + * if self.iterator == NULL: # <<<<<<<<<<<<<< + * raise ValueError("malformatted query or wrong sequence name.\n") + * + */ + __pyx_t_3 = (((void *)((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->iterator) == NULL); + if (__pyx_t_3) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":720 + * + * if self.iterator == NULL: + * raise ValueError("malformatted query or wrong sequence name.\n") # <<<<<<<<<<<<<< + * + * def __iter__(self): + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_12)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_12)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_12)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L7; + } + __pyx_L7:; + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("ctabix.TabixIteratorParsed.__cinit__"); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":722 + * raise ValueError("malformatted query or wrong sequence name.\n") + * + * def __iter__(self): # <<<<<<<<<<<<<< + * return self + * + */ + +static PyObject *__pyx_pf_6ctabix_19TabixIteratorParsed___iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pf_6ctabix_19TabixIteratorParsed___iter__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannySetupContext("__iter__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":723 + * + * def __iter__(self): + * return self # <<<<<<<<<<<<<< + * + * def __next__(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self); + __pyx_r = __pyx_v_self; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":725 + * return self + * + * def __next__(self): # <<<<<<<<<<<<<< + * """python version of next(). + * + */ + +static PyObject *__pyx_pf_6ctabix_19TabixIteratorParsed___next__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_6ctabix_19TabixIteratorParsed___next__[] = "python version of next().\n\n pyrex uses this non-standard name instead of next()\n "; +struct wrapperbase __pyx_wrapperbase_6ctabix_19TabixIteratorParsed___next__; +static PyObject *__pyx_pf_6ctabix_19TabixIteratorParsed___next__(PyObject *__pyx_v_self) { + char *__pyx_v_s; + int __pyx_v_len; + PyObject *__pyx_r = NULL; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("__next__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":733 + * cdef char * s + * cdef int len + * s = ti_read(self.tabixfile, self.iterator, &len) # <<<<<<<<<<<<<< + * if s == NULL: raise StopIteration + * return self.parser(s, len) + */ + __pyx_v_s = ti_read(((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->tabixfile, ((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->iterator, (&__pyx_v_len)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":734 + * cdef int len + * s = ti_read(self.tabixfile, self.iterator, &len) + * if s == NULL: raise StopIteration # <<<<<<<<<<<<<< + * return self.parser(s, len) + * + */ + __pyx_t_1 = (__pyx_v_s == NULL); + if (__pyx_t_1) { + __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":735 + * s = ti_read(self.tabixfile, self.iterator, &len) + * if s == NULL: raise StopIteration + * return self.parser(s, len) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyInt_FromLong(__pyx_v_len); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(((PyObject *)((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->parser), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("ctabix.TabixIteratorParsed.__next__"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":737 + * return self.parser(s, len) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.iterator != NULL: + * ti_iter_destroy(self.iterator) + */ + +static void __pyx_pf_6ctabix_19TabixIteratorParsed___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pf_6ctabix_19TabixIteratorParsed___dealloc__(PyObject *__pyx_v_self) { + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__"); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":738 + * + * def __dealloc__(self): + * if self.iterator != NULL: # <<<<<<<<<<<<<< + * ti_iter_destroy(self.iterator) + * + */ + __pyx_t_1 = (((void *)((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->iterator) != NULL); + if (__pyx_t_1) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":739 + * def __dealloc__(self): + * if self.iterator != NULL: + * ti_iter_destroy(self.iterator) # <<<<<<<<<<<<<< + * + * def tabix_compress( filename_in, + */ + ti_iter_destroy(((struct __pyx_obj_6ctabix_TabixIteratorParsed *)__pyx_v_self)->iterator); + goto __pyx_L5; + } + __pyx_L5:; + + __Pyx_RefNannyFinishContext(); +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":741 + * ti_iter_destroy(self.iterator) + * + * def tabix_compress( filename_in, # <<<<<<<<<<<<<< + * filename_out, + * force = False ): + */ + +static PyObject *__pyx_pf_6ctabix_tabix_compress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6ctabix_tabix_compress[] = "tabix_compress(filename_in, filename_out, force=False)\n\n compress *filename_in* writing the output to *filename_out*.\n \n Raise an IOError if *filename_out* already exists, unless *force* is set.\n "; +static PyObject *__pyx_pf_6ctabix_tabix_compress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_filename_in = 0; + PyObject *__pyx_v_filename_out = 0; + PyObject *__pyx_v_force = 0; + int __pyx_v_WINDOW_SIZE; + int __pyx_v_c; + int __pyx_v_r; + void *__pyx_v_buffer; + BGZF *__pyx_v_fp; + int __pyx_v_fd_src; + int __pyx_v_O_RDONLY; + PyObject *__pyx_r = NULL; + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + char *__pyx_t_8; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename_in,&__pyx_n_s__filename_out,&__pyx_n_s__force,0}; + __Pyx_RefNannySetupContext("tabix_compress"); + __pyx_self = __pyx_self; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[3] = {0,0,0}; + values[2] = __pyx_k_28; + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename_in); + if (likely(values[0])) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename_out); + if (likely(values[1])) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__force); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "tabix_compress") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_filename_in = values[0]; + __pyx_v_filename_out = values[1]; + __pyx_v_force = values[2]; + } else { + __pyx_v_force = __pyx_k_28; + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: + __pyx_v_force = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: + __pyx_v_filename_out = PyTuple_GET_ITEM(__pyx_args, 1); + __pyx_v_filename_in = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.tabix_compress"); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":751 + * ''' + * + * if not force and os.path.exists(filename_out ): # <<<<<<<<<<<<<< + * raise IOError( "Filename '%s' already exists, use *force* to overwrite" % filename_out) + * + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__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 = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_filename_out); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename_out); + __Pyx_GIVEREF(__pyx_v_filename_out); + __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __pyx_t_1; + } else { + __pyx_t_6 = __pyx_t_2; + } + if (__pyx_t_6) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":752 + * + * if not force and os.path.exists(filename_out ): + * raise IOError( "Filename '%s' already exists, use *force* to overwrite" % filename_out) # <<<<<<<<<<<<<< + * + * cdef int WINDOW_SIZE + */ + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_29), __pyx_v_filename_out); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":761 + * + * cdef int O_RDONLY + * O_RDONLY = os.O_RDONLY # <<<<<<<<<<<<<< + * + * WINDOW_SIZE = 64 * 1024 + */ + __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__O_RDONLY); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_O_RDONLY = __pyx_t_7; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":763 + * O_RDONLY = os.O_RDONLY + * + * WINDOW_SIZE = 64 * 1024 # <<<<<<<<<<<<<< + * + * fp = bgzf_open( filename_out, "w") + */ + __pyx_v_WINDOW_SIZE = 65536; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":765 + * WINDOW_SIZE = 64 * 1024 + * + * fp = bgzf_open( filename_out, "w") # <<<<<<<<<<<<<< + * if fp == NULL: + * raise IOError( "could not open '%s' for writing" ) + */ + __pyx_t_8 = PyBytes_AsString(__pyx_v_filename_out); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_fp = bgzf_open(__pyx_t_8, __pyx_k__w); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":766 + * + * fp = bgzf_open( filename_out, "w") + * if fp == NULL: # <<<<<<<<<<<<<< + * raise IOError( "could not open '%s' for writing" ) + * + */ + __pyx_t_6 = (__pyx_v_fp == NULL); + if (__pyx_t_6) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":767 + * fp = bgzf_open( filename_out, "w") + * if fp == NULL: + * raise IOError( "could not open '%s' for writing" ) # <<<<<<<<<<<<<< + * + * fd_src = open(filename_in, O_RDONLY) + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_30)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_30)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_30)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L7; + } + __pyx_L7:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":769 + * raise IOError( "could not open '%s' for writing" ) + * + * fd_src = open(filename_in, O_RDONLY) # <<<<<<<<<<<<<< + * if fd_src == 0: + * raise IOError( "could not open '%s' for reading" ) + */ + __pyx_t_8 = PyBytes_AsString(__pyx_v_filename_in); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_fd_src = open(__pyx_t_8, __pyx_v_O_RDONLY); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":770 + * + * fd_src = open(filename_in, O_RDONLY) + * if fd_src == 0: # <<<<<<<<<<<<<< + * raise IOError( "could not open '%s' for reading" ) + * + */ + __pyx_t_6 = (__pyx_v_fd_src == 0); + if (__pyx_t_6) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":771 + * fd_src = open(filename_in, O_RDONLY) + * if fd_src == 0: + * raise IOError( "could not open '%s' for reading" ) # <<<<<<<<<<<<<< + * + * buffer = malloc(WINDOW_SIZE) + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_31)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_31)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31)); + __pyx_t_4 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L8; + } + __pyx_L8:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":773 + * raise IOError( "could not open '%s' for reading" ) + * + * buffer = malloc(WINDOW_SIZE) # <<<<<<<<<<<<<< + * + * while c > 0: + */ + __pyx_v_buffer = malloc(__pyx_v_WINDOW_SIZE); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":775 + * buffer = malloc(WINDOW_SIZE) + * + * while c > 0: # <<<<<<<<<<<<<< + * c = read(fd_src, buffer, WINDOW_SIZE) + * r = bgzf_write(fp, buffer, c) + */ + while (1) { + __pyx_t_6 = (__pyx_v_c > 0); + if (!__pyx_t_6) break; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":776 + * + * while c > 0: + * c = read(fd_src, buffer, WINDOW_SIZE) # <<<<<<<<<<<<<< + * r = bgzf_write(fp, buffer, c) + * if r < 0: + */ + __pyx_v_c = read(__pyx_v_fd_src, __pyx_v_buffer, __pyx_v_WINDOW_SIZE); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":777 + * while c > 0: + * c = read(fd_src, buffer, WINDOW_SIZE) + * r = bgzf_write(fp, buffer, c) # <<<<<<<<<<<<<< + * if r < 0: + * free( buffer ) + */ + __pyx_v_r = bgzf_write(__pyx_v_fp, __pyx_v_buffer, __pyx_v_c); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":778 + * c = read(fd_src, buffer, WINDOW_SIZE) + * r = bgzf_write(fp, buffer, c) + * if r < 0: # <<<<<<<<<<<<<< + * free( buffer ) + * raise OSError("writing failed") + */ + __pyx_t_6 = (__pyx_v_r < 0); + if (__pyx_t_6) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":779 + * r = bgzf_write(fp, buffer, c) + * if r < 0: + * free( buffer ) # <<<<<<<<<<<<<< + * raise OSError("writing failed") + * + */ + free(__pyx_v_buffer); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":780 + * if r < 0: + * free( buffer ) + * raise OSError("writing failed") # <<<<<<<<<<<<<< + * + * free( buffer ) + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_32)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_32)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_OSError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L11; + } + __pyx_L11:; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":782 + * raise OSError("writing failed") + * + * free( buffer ) # <<<<<<<<<<<<<< + * r = bgzf_close(fp) + * if r < 0: raise OSError("writing failed") + */ + free(__pyx_v_buffer); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":783 + * + * free( buffer ) + * r = bgzf_close(fp) # <<<<<<<<<<<<<< + * if r < 0: raise OSError("writing failed") + * + */ + __pyx_v_r = bgzf_close(__pyx_v_fp); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":784 + * free( buffer ) + * r = bgzf_close(fp) + * if r < 0: raise OSError("writing failed") # <<<<<<<<<<<<<< + * + * def tabix_index( filename, + */ + __pyx_t_6 = (__pyx_v_r < 0); + if (__pyx_t_6) { + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_32)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_32)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32)); + __pyx_t_4 = PyObject_Call(__pyx_builtin_OSError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L12; + } + __pyx_L12:; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("ctabix.tabix_compress"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":786 + * if r < 0: raise OSError("writing failed") + * + * def tabix_index( filename, # <<<<<<<<<<<<<< + * force = False, + * seq_col = None, + */ + +static PyObject *__pyx_pf_6ctabix_tabix_index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6ctabix_tabix_index[] = "tabix_index(filename, force=False, seq_col=None, start_col=None, end_col=None, preset=None, meta_char='#', zerobased=False)\n\n index tab-separated *filename* using tabix.\n\n An existing index will not be overwritten unless\n *force* is set.\n\n The index will be built from coordinates\n in columns *seq_col*, *start_col* and *end_col*.\n\n The contents of *filename* have to be sorted by \n contig and position - the method does not check\n if the file is sorted.\n\n Column indices are 0-based. Coordinates in the file\n are assumed to be 1-based.\n\n If *preset* is provided, the column coordinates\n are taken from a preset. Valid values for preset\n are \"gff\", \"bed\", \"sam\", \"vcf\", psltbl\", \"pileup\".\n \n Lines beginning with *meta_char* and the first\n *line_skip* lines will be skipped.\n \n If *filename* does not end in \".gz\", it will be automatically\n compressed. The original file will be removed and only the \n compressed file will be retained. \n\n If *filename* ends in *gz*, the file is assumed to be already\n compressed with bgzf.\n\n returns the filename of the compressed data\n "; +static PyObject *__pyx_pf_6ctabix_tabix_index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_filename = 0; + PyObject *__pyx_v_force = 0; + PyObject *__pyx_v_seq_col = 0; + PyObject *__pyx_v_start_col = 0; + PyObject *__pyx_v_end_col = 0; + PyObject *__pyx_v_preset = 0; + PyObject *__pyx_v_meta_char = 0; + PyObject *__pyx_v_zerobased = 0; + PyObject *__pyx_v_preset2conf; + PyObject *__pyx_v_conf_data; + ti_conf_t __pyx_v_conf; + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int32_t __pyx_t_11; + int32_t __pyx_t_12; + int32_t __pyx_t_13; + int32_t __pyx_t_14; + int32_t __pyx_t_15; + int32_t __pyx_t_16; + PyObject *__pyx_t_17 = NULL; + char *__pyx_t_18; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__force,&__pyx_n_s__seq_col,&__pyx_n_s__start_col,&__pyx_n_s__end_col,&__pyx_n_s__preset,&__pyx_n_s__meta_char,&__pyx_n_s__zerobased,0}; + __Pyx_RefNannySetupContext("tabix_index"); + __pyx_self = __pyx_self; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); + PyObject* values[8] = {0,0,0,0,0,0,0,0}; + values[1] = __pyx_k_33; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":788 + * def tabix_index( filename, + * force = False, + * seq_col = None, # <<<<<<<<<<<<<< + * start_col = None, + * end_col = None, + */ + values[2] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":789 + * force = False, + * seq_col = None, + * start_col = None, # <<<<<<<<<<<<<< + * end_col = None, + * preset = None, + */ + values[3] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":790 + * seq_col = None, + * start_col = None, + * end_col = None, # <<<<<<<<<<<<<< + * preset = None, + * meta_char = "#", + */ + values[4] = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":791 + * start_col = None, + * end_col = None, + * preset = None, # <<<<<<<<<<<<<< + * meta_char = "#", + * zerobased = False, + */ + values[5] = ((PyObject *)Py_None); + values[6] = ((PyObject *)__pyx_kp_s_34); + values[7] = __pyx_k_35; + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 0: + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename); + if (likely(values[0])) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__force); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__seq_col); + if (value) { values[2] = value; kw_args--; } + } + case 3: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start_col); + if (value) { values[3] = value; kw_args--; } + } + case 4: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end_col); + if (value) { values[4] = value; kw_args--; } + } + case 5: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__preset); + if (value) { values[5] = value; kw_args--; } + } + case 6: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__meta_char); + if (value) { values[6] = value; kw_args--; } + } + case 7: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__zerobased); + if (value) { values[7] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "tabix_index") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + __pyx_v_filename = values[0]; + __pyx_v_force = values[1]; + __pyx_v_seq_col = values[2]; + __pyx_v_start_col = values[3]; + __pyx_v_end_col = values[4]; + __pyx_v_preset = values[5]; + __pyx_v_meta_char = values[6]; + __pyx_v_zerobased = values[7]; + } else { + __pyx_v_force = __pyx_k_33; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":788 + * def tabix_index( filename, + * force = False, + * seq_col = None, # <<<<<<<<<<<<<< + * start_col = None, + * end_col = None, + */ + __pyx_v_seq_col = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":789 + * force = False, + * seq_col = None, + * start_col = None, # <<<<<<<<<<<<<< + * end_col = None, + * preset = None, + */ + __pyx_v_start_col = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":790 + * seq_col = None, + * start_col = None, + * end_col = None, # <<<<<<<<<<<<<< + * preset = None, + * meta_char = "#", + */ + __pyx_v_end_col = ((PyObject *)Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":791 + * start_col = None, + * end_col = None, + * preset = None, # <<<<<<<<<<<<<< + * meta_char = "#", + * zerobased = False, + */ + __pyx_v_preset = ((PyObject *)Py_None); + __pyx_v_meta_char = ((PyObject *)__pyx_kp_s_34); + __pyx_v_zerobased = __pyx_k_35; + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 8: __pyx_v_zerobased = PyTuple_GET_ITEM(__pyx_args, 7); + case 7: __pyx_v_meta_char = PyTuple_GET_ITEM(__pyx_args, 6); + case 6: __pyx_v_preset = PyTuple_GET_ITEM(__pyx_args, 5); + case 5: __pyx_v_end_col = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: __pyx_v_start_col = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: __pyx_v_seq_col = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: __pyx_v_force = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: __pyx_v_filename = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("tabix_index", 0, 1, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("ctabix.tabix_index"); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __Pyx_INCREF(__pyx_v_filename); + __Pyx_INCREF(__pyx_v_end_col); + __Pyx_INCREF(__pyx_v_preset); + __pyx_v_preset2conf = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_conf_data = Py_None; __Pyx_INCREF(Py_None); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":828 + * ''' + * + * if not os.path.exists(filename): raise IOError("No such file '%s'" % filename) # <<<<<<<<<<<<<< + * + * if not filename.endswith(".gz"): + */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __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 = 828; __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 = 828; __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 = 828; __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, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __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_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 = 828; __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) { + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_36), __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __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 = 828; __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, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":830 + * if not os.path.exists(filename): raise IOError("No such file '%s'" % filename) + * + * if not filename.endswith(".gz"): # <<<<<<<<<<<<<< + * + * tabix_compress( filename, filename + ".gz", force = force ) + */ + __pyx_t_3 = PyObject_GetAttr(__pyx_v_filename, __pyx_n_s__endswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_37)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_37)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37)); + __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __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_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = (!__pyx_t_5); + if (__pyx_t_4) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":832 + * if not filename.endswith(".gz"): + * + * tabix_compress( filename, filename + ".gz", force = force ) # <<<<<<<<<<<<<< + * os.unlink( filename ) + * filename += ".gz" + */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__tabix_compress); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Add(__pyx_v_filename, ((PyObject *)__pyx_kp_s_37)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __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 = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_filename); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename); + __Pyx_GIVEREF(__pyx_v_filename); + 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 = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__force), __pyx_v_force) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_1, __pyx_t_3, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":833 + * + * tabix_compress( filename, filename + ".gz", force = force ) + * os.unlink( filename ) # <<<<<<<<<<<<<< + * filename += ".gz" + * + */ + __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__unlink); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__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 = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_filename); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filename); + __Pyx_GIVEREF(__pyx_v_filename); + __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __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_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":834 + * tabix_compress( filename, filename + ".gz", force = force ) + * os.unlink( filename ) + * filename += ".gz" # <<<<<<<<<<<<<< + * + * if not force and os.path.exists(filename + ".tbi" ): + */ + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_filename, ((PyObject *)__pyx_kp_s_37)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __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; + goto __pyx_L7; + } + __pyx_L7:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":836 + * filename += ".gz" + * + * if not force and os.path.exists(filename + ".tbi" ): # <<<<<<<<<<<<<< + * raise IOError( "Filename '%s.tbi' already exists, use *force* to overwrite" ) + * + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = (!__pyx_t_4); + if (__pyx_t_5) { + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyNumber_Add(__pyx_v_filename, ((PyObject *)__pyx_kp_s_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __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_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __pyx_t_4; + } else { + __pyx_t_7 = __pyx_t_5; + } + if (__pyx_t_7) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":837 + * + * if not force and os.path.exists(filename + ".tbi" ): + * raise IOError( "Filename '%s.tbi' already exists, use *force* to overwrite" ) # <<<<<<<<<<<<<< + * + * # columns (1-based) + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_38)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_38)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38)); + __pyx_t_2 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L8; + } + __pyx_L8:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":842 + * # preset-code, contig, start, end, metachar for commends, lines to ignore at beginning + * # 0 is a missing column + * preset2conf = { # <<<<<<<<<<<<<< + * 'gff' : ( 0, 1, 4, 5, ord('#'), 0 ), + * 'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ), + */ + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":843 + * # 0 is a missing column + * preset2conf = { + * 'gff' : ( 0, 1, 4, 5, ord('#'), 0 ), # <<<<<<<<<<<<<< + * 'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ), + * 'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ), + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_34)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ord, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_INCREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + __Pyx_INCREF(__pyx_int_4); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_4); + __Pyx_GIVEREF(__pyx_int_4); + __Pyx_INCREF(__pyx_int_5); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_int_5); + __Pyx_GIVEREF(__pyx_int_5); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__gff), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":844 + * preset2conf = { + * 'gff' : ( 0, 1, 4, 5, ord('#'), 0 ), + * 'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ), # <<<<<<<<<<<<<< + * 'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ), + * 'sam' : ( 1, 3, 4, 0, ord('#'), 0 ), + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_34)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ord, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0x10000); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0x10000); + __Pyx_GIVEREF(__pyx_int_0x10000); + __Pyx_INCREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + __Pyx_INCREF(__pyx_int_2); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_2); + __Pyx_GIVEREF(__pyx_int_2); + __Pyx_INCREF(__pyx_int_3); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_int_3); + __Pyx_GIVEREF(__pyx_int_3); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__bed), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":845 + * 'gff' : ( 0, 1, 4, 5, ord('#'), 0 ), + * 'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ), + * 'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ), # <<<<<<<<<<<<<< + * 'sam' : ( 1, 3, 4, 0, ord('#'), 0 ), + * 'vcf' : ( 2, 1, 2, 0, ord('#'), 0 ), + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_34)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ord, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_0x10000); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0x10000); + __Pyx_GIVEREF(__pyx_int_0x10000); + __Pyx_INCREF(__pyx_int_15); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_15); + __Pyx_GIVEREF(__pyx_int_15); + __Pyx_INCREF(__pyx_int_17); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_17); + __Pyx_GIVEREF(__pyx_int_17); + __Pyx_INCREF(__pyx_int_18); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_int_18); + __Pyx_GIVEREF(__pyx_int_18); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__psltbl), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":846 + * 'bed' : ( 0x10000, 1, 2, 3, ord('#'), 0 ), + * 'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ), + * 'sam' : ( 1, 3, 4, 0, ord('#'), 0 ), # <<<<<<<<<<<<<< + * 'vcf' : ( 2, 1, 2, 0, ord('#'), 0 ), + * 'pileup': (3, 1, 2, 0, ord('#'), 0 ), + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_34)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ord, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + __Pyx_INCREF(__pyx_int_3); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_3); + __Pyx_GIVEREF(__pyx_int_3); + __Pyx_INCREF(__pyx_int_4); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_4); + __Pyx_GIVEREF(__pyx_int_4); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__sam), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":847 + * 'psltbl' : ( 0x10000, 15, 17, 18, ord('#'), 0 ), + * 'sam' : ( 1, 3, 4, 0, ord('#'), 0 ), + * 'vcf' : ( 2, 1, 2, 0, ord('#'), 0 ), # <<<<<<<<<<<<<< + * 'pileup': (3, 1, 2, 0, ord('#'), 0 ), + * } + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_34)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ord, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_2); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_2); + __Pyx_GIVEREF(__pyx_int_2); + __Pyx_INCREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + __Pyx_INCREF(__pyx_int_2); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_2); + __Pyx_GIVEREF(__pyx_int_2); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__vcf), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":848 + * 'sam' : ( 1, 3, 4, 0, ord('#'), 0 ), + * 'vcf' : ( 2, 1, 2, 0, ord('#'), 0 ), + * 'pileup': (3, 1, 2, 0, ord('#'), 0 ), # <<<<<<<<<<<<<< + * } + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_34)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_34)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_ord, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_int_3); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_3); + __Pyx_GIVEREF(__pyx_int_3); + __Pyx_INCREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + __Pyx_INCREF(__pyx_int_2); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_2); + __Pyx_GIVEREF(__pyx_int_2); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__pileup), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_preset2conf)); + __pyx_v_preset2conf = __pyx_t_2; + __pyx_t_2 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":851 + * } + * + * if preset: # <<<<<<<<<<<<<< + * try: + * conf_data = preset2conf[preset] + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_preset); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_7) { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":852 + * + * if preset: + * try: # <<<<<<<<<<<<<< + * conf_data = preset2conf[preset] + * except KeyError: + */ + { + PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb; + __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb); + __Pyx_XGOTREF(__pyx_save_exc_type); + __Pyx_XGOTREF(__pyx_save_exc_value); + __Pyx_XGOTREF(__pyx_save_exc_tb); + /*try:*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":853 + * if preset: + * try: + * conf_data = preset2conf[preset] # <<<<<<<<<<<<<< + * except KeyError: + * raise KeyError( "unknown preset '%s', valid presets are '%s'" % (preset, ",".join(preset2conf.keys() ))) + */ + __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_preset2conf), __pyx_v_preset); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L10_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_v_conf_data); + __pyx_v_conf_data = __pyx_t_2; + __pyx_t_2 = 0; + } + __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0; + __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0; + __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0; + goto __pyx_L17_try_end; + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":854 + * try: + * conf_data = preset2conf[preset] + * except KeyError: # <<<<<<<<<<<<<< + * raise KeyError( "unknown preset '%s', valid presets are '%s'" % (preset, ",".join(preset2conf.keys() ))) + * else: + */ + __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); + if (__pyx_t_8) { + __Pyx_AddTraceback("ctabix.tabix_index"); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_3); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":855 + * conf_data = preset2conf[preset] + * except KeyError: + * raise KeyError( "unknown preset '%s', valid presets are '%s'" % (preset, ",".join(preset2conf.keys() ))) # <<<<<<<<<<<<<< + * else: + * if end_col == None: end_col = -1 + */ + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_40), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = PyDict_Keys(((PyObject *)__pyx_v_preset2conf)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_GOTREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_INCREF(__pyx_v_preset); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_preset); + __Pyx_GIVEREF(__pyx_v_preset); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_39), __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_9)); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_GOTREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_9)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); + __pyx_t_9 = 0; + __pyx_t_9 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_exception_handled; + } + __pyx_L12_except_error:; + __Pyx_XGIVEREF(__pyx_save_exc_type); + __Pyx_XGIVEREF(__pyx_save_exc_value); + __Pyx_XGIVEREF(__pyx_save_exc_tb); + __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb); + goto __pyx_L1_error; + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_save_exc_type); + __Pyx_XGIVEREF(__pyx_save_exc_value); + __Pyx_XGIVEREF(__pyx_save_exc_tb); + __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb); + __pyx_L17_try_end:; + } + goto __pyx_L9; + } + /*else*/ { + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":857 + * raise KeyError( "unknown preset '%s', valid presets are '%s'" % (preset, ",".join(preset2conf.keys() ))) + * else: + * if end_col == None: end_col = -1 # <<<<<<<<<<<<<< + * preset = 0 + * + */ + __pyx_t_3 = PyObject_RichCompare(__pyx_v_end_col, Py_None, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + __Pyx_INCREF(__pyx_int_neg_1); + __Pyx_DECREF(__pyx_v_end_col); + __pyx_v_end_col = __pyx_int_neg_1; + goto __pyx_L20; + } + __pyx_L20:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":858 + * else: + * if end_col == None: end_col = -1 + * preset = 0 # <<<<<<<<<<<<<< + * + * # note that tabix internally works with 0-based coordinates and open/closed intervals. + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_DECREF(__pyx_v_preset); + __pyx_v_preset = __pyx_int_0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":865 + * # -1 is subtracted from the start coordinate. To avoid doing this, set + * # the TI_FLAG_UCSC=0x10000 flag: + * if zerobased: preset = preset | 0x10000 # <<<<<<<<<<<<<< + * + * conf_data = (preset, seq_col+1, start_col+1, end_col+1, ord(meta_char), 0) + */ + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_zerobased); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_7) { + __pyx_t_3 = PyNumber_Or(__pyx_v_preset, __pyx_int_0x10000); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_v_preset); + __pyx_v_preset = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L21; + } + __pyx_L21:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":867 + * if zerobased: preset = preset | 0x10000 + * + * conf_data = (preset, seq_col+1, start_col+1, end_col+1, ord(meta_char), 0) # <<<<<<<<<<<<<< + * + * cdef ti_conf_t conf + */ + __pyx_t_3 = PyNumber_Add(__pyx_v_seq_col, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyNumber_Add(__pyx_v_start_col, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyNumber_Add(__pyx_v_end_col, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_v_meta_char); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_meta_char); + __Pyx_GIVEREF(__pyx_v_meta_char); + __pyx_t_10 = PyObject_Call(__pyx_builtin_ord, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_v_preset); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_preset); + __Pyx_GIVEREF(__pyx_v_preset); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __pyx_t_3 = 0; + __pyx_t_6 = 0; + __pyx_t_2 = 0; + __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_v_conf_data); + __pyx_v_conf_data = __pyx_t_9; + __pyx_t_9 = 0; + } + __pyx_L9:; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":870 + * + * cdef ti_conf_t conf + * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data # <<<<<<<<<<<<<< + * + * ti_index_build( filename, &conf) + */ + if (PyTuple_CheckExact(__pyx_v_conf_data) && likely(PyTuple_GET_SIZE(__pyx_v_conf_data) == 6)) { + PyObject* tuple = __pyx_v_conf_data; + __pyx_t_9 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_9); + __pyx_t_11 = __Pyx_PyInt_from_py_int32_t(__pyx_t_9); if (unlikely((__pyx_t_11 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_10); + __pyx_t_12 = __Pyx_PyInt_from_py_int32_t(__pyx_t_10); if (unlikely((__pyx_t_12 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyInt_from_py_int32_t(__pyx_t_2); if (unlikely((__pyx_t_13 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = PyTuple_GET_ITEM(tuple, 3); __Pyx_INCREF(__pyx_t_6); + __pyx_t_14 = __Pyx_PyInt_from_py_int32_t(__pyx_t_6); if (unlikely((__pyx_t_14 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = PyTuple_GET_ITEM(tuple, 4); __Pyx_INCREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyInt_from_py_int32_t(__pyx_t_3); if (unlikely((__pyx_t_15 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = PyTuple_GET_ITEM(tuple, 5); __Pyx_INCREF(__pyx_t_1); + __pyx_t_16 = __Pyx_PyInt_from_py_int32_t(__pyx_t_1); if (unlikely((__pyx_t_16 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_conf.preset = __pyx_t_11; + __pyx_v_conf.sc = __pyx_t_12; + __pyx_v_conf.bc = __pyx_t_13; + __pyx_v_conf.ec = __pyx_t_14; + __pyx_v_conf.meta_char = __pyx_t_15; + __pyx_v_conf.line_skip = __pyx_t_16; + } else { + __pyx_t_17 = PyObject_GetIter(__pyx_v_conf_data); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_17, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_16 = __Pyx_PyInt_from_py_int32_t(__pyx_t_9); if (unlikely((__pyx_t_16 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = __Pyx_UnpackItem(__pyx_t_17, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_15 = __Pyx_PyInt_from_py_int32_t(__pyx_t_10); if (unlikely((__pyx_t_15 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_17, 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_14 = __Pyx_PyInt_from_py_int32_t(__pyx_t_2); if (unlikely((__pyx_t_14 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_17, 3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_from_py_int32_t(__pyx_t_6); if (unlikely((__pyx_t_13 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_17, 4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_12 = __Pyx_PyInt_from_py_int32_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_17, 5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = __Pyx_PyInt_from_py_int32_t(__pyx_t_1); if (unlikely((__pyx_t_11 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__Pyx_EndUnpack(__pyx_t_17, 6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_v_conf.preset = __pyx_t_16; + __pyx_v_conf.sc = __pyx_t_15; + __pyx_v_conf.bc = __pyx_t_14; + __pyx_v_conf.ec = __pyx_t_13; + __pyx_v_conf.meta_char = __pyx_t_12; + __pyx_v_conf.line_skip = __pyx_t_11; + } + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":872 + * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data + * + * ti_index_build( filename, &conf) # <<<<<<<<<<<<<< + * + * return filename + */ + __pyx_t_18 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_18) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + ti_index_build(__pyx_t_18, (&__pyx_v_conf)); + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":874 + * ti_index_build( filename, &conf) + * + * return filename # <<<<<<<<<<<<<< + * + * __all__ = ["tabix_index", + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_filename); + __pyx_r = __pyx_v_filename; + 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_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_AddTraceback("ctabix.tabix_index"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(__pyx_v_preset2conf); + __Pyx_DECREF(__pyx_v_conf_data); + __Pyx_DECREF(__pyx_v_filename); + __Pyx_DECREF(__pyx_v_end_col); + __Pyx_DECREF(__pyx_v_preset); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_tp_new_6ctabix_Tabixfile(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = (*t->tp_alloc)(t, 0); + if (!o) return 0; + if (__pyx_pf_6ctabix_9Tabixfile___cinit__(o, a, k) < 0) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6ctabix_Tabixfile(PyObject *o) { + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6ctabix_9Tabixfile_contigs(PyObject *o, void *x) { + return __pyx_pf_6ctabix_9Tabixfile_7contigs___get__(o); +} + +static PyMethodDef __pyx_methods_6ctabix_Tabixfile[] = { + {__Pyx_NAMESTR("_isOpen"), (PyCFunction)__pyx_pf_6ctabix_9Tabixfile__isOpen, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6ctabix_9Tabixfile__isOpen)}, + {__Pyx_NAMESTR("_open"), (PyCFunction)__pyx_pf_6ctabix_9Tabixfile__open, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6ctabix_9Tabixfile__open)}, + {__Pyx_NAMESTR("_parseRegion"), (PyCFunction)__pyx_pf_6ctabix_9Tabixfile__parseRegion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6ctabix_9Tabixfile__parseRegion)}, + {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pf_6ctabix_9Tabixfile_fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6ctabix_9Tabixfile_fetch)}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6ctabix_Tabixfile[] = { + {(char *)"contigs", __pyx_getprop_6ctabix_9Tabixfile_contigs, 0, __Pyx_DOCSTR(__pyx_k_41), 0}, + {0, 0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_Tabixfile = { + 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_Tabixfile = { + 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_Tabixfile = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_Tabixfile = { + #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 +}; + +PyTypeObject __pyx_type_6ctabix_Tabixfile = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("ctabix.Tabixfile"), /*tp_name*/ + sizeof(struct __pyx_obj_6ctabix_Tabixfile), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6ctabix_Tabixfile, /*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_Tabixfile, /*tp_as_number*/ + &__pyx_tp_as_sequence_Tabixfile, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_Tabixfile, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_Tabixfile, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + __Pyx_DOCSTR("*(filename, mode='r')*\n\n opens a :term:`tabix file` for reading. A missing\n index (*filename* + \".tbi\") will raise an exception.\n "), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6ctabix_Tabixfile, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6ctabix_Tabixfile, /*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_6ctabix_Tabixfile, /*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_6ctabix_TabixIterator(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = (*t->tp_alloc)(t, 0); + if (!o) return 0; + if (__pyx_pf_6ctabix_13TabixIterator___cinit__(o, a, k) < 0) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6ctabix_TabixIterator(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pf_6ctabix_13TabixIterator___dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_6ctabix_TabixIterator[] = { + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_6ctabix_13TabixIterator___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_6ctabix_13TabixIterator___next__)}, + {0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_TabixIterator = { + 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_TabixIterator = { + 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_TabixIterator = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_TabixIterator = { + #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 +}; + +PyTypeObject __pyx_type_6ctabix_TabixIterator = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("ctabix.TabixIterator"), /*tp_name*/ + sizeof(struct __pyx_obj_6ctabix_TabixIterator), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6ctabix_TabixIterator, /*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_TabixIterator, /*tp_as_number*/ + &__pyx_tp_as_sequence_TabixIterator, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_TabixIterator, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_TabixIterator, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + __Pyx_DOCSTR("iterates over rows in *tabixfile* in region\n given by *tid*, *start* and *end*.\n "), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + __pyx_pf_6ctabix_13TabixIterator___iter__, /*tp_iter*/ + __pyx_pf_6ctabix_13TabixIterator___next__, /*tp_iternext*/ + __pyx_methods_6ctabix_TabixIterator, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*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_6ctabix_TabixIterator, /*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_6ctabix_TupleProxy __pyx_vtable_6ctabix_TupleProxy; + +static PyObject *__pyx_tp_new_6ctabix_TupleProxy(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6ctabix_TupleProxy *p; + PyObject *o = (*t->tp_alloc)(t, 0); + if (!o) return 0; + p = ((struct __pyx_obj_6ctabix_TupleProxy *)o); + p->__pyx_vtab = __pyx_vtabptr_6ctabix_TupleProxy; + if (__pyx_pf_6ctabix_10TupleProxy___cinit__(o, __pyx_empty_tuple, NULL) < 0) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6ctabix_TupleProxy(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pf_6ctabix_10TupleProxy___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_sq_item_6ctabix_TupleProxy(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; +} + +static PyMethodDef __pyx_methods_6ctabix_TupleProxy[] = { + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_6ctabix_10TupleProxy___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_6ctabix_10TupleProxy___next__)}, + {0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_TupleProxy = { + 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_TupleProxy = { + __pyx_pf_6ctabix_10TupleProxy___len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_6ctabix_TupleProxy, /*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_TupleProxy = { + __pyx_pf_6ctabix_10TupleProxy___len__, /*mp_length*/ + __pyx_pf_6ctabix_10TupleProxy___getitem__, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_TupleProxy = { + #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 +}; + +PyTypeObject __pyx_type_6ctabix_TupleProxy = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("ctabix.TupleProxy"), /*tp_name*/ + sizeof(struct __pyx_obj_6ctabix_TupleProxy), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6ctabix_TupleProxy, /*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_TupleProxy, /*tp_as_number*/ + &__pyx_tp_as_sequence_TupleProxy, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_TupleProxy, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_TupleProxy, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + __Pyx_DOCSTR("Proxy class for access to parsed row as a tuple.\n\n This class represents a table row for fast read-access.\n "), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + __pyx_pf_6ctabix_10TupleProxy___iter__, /*tp_iter*/ + __pyx_pf_6ctabix_10TupleProxy___next__, /*tp_iternext*/ + __pyx_methods_6ctabix_TupleProxy, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*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_6ctabix_TupleProxy, /*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_6ctabix_GTFProxy __pyx_vtable_6ctabix_GTFProxy; + +static PyObject *__pyx_tp_new_6ctabix_GTFProxy(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6ctabix_GTFProxy *p; + PyObject *o = (*t->tp_alloc)(t, 0); + if (!o) return 0; + p = ((struct __pyx_obj_6ctabix_GTFProxy *)o); + p->__pyx_vtab = __pyx_vtabptr_6ctabix_GTFProxy; + if (__pyx_pf_6ctabix_8GTFProxy___cinit__(o, __pyx_empty_tuple, NULL) < 0) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6ctabix_GTFProxy(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pf_6ctabix_8GTFProxy___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_sq_item_6ctabix_GTFProxy(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; +} + +static PyObject *__pyx_tp_getattro_6ctabix_GTFProxy(PyObject *o, PyObject *n) { + PyObject *v = PyObject_GenericGetAttr(o, n); + if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + v = __pyx_pf_6ctabix_8GTFProxy___getattr__(o, n); + } + return v; +} + +static PyObject *__pyx_getprop_6ctabix_8GTFProxy_contig(PyObject *o, void *x) { + return __pyx_pf_6ctabix_8GTFProxy_6contig___get__(o); +} + +static int __pyx_setprop_6ctabix_8GTFProxy_contig(PyObject *o, PyObject *v, void *x) { + if (v) { + return __pyx_pf_6ctabix_8GTFProxy_6contig___set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6ctabix_8GTFProxy_feature(PyObject *o, void *x) { + return __pyx_pf_6ctabix_8GTFProxy_7feature___get__(o); +} + +static int __pyx_setprop_6ctabix_8GTFProxy_feature(PyObject *o, PyObject *v, void *x) { + if (v) { + return __pyx_pf_6ctabix_8GTFProxy_7feature___set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6ctabix_8GTFProxy_source(PyObject *o, void *x) { + return __pyx_pf_6ctabix_8GTFProxy_6source___get__(o); +} + +static int __pyx_setprop_6ctabix_8GTFProxy_source(PyObject *o, PyObject *v, void *x) { + if (v) { + return __pyx_pf_6ctabix_8GTFProxy_6source___set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6ctabix_8GTFProxy_start(PyObject *o, void *x) { + return __pyx_pf_6ctabix_8GTFProxy_5start___get__(o); +} + +static int __pyx_setprop_6ctabix_8GTFProxy_start(PyObject *o, PyObject *v, void *x) { + if (v) { + return __pyx_pf_6ctabix_8GTFProxy_5start___set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6ctabix_8GTFProxy_end(PyObject *o, void *x) { + return __pyx_pf_6ctabix_8GTFProxy_3end___get__(o); +} + +static int __pyx_setprop_6ctabix_8GTFProxy_end(PyObject *o, PyObject *v, void *x) { + if (v) { + return __pyx_pf_6ctabix_8GTFProxy_3end___set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6ctabix_8GTFProxy_score(PyObject *o, void *x) { + return __pyx_pf_6ctabix_8GTFProxy_5score___get__(o); +} + +static int __pyx_setprop_6ctabix_8GTFProxy_score(PyObject *o, PyObject *v, void *x) { + if (v) { + return __pyx_pf_6ctabix_8GTFProxy_5score___set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6ctabix_8GTFProxy_strand(PyObject *o, void *x) { + return __pyx_pf_6ctabix_8GTFProxy_6strand___get__(o); +} + +static int __pyx_setprop_6ctabix_8GTFProxy_strand(PyObject *o, PyObject *v, void *x) { + if (v) { + return __pyx_pf_6ctabix_8GTFProxy_6strand___set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6ctabix_8GTFProxy_frame(PyObject *o, void *x) { + return __pyx_pf_6ctabix_8GTFProxy_5frame___get__(o); +} + +static int __pyx_setprop_6ctabix_8GTFProxy_frame(PyObject *o, PyObject *v, void *x) { + if (v) { + return __pyx_pf_6ctabix_8GTFProxy_5frame___set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_6ctabix_8GTFProxy_attributes(PyObject *o, void *x) { + return __pyx_pf_6ctabix_8GTFProxy_10attributes___get__(o); +} + +static int __pyx_setprop_6ctabix_8GTFProxy_attributes(PyObject *o, PyObject *v, void *x) { + if (v) { + return __pyx_pf_6ctabix_8GTFProxy_10attributes___set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_6ctabix_GTFProxy[] = { + {__Pyx_NAMESTR("asDict"), (PyCFunction)__pyx_pf_6ctabix_8GTFProxy_asDict, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6ctabix_8GTFProxy_asDict)}, + {__Pyx_NAMESTR("fromDict"), (PyCFunction)__pyx_pf_6ctabix_8GTFProxy_fromDict, METH_O, __Pyx_DOCSTR(__pyx_doc_6ctabix_8GTFProxy_fromDict)}, + {__Pyx_NAMESTR("invert"), (PyCFunction)__pyx_pf_6ctabix_8GTFProxy_invert, METH_O, __Pyx_DOCSTR(__pyx_doc_6ctabix_8GTFProxy_invert)}, + {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pf_6ctabix_8GTFProxy_keys, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6ctabix_8GTFProxy_keys)}, + {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_6ctabix_8GTFProxy___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_6ctabix_8GTFProxy___getattr__)}, + {__Pyx_NAMESTR("setAttribute"), (PyCFunction)__pyx_pf_6ctabix_8GTFProxy_setAttribute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6ctabix_8GTFProxy_setAttribute)}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6ctabix_GTFProxy[] = { + {(char *)"contig", __pyx_getprop_6ctabix_8GTFProxy_contig, __pyx_setprop_6ctabix_8GTFProxy_contig, __Pyx_DOCSTR(__pyx_k_42), 0}, + {(char *)"feature", __pyx_getprop_6ctabix_8GTFProxy_feature, __pyx_setprop_6ctabix_8GTFProxy_feature, __Pyx_DOCSTR(__pyx_k_43), 0}, + {(char *)"source", __pyx_getprop_6ctabix_8GTFProxy_source, __pyx_setprop_6ctabix_8GTFProxy_source, __Pyx_DOCSTR(__pyx_k_44), 0}, + {(char *)"start", __pyx_getprop_6ctabix_8GTFProxy_start, __pyx_setprop_6ctabix_8GTFProxy_start, __Pyx_DOCSTR(__pyx_k_45), 0}, + {(char *)"end", __pyx_getprop_6ctabix_8GTFProxy_end, __pyx_setprop_6ctabix_8GTFProxy_end, __Pyx_DOCSTR(__pyx_k_46), 0}, + {(char *)"score", __pyx_getprop_6ctabix_8GTFProxy_score, __pyx_setprop_6ctabix_8GTFProxy_score, __Pyx_DOCSTR(__pyx_k_47), 0}, + {(char *)"strand", __pyx_getprop_6ctabix_8GTFProxy_strand, __pyx_setprop_6ctabix_8GTFProxy_strand, __Pyx_DOCSTR(__pyx_k_48), 0}, + {(char *)"frame", __pyx_getprop_6ctabix_8GTFProxy_frame, __pyx_setprop_6ctabix_8GTFProxy_frame, __Pyx_DOCSTR(__pyx_k_49), 0}, + {(char *)"attributes", __pyx_getprop_6ctabix_8GTFProxy_attributes, __pyx_setprop_6ctabix_8GTFProxy_attributes, __Pyx_DOCSTR(__pyx_k_50), 0}, + {0, 0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_GTFProxy = { + 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_GTFProxy = { + 0, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_6ctabix_GTFProxy, /*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_GTFProxy = { + 0, /*mp_length*/ + __pyx_pf_6ctabix_8GTFProxy___getitem__, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_GTFProxy = { + #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 +}; + +PyTypeObject __pyx_type_6ctabix_GTFProxy = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("ctabix.GTFProxy"), /*tp_name*/ + sizeof(struct __pyx_obj_6ctabix_GTFProxy), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6ctabix_GTFProxy, /*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_GTFProxy, /*tp_as_number*/ + &__pyx_tp_as_sequence_GTFProxy, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_GTFProxy, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + __pyx_pf_6ctabix_8GTFProxy___str__, /*tp_str*/ + __pyx_tp_getattro_6ctabix_GTFProxy, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_GTFProxy, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + __Pyx_DOCSTR("Proxy class for access to GTF fields.\n\n This class represents a GTF entry for fast read-access.\n Write-access has been added as well, though some care must\n be taken. If any of the string fields (contig, source, ...)\n are set, the new value is tied to the lifetime of the\n argument that was supplied.\n\n The only exception is the attributes field when set from\n a dictionary - this field will manage its own memory.\n\n "), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6ctabix_GTFProxy, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6ctabix_GTFProxy, /*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_6ctabix_GTFProxy, /*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_6ctabix_Parser(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = (*t->tp_alloc)(t, 0); + if (!o) return 0; + return o; +} + +static void __pyx_tp_dealloc_6ctabix_Parser(PyObject *o) { + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_6ctabix_Parser[] = { + {0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_Parser = { + 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_Parser = { + 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_Parser = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_Parser = { + #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 +}; + +PyTypeObject __pyx_type_6ctabix_Parser = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("ctabix.Parser"), /*tp_name*/ + sizeof(struct __pyx_obj_6ctabix_Parser), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6ctabix_Parser, /*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_Parser, /*tp_as_number*/ + &__pyx_tp_as_sequence_Parser, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_Parser, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_Parser, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6ctabix_Parser, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*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_6ctabix_Parser, /*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_6ctabix_asTuple(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = __pyx_tp_new_6ctabix_Parser(t, a, k); + if (!o) return 0; + return o; +} + +static PyMethodDef __pyx_methods_6ctabix_asTuple[] = { + {0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_asTuple = { + 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_asTuple = { + 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_asTuple = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_asTuple = { + #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 +}; + +PyTypeObject __pyx_type_6ctabix_asTuple = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("ctabix.asTuple"), /*tp_name*/ + sizeof(struct __pyx_obj_6ctabix_asTuple), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6ctabix_Parser, /*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_asTuple, /*tp_as_number*/ + &__pyx_tp_as_sequence_asTuple, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_asTuple, /*tp_as_mapping*/ + 0, /*tp_hash*/ + __pyx_pf_6ctabix_7asTuple___call__, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_asTuple, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + __Pyx_DOCSTR("converts a :term:`tabix row` into a python tuple."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6ctabix_asTuple, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*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_6ctabix_asTuple, /*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_6ctabix_asGTF(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = __pyx_tp_new_6ctabix_Parser(t, a, k); + if (!o) return 0; + return o; +} + +static PyMethodDef __pyx_methods_6ctabix_asGTF[] = { + {0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_asGTF = { + 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_asGTF = { + 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_asGTF = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_asGTF = { + #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 +}; + +PyTypeObject __pyx_type_6ctabix_asGTF = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("ctabix.asGTF"), /*tp_name*/ + sizeof(struct __pyx_obj_6ctabix_asGTF), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6ctabix_Parser, /*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_asGTF, /*tp_as_number*/ + &__pyx_tp_as_sequence_asGTF, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_asGTF, /*tp_as_mapping*/ + 0, /*tp_hash*/ + __pyx_pf_6ctabix_5asGTF___call__, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_asGTF, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + __Pyx_DOCSTR("converts a :term:`tabix row` into a GTF record."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6ctabix_asGTF, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*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_6ctabix_asGTF, /*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_6ctabix_TabixIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6ctabix_TabixIteratorParsed *p; + PyObject *o = (*t->tp_alloc)(t, 0); + if (!o) return 0; + p = ((struct __pyx_obj_6ctabix_TabixIteratorParsed *)o); + p->parser = ((struct __pyx_obj_6ctabix_Parser *)Py_None); Py_INCREF(Py_None); + if (__pyx_pf_6ctabix_19TabixIteratorParsed___cinit__(o, a, k) < 0) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6ctabix_TabixIteratorParsed(PyObject *o) { + struct __pyx_obj_6ctabix_TabixIteratorParsed *p = (struct __pyx_obj_6ctabix_TabixIteratorParsed *)o; + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pf_6ctabix_19TabixIteratorParsed___dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + Py_XDECREF(((PyObject *)p->parser)); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6ctabix_TabixIteratorParsed(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6ctabix_TabixIteratorParsed *p = (struct __pyx_obj_6ctabix_TabixIteratorParsed *)o; + if (p->parser) { + e = (*v)(((PyObject*)p->parser), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6ctabix_TabixIteratorParsed(PyObject *o) { + struct __pyx_obj_6ctabix_TabixIteratorParsed *p = (struct __pyx_obj_6ctabix_TabixIteratorParsed *)o; + PyObject* tmp; + tmp = ((PyObject*)p->parser); + p->parser = ((struct __pyx_obj_6ctabix_Parser *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_6ctabix_TabixIteratorParsed[] = { + {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_6ctabix_19TabixIteratorParsed___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_6ctabix_19TabixIteratorParsed___next__)}, + {0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_TabixIteratorParsed = { + 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_TabixIteratorParsed = { + 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_TabixIteratorParsed = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_TabixIteratorParsed = { + #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 +}; + +PyTypeObject __pyx_type_6ctabix_TabixIteratorParsed = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("ctabix.TabixIteratorParsed"), /*tp_name*/ + sizeof(struct __pyx_obj_6ctabix_TabixIteratorParsed), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6ctabix_TabixIteratorParsed, /*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_TabixIteratorParsed, /*tp_as_number*/ + &__pyx_tp_as_sequence_TabixIteratorParsed, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_TabixIteratorParsed, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_TabixIteratorParsed, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + __Pyx_DOCSTR("iterates over mapped reads in a region.\n "), /*tp_doc*/ + __pyx_tp_traverse_6ctabix_TabixIteratorParsed, /*tp_traverse*/ + __pyx_tp_clear_6ctabix_TabixIteratorParsed, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + __pyx_pf_6ctabix_19TabixIteratorParsed___iter__, /*tp_iter*/ + __pyx_pf_6ctabix_19TabixIteratorParsed___next__, /*tp_iternext*/ + __pyx_methods_6ctabix_TabixIteratorParsed, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*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_6ctabix_TabixIteratorParsed, /*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 PyMethodDef __pyx_methods[] = { + {__Pyx_NAMESTR("toDot"), (PyCFunction)__pyx_pf_6ctabix_toDot, METH_O, __Pyx_DOCSTR(__pyx_doc_6ctabix_toDot)}, + {__Pyx_NAMESTR("quote"), (PyCFunction)__pyx_pf_6ctabix_quote, METH_O, __Pyx_DOCSTR(__pyx_doc_6ctabix_quote)}, + {__Pyx_NAMESTR("tabix_compress"), (PyCFunction)__pyx_pf_6ctabix_tabix_compress, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6ctabix_tabix_compress)}, + {__Pyx_NAMESTR("tabix_index"), (PyCFunction)__pyx_pf_6ctabix_tabix_index, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6ctabix_tabix_index)}, + {0, 0, 0, 0} +}; + +#if PY_MAJOR_VERSION >= 3 +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + __Pyx_NAMESTR("ctabix"), + 0, /* m_doc */ + -1, /* m_size */ + __pyx_methods /* m_methods */, + NULL, /* m_reload */ + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, + {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, + {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, + {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0}, + {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, + {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0}, + {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, + {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0}, + {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0}, + {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, + {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0}, + {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0}, + {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, + {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0}, + {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, + {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0}, + {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, + {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0}, + {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0}, + {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, + {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, + {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, + {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, + {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0}, + {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0}, + {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, + {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 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_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, + {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, + {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0}, + {&__pyx_kp_u_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 1, 0, 0}, + {&__pyx_kp_u_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 1, 0, 0}, + {&__pyx_kp_u_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 1, 0, 0}, + {&__pyx_kp_u_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 1, 0, 0}, + {&__pyx_kp_u_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 1, 0, 0}, + {&__pyx_kp_u_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 1, 0, 0}, + {&__pyx_kp_u_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 1, 0, 0}, + {&__pyx_kp_u_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 1, 0, 0}, + {&__pyx_kp_u_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 1, 0, 0}, + {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0}, + {&__pyx_kp_u_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 1, 0, 0}, + {&__pyx_kp_u_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 1, 0, 0}, + {&__pyx_kp_u_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 1, 0, 0}, + {&__pyx_kp_u_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 1, 0, 0}, + {&__pyx_kp_u_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 1, 0, 0}, + {&__pyx_kp_u_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 1, 0, 0}, + {&__pyx_kp_u_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 1, 0, 0}, + {&__pyx_kp_u_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 1, 0, 0}, + {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, + {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, + {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, + {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1}, + {&__pyx_n_s__GTFProxy, __pyx_k__GTFProxy, sizeof(__pyx_k__GTFProxy), 0, 0, 1, 1}, + {&__pyx_n_s__IOError, __pyx_k__IOError, sizeof(__pyx_k__IOError), 0, 0, 1, 1}, + {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, + {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, + {&__pyx_n_s__OSError, __pyx_k__OSError, sizeof(__pyx_k__OSError), 0, 0, 1, 1}, + {&__pyx_n_s__O_RDONLY, __pyx_k__O_RDONLY, sizeof(__pyx_k__O_RDONLY), 0, 0, 1, 1}, + {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1}, + {&__pyx_n_s__StringType, __pyx_k__StringType, sizeof(__pyx_k__StringType), 0, 0, 1, 1}, + {&__pyx_n_s__StringTypes, __pyx_k__StringTypes, sizeof(__pyx_k__StringTypes), 0, 0, 1, 1}, + {&__pyx_n_s__TabixIterator, __pyx_k__TabixIterator, sizeof(__pyx_k__TabixIterator), 0, 0, 1, 1}, + {&__pyx_n_s__TabixIteratorParsed, __pyx_k__TabixIteratorParsed, sizeof(__pyx_k__TabixIteratorParsed), 0, 0, 1, 1}, + {&__pyx_n_s__Tabixfile, __pyx_k__Tabixfile, sizeof(__pyx_k__Tabixfile), 0, 0, 1, 1}, + {&__pyx_n_s__TupleProxy, __pyx_k__TupleProxy, sizeof(__pyx_k__TupleProxy), 0, 0, 1, 1}, + {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, + {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, + {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1}, + {&__pyx_n_s____getattr__, __pyx_k____getattr__, sizeof(__pyx_k____getattr__), 0, 0, 1, 1}, + {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, + {&__pyx_n_s____next__, __pyx_k____next__, sizeof(__pyx_k____next__), 0, 0, 1, 1}, + {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, + {&__pyx_n_s___isOpen, __pyx_k___isOpen, sizeof(__pyx_k___isOpen), 0, 0, 1, 1}, + {&__pyx_n_s___open, __pyx_k___open, sizeof(__pyx_k___open), 0, 0, 1, 1}, + {&__pyx_n_s___parseRegion, __pyx_k___parseRegion, sizeof(__pyx_k___parseRegion), 0, 0, 1, 1}, + {&__pyx_n_s__asDict, __pyx_k__asDict, sizeof(__pyx_k__asDict), 0, 0, 1, 1}, + {&__pyx_n_s__asGTF, __pyx_k__asGTF, sizeof(__pyx_k__asGTF), 0, 0, 1, 1}, + {&__pyx_n_s__asTuple, __pyx_k__asTuple, sizeof(__pyx_k__asTuple), 0, 0, 1, 1}, + {&__pyx_n_s__attributes, __pyx_k__attributes, sizeof(__pyx_k__attributes), 0, 0, 1, 1}, + {&__pyx_n_s__bc, __pyx_k__bc, sizeof(__pyx_k__bc), 0, 0, 1, 1}, + {&__pyx_n_s__bed, __pyx_k__bed, sizeof(__pyx_k__bed), 0, 0, 1, 1}, + {&__pyx_n_s__buffer, __pyx_k__buffer, sizeof(__pyx_k__buffer), 0, 0, 1, 1}, + {&__pyx_n_s__close, __pyx_k__close, sizeof(__pyx_k__close), 0, 0, 1, 1}, + {&__pyx_n_s__contig, __pyx_k__contig, sizeof(__pyx_k__contig), 0, 0, 1, 1}, + {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1}, + {&__pyx_n_s__ctypes, __pyx_k__ctypes, sizeof(__pyx_k__ctypes), 0, 0, 1, 1}, + {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1}, + {&__pyx_n_s__ec, __pyx_k__ec, sizeof(__pyx_k__ec), 0, 0, 1, 1}, + {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1}, + {&__pyx_n_s__end_col, __pyx_k__end_col, sizeof(__pyx_k__end_col), 0, 0, 1, 1}, + {&__pyx_n_s__endswith, __pyx_k__endswith, sizeof(__pyx_k__endswith), 0, 0, 1, 1}, + {&__pyx_n_s__exists, __pyx_k__exists, sizeof(__pyx_k__exists), 0, 0, 1, 1}, + {&__pyx_n_s__feature, __pyx_k__feature, sizeof(__pyx_k__feature), 0, 0, 1, 1}, + {&__pyx_n_s__fetch, __pyx_k__fetch, sizeof(__pyx_k__fetch), 0, 0, 1, 1}, + {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1}, + {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1}, + {&__pyx_n_s__filename_in, __pyx_k__filename_in, sizeof(__pyx_k__filename_in), 0, 0, 1, 1}, + {&__pyx_n_s__filename_out, __pyx_k__filename_out, sizeof(__pyx_k__filename_out), 0, 0, 1, 1}, + {&__pyx_n_s__force, __pyx_k__force, sizeof(__pyx_k__force), 0, 0, 1, 1}, + {&__pyx_n_s__fp, __pyx_k__fp, sizeof(__pyx_k__fp), 0, 0, 1, 1}, + {&__pyx_n_s__frame, __pyx_k__frame, sizeof(__pyx_k__frame), 0, 0, 1, 1}, + {&__pyx_n_s__fromDict, __pyx_k__fromDict, sizeof(__pyx_k__fromDict), 0, 0, 1, 1}, + {&__pyx_n_s__gff, __pyx_k__gff, sizeof(__pyx_k__gff), 0, 0, 1, 1}, + {&__pyx_n_s__hasOwnAttributes, __pyx_k__hasOwnAttributes, sizeof(__pyx_k__hasOwnAttributes), 0, 0, 1, 1}, + {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 0, 0, 1, 1}, + {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1}, + {&__pyx_n_s__invert, __pyx_k__invert, sizeof(__pyx_k__invert), 0, 0, 1, 1}, + {&__pyx_n_s__isModified, __pyx_k__isModified, sizeof(__pyx_k__isModified), 0, 0, 1, 1}, + {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1}, + {&__pyx_n_s__iterator, __pyx_k__iterator, sizeof(__pyx_k__iterator), 0, 0, 1, 1}, + {&__pyx_n_s__itertools, __pyx_k__itertools, sizeof(__pyx_k__itertools), 0, 0, 1, 1}, + {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1}, + {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1}, + {&__pyx_n_s__len, __pyx_k__len, sizeof(__pyx_k__len), 0, 0, 1, 1}, + {&__pyx_n_s__line_skip, __pyx_k__line_skip, sizeof(__pyx_k__line_skip), 0, 0, 1, 1}, + {&__pyx_n_s__meta_char, __pyx_k__meta_char, sizeof(__pyx_k__meta_char), 0, 0, 1, 1}, + {&__pyx_n_s__mode, __pyx_k__mode, sizeof(__pyx_k__mode), 0, 0, 1, 1}, + {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1}, + {&__pyx_n_s__nbytes, __pyx_k__nbytes, sizeof(__pyx_k__nbytes), 0, 0, 1, 1}, + {&__pyx_n_s__nfields, __pyx_k__nfields, sizeof(__pyx_k__nfields), 0, 0, 1, 1}, + {&__pyx_n_s__ord, __pyx_k__ord, sizeof(__pyx_k__ord), 0, 0, 1, 1}, + {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1}, + {&__pyx_n_s__parser, __pyx_k__parser, sizeof(__pyx_k__parser), 0, 0, 1, 1}, + {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1}, + {&__pyx_n_s__pileup, __pyx_k__pileup, sizeof(__pyx_k__pileup), 0, 0, 1, 1}, + {&__pyx_n_s__preset, __pyx_k__preset, sizeof(__pyx_k__preset), 0, 0, 1, 1}, + {&__pyx_n_s__psltbl, __pyx_k__psltbl, sizeof(__pyx_k__psltbl), 0, 0, 1, 1}, + {&__pyx_n_s__quote, __pyx_k__quote, sizeof(__pyx_k__quote), 0, 0, 1, 1}, + {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1}, + {&__pyx_n_s__reference, __pyx_k__reference, sizeof(__pyx_k__reference), 0, 0, 1, 1}, + {&__pyx_n_s__region, __pyx_k__region, sizeof(__pyx_k__region), 0, 0, 1, 1}, + {&__pyx_n_s__sam, __pyx_k__sam, sizeof(__pyx_k__sam), 0, 0, 1, 1}, + {&__pyx_n_s__sc, __pyx_k__sc, sizeof(__pyx_k__sc), 0, 0, 1, 1}, + {&__pyx_n_s__score, __pyx_k__score, sizeof(__pyx_k__score), 0, 0, 1, 1}, + {&__pyx_n_s__seq_col, __pyx_k__seq_col, sizeof(__pyx_k__seq_col), 0, 0, 1, 1}, + {&__pyx_n_s__setAttribute, __pyx_k__setAttribute, sizeof(__pyx_k__setAttribute), 0, 0, 1, 1}, + {&__pyx_n_s__source, __pyx_k__source, sizeof(__pyx_k__source), 0, 0, 1, 1}, + {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1}, + {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1}, + {&__pyx_n_s__start_col, __pyx_k__start_col, sizeof(__pyx_k__start_col), 0, 0, 1, 1}, + {&__pyx_n_s__strand, __pyx_k__strand, sizeof(__pyx_k__strand), 0, 0, 1, 1}, + {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1}, + {&__pyx_n_s__struct, __pyx_k__struct, sizeof(__pyx_k__struct), 0, 0, 1, 1}, + {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1}, + {&__pyx_n_s__tabix_compress, __pyx_k__tabix_compress, sizeof(__pyx_k__tabix_compress), 0, 0, 1, 1}, + {&__pyx_n_s__tabix_index, __pyx_k__tabix_index, sizeof(__pyx_k__tabix_index), 0, 0, 1, 1}, + {&__pyx_n_s__tabixfile, __pyx_k__tabixfile, sizeof(__pyx_k__tabixfile), 0, 0, 1, 1}, + {&__pyx_n_s__tempfile, __pyx_k__tempfile, sizeof(__pyx_k__tempfile), 0, 0, 1, 1}, + {&__pyx_n_s__tid, __pyx_k__tid, sizeof(__pyx_k__tid), 0, 0, 1, 1}, + {&__pyx_n_s__toDot, __pyx_k__toDot, sizeof(__pyx_k__toDot), 0, 0, 1, 1}, + {&__pyx_n_s__types, __pyx_k__types, sizeof(__pyx_k__types), 0, 0, 1, 1}, + {&__pyx_n_s__unlink, __pyx_k__unlink, sizeof(__pyx_k__unlink), 0, 0, 1, 1}, + {&__pyx_n_s__update, __pyx_k__update, sizeof(__pyx_k__update), 0, 0, 1, 1}, + {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1}, + {&__pyx_n_s__vcf, __pyx_k__vcf, sizeof(__pyx_k__vcf), 0, 0, 1, 1}, + {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1}, + {&__pyx_n_s__zerobased, __pyx_k__zerobased, sizeof(__pyx_k__zerobased), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_IOError = __Pyx_GetName(__pyx_b, __pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __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 = 98; __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 = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __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 = 549; __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 = 643; __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 = 780; __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 = 843; __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 = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + return 0; + __pyx_L1_error:; + return -1; +} + +static int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_0x10000 = PyInt_FromLong(0x10000); if (unlikely(!__pyx_int_0x10000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + return 0; + __pyx_L1_error:; + return -1; +} + +#if PY_MAJOR_VERSION < 3 +PyMODINIT_FUNC initctabix(void); /*proto*/ +PyMODINIT_FUNC initctabix(void) +#else +PyMODINIT_FUNC PyInit_ctabix(void); /*proto*/ +PyMODINIT_FUNC PyInit_ctabix(void) +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + #if CYTHON_REFNANNY + void* __pyx_refnanny = NULL; + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_ctabix(void)", __LINE__, __FILE__); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #ifdef __pyx_binding_PyCFunctionType_USED + if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif + /*--- Module creation code ---*/ + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4(__Pyx_NAMESTR("ctabix"), __pyx_methods, 0, 0, PYTHON_API_VERSION); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + #if PY_MAJOR_VERSION < 3 + Py_INCREF(__pyx_m); + #endif + __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); + if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + /*--- Initialize various global constants etc. ---*/ + if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_module_is_main_ctabix) { + if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + } + /*--- Builtin init code ---*/ + if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Global init code ---*/ + /*--- Function export code ---*/ + /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_6ctabix_Tabixfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Tabixfile", (PyObject *)&__pyx_type_6ctabix_Tabixfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6ctabix_Tabixfile = &__pyx_type_6ctabix_Tabixfile; + if (PyType_Ready(&__pyx_type_6ctabix_TabixIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6ctabix_TabixIterator, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_6ctabix_13TabixIterator___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_6ctabix_13TabixIterator___next__.doc = __pyx_doc_6ctabix_13TabixIterator___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6ctabix_13TabixIterator___next__; + } + } + if (__Pyx_SetAttrString(__pyx_m, "TabixIterator", (PyObject *)&__pyx_type_6ctabix_TabixIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6ctabix_TabixIterator = &__pyx_type_6ctabix_TabixIterator; + __pyx_vtabptr_6ctabix_TupleProxy = &__pyx_vtable_6ctabix_TupleProxy; + #if PY_MAJOR_VERSION >= 3 + __pyx_vtable_6ctabix_TupleProxy.take = (PyObject *(*)(struct __pyx_obj_6ctabix_TupleProxy *, char *, size_t))__pyx_f_6ctabix_10TupleProxy_take; + __pyx_vtable_6ctabix_TupleProxy.present = (PyObject *(*)(struct __pyx_obj_6ctabix_TupleProxy *, char *, size_t))__pyx_f_6ctabix_10TupleProxy_present; + __pyx_vtable_6ctabix_TupleProxy.copy = (PyObject *(*)(struct __pyx_obj_6ctabix_TupleProxy *, char *, size_t))__pyx_f_6ctabix_10TupleProxy_copy; + __pyx_vtable_6ctabix_TupleProxy.update = (PyObject *(*)(struct __pyx_obj_6ctabix_TupleProxy *, char *, size_t))__pyx_f_6ctabix_10TupleProxy_update; + #else + *(void(**)(void))&__pyx_vtable_6ctabix_TupleProxy.take = (void(*)(void))__pyx_f_6ctabix_10TupleProxy_take; + *(void(**)(void))&__pyx_vtable_6ctabix_TupleProxy.present = (void(*)(void))__pyx_f_6ctabix_10TupleProxy_present; + *(void(**)(void))&__pyx_vtable_6ctabix_TupleProxy.copy = (void(*)(void))__pyx_f_6ctabix_10TupleProxy_copy; + *(void(**)(void))&__pyx_vtable_6ctabix_TupleProxy.update = (void(*)(void))__pyx_f_6ctabix_10TupleProxy_update; + #endif + if (PyType_Ready(&__pyx_type_6ctabix_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6ctabix_TupleProxy, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_6ctabix_10TupleProxy___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_6ctabix_10TupleProxy___next__.doc = __pyx_doc_6ctabix_10TupleProxy___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6ctabix_10TupleProxy___next__; + } + } + if (__Pyx_SetVtable(__pyx_type_6ctabix_TupleProxy.tp_dict, __pyx_vtabptr_6ctabix_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "TupleProxy", (PyObject *)&__pyx_type_6ctabix_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6ctabix_TupleProxy = &__pyx_type_6ctabix_TupleProxy; + __pyx_vtabptr_6ctabix_GTFProxy = &__pyx_vtable_6ctabix_GTFProxy; + #if PY_MAJOR_VERSION >= 3 + __pyx_vtable_6ctabix_GTFProxy.take = (PyObject *(*)(struct __pyx_obj_6ctabix_GTFProxy *, char *, size_t))__pyx_f_6ctabix_8GTFProxy_take; + __pyx_vtable_6ctabix_GTFProxy.present = (PyObject *(*)(struct __pyx_obj_6ctabix_GTFProxy *, char *, size_t))__pyx_f_6ctabix_8GTFProxy_present; + __pyx_vtable_6ctabix_GTFProxy.copy = (PyObject *(*)(struct __pyx_obj_6ctabix_GTFProxy *, char *, size_t))__pyx_f_6ctabix_8GTFProxy_copy; + __pyx_vtable_6ctabix_GTFProxy.update = (PyObject *(*)(struct __pyx_obj_6ctabix_GTFProxy *, char *, size_t))__pyx_f_6ctabix_8GTFProxy_update; + #else + *(void(**)(void))&__pyx_vtable_6ctabix_GTFProxy.take = (void(*)(void))__pyx_f_6ctabix_8GTFProxy_take; + *(void(**)(void))&__pyx_vtable_6ctabix_GTFProxy.present = (void(*)(void))__pyx_f_6ctabix_8GTFProxy_present; + *(void(**)(void))&__pyx_vtable_6ctabix_GTFProxy.copy = (void(*)(void))__pyx_f_6ctabix_8GTFProxy_copy; + *(void(**)(void))&__pyx_vtable_6ctabix_GTFProxy.update = (void(*)(void))__pyx_f_6ctabix_8GTFProxy_update; + #endif + if (PyType_Ready(&__pyx_type_6ctabix_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6ctabix_GTFProxy, "__getattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_6ctabix_8GTFProxy___getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_6ctabix_8GTFProxy___getattr__.doc = __pyx_doc_6ctabix_8GTFProxy___getattr__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6ctabix_8GTFProxy___getattr__; + } + } + if (__Pyx_SetVtable(__pyx_type_6ctabix_GTFProxy.tp_dict, __pyx_vtabptr_6ctabix_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "GTFProxy", (PyObject *)&__pyx_type_6ctabix_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6ctabix_GTFProxy = &__pyx_type_6ctabix_GTFProxy; + if (PyType_Ready(&__pyx_type_6ctabix_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Parser", (PyObject *)&__pyx_type_6ctabix_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6ctabix_Parser = &__pyx_type_6ctabix_Parser; + __pyx_type_6ctabix_asTuple.tp_base = __pyx_ptype_6ctabix_Parser; + if (PyType_Ready(&__pyx_type_6ctabix_asTuple) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "asTuple", (PyObject *)&__pyx_type_6ctabix_asTuple) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6ctabix_asTuple = &__pyx_type_6ctabix_asTuple; + __pyx_type_6ctabix_asGTF.tp_base = __pyx_ptype_6ctabix_Parser; + if (PyType_Ready(&__pyx_type_6ctabix_asGTF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "asGTF", (PyObject *)&__pyx_type_6ctabix_asGTF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6ctabix_asGTF = &__pyx_type_6ctabix_asGTF; + if (PyType_Ready(&__pyx_type_6ctabix_TabixIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6ctabix_TabixIteratorParsed, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_6ctabix_19TabixIteratorParsed___next__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_6ctabix_19TabixIteratorParsed___next__.doc = __pyx_doc_6ctabix_19TabixIteratorParsed___next__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6ctabix_19TabixIteratorParsed___next__; + } + } + if (__Pyx_SetAttrString(__pyx_m, "TabixIteratorParsed", (PyObject *)&__pyx_type_6ctabix_TabixIteratorParsed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6ctabix_TabixIteratorParsed = &__pyx_type_6ctabix_TabixIteratorParsed; + /*--- Type import code ---*/ + /*--- Function import code ---*/ + /*--- Execution code ---*/ + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":4 + * # adds doc-strings for sphinx + * + * import tempfile, os, sys, types, itertools, struct, ctypes # <<<<<<<<<<<<<< + * + * cdef class Tabixfile: + */ + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__tempfile), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tempfile, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__types), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__itertools), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__struct), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__struct, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":743 + * def tabix_compress( filename_in, + * filename_out, + * force = False ): # <<<<<<<<<<<<<< + * + * ''' + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_k_28 = __pyx_t_1; + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":787 + * + * def tabix_index( filename, + * force = False, # <<<<<<<<<<<<<< + * seq_col = None, + * start_col = None, + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_k_33 = __pyx_t_1; + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":793 + * preset = None, + * meta_char = "#", + * zerobased = False, # <<<<<<<<<<<<<< + * ): + * ''' + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_k_35 = __pyx_t_1; + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":876 + * return filename + * + * __all__ = ["tabix_index", # <<<<<<<<<<<<<< + * "tabix_compress", + * "Tabixfile", + */ + __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__tabix_index)); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__tabix_index)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tabix_index)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__tabix_compress)); + PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__tabix_compress)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tabix_compress)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__Tabixfile)); + PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__Tabixfile)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Tabixfile)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__asTuple)); + PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__asTuple)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__asTuple)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__asGTF)); + PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_s__asGTF)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__asGTF)); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + + /* "/net/cpp-compute/backup/andreas/projects/pysam/pysam/pysam/ctabix.pyx":1 + * # cython: embedsignature=True # <<<<<<<<<<<<<< + * # adds doc-strings for sphinx + * + */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Tabixfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s___isOpen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_51), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Tabixfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s___open); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_52), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Tabixfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s___parseRegion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_53), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Tabixfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__fetch); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_54), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TabixIterator); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____next__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_55), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__toDot); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_2, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_56), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__quote); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_57), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____next__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_58), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__asDict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_59), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__fromDict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_60), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__invert); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_61), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_62), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____getattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_63), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setAttribute); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_64), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TabixIteratorParsed); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____next__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_65), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__tabix_compress); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_2, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_66), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__tabix_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_67), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + + /* "pysam/ctabix.pxd":2 + * + * cdef extern from "string.h": # <<<<<<<<<<<<<< + * ctypedef int size_t + * void *memcpy(void *dst,void *src,size_t len) + */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + if (__pyx_m) { + __Pyx_AddTraceback("init ctabix"); + Py_DECREF(__pyx_m); __pyx_m = 0; + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init ctabix"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if PY_MAJOR_VERSION < 3 + return; + #else + return __pyx_m; + #endif +} + +/* Runtime support code */ + +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { + PyObject *result; + result = PyObject_GetAttr(dict, name); + if (!result) + PyErr_SetObject(PyExc_NameError, name); + return result; +} + +static CYTHON_INLINE int __Pyx_CheckKeywordStrings( + PyObject *kwdict, + const char* function_name, + int kw_allowed) +{ + PyObject* key = 0; + Py_ssize_t pos = 0; + while (PyDict_Next(kwdict, &pos, &key, 0)) { + #if PY_MAJOR_VERSION < 3 + if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) + #else + if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) + #endif + goto invalid_keyword_type; + } + if ((!kw_allowed) && unlikely(key)) + goto invalid_keyword; + return 1; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%s() keywords must be strings", function_name); + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%s() got an unexpected keyword argument '%s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif + return 0; +} + +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AS_STRING(kw_name)); + #endif +} + +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *number, *more_or_less; + + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + number = (num_expected == 1) ? "" : "s"; + PyErr_Format(PyExc_TypeError, + #if PY_VERSION_HEX < 0x02050000 + "%s() takes %s %d positional argument%s (%d given)", + #else + "%s() takes %s %zd positional argument%s (%zd given)", + #endif + func_name, more_or_less, num_expected, number, num_found); +} + +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + } else { + #if PY_MAJOR_VERSION < 3 + if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) { + #else + if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) { + #endif + goto invalid_keyword_type; + } else { + for (name = first_kw_arg; *name; name++) { + #if PY_MAJOR_VERSION >= 3 + if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) && + PyUnicode_Compare(**name, key) == 0) break; + #else + if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) && + _PyString_Eq(**name, key)) break; + #endif + } + if (*name) { + values[name-argnames] = value; + } else { + /* unexpected keyword found */ + for (name=argnames; name != first_kw_arg; name++) { + if (**name == key) goto arg_passed_twice; + #if PY_MAJOR_VERSION >= 3 + if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) && + PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice; + #else + if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) && + _PyString_Eq(**name, key)) goto arg_passed_twice; + #endif + } + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + } + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, **name); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%s() got an unexpected keyword argument '%s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + + +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + #if PY_VERSION_HEX < 0x02050000 + "need more than %d value%s to unpack", (int)index, + #else + "need more than %zd value%s to unpack", index, + #endif + (index == 1) ? "" : "s"); +} + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + #if PY_VERSION_HEX < 0x02050000 + "too many values to unpack (expected %d)", (int)expected); + #else + "too many values to unpack (expected %zd)", expected); + #endif +} + +static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) { + PyObject *item; + if (!(item = PyIter_Next(iter))) { + if (!PyErr_Occurred()) { + __Pyx_RaiseNeedMoreValuesError(index); + } + } + return item; +} + +static int __Pyx_EndUnpack(PyObject *iter, Py_ssize_t expected) { + PyObject *item; + if ((item = PyIter_Next(iter))) { + Py_DECREF(item); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + else if (!PyErr_Occurred()) + return 0; + else + return -1; +} + +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact) +{ + if (!type) { + PyErr_Format(PyExc_SystemError, "Missing type object"); + return 0; + } + if (none_allowed && obj == Py_None) return 1; + else if (exact) { + if (Py_TYPE(obj) == type) return 1; + } + else { + if (PyObject_TypeCheck(obj, type)) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%s' has incorrect type (expected %s, got %s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +static double __Pyx__PyObject_AsDouble(PyObject* obj) { + PyObject* float_value; + if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) { + return PyFloat_AsDouble(obj); + } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { +#if PY_MAJOR_VERSION >= 3 + float_value = PyFloat_FromString(obj); +#else + float_value = PyFloat_FromString(obj, 0); +#endif + } else { + PyObject* args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + PyTuple_SET_ITEM(args, 0, obj); + float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); + PyTuple_SET_ITEM(args, 0, 0); + Py_DECREF(args); + } + if (likely(float_value)) { + double value = PyFloat_AS_DOUBLE(float_value); + Py_DECREF(float_value); + return value; + } +bad: + return (double)-1; +} + +static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable"); +} + +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *local_type, *local_value, *local_tb; + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + PyErr_NormalizeException(&local_type, &local_value, &local_tb); + if (unlikely(tstate->curexc_type)) + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + #endif + *type = local_type; + *value = local_value; + *tb = local_tb; + Py_INCREF(local_type); + Py_INCREF(local_value); + Py_INCREF(local_tb); + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + /* Make sure tstate is in a consistent state when we XDECREF + these objects (XDECREF may run arbitrary code). */ + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + + +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { + PyThreadState *tstate = PyThreadState_GET(); + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} + +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} + +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) { + PyObject *py_import = 0; + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); + if (!py_import) + goto bad; + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, NULL); +bad: + Py_XDECREF(empty_list); + Py_XDECREF(py_import); + Py_XDECREF(empty_dict); + return module; +} + +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} + +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { + PyThreadState *tstate = PyThreadState_GET(); + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} + + +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { + Py_XINCREF(type); + Py_XINCREF(value); + Py_XINCREF(tb); + /* First, check the traceback argument, replacing None with NULL. */ + if (tb == Py_None) { + Py_DECREF(tb); + tb = 0; + } + else if (tb != NULL && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + /* Next, replace a missing value with None */ + if (value == NULL) { + value = Py_None; + Py_INCREF(value); + } + #if PY_VERSION_HEX < 0x02050000 + if (!PyClass_Check(type)) + #else + if (!PyType_Check(type)) + #endif + { + /* Raising an instance. The value should be a dummy. */ + if (value != Py_None) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + /* Normalize to raise , */ + Py_DECREF(value); + value = type; + #if PY_VERSION_HEX < 0x02050000 + if (PyInstance_Check(type)) { + type = (PyObject*) ((PyInstanceObject*)type)->in_class; + Py_INCREF(type); + } + else { + type = 0; + PyErr_SetString(PyExc_TypeError, + "raise: exception must be an old-style class or instance"); + goto raise_error; + } + #else + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + #endif + } + + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} + +#else /* Python 3+ */ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (!PyExceptionClass_Check(type)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + + PyErr_SetObject(type, value); + + if (tb) { + PyThreadState *tstate = PyThreadState_GET(); + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } + } + +bad: + return; +} +#endif + +static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t val) { + const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0; + const int is_unsigned = const_zero < neg_one; + if ((sizeof(uint32_t) == sizeof(char)) || + (sizeof(uint32_t) == sizeof(short))) { + return PyInt_FromLong((long)val); + } else if ((sizeof(uint32_t) == sizeof(int)) || + (sizeof(uint32_t) == sizeof(long))) { + if (is_unsigned) + return PyLong_FromUnsignedLong((unsigned long)val); + else + return PyInt_FromLong((long)val); + } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) { + if (is_unsigned) + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); + else + return PyLong_FromLongLong((PY_LONG_LONG)val); + } else { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + return _PyLong_FromByteArray(bytes, sizeof(uint32_t), + little, !is_unsigned); + } +} + +static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject* x) { + const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0; + const int is_unsigned = const_zero < neg_one; + if (sizeof(uint32_t) == sizeof(char)) { + if (is_unsigned) + return (uint32_t)__Pyx_PyInt_AsUnsignedChar(x); + else + return (uint32_t)__Pyx_PyInt_AsSignedChar(x); + } else if (sizeof(uint32_t) == sizeof(short)) { + if (is_unsigned) + return (uint32_t)__Pyx_PyInt_AsUnsignedShort(x); + else + return (uint32_t)__Pyx_PyInt_AsSignedShort(x); + } else if (sizeof(uint32_t) == sizeof(int)) { + if (is_unsigned) + return (uint32_t)__Pyx_PyInt_AsUnsignedInt(x); + else + return (uint32_t)__Pyx_PyInt_AsSignedInt(x); + } else if (sizeof(uint32_t) == sizeof(long)) { + if (is_unsigned) + return (uint32_t)__Pyx_PyInt_AsUnsignedLong(x); + else + return (uint32_t)__Pyx_PyInt_AsSignedLong(x); + } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) { + if (is_unsigned) + return (uint32_t)__Pyx_PyInt_AsUnsignedLongLong(x); + else + return (uint32_t)__Pyx_PyInt_AsSignedLongLong(x); + } else { + uint32_t val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_VERSION_HEX < 0x03000000 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } + return (uint32_t)-1; + } +} + +static CYTHON_INLINE int32_t __Pyx_PyInt_from_py_int32_t(PyObject* x) { + const int32_t neg_one = (int32_t)-1, const_zero = (int32_t)0; + const int is_unsigned = const_zero < neg_one; + if (sizeof(int32_t) == sizeof(char)) { + if (is_unsigned) + return (int32_t)__Pyx_PyInt_AsUnsignedChar(x); + else + return (int32_t)__Pyx_PyInt_AsSignedChar(x); + } else if (sizeof(int32_t) == sizeof(short)) { + if (is_unsigned) + return (int32_t)__Pyx_PyInt_AsUnsignedShort(x); + else + return (int32_t)__Pyx_PyInt_AsSignedShort(x); + } else if (sizeof(int32_t) == sizeof(int)) { + if (is_unsigned) + return (int32_t)__Pyx_PyInt_AsUnsignedInt(x); + else + return (int32_t)__Pyx_PyInt_AsSignedInt(x); + } else if (sizeof(int32_t) == sizeof(long)) { + if (is_unsigned) + return (int32_t)__Pyx_PyInt_AsUnsignedLong(x); + else + return (int32_t)__Pyx_PyInt_AsSignedLong(x); + } else if (sizeof(int32_t) == sizeof(PY_LONG_LONG)) { + if (is_unsigned) + return (int32_t)__Pyx_PyInt_AsUnsignedLongLong(x); + else + return (int32_t)__Pyx_PyInt_AsSignedLongLong(x); + } else { + int32_t val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_VERSION_HEX < 0x03000000 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } + return (int32_t)-1; + } +} + +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { + const unsigned char neg_one = (unsigned char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(unsigned char) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(unsigned char)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned char" : + "value too large to convert to unsigned char"); + } + return (unsigned char)-1; + } + return (unsigned char)val; + } + return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); +} + +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { + const unsigned short neg_one = (unsigned short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(unsigned short) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(unsigned short)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned short" : + "value too large to convert to unsigned short"); + } + return (unsigned short)-1; + } + return (unsigned short)val; + } + return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); +} + +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { + const unsigned int neg_one = (unsigned int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(unsigned int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(unsigned int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned int" : + "value too large to convert to unsigned int"); + } + return (unsigned int)-1; + } + return (unsigned int)val; + } + return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); +} + +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { + const char neg_one = (char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(char) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(char)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to char" : + "value too large to convert to char"); + } + return (char)-1; + } + return (char)val; + } + return (char)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { + const short neg_one = (short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(short) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(short)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to short" : + "value too large to convert to short"); + } + return (short)-1; + } + return (short)val; + } + return (short)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { + const int neg_one = (int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to int" : + "value too large to convert to int"); + } + return (int)-1; + } + return (int)val; + } + return (int)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { + const signed char neg_one = (signed char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(signed char) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(signed char)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed char" : + "value too large to convert to signed char"); + } + return (signed char)-1; + } + return (signed char)val; + } + return (signed char)__Pyx_PyInt_AsSignedLong(x); +} + +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { + const signed short neg_one = (signed short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(signed short) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(signed short)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed short" : + "value too large to convert to signed short"); + } + return (signed short)-1; + } + return (signed short)val; + } + return (signed short)__Pyx_PyInt_AsSignedLong(x); +} + +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { + const signed int neg_one = (signed int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(signed int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(signed int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed int" : + "value too large to convert to signed int"); + } + return (signed int)-1; + } + return (signed int)val; + } + return (signed int)__Pyx_PyInt_AsSignedLong(x); +} + +static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { + const int neg_one = (int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to int" : + "value too large to convert to int"); + } + return (int)-1; + } + return (int)val; + } + return (int)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { + const unsigned long neg_one = (unsigned long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned long"); + return (unsigned long)-1; + } + return (unsigned long)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned long"); + return (unsigned long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); + } + } else { + unsigned long val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (unsigned long)-1; + val = __Pyx_PyInt_AsUnsignedLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG)-1; + } + return (unsigned PY_LONG_LONG)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); + } + } else { + unsigned PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (unsigned PY_LONG_LONG)-1; + val = __Pyx_PyInt_AsUnsignedLongLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { + const long neg_one = (long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } + return (long)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (long)-1; + val = __Pyx_PyInt_AsLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { + const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } + return (PY_LONG_LONG)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); + } + } else { + PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (PY_LONG_LONG)-1; + val = __Pyx_PyInt_AsLongLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { + const signed long neg_one = (signed long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } + return (signed long)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); + } + } else { + signed long val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (signed long)-1; + val = __Pyx_PyInt_AsSignedLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { + const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } + return (signed PY_LONG_LONG)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); + } + } else { + signed PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (signed PY_LONG_LONG)-1; + val = __Pyx_PyInt_AsSignedLongLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static int __Pyx_SetVtable(PyObject *dict, void *vtable) { +#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + PyObject *ob = PyCapsule_New(vtable, 0, 0); +#else + PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); +#endif + if (!ob) + goto bad; + if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0) + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" + +static void __Pyx_AddTraceback(const char *funcname) { + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + PyObject *py_globals = 0; + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(__pyx_filename); + #else + py_srcfile = PyUnicode_FromString(__pyx_filename); + #endif + if (!py_srcfile) goto bad; + if (__pyx_clineno) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_globals = PyModule_GetDict(__pyx_m); + if (!py_globals) goto bad; + py_code = PyCode_New( + 0, /*int argcount,*/ + #if PY_MAJOR_VERSION >= 3 + 0, /*int kwonlyargcount,*/ + #endif + 0, /*int nlocals,*/ + 0, /*int stacksize,*/ + 0, /*int flags,*/ + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + __pyx_lineno, /*int firstlineno,*/ + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + if (!py_code) goto bad; + py_frame = PyFrame_New( + PyThreadState_GET(), /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + py_globals, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + py_frame->f_lineno = __pyx_lineno; + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + while (t->p) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else /* Python 3+ has unicode identifiers */ + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + ++t; + } + return 0; +} + +/* Type Conversion Functions */ + +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} + +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { + PyNumberMethods *m; + const char *name = NULL; + PyObject *res = NULL; +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(x) || PyLong_Check(x)) +#else + if (PyLong_Check(x)) +#endif + return Py_INCREF(x), x; + m = Py_TYPE(x)->tp_as_number; +#if PY_VERSION_HEX < 0x03000000 + if (m && m->nb_int) { + name = "int"; + res = PyNumber_Int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = PyNumber_Long(x); + } +#else + if (m && m->nb_int) { + name = "int"; + res = PyNumber_Long(x); + } +#endif + if (res) { +#if PY_VERSION_HEX < 0x03000000 + if (!PyInt_Check(res) && !PyLong_Check(res)) { +#else + if (!PyLong_Check(res)) { +#endif + PyErr_Format(PyExc_TypeError, + "__%s__ returned non-%s (type %.200s)", + name, name, Py_TYPE(res)->tp_name); + Py_DECREF(res); + return NULL; + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} + +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject* x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} + +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { +#if PY_VERSION_HEX < 0x02050000 + if (ival <= LONG_MAX) + return PyInt_FromLong((long)ival); + else { + unsigned char *bytes = (unsigned char *) &ival; + int one = 1; int little = (int)*(unsigned char*)&one; + return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); + } +#else + return PyInt_FromSize_t(ival); +#endif +} + +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { + unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); + if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) { + return (size_t)-1; + } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t)-1; + } + return (size_t)val; +} + + +#endif /* Py_PYTHON_H */ diff --git a/pysam/version.py b/pysam/version.py index 454a67e..4116fe6 100644 --- a/pysam/version.py +++ b/pysam/version.py @@ -1,6 +1,6 @@ # pysam versioning information -__version__ = "0.4" +__version__ = "0.4.1" __samtools_version__ = "0.1.12a" diff --git a/setup.cfg b/setup.cfg index b9711b8..81d163a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,8 +1,8 @@ [bdist_rpm] -doc_files = README doc/*.html ChangeLog vendor = TDB -packager = TDB +doc_files = README doc/*.html ChangeLog distribution-name = Red Hat Linux +packager = TDB requires = python [egg_info] -- 2.30.2