+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3180
+ * self.genotype,
+ * self.consensus_quality,
+ * self.snp_quality, # <<<<<<<<<<<<<<
+ * self.mapping_quality,
+ * self.coverage,
+ */
+ __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 = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3181
+ * self.consensus_quality,
+ * self.snp_quality,
+ * self.mapping_quality, # <<<<<<<<<<<<<<
+ * self.coverage,
+ * self.first_allele,
+ */
+ __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 = 3181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3182
+ * self.snp_quality,
+ * self.mapping_quality,
+ * self.coverage, # <<<<<<<<<<<<<<
+ * self.first_allele,
+ * self.second_allele,
+ */
+ __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__coverage); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3183
+ * self.mapping_quality,
+ * self.coverage,
+ * self.first_allele, # <<<<<<<<<<<<<<
+ * self.second_allele,
+ * self.reads_first,
+ */
+ __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 = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3184
+ * self.coverage,
+ * self.first_allele,
+ * self.second_allele, # <<<<<<<<<<<<<<
+ * self.reads_first,
+ * self.reads_second,
+ */
+ __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 = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3185
+ * self.first_allele,
+ * self.second_allele,
+ * self.reads_first, # <<<<<<<<<<<<<<
+ * self.reads_second,
+ * self.reads_diff ) ) )
+ */
+ __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 = 3185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3186
+ * self.second_allele,
+ * self.reads_first,
+ * self.reads_second, # <<<<<<<<<<<<<<
+ * self.reads_diff ) ) )
+ *
+ */
+ __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 = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3187
+ * self.reads_first,
+ * self.reads_second,
+ * self.reads_diff ) ) ) # <<<<<<<<<<<<<<
+ *
+ * def __dealloc__(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 = 3187; __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 = 3176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_14, 7, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_14, 8, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_14, 9, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_14, 10, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_14, 11, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_11 = 0;
+ __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 = 3175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __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 = 3175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_r = __pyx_t_14;
+ __pyx_t_14 = 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_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_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_AddTraceback("csamtools.IndelCall.__str__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3189
+ * self.reads_diff ) ) )
+ *
+ * def __dealloc__(self ): # <<<<<<<<<<<<<<
+ * bam_maqindel_ret_destroy(self._r)
+ *
+ */
+
+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], 3189);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3190
+ *
+ * def __dealloc__(self ):
+ * bam_maqindel_ret_destroy(self._r) # <<<<<<<<<<<<<<
+ *
+ * cdef class IndelCallerBase:
+ */
+ bam_maqindel_ret_destroy(((struct __pyx_obj_9csamtools_IndelCall *)__pyx_v_self)->_r);
+
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3212
+ * cdef int max_depth
+ *
+ * def __cinit__(self, # <<<<<<<<<<<<<<
+ * IteratorColumn iterator_column,
+ * **kwargs ):
+ */
+
+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;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ float __pyx_t_4;
+ int __pyx_t_5;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__iterator_column,0};
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__cinit__");
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 3212);
+ __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[1] = {0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ 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__iterator_column);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_iterator_column = ((struct __pyx_obj_9csamtools_IteratorColumn *)values[0]);
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ __pyx_v_iterator_column = ((struct __pyx_obj_9csamtools_IteratorColumn *)PyTuple_GET_ITEM(__pyx_args, 0));
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_kwargs);
+ __Pyx_AddTraceback("csamtools.IndelCallerBase.__cinit__");
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __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 = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3217
+ *
+ *
+ * self.iter = iterator_column # <<<<<<<<<<<<<<
+ *
+ * assert iterator_column.hasReference(), "IndelCallerBase requires an pileup iterator with reference sequence"
+ */
+ __Pyx_INCREF(((PyObject *)__pyx_v_iterator_column));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_iterator_column));
+ __Pyx_GOTREF(((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter);
+ __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;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3219
+ * self.iter = iterator_column
+ *
+ * assert iterator_column.hasReference(), "IndelCallerBase requires an pileup iterator with reference sequence" # <<<<<<<<<<<<<<
+ *
+ * self.options = bam_maqindel_opt_init()
+ */
+ #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 = 3219; __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 = 3219; __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 = 3219; __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_111));
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ #endif
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3221
+ * assert iterator_column.hasReference(), "IndelCallerBase requires an pileup iterator with reference sequence"
+ *
+ * self.options = bam_maqindel_opt_init() # <<<<<<<<<<<<<<
+ *
+ * # set the default parameterization according to
+ */
+ ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->options = bam_maqindel_opt_init();
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3226
+ * # samtools
+ *
+ * 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 )
+ */
+ if (unlikely(__pyx_v_kwargs == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_2 = PyFloat_FromDouble(0.00015); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__r_indel), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __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_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->options->r_indel = __pyx_t_4;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3227
+ *
+ * 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 )
+ * self.max_depth = kwargs.get( "max_depth", 1024 )
+ */
+ if (unlikely(__pyx_v_kwargs == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__q_indel), __pyx_int_40); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->options->q_indel = __pyx_t_5;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3228
+ * 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 ) # <<<<<<<<<<<<<<
+ * self.max_depth = kwargs.get( "max_depth", 1024 )
+ *
+ */
+ if (unlikely(__pyx_v_kwargs == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__cap_mapQ), __pyx_int_60); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->cap_mapQ = __pyx_t_5;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3229
+ * 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 ) # <<<<<<<<<<<<<<
+ *
+ * def __dealloc__(self):
+ */
+ if (unlikely(__pyx_v_kwargs == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'get'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_kwargs), ((PyObject *)__pyx_n_s__max_depth), __pyx_int_1024); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->max_depth = __pyx_t_5;
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("csamtools.IndelCallerBase.__cinit__");
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_DECREF(__pyx_v_kwargs);
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3231
+ * self.max_depth = kwargs.get( "max_depth", 1024 )
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * free( self.options )
+ *
+ */
+
+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], 3231);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3232
+ *
+ * def __dealloc__(self):
+ * free( self.options ) # <<<<<<<<<<<<<<
+ *
+ * def _call( self ):
+ */
+ free(((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->options);
+
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3234
+ * free( self.options )
+ *
+ * def _call( self ): # <<<<<<<<<<<<<<
+ *
+ * cdef char * seq = self.iter.getSequence()
+ */
+
+static PyObject *__pyx_pf_9csamtools_15IndelCallerBase__call(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9csamtools_15IndelCallerBase__call[] = "IndelCallerBase._call(self)";
+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;
+ int __pyx_v_m;
+ struct __pyx_obj_9csamtools_IndelCall *__pyx_v_call;
+ uint64_t __pyx_v_rms_aux;
+ int __pyx_v_i;
+ bam_pileup1_t *__pyx_v_p;
+ int __pyx_v_tmp;
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ int __pyx_t_7;
+ double __pyx_t_8;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("_call");
+ __Pyx_TraceCall("_call", __pyx_f[0], 3234);
+ __pyx_v_call = ((struct __pyx_obj_9csamtools_IndelCall *)Py_None); __Pyx_INCREF(Py_None);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3236
+ * def _call( self ):
+ *
+ * cdef char * seq = self.iter.getSequence() # <<<<<<<<<<<<<<
+ * cdef int seq_len = self.iter.seq_len
+ *
+ */
+ __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);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3237
+ *
+ * cdef char * seq = self.iter.getSequence()
+ * cdef int seq_len = self.iter.seq_len # <<<<<<<<<<<<<<
+ *
+ * assert seq != NULL
+ */
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter), __pyx_n_s__seq_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_seq_len = __pyx_t_2;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3239
+ * cdef int seq_len = self.iter.seq_len
+ *
+ * assert seq != NULL # <<<<<<<<<<<<<<
+ *
+ * # reference base
+ */
+ #ifndef PYREX_WITHOUT_ASSERTIONS
+ if (unlikely(!(__pyx_v_seq != NULL))) {
+ PyErr_SetNone(PyExc_AssertionError);
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ #endif
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3242
+ *
+ * # 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) )
+ *
+ */
+ __pyx_t_3 = (((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->pos >= __pyx_v_seq_len);
+ if (__pyx_t_3) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3243
+ * # 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 bam_maqindel_ret_t * r
+ */
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_seq_len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __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 = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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_108), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+ __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 = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
+ __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
+ __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3243; __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 = 3243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L5;
+ }
+ __pyx_L5:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3247
+ * cdef bam_maqindel_ret_t * r
+ *
+ * cdef int m = min( self.max_depth, self.iter.n_plp ) # <<<<<<<<<<<<<<
+ *
+ * # printf("pysam: m=%i, q_indel=%i, r_indel=%f, r_snp=%i, mm_penalty=%i, indel_err=%i, ambi_thres=%i\n",
+ */
+ __pyx_t_2 = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->n_plp;
+ __pyx_t_6 = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->max_depth;
+ if ((__pyx_t_2 < __pyx_t_6)) {
+ __pyx_t_7 = __pyx_t_2;
+ } else {
+ __pyx_t_7 = __pyx_t_6;
+ }
+ __pyx_v_m = __pyx_t_7;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3259
+ * seq,
+ * 0,
+ * NULL) # <<<<<<<<<<<<<<
+ *
+ * if r == NULL: return None
+ */
+ __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);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3261
+ * NULL)
+ *
+ * if r == NULL: return None # <<<<<<<<<<<<<<
+ *
+ * cdef IndelCall call
+ */
+ __pyx_t_3 = (__pyx_v_r == NULL);
+ if (__pyx_t_3) {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3264
+ *
+ * cdef IndelCall call
+ * call = IndelCall() # <<<<<<<<<<<<<<
+ * call._r = r
+ * call._tid = self.iter.tid
+ */
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IndelCall)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(((PyObject *)__pyx_v_call));
+ __pyx_v_call = ((struct __pyx_obj_9csamtools_IndelCall *)__pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3265
+ * cdef IndelCall call
+ * call = IndelCall()
+ * call._r = r # <<<<<<<<<<<<<<
+ * call._tid = self.iter.tid
+ * call._pos = self.iter.pos
+ */
+ __pyx_v_call->_r = __pyx_v_r;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3266
+ * call = IndelCall()
+ * call._r = r
+ * call._tid = self.iter.tid # <<<<<<<<<<<<<<
+ * call._pos = self.iter.pos
+ * call._coverage = self.iter.n_plp
+ */
+ __pyx_v_call->_tid = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->tid;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3267
+ * call._r = r
+ * call._tid = self.iter.tid
+ * call._pos = self.iter.pos # <<<<<<<<<<<<<<
+ * call._coverage = self.iter.n_plp
+ *
+ */
+ __pyx_v_call->_pos = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->pos;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3268
+ * call._tid = self.iter.tid
+ * call._pos = self.iter.pos
+ * call._coverage = self.iter.n_plp # <<<<<<<<<<<<<<
+ *
+ * cdef uint64_t rms_aux = 0
+ */
+ __pyx_v_call->_coverage = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->n_plp;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3270
+ * call._coverage = self.iter.n_plp
+ *
+ * cdef uint64_t rms_aux = 0 # <<<<<<<<<<<<<<
+ * cdef int i = 0
+ * cdef bam_pileup1_t * p
+ */
+ __pyx_v_rms_aux = 0;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3271
+ *
+ * cdef uint64_t rms_aux = 0
+ * cdef int i = 0 # <<<<<<<<<<<<<<
+ * cdef bam_pileup1_t * p
+ * cdef int tmp
+ */
+ __pyx_v_i = 0;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3275
+ * cdef int tmp
+ *
+ * for i from 0 <= i < self.iter.n_plp: # <<<<<<<<<<<<<<
+ * p = self.iter.plp + i
+ * if p.b.core.qual < self.cap_mapQ:
+ */
+ __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++) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3276
+ *
+ * for i from 0 <= i < self.iter.n_plp:
+ * p = self.iter.plp + i # <<<<<<<<<<<<<<
+ * if p.b.core.qual < self.cap_mapQ:
+ * tmp = p.b.core.qual
+ */
+ __pyx_v_p = (((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->plp + __pyx_v_i);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3277
+ * for i from 0 <= i < self.iter.n_plp:
+ * p = self.iter.plp + i
+ * if p.b.core.qual < self.cap_mapQ: # <<<<<<<<<<<<<<
+ * tmp = p.b.core.qual
+ * else:
+ */
+ __pyx_t_3 = (__pyx_v_p->b->core.qual < ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->cap_mapQ);
+ if (__pyx_t_3) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3278
+ * p = self.iter.plp + i
+ * if p.b.core.qual < self.cap_mapQ:
+ * tmp = p.b.core.qual # <<<<<<<<<<<<<<
+ * else:
+ * tmp = self.cap_mapQ
+ */
+ __pyx_v_tmp = __pyx_v_p->b->core.qual;
+ goto __pyx_L9;
+ }
+ /*else*/ {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3280
+ * tmp = p.b.core.qual
+ * else:
+ * tmp = self.cap_mapQ # <<<<<<<<<<<<<<
+ * rms_aux += tmp * tmp
+ *
+ */
+ __pyx_v_tmp = ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->cap_mapQ;
+ }
+ __pyx_L9:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3281
+ * else:
+ * tmp = self.cap_mapQ
+ * rms_aux += tmp * tmp # <<<<<<<<<<<<<<
+ *
+ * call._rms_mapping_quality = <uint64_t>(sqrt(<double>rms_aux / self.iter.n_plp) + .499)
+ */
+ __pyx_v_rms_aux += (__pyx_v_tmp * __pyx_v_tmp);
+ }
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3283
+ * rms_aux += tmp * tmp
+ *
+ * call._rms_mapping_quality = <uint64_t>(sqrt(<double>rms_aux / self.iter.n_plp) + .499) # <<<<<<<<<<<<<<
+ *
+ * return call
+ */
+ __pyx_t_8 = ((double)__pyx_v_rms_aux);
+ if (unlikely(((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->n_plp == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_call->_rms_mapping_quality = ((uint64_t)(sqrt((__pyx_t_8 / ((struct __pyx_obj_9csamtools_IndelCallerBase *)__pyx_v_self)->iter->n_plp)) + .499));
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3285
+ * call._rms_mapping_quality = <uint64_t>(sqrt(<double>rms_aux / self.iter.n_plp) + .499)
+ *
+ * return call # <<<<<<<<<<<<<<
+ *
+ * cdef class IndelCaller( IndelCallerBase ):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject *)__pyx_v_call));
+ __pyx_r = ((PyObject *)__pyx_v_call);
+ 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_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("csamtools.IndelCallerBase._call");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_DECREF((PyObject *)__pyx_v_call);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3300
+ * '''
+ *
+ * def __cinit__(self, # <<<<<<<<<<<<<<
+ * IteratorColumn iterator_column,
+ * **kwargs ):
+ */
+
+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;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__iterator_column,0};
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__cinit__");
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 3300);
+ __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[1] = {0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ 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__iterator_column);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_iterator_column = ((struct __pyx_obj_9csamtools_IteratorColumn *)values[0]);
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ __pyx_v_iterator_column = ((struct __pyx_obj_9csamtools_IteratorColumn *)PyTuple_GET_ITEM(__pyx_args, 0));
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_kwargs);
+ __Pyx_AddTraceback("csamtools.IndelCaller.__cinit__");
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __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 = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("csamtools.IndelCaller.__cinit__");
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_DECREF(__pyx_v_kwargs);
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3306
+ * pass
+ *
+ * def call(self, reference, int pos ): # <<<<<<<<<<<<<<
+ * """call a snp on chromosome *reference*
+ * and position *pos*.
+ */
+
+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[] = "IndelCaller.call(self, reference, int pos)\ncall 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;
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__reference,&__pyx_n_s__pos,0};
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("call");
+ __Pyx_TraceCall("call", __pyx_f[0], 3306);
+ 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__reference);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos);
+ if (likely(values[1])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("call", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __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 = 3306; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_reference = values[0];
+ __pyx_v_pos = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ __pyx_v_reference = PyTuple_GET_ITEM(__pyx_args, 0);
+ __pyx_v_pos = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __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 = 3306; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("csamtools.IndelCaller.call");
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3313
+ * """
+ *
+ * cdef int tid = self.iter.samfile.gettid( reference ) # <<<<<<<<<<<<<<
+ *
+ * self.iter.reset( tid, pos, pos + 1 )
+ */
+ __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 = 3313; __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 = 3313; __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_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __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_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_tid = __pyx_t_4;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3315
+ * cdef int tid = self.iter.samfile.gettid( reference )
+ *
+ * self.iter.reset( tid, pos, pos + 1 ) # <<<<<<<<<<<<<<
+ *
+ * while 1:
+ */
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_tid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyInt_FromLong((__pyx_v_pos + 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = ((struct __pyx_vtabstruct_9csamtools_IteratorColumn *)((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter->__pyx_vtab)->reset(((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter, __pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3315; __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_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3317
+ * self.iter.reset( tid, pos, pos + 1 )
+ *
+ * while 1: # <<<<<<<<<<<<<<
+ * self.iter.cnext()
+ *
+ */
+ while (1) {
+ if (!1) break;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3318
+ *
+ * while 1:
+ * self.iter.cnext() # <<<<<<<<<<<<<<
+ *
+ * if self.iter.n_plp < 0:
+ */
+ ((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);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3320
+ * self.iter.cnext()
+ *
+ * if self.iter.n_plp < 0: # <<<<<<<<<<<<<<
+ * raise ValueError("error during iteration" )
+ *
+ */
+ __pyx_t_6 = (((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter->n_plp < 0);
+ if (__pyx_t_6) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3321
+ *
+ * if self.iter.n_plp < 0:
+ * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<<
+ *
+ * if self.iter.plp == NULL:
+ */
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_59));
+ PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_59));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_59));
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3321; __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 = 3321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L8;
+ }
+ __pyx_L8:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3323
+ * raise ValueError("error during iteration" )
+ *
+ * if self.iter.plp == NULL: # <<<<<<<<<<<<<<
+ * raise ValueError( "no reads in region - no call" )
+ *
+ */
+ __pyx_t_6 = (((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter->plp == NULL);
+ if (__pyx_t_6) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3324
+ *
+ * if self.iter.plp == NULL:
+ * raise ValueError( "no reads in region - no call" ) # <<<<<<<<<<<<<<
+ *
+ * if self.iter.pos == pos: break
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_109));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_109));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_109));
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __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 = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L9;
+ }
+ __pyx_L9:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3326
+ * raise ValueError( "no reads in region - no call" )
+ *
+ * if self.iter.pos == pos: break # <<<<<<<<<<<<<<
+ *
+ * return self._call()
+ */
+ __pyx_t_6 = (((struct __pyx_obj_9csamtools_IndelCaller *)__pyx_v_self)->__pyx_base.iter->pos == __pyx_v_pos);
+ if (__pyx_t_6) {
+ goto __pyx_L7_break;
+ goto __pyx_L10;
+ }
+ __pyx_L10:;
+ }
+ __pyx_L7_break:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3328
+ * if self.iter.pos == pos: break
+ *
+ * return self._call() # <<<<<<<<<<<<<<
+ *
+ * cdef class IteratorIndelCalls( IndelCallerBase ):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___call); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __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_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("csamtools.IndelCaller.call");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3344
+ * """
+ *
+ * def __cinit__(self, # <<<<<<<<<<<<<<
+ * IteratorColumn iterator_column,
+ * **kwargs ):
+ */
+
+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;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__iterator_column,0};
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__cinit__");
+ __Pyx_TraceCall("__cinit__", __pyx_f[0], 3344);
+ __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[1] = {0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ 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__iterator_column);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_iterator_column = ((struct __pyx_obj_9csamtools_IteratorColumn *)values[0]);
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ __pyx_v_iterator_column = ((struct __pyx_obj_9csamtools_IteratorColumn *)PyTuple_GET_ITEM(__pyx_args, 0));
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_kwargs);
+ __Pyx_AddTraceback("csamtools.IteratorIndelCalls.__cinit__");
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __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 = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("csamtools.IteratorIndelCalls.__cinit__");
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_DECREF(__pyx_v_kwargs);
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3350
+ *
+ *
+ * def __iter__(self): # <<<<<<<<<<<<<<
+ * return 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], 3350);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3351
+ *
+ * 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_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3353
+ * return self
+ *
+ * def __next__(self): # <<<<<<<<<<<<<<
+ * """python version of next().
+ * """
+ */
+
+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;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__next__");
+ __Pyx_TraceCall("__next__", __pyx_f[0], 3353);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3358
+ *
+ * # the following code was adapted from bam_plcmd.c:pileup_func()
+ * self.iter.cnext() # <<<<<<<<<<<<<<
+ *
+ * if self.iter.n_plp < 0:
+ */
+ ((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);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3360
+ * self.iter.cnext()
+ *
+ * if self.iter.n_plp < 0: # <<<<<<<<<<<<<<
+ * raise ValueError("error during iteration" )
+ *
+ */
+ __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorIndelCalls *)__pyx_v_self)->__pyx_base.iter->n_plp < 0);
+ if (__pyx_t_1) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3361
+ *
+ * if self.iter.n_plp < 0:
+ * raise ValueError("error during iteration" ) # <<<<<<<<<<<<<<
+ *
+ * if self.iter.plp == NULL:
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_59));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_59));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_59));
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3361; __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 = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L5;
+ }
+ __pyx_L5:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3363
+ * raise ValueError("error during iteration" )
+ *
+ * if self.iter.plp == NULL: # <<<<<<<<<<<<<<
+ * raise StopIteration
+ *
+ */
+ __pyx_t_1 = (((struct __pyx_obj_9csamtools_IteratorIndelCalls *)__pyx_v_self)->__pyx_base.iter->plp == NULL);
+ if (__pyx_t_1) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3364
+ *
+ * if self.iter.plp == NULL:
+ * raise StopIteration # <<<<<<<<<<<<<<
+ *
+ * return self._call()
+ */
+ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0);
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3366
+ * raise StopIteration
+ *
+ * return self._call() # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___call); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __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);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("csamtools.IteratorIndelCalls.__next__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3386
+ * cdef int owns_samfile
+ *
+ * def __init__(self, Samfile samfile, int reopen = True ): # <<<<<<<<<<<<<<
+ * self.samfile = samfile
+ *
+ */
+
+static int __pyx_pf_9csamtools_12IndexedReads___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pf_9csamtools_12IndexedReads___init__(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;
+ PyObject *__pyx_v_store;
+ int __pyx_r;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ char *__pyx_t_3;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samfile,&__pyx_n_s__reopen,0};
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__init__");
+ __Pyx_TraceCall("__init__", __pyx_f[0], 3386);
+ 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__samfile);
+ 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__reopen);
+ 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), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_samfile = ((struct __pyx_obj_9csamtools_Samfile *)values[0]);
+ if (values[1]) {
+ __pyx_v_reopen = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ } else {
+ __pyx_v_reopen = ((int)1);
+ }
+ } else {
+ __pyx_v_reopen = ((int)1);
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: __pyx_v_reopen = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_reopen == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ case 1: __pyx_v_samfile = ((struct __pyx_obj_9csamtools_Samfile *)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("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("csamtools.IndexedReads.__init__");
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_v_mode = Py_None; __Pyx_INCREF(Py_None);
+ __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 = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3387
+ *
+ * def __init__(self, Samfile samfile, int reopen = True ):
+ * self.samfile = samfile # <<<<<<<<<<<<<<
+ *
+ * if samfile.isbam: mode = "rb"
+ */
+ __Pyx_INCREF(((PyObject *)__pyx_v_samfile));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_samfile));
+ __Pyx_GOTREF(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->samfile);
+ __Pyx_DECREF(((PyObject *)((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->samfile));
+ ((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->samfile = __pyx_v_samfile;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3389
+ * self.samfile = samfile
+ *
+ * if samfile.isbam: mode = "rb" # <<<<<<<<<<<<<<
+ * else: mode = "r"
+ *
+ */
+ if (__pyx_v_samfile->isbam) {
+ __Pyx_INCREF(((PyObject *)__pyx_n_s__rb));
+ __Pyx_DECREF(__pyx_v_mode);
+ __pyx_v_mode = ((PyObject *)__pyx_n_s__rb);
+ goto __pyx_L6;
+ }
+ /*else*/ {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3390
+ *
+ * if samfile.isbam: mode = "rb"
+ * else: mode = "r" # <<<<<<<<<<<<<<
+ *
+ * # reopen the file - note that this makes the iterator
+ */
+ __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
+ __Pyx_DECREF(__pyx_v_mode);
+ __pyx_v_mode = ((PyObject *)__pyx_n_s__r);
+ }
+ __pyx_L6:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3394
+ * # reopen the file - note that this makes the iterator
+ * # slow and causes pileup to slow down significantly.
+ * if reopen: # <<<<<<<<<<<<<<
+ * store = StderrStore()
+ * self.fp = samopen( samfile._filename, mode, NULL )
+ */
+ if (__pyx_v_reopen) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3395
+ * # slow and causes pileup to slow down significantly.
+ * if reopen:
+ * store = StderrStore() # <<<<<<<<<<<<<<
+ * self.fp = samopen( samfile._filename, mode, NULL )
+ * store.release()
+ */
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__StderrStore); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3395; __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 = 3395; __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_2;
+ __pyx_t_2 = 0;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3396
+ * if reopen:
+ * store = StderrStore()
+ * self.fp = samopen( samfile._filename, mode, NULL ) # <<<<<<<<<<<<<<
+ * store.release()
+ * assert self.fp != NULL
+ */
+ __pyx_t_3 = PyBytes_AsString(__pyx_v_mode); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->fp = samopen(__pyx_v_samfile->_filename, __pyx_t_3, NULL);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3397
+ * store = StderrStore()
+ * self.fp = samopen( samfile._filename, mode, NULL )
+ * store.release() # <<<<<<<<<<<<<<
+ * assert self.fp != NULL
+ * self.owns_samfile = True
+ */
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_store, __pyx_n_s__release); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __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 = 3397; __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;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3398
+ * self.fp = samopen( samfile._filename, mode, NULL )
+ * store.release()
+ * assert self.fp != NULL # <<<<<<<<<<<<<<
+ * self.owns_samfile = True
+ * else:
+ */
+ #ifndef PYREX_WITHOUT_ASSERTIONS
+ if (unlikely(!(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->fp != NULL))) {
+ PyErr_SetNone(PyExc_AssertionError);
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ #endif
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3399
+ * store.release()
+ * assert self.fp != NULL
+ * self.owns_samfile = True # <<<<<<<<<<<<<<
+ * else:
+ * self.fp = samfile.samfile
+ */
+ ((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->owns_samfile = 1;
+ goto __pyx_L7;
+ }
+ /*else*/ {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3401
+ * self.owns_samfile = True
+ * else:
+ * self.fp = samfile.samfile # <<<<<<<<<<<<<<
+ * self.owns_samfile = False
+ *
+ */
+ ((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->fp = __pyx_v_samfile->samfile;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3402
+ * else:
+ * self.fp = samfile.samfile
+ * self.owns_samfile = False # <<<<<<<<<<<<<<
+ *
+ * assert samfile.isbam, "can only IndexReads on bam files"
+ */
+ ((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->owns_samfile = 0;
+ }
+ __pyx_L7:;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3404
+ * self.owns_samfile = False
+ *
+ * assert samfile.isbam, "can only IndexReads on bam files" # <<<<<<<<<<<<<<
+ *
+ * def build( self ):
+ */
+ #ifndef PYREX_WITHOUT_ASSERTIONS
+ if (unlikely(!__pyx_v_samfile->isbam)) {
+ PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_112));
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ #endif
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("csamtools.IndexedReads.__init__");
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_DECREF(__pyx_v_mode);
+ __Pyx_DECREF(__pyx_v_store);
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3406
+ * assert samfile.isbam, "can only IndexReads on bam files"
+ *
+ * def build( self ): # <<<<<<<<<<<<<<
+ * '''build index.'''
+ *
+ */
+
+static PyObject *__pyx_pf_9csamtools_12IndexedReads_build(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9csamtools_12IndexedReads_build[] = "IndexedReads.build(self)\nbuild index.";
+static PyObject *__pyx_pf_9csamtools_12IndexedReads_build(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ int __pyx_v_ret;
+ bam1_t *__pyx_v_b;
+ uint64_t __pyx_v_pos;
+ char *__pyx_v_qname;
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("build");
+ __Pyx_TraceCall("build", __pyx_f[0], 3406);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3409
+ * '''build index.'''
+ *
+ * self.index = collections.defaultdict( list ) # <<<<<<<<<<<<<<
+ *
+ * # this method will start indexing from the current file position
+ */
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(((PyObject *)((PyObject*)&PyList_Type)));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)&PyList_Type)));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyList_Type)));
+ __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __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_GIVEREF(__pyx_t_3);
+ __Pyx_GOTREF(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->index);
+ __Pyx_DECREF(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->index);
+ ((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->index = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3413
+ * # this method will start indexing from the current file position
+ * # if you decide
+ * cdef int ret = 1 # <<<<<<<<<<<<<<
+ * cdef bam1_t * b = <bam1_t*> calloc(1, sizeof( bam1_t) )
+ *
+ */
+ __pyx_v_ret = 1;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3414
+ * # if you decide
+ * cdef int ret = 1
+ * cdef bam1_t * b = <bam1_t*> calloc(1, sizeof( bam1_t) ) # <<<<<<<<<<<<<<
+ *
+ * cdef uint64_t pos
+ */
+ __pyx_v_b = ((bam1_t *)calloc(1, (sizeof(bam1_t))));
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3418
+ * cdef uint64_t pos
+ *
+ * while ret > 0: # <<<<<<<<<<<<<<
+ * pos = bam_tell( self.fp.x.bam )
+ * ret = samread( self.fp, b)
+ */
+ while (1) {
+ __pyx_t_4 = (__pyx_v_ret > 0);
+ if (!__pyx_t_4) break;
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3419
+ *
+ * while ret > 0:
+ * pos = bam_tell( self.fp.x.bam ) # <<<<<<<<<<<<<<
+ * ret = samread( self.fp, b)
+ * if ret > 0:
+ */
+ __pyx_v_pos = bam_tell(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->fp->x.bam);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3420
+ * while ret > 0:
+ * pos = bam_tell( self.fp.x.bam )
+ * ret = samread( self.fp, b) # <<<<<<<<<<<<<<
+ * if ret > 0:
+ * qname = bam1_qname( b )
+ */
+ __pyx_v_ret = samread(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->fp, __pyx_v_b);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3421
+ * pos = bam_tell( self.fp.x.bam )
+ * ret = samread( self.fp, b)
+ * if ret > 0: # <<<<<<<<<<<<<<
+ * qname = bam1_qname( b )
+ * self.index[qname].append( pos )
+ */
+ __pyx_t_4 = (__pyx_v_ret > 0);
+ if (__pyx_t_4) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3422
+ * ret = samread( self.fp, b)
+ * if ret > 0:
+ * qname = bam1_qname( b ) # <<<<<<<<<<<<<<
+ * self.index[qname].append( pos )
+ *
+ */
+ __pyx_v_qname = bam1_qname(__pyx_v_b);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3423
+ * if ret > 0:
+ * qname = bam1_qname( b )
+ * self.index[qname].append( pos ) # <<<<<<<<<<<<<<
+ *
+ * bam_destroy1( b )
+ */
+ __pyx_t_3 = PyBytes_FromString(__pyx_v_qname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ __pyx_t_1 = PyObject_GetItem(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->index, ((PyObject *)__pyx_t_3)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __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 = __Pyx_PyInt_to_py_uint64_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __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_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+ }
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3425
+ * self.index[qname].append( pos )
+ *
+ * bam_destroy1( b ) # <<<<<<<<<<<<<<
+ *
+ * def find( self, qname ):
+ */
+ bam_destroy1(__pyx_v_b);
+
+ __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("csamtools.IndexedReads.build");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3427
+ * bam_destroy1( b )
+ *
+ * def find( self, qname ): # <<<<<<<<<<<<<<
+ * if qname in self.index:
+ * return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )
+ */
+
+static PyObject *__pyx_pf_9csamtools_12IndexedReads_find(PyObject *__pyx_v_self, PyObject *__pyx_v_qname); /*proto*/
+static char __pyx_doc_9csamtools_12IndexedReads_find[] = "IndexedReads.find(self, qname)";
+static PyObject *__pyx_pf_9csamtools_12IndexedReads_find(PyObject *__pyx_v_self, PyObject *__pyx_v_qname) {
+ PyObject *__pyx_r = NULL;
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("find");
+ __Pyx_TraceCall("find", __pyx_f[0], 3427);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3428
+ *
+ * def find( self, qname ):
+ * if qname in self.index: # <<<<<<<<<<<<<<
+ * return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )
+ * else:
+ */
+ __pyx_t_1 = ((PySequence_Contains(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->index, __pyx_v_qname))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_1) {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3429
+ * def find( self, qname ):
+ * if qname in self.index:
+ * return IteratorRowSelection( self.samfile, self.index[qname], reopen = False ) # <<<<<<<<<<<<<<
+ * else:
+ * raise KeyError( "read %s not found" % qname )
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyObject_GetItem(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->index, __pyx_v_qname); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3429; __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 = 3429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(((PyObject *)((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->samfile));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->samfile));
+ __Pyx_GIVEREF(((PyObject *)((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->samfile));
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+ __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__reopen), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_9csamtools_IteratorRowSelection)), __pyx_t_3, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3429; __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_2)); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+ goto __pyx_L5;
+ }
+ /*else*/ {
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3431
+ * return IteratorRowSelection( self.samfile, self.index[qname], reopen = False )
+ * else:
+ * raise KeyError( "read %s not found" % qname ) # <<<<<<<<<<<<<<
+ *
+ * def __dealloc__(self):
+ */
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_113), __pyx_v_qname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
+ __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
+ __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3431; __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 = 3431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_L5:;
+
+ __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("csamtools.IndexedReads.find");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_TraceReturn(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3433
+ * raise KeyError( "read %s not found" % qname )
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * if self.owns_samfile: samclose( self.fp )
+ *
+ */
+
+static void __pyx_pf_9csamtools_12IndexedReads___dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pf_9csamtools_12IndexedReads___dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_TraceDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__");
+ __Pyx_TraceCall("__dealloc__", __pyx_f[0], 3433);
+
+ /* "/ifs/devel/pysam/pysam/pysam/csamtools.pyx":3434
+ *
+ * def __dealloc__(self):
+ * if self.owns_samfile: samclose( self.fp ) # <<<<<<<<<<<<<<
+ *
+ * __all__ = ["Samfile",
+ */
+ if (((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->owns_samfile) {
+ samclose(((struct __pyx_obj_9csamtools_IndexedReads *)__pyx_v_self)->fp);
+ goto __pyx_L5;
+ }
+ __pyx_L5:;
+
+ __Pyx_TraceReturn(Py_None);
+ __Pyx_RefNannyFinishContext();
+}
+
+static PyObject *__pyx_tp_new_9csamtools_AlignedRead(PyTypeObject *t, PyObject *a, PyObject *k) {
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ return o;
+}
+
+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___dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qname(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_cigar(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_seq(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qual(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_query(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qstart(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_qlen(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static int __pyx_setprop_9csamtools_11AlignedRead_tags(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_9csamtools_11AlignedRead_4tags___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_flag(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_rname(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_tid(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_pos(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_bin(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_rlen(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_alen(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static int __pyx_setprop_9csamtools_11AlignedRead_mapq(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_9csamtools_11AlignedRead_4mapq___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_mrnm(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_mpos(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_isize(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_paired(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_proper_pair(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_unmapped(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_mate_is_unmapped(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_reverse(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_mate_is_reverse(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_read1(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_read2(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_secondary(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_qcfail(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_is_duplicate(PyObject *o, void *x) {
+ 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___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11AlignedRead_positions(PyObject *o, void *x) {
+ return __pyx_pf_9csamtools_11AlignedRead_9positions___get__(o);
+}
+
+static PyMethodDef __pyx_methods_9csamtools_AlignedRead[] = {
+ {__Pyx_NAMESTR("compare"), (PyCFunction)__pyx_pf_9csamtools_11AlignedRead_compare, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_11AlignedRead_compare)},
+ {__Pyx_NAMESTR("overlap"), (PyCFunction)__pyx_pf_9csamtools_11AlignedRead_overlap, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_11AlignedRead_overlap)},
+ {__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_114), 0},
+ {(char *)"cigar", __pyx_getprop_9csamtools_11AlignedRead_cigar, __pyx_setprop_9csamtools_11AlignedRead_cigar, __Pyx_DOCSTR(__pyx_k_115), 0},
+ {(char *)"seq", __pyx_getprop_9csamtools_11AlignedRead_seq, __pyx_setprop_9csamtools_11AlignedRead_seq, __Pyx_DOCSTR(__pyx_k_116), 0},
+ {(char *)"qual", __pyx_getprop_9csamtools_11AlignedRead_qual, __pyx_setprop_9csamtools_11AlignedRead_qual, __Pyx_DOCSTR(__pyx_k_117), 0},
+ {(char *)"query", __pyx_getprop_9csamtools_11AlignedRead_query, 0, __Pyx_DOCSTR(__pyx_k_118), 0},
+ {(char *)"qqual", __pyx_getprop_9csamtools_11AlignedRead_qqual, 0, __Pyx_DOCSTR(__pyx_k_119), 0},
+ {(char *)"qstart", __pyx_getprop_9csamtools_11AlignedRead_qstart, 0, __Pyx_DOCSTR(__pyx_k_120), 0},
+ {(char *)"qend", __pyx_getprop_9csamtools_11AlignedRead_qend, 0, __Pyx_DOCSTR(__pyx_k_121), 0},
+ {(char *)"qlen", __pyx_getprop_9csamtools_11AlignedRead_qlen, 0, __Pyx_DOCSTR(__pyx_k_122), 0},
+ {(char *)"tags", __pyx_getprop_9csamtools_11AlignedRead_tags, __pyx_setprop_9csamtools_11AlignedRead_tags, __Pyx_DOCSTR(__pyx_k_123), 0},
+ {(char *)"flag", __pyx_getprop_9csamtools_11AlignedRead_flag, __pyx_setprop_9csamtools_11AlignedRead_flag, __Pyx_DOCSTR(__pyx_k_124), 0},
+ {(char *)"rname", __pyx_getprop_9csamtools_11AlignedRead_rname, __pyx_setprop_9csamtools_11AlignedRead_rname, __Pyx_DOCSTR(__pyx_k_125), 0},
+ {(char *)"tid", __pyx_getprop_9csamtools_11AlignedRead_tid, __pyx_setprop_9csamtools_11AlignedRead_tid, __Pyx_DOCSTR(__pyx_k_126), 0},
+ {(char *)"pos", __pyx_getprop_9csamtools_11AlignedRead_pos, __pyx_setprop_9csamtools_11AlignedRead_pos, __Pyx_DOCSTR(__pyx_k_127), 0},
+ {(char *)"bin", __pyx_getprop_9csamtools_11AlignedRead_bin, __pyx_setprop_9csamtools_11AlignedRead_bin, __Pyx_DOCSTR(__pyx_k_128), 0},
+ {(char *)"rlen", __pyx_getprop_9csamtools_11AlignedRead_rlen, 0, __Pyx_DOCSTR(__pyx_k_129), 0},
+ {(char *)"aend", __pyx_getprop_9csamtools_11AlignedRead_aend, 0, __Pyx_DOCSTR(__pyx_k_130), 0},
+ {(char *)"alen", __pyx_getprop_9csamtools_11AlignedRead_alen, 0, __Pyx_DOCSTR(__pyx_k_131), 0},
+ {(char *)"mapq", __pyx_getprop_9csamtools_11AlignedRead_mapq, __pyx_setprop_9csamtools_11AlignedRead_mapq, __Pyx_DOCSTR(__pyx_k_132), 0},
+ {(char *)"mrnm", __pyx_getprop_9csamtools_11AlignedRead_mrnm, __pyx_setprop_9csamtools_11AlignedRead_mrnm, __Pyx_DOCSTR(__pyx_k_133), 0},
+ {(char *)"mpos", __pyx_getprop_9csamtools_11AlignedRead_mpos, __pyx_setprop_9csamtools_11AlignedRead_mpos, __Pyx_DOCSTR(__pyx_k_134), 0},
+ {(char *)"isize", __pyx_getprop_9csamtools_11AlignedRead_isize, __pyx_setprop_9csamtools_11AlignedRead_isize, __Pyx_DOCSTR(__pyx_k_135), 0},
+ {(char *)"is_paired", __pyx_getprop_9csamtools_11AlignedRead_is_paired, __pyx_setprop_9csamtools_11AlignedRead_is_paired, __Pyx_DOCSTR(__pyx_k_136), 0},
+ {(char *)"is_proper_pair", __pyx_getprop_9csamtools_11AlignedRead_is_proper_pair, __pyx_setprop_9csamtools_11AlignedRead_is_proper_pair, __Pyx_DOCSTR(__pyx_k_137), 0},
+ {(char *)"is_unmapped", __pyx_getprop_9csamtools_11AlignedRead_is_unmapped, __pyx_setprop_9csamtools_11AlignedRead_is_unmapped, __Pyx_DOCSTR(__pyx_k_138), 0},
+ {(char *)"mate_is_unmapped", __pyx_getprop_9csamtools_11AlignedRead_mate_is_unmapped, __pyx_setprop_9csamtools_11AlignedRead_mate_is_unmapped, __Pyx_DOCSTR(__pyx_k_139), 0},
+ {(char *)"is_reverse", __pyx_getprop_9csamtools_11AlignedRead_is_reverse, __pyx_setprop_9csamtools_11AlignedRead_is_reverse, __Pyx_DOCSTR(__pyx_k_140), 0},
+ {(char *)"mate_is_reverse", __pyx_getprop_9csamtools_11AlignedRead_mate_is_reverse, __pyx_setprop_9csamtools_11AlignedRead_mate_is_reverse, __Pyx_DOCSTR(__pyx_k_141), 0},
+ {(char *)"is_read1", __pyx_getprop_9csamtools_11AlignedRead_is_read1, __pyx_setprop_9csamtools_11AlignedRead_is_read1, __Pyx_DOCSTR(__pyx_k_142), 0},
+ {(char *)"is_read2", __pyx_getprop_9csamtools_11AlignedRead_is_read2, __pyx_setprop_9csamtools_11AlignedRead_is_read2, __Pyx_DOCSTR(__pyx_k_143), 0},
+ {(char *)"is_secondary", __pyx_getprop_9csamtools_11AlignedRead_is_secondary, __pyx_setprop_9csamtools_11AlignedRead_is_secondary, __Pyx_DOCSTR(__pyx_k_144), 0},
+ {(char *)"is_qcfail", __pyx_getprop_9csamtools_11AlignedRead_is_qcfail, __pyx_setprop_9csamtools_11AlignedRead_is_qcfail, __Pyx_DOCSTR(__pyx_k_145), 0},
+ {(char *)"is_duplicate", __pyx_getprop_9csamtools_11AlignedRead_is_duplicate, __pyx_setprop_9csamtools_11AlignedRead_is_duplicate, __Pyx_DOCSTR(__pyx_k_146), 0},
+ {(char *)"positions", __pyx_getprop_9csamtools_11AlignedRead_positions, 0, __Pyx_DOCSTR(__pyx_k_147), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_AlignedRead = {
+ 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_AlignedRead = {
+ 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_AlignedRead = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_AlignedRead = {
+ #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_9csamtools_AlignedRead = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.AlignedRead"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_AlignedRead), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_AlignedRead, /*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_AlignedRead, /*tp_as_number*/
+ &__pyx_tp_as_sequence_AlignedRead, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_AlignedRead, /*tp_as_mapping*/
+ __pyx_pf_9csamtools_11AlignedRead___hash__, /*tp_hash*/
+ 0, /*tp_call*/
+ __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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+ __Pyx_DOCSTR("AlignedRead()\n\n Class representing an aligned read. see SAM format specification for \n the 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*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_9csamtools_AlignedRead, /*tp_methods*/
+ 0, /*tp_members*/
+ __pyx_getsets_9csamtools_AlignedRead, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pf_9csamtools_11AlignedRead___init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_9csamtools_AlignedRead, /*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_9csamtools_Samfile __pyx_vtable_9csamtools_Samfile;
+
+static PyObject *__pyx_tp_new_9csamtools_Samfile(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_9csamtools_Samfile *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_9csamtools_Samfile *)o);
+ p->__pyx_vtab = __pyx_vtabptr_9csamtools_Samfile;
+ if (__pyx_pf_9csamtools_7Samfile___cinit__(o, a, k) < 0) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+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___dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_7Samfile_filename(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_7Samfile_references(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_7Samfile_text(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyMethodDef __pyx_methods_9csamtools_Samfile[] = {
+ {__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("gettid"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_gettid, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_gettid)},
+ {__Pyx_NAMESTR("getrname"), (PyCFunction)__pyx_pf_9csamtools_7Samfile_getrname, METH_O, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile_getrname)},
+ {__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(__pyx_doc_9csamtools_7Samfile___enter__)},
+ {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pf_9csamtools_7Samfile___exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9csamtools_7Samfile___exit__)},
+ {__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_148), 0},
+ {(char *)"nreferences", __pyx_getprop_9csamtools_7Samfile_nreferences, 0, __Pyx_DOCSTR(__pyx_k_149), 0},
+ {(char *)"references", __pyx_getprop_9csamtools_7Samfile_references, 0, __Pyx_DOCSTR(__pyx_k_150), 0},
+ {(char *)"lengths", __pyx_getprop_9csamtools_7Samfile_lengths, 0, __Pyx_DOCSTR(__pyx_k_151), 0},
+ {(char *)"text", __pyx_getprop_9csamtools_7Samfile_text, 0, __Pyx_DOCSTR(__pyx_k_152), 0},
+ {(char *)"header", __pyx_getprop_9csamtools_7Samfile_header, 0, __Pyx_DOCSTR(__pyx_k_153), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_Samfile = {
+ 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_Samfile = {
+ 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_Samfile = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_Samfile = {
+ #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_9csamtools_Samfile = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.Samfile"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_Samfile), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_Samfile, /*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_Samfile, /*tp_as_number*/
+ &__pyx_tp_as_sequence_Samfile, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_Samfile, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_Samfile, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+ __Pyx_DOCSTR("*(filename, mode=None, 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 (:term:`SAM`). 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 f = pysam.Samfile('ex1.bam','rb')\n\n If mode is not specified, we will try to auto-detect in the order 'r', 'rb', thus both the following\n should work::\n\n f1 = pysam.Samfile('ex1.bam' )\n f2 = pysam.Samfile('ex1.bam' )\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___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*/
+ 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_9csamtools_Samfile, /*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_9csamtools_PileupProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ return o;
+}
+
+static void __pyx_tp_dealloc_9csamtools_PileupProxy(PyObject *o) {
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_11PileupProxy_tid(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static int __pyx_setprop_9csamtools_11PileupProxy_n(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_9csamtools_11PileupProxy_1n___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_9csamtools_11PileupProxy_pos(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyMethodDef __pyx_methods_9csamtools_PileupProxy[] = {
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_9csamtools_PileupProxy[] = {
+ {(char *)"tid", __pyx_getprop_9csamtools_11PileupProxy_tid, 0, __Pyx_DOCSTR(__pyx_k_154), 0},
+ {(char *)"n", __pyx_getprop_9csamtools_11PileupProxy_n, __pyx_setprop_9csamtools_11PileupProxy_n, __Pyx_DOCSTR(__pyx_k_155), 0},
+ {(char *)"pos", __pyx_getprop_9csamtools_11PileupProxy_pos, 0, 0, 0},
+ {(char *)"pileups", __pyx_getprop_9csamtools_11PileupProxy_pileups, 0, __Pyx_DOCSTR(__pyx_k_156), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_PileupProxy = {
+ 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_PileupProxy = {
+ 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_PileupProxy = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_PileupProxy = {
+ #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_9csamtools_PileupProxy = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.PileupProxy"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_PileupProxy), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_PileupProxy, /*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_PileupProxy, /*tp_as_number*/
+ &__pyx_tp_as_sequence_PileupProxy, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_PileupProxy, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ __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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+ __Pyx_DOCSTR("PileupProxy()\nA 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*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_9csamtools_PileupProxy, /*tp_methods*/
+ 0, /*tp_members*/
+ __pyx_getsets_9csamtools_PileupProxy, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pf_9csamtools_11PileupProxy___init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_9csamtools_PileupProxy, /*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_9csamtools_PileupRead(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_9csamtools_PileupRead *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_9csamtools_PileupRead *)o);
+ p->_alignment = ((struct __pyx_obj_9csamtools_AlignedRead *)Py_None); Py_INCREF(Py_None);
+ return o;
+}
+
+static void __pyx_tp_dealloc_9csamtools_PileupRead(PyObject *o) {
+ struct __pyx_obj_9csamtools_PileupRead *p = (struct __pyx_obj_9csamtools_PileupRead *)o;
+ Py_XDECREF(((PyObject *)p->_alignment));
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_9csamtools_PileupRead(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_9csamtools_PileupRead *p = (struct __pyx_obj_9csamtools_PileupRead *)o;
+ if (p->_alignment) {
+ e = (*v)(((PyObject*)p->_alignment), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_9csamtools_PileupRead(PyObject *o) {
+ struct __pyx_obj_9csamtools_PileupRead *p = (struct __pyx_obj_9csamtools_PileupRead *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->_alignment);
+ p->_alignment = ((struct __pyx_obj_9csamtools_AlignedRead *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyObject *__pyx_getprop_9csamtools_10PileupRead_alignment(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_10PileupRead_indel(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_10PileupRead_is_head(PyObject *o, void *x) {
+ 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___get__(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_10PileupRead_level(PyObject *o, void *x) {
+ return __pyx_pf_9csamtools_10PileupRead_5level___get__(o);
+}
+
+static PyMethodDef __pyx_methods_9csamtools_PileupRead[] = {
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_9csamtools_PileupRead[] = {
+ {(char *)"alignment", __pyx_getprop_9csamtools_10PileupRead_alignment, 0, __Pyx_DOCSTR(__pyx_k_157), 0},
+ {(char *)"qpos", __pyx_getprop_9csamtools_10PileupRead_qpos, 0, __Pyx_DOCSTR(__pyx_k_158), 0},
+ {(char *)"indel", __pyx_getprop_9csamtools_10PileupRead_indel, 0, __Pyx_DOCSTR(__pyx_k_159), 0},
+ {(char *)"is_del", __pyx_getprop_9csamtools_10PileupRead_is_del, 0, __Pyx_DOCSTR(__pyx_k_160), 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},
+ {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_PileupRead = {
+ 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_PileupRead = {
+ 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_PileupRead = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_PileupRead = {
+ #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_9csamtools_PileupRead = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.PileupRead"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_PileupRead), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_PileupRead, /*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_PileupRead, /*tp_as_number*/
+ &__pyx_tp_as_sequence_PileupRead, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_PileupRead, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ __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_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("PileupRead()\nA read aligned to a column.\n "), /*tp_doc*/
+ __pyx_tp_traverse_9csamtools_PileupRead, /*tp_traverse*/
+ __pyx_tp_clear_9csamtools_PileupRead, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_9csamtools_PileupRead, /*tp_methods*/
+ 0, /*tp_members*/
+ __pyx_getsets_9csamtools_PileupRead, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pf_9csamtools_10PileupRead___init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_9csamtools_PileupRead, /*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_9csamtools_Fastafile __pyx_vtable_9csamtools_Fastafile;
+
+static PyObject *__pyx_tp_new_9csamtools_Fastafile(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_9csamtools_Fastafile *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_9csamtools_Fastafile *)o);
+ p->__pyx_vtab = __pyx_vtabptr_9csamtools_Fastafile;
+ if (__pyx_pf_9csamtools_9Fastafile___cinit__(o, a, k) < 0) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+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___dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_9csamtools_9Fastafile_filename(PyObject *o, void *x) {
+ return __pyx_pf_9csamtools_9Fastafile_8filename___get__(o);
+}
+
+static PyMethodDef __pyx_methods_9csamtools_Fastafile[] = {
+ {__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(__pyx_doc_9csamtools_9Fastafile_close)},
+ {__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_148), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_Fastafile = {
+ 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_Fastafile = {
+ __pyx_pf_9csamtools_9Fastafile___len__, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ 0, /*sq_item*/
+ 0, /*sq_slice*/
+ 0, /*sq_ass_item*/
+ 0, /*sq_ass_slice*/
+ 0, /*sq_contains*/
+ 0, /*sq_inplace_concat*/
+ 0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_Fastafile = {
+ __pyx_pf_9csamtools_9Fastafile___len__, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_Fastafile = {
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getreadbuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getwritebuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getsegcount*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getcharbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*bf_getbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*bf_releasebuffer*/
+ #endif
+};
+
+PyTypeObject __pyx_type_9csamtools_Fastafile = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.Fastafile"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_Fastafile), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_Fastafile, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*tp_repr*/
+ &__pyx_tp_as_number_Fastafile, /*tp_as_number*/
+ &__pyx_tp_as_sequence_Fastafile, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_Fastafile, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_Fastafile, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_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*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_9csamtools_Fastafile, /*tp_methods*/
+ 0, /*tp_members*/
+ __pyx_getsets_9csamtools_Fastafile, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_9csamtools_Fastafile, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_9csamtools_IteratorRow(PyTypeObject *t, PyObject *a, PyObject *k) {
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ return o;
+}
+
+static void __pyx_tp_dealloc_9csamtools_IteratorRow(PyObject *o) {
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_9csamtools_IteratorRow[] = {
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_IteratorRow = {
+ 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_IteratorRow = {
+ 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_IteratorRow = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_IteratorRow = {
+ #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_9csamtools_IteratorRow = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.IteratorRow"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_IteratorRow), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_IteratorRow, /*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_IteratorRow, /*tp_as_number*/
+ &__pyx_tp_as_sequence_IteratorRow, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_IteratorRow, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_IteratorRow, /*tp_as_buffer*/
+ 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*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_9csamtools_IteratorRow, /*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_9csamtools_IteratorRow, /*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_9csamtools_IteratorRowRegion __pyx_vtable_9csamtools_IteratorRowRegion;
+
+static PyObject *__pyx_tp_new_9csamtools_IteratorRowRegion(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_9csamtools_IteratorRowRegion *p;
+ PyObject *o = __pyx_tp_new_9csamtools_IteratorRow(t, a, k);
+ if (!o) return 0;
+ 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___cinit__(o, a, k) < 0) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_9csamtools_IteratorRowRegion(PyObject *o) {
+ struct __pyx_obj_9csamtools_IteratorRowRegion *p = (struct __pyx_obj_9csamtools_IteratorRowRegion *)o;
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pf_9csamtools_17IteratorRowRegion___dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_XDECREF(((PyObject *)p->samfile));
+ __pyx_tp_dealloc_9csamtools_IteratorRow(o);
+}
+
+static int __pyx_tp_traverse_9csamtools_IteratorRowRegion(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_9csamtools_IteratorRowRegion *p = (struct __pyx_obj_9csamtools_IteratorRowRegion *)o;
+ if (__pyx_ptype_9csamtools_IteratorRow->tp_traverse) {
+ e = __pyx_ptype_9csamtools_IteratorRow->tp_traverse(o, v, a); if (e) return e;
+ }
+ if (p->samfile) {
+ e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_9csamtools_IteratorRowRegion(PyObject *o) {
+ struct __pyx_obj_9csamtools_IteratorRowRegion *p = (struct __pyx_obj_9csamtools_IteratorRowRegion *)o;
+ PyObject* tmp;
+ if (__pyx_ptype_9csamtools_IteratorRow->tp_clear) {
+ __pyx_ptype_9csamtools_IteratorRow->tp_clear(o);
+ }
+ tmp = ((PyObject*)p->samfile);
+ p->samfile = ((struct __pyx_obj_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_9csamtools_IteratorRowRegion[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_17IteratorRowRegion___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_17IteratorRowRegion___next__)},
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_IteratorRowRegion = {
+ 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_IteratorRowRegion = {
+ 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_IteratorRowRegion = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_IteratorRowRegion = {
+ #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_9csamtools_IteratorRowRegion = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.IteratorRowRegion"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_IteratorRowRegion), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_IteratorRowRegion, /*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_IteratorRowRegion, /*tp_as_number*/
+ &__pyx_tp_as_sequence_IteratorRowRegion, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_IteratorRowRegion, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_IteratorRowRegion, /*tp_as_buffer*/
+ 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 between\n multiple iterators working on the same file. Set *reopen* = False\n to not re-open *samfile*.\n\n The samtools iterators assume that the file\n position between iterations do not change.\n As a consequence, no two iterators can work\n on the same file. To permit this, each iterator\n creates its own file handle by re-opening the\n file.\n\n Note that the index will be shared between \n samfile and the iterator.\n "), /*tp_doc*/
+ __pyx_tp_traverse_9csamtools_IteratorRowRegion, /*tp_traverse*/
+ __pyx_tp_clear_9csamtools_IteratorRowRegion, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ __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*/
+ 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_9csamtools_IteratorRowRegion, /*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_9csamtools_IteratorRowAll __pyx_vtable_9csamtools_IteratorRowAll;
+
+static PyObject *__pyx_tp_new_9csamtools_IteratorRowAll(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_9csamtools_IteratorRowAll *p;
+ PyObject *o = __pyx_tp_new_9csamtools_IteratorRow(t, a, k);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_9csamtools_IteratorRowAll *)o);
+ p->__pyx_vtab = __pyx_vtabptr_9csamtools_IteratorRowAll;
+ if (__pyx_pf_9csamtools_14IteratorRowAll___cinit__(o, a, k) < 0) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+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___dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ __pyx_tp_dealloc_9csamtools_IteratorRow(o);
+}
+
+static PyMethodDef __pyx_methods_9csamtools_IteratorRowAll[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_14IteratorRowAll___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_14IteratorRowAll___next__)},
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_IteratorRowAll = {
+ 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_IteratorRowAll = {
+ 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_IteratorRowAll = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_IteratorRowAll = {
+ #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_9csamtools_IteratorRowAll = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.IteratorRowAll"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_IteratorRowAll), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_IteratorRowAll, /*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_IteratorRowAll, /*tp_as_number*/
+ &__pyx_tp_as_sequence_IteratorRowAll, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_IteratorRowAll, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_IteratorRowAll, /*tp_as_buffer*/
+ 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 between\n multiple iterators working 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___iter__, /*tp_iter*/
+ __pyx_pf_9csamtools_14IteratorRowAll___next__, /*tp_iternext*/
+ __pyx_methods_9csamtools_IteratorRowAll, /*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_9csamtools_IteratorRowAll, /*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_9csamtools_IteratorRowAllRefs(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_9csamtools_IteratorRowAllRefs *p;
+ PyObject *o = __pyx_tp_new_9csamtools_IteratorRow(t, a, k);
+ if (!o) return 0;
+ 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___cinit__(o, a, k) < 0) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_9csamtools_IteratorRowAllRefs(PyObject *o) {
+ struct __pyx_obj_9csamtools_IteratorRowAllRefs *p = (struct __pyx_obj_9csamtools_IteratorRowAllRefs *)o;
+ Py_XDECREF(((PyObject *)p->samfile));
+ Py_XDECREF(((PyObject *)p->rowiter));
+ __pyx_tp_dealloc_9csamtools_IteratorRow(o);
+}
+
+static int __pyx_tp_traverse_9csamtools_IteratorRowAllRefs(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_9csamtools_IteratorRowAllRefs *p = (struct __pyx_obj_9csamtools_IteratorRowAllRefs *)o;
+ if (__pyx_ptype_9csamtools_IteratorRow->tp_traverse) {
+ e = __pyx_ptype_9csamtools_IteratorRow->tp_traverse(o, v, a); if (e) return e;
+ }
+ if (p->samfile) {
+ e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
+ }
+ if (p->rowiter) {
+ e = (*v)(((PyObject*)p->rowiter), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_9csamtools_IteratorRowAllRefs(PyObject *o) {
+ struct __pyx_obj_9csamtools_IteratorRowAllRefs *p = (struct __pyx_obj_9csamtools_IteratorRowAllRefs *)o;
+ PyObject* tmp;
+ if (__pyx_ptype_9csamtools_IteratorRow->tp_clear) {
+ __pyx_ptype_9csamtools_IteratorRow->tp_clear(o);
+ }
+ tmp = ((PyObject*)p->samfile);
+ p->samfile = ((struct __pyx_obj_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->rowiter);
+ p->rowiter = ((struct __pyx_obj_9csamtools_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_9csamtools_IteratorRowAllRefs[] = {
+ {__Pyx_NAMESTR("nextiter"), (PyCFunction)__pyx_pf_9csamtools_18IteratorRowAllRefs_nextiter, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9csamtools_18IteratorRowAllRefs_nextiter)},
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_18IteratorRowAllRefs___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_18IteratorRowAllRefs___next__)},
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_IteratorRowAllRefs = {
+ 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_IteratorRowAllRefs = {
+ 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_IteratorRowAllRefs = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_IteratorRowAllRefs = {
+ #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_9csamtools_IteratorRowAllRefs = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.IteratorRowAllRefs"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_IteratorRowAllRefs), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_IteratorRowAllRefs, /*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_IteratorRowAllRefs, /*tp_as_number*/
+ &__pyx_tp_as_sequence_IteratorRowAllRefs, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_IteratorRowAllRefs, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_IteratorRowAllRefs, /*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 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___iter__, /*tp_iter*/
+ __pyx_pf_9csamtools_18IteratorRowAllRefs___next__, /*tp_iternext*/
+ __pyx_methods_9csamtools_IteratorRowAllRefs, /*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_9csamtools_IteratorRowAllRefs, /*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_9csamtools_IteratorRowSelection __pyx_vtable_9csamtools_IteratorRowSelection;
+
+static PyObject *__pyx_tp_new_9csamtools_IteratorRowSelection(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_9csamtools_IteratorRowSelection *p;
+ PyObject *o = __pyx_tp_new_9csamtools_IteratorRow(t, a, k);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_9csamtools_IteratorRowSelection *)o);
+ p->__pyx_vtab = __pyx_vtabptr_9csamtools_IteratorRowSelection;
+ p->positions = Py_None; Py_INCREF(Py_None);
+ if (__pyx_pf_9csamtools_20IteratorRowSelection___cinit__(o, a, k) < 0) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_9csamtools_IteratorRowSelection(PyObject *o) {
+ struct __pyx_obj_9csamtools_IteratorRowSelection *p = (struct __pyx_obj_9csamtools_IteratorRowSelection *)o;
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pf_9csamtools_20IteratorRowSelection___dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_XDECREF(p->positions);
+ __pyx_tp_dealloc_9csamtools_IteratorRow(o);
+}
+
+static int __pyx_tp_traverse_9csamtools_IteratorRowSelection(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_9csamtools_IteratorRowSelection *p = (struct __pyx_obj_9csamtools_IteratorRowSelection *)o;
+ if (__pyx_ptype_9csamtools_IteratorRow->tp_traverse) {
+ e = __pyx_ptype_9csamtools_IteratorRow->tp_traverse(o, v, a); if (e) return e;
+ }
+ if (p->positions) {
+ e = (*v)(p->positions, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_9csamtools_IteratorRowSelection(PyObject *o) {
+ struct __pyx_obj_9csamtools_IteratorRowSelection *p = (struct __pyx_obj_9csamtools_IteratorRowSelection *)o;
+ PyObject* tmp;
+ if (__pyx_ptype_9csamtools_IteratorRow->tp_clear) {
+ __pyx_ptype_9csamtools_IteratorRow->tp_clear(o);
+ }
+ tmp = ((PyObject*)p->positions);
+ p->positions = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_9csamtools_IteratorRowSelection[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9csamtools_20IteratorRowSelection___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_9csamtools_20IteratorRowSelection___next__)},
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_IteratorRowSelection = {
+ 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_IteratorRowSelection = {
+ 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_IteratorRowSelection = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_IteratorRowSelection = {
+ #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_9csamtools_IteratorRowSelection = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("csamtools.IteratorRowSelection"), /*tp_name*/
+ sizeof(struct __pyx_obj_9csamtools_IteratorRowSelection), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_9csamtools_IteratorRowSelection, /*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_IteratorRowSelection, /*tp_as_number*/
+ &__pyx_tp_as_sequence_IteratorRowSelection, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_IteratorRowSelection, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer_IteratorRowSelection, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("*(Samfile samfile)*\n\n iterate over reads in *samfile* at a given list of file positions.\n "), /*tp_doc*/
+ __pyx_tp_traverse_9csamtools_IteratorRowSelection, /*tp_traverse*/
+ __pyx_tp_clear_9csamtools_IteratorRowSelection, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ __pyx_pf_9csamtools_20IteratorRowSelection___iter__, /*tp_iter*/
+ __pyx_pf_9csamtools_20IteratorRowSelection___next__, /*tp_iternext*/
+ __pyx_methods_9csamtools_IteratorRowSelection, /*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_9csamtools_IteratorRowSelection, /*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_9csamtools_IteratorColumn __pyx_vtable_9csamtools_IteratorColumn;
+
+static PyObject *__pyx_tp_new_9csamtools_IteratorColumn(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_9csamtools_IteratorColumn *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_9csamtools_IteratorColumn *)o);
+ p->__pyx_vtab = __pyx_vtabptr_9csamtools_IteratorColumn;
+ p->iter = ((struct __pyx_obj_9csamtools_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
+ 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___cinit__(o, a, k) < 0) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_9csamtools_IteratorColumn(PyObject *o) {
+ struct __pyx_obj_9csamtools_IteratorColumn *p = (struct __pyx_obj_9csamtools_IteratorColumn *)o;
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pf_9csamtools_14IteratorColumn___dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_XDECREF(((PyObject *)p->iter));
+ Py_XDECREF(((PyObject *)p->samfile));
+ Py_XDECREF(((PyObject *)p->fastafile));
+ Py_XDECREF(p->stepper);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_9csamtools_IteratorColumn(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_9csamtools_IteratorColumn *p = (struct __pyx_obj_9csamtools_IteratorColumn *)o;
+ if (p->iter) {
+ e = (*v)(((PyObject*)p->iter), a); if (e) return e;
+ }
+ if (p->samfile) {
+ e = (*v)(((PyObject*)p->samfile), a); if (e) return e;
+ }
+ if (p->fastafile) {
+ e = (*v)(((PyObject*)p->fastafile), a); if (e) return e;
+ }
+ if (p->stepper) {
+ e = (*v)(p->stepper, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_9csamtools_IteratorColumn(PyObject *o) {
+ struct __pyx_obj_9csamtools_IteratorColumn *p = (struct __pyx_obj_9csamtools_IteratorColumn *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->iter);
+ p->iter = ((struct __pyx_obj_9csamtools_IteratorRowRegion *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->samfile);
+ p->samfile = ((struct __pyx_obj_9csamtools_Samfile *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->fastafile);
+ p->fastafile = ((struct __pyx_obj_9csamtools_Fastafile *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->stepper);
+ p->stepper = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyObject *__pyx_getprop_9csamtools_14IteratorColumn_seq_len(PyObject *o, void *x) {
+ return __pyx_pf_9csamtools_14IteratorColumn_7seq_len___get__(o);
+}
+
+static PyMethodDef __pyx_methods_9csamtools_IteratorColumn[] = {
+ {__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_161), 0},