Imported Upstream version 0.5
[pysam.git] / pysam / TabProxies.c
1 /* Generated by Cython 0.13 on Thu May  5 14:57:52 2011 */
2
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6     #error Python headers needed to compile C extensions, please install development version of Python.
7 #else
8
9 #include <stddef.h> /* For offsetof */
10 #ifndef offsetof
11 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
12 #endif
13
14 #if !defined(WIN32) && !defined(MS_WINDOWS)
15   #ifndef __stdcall
16     #define __stdcall
17   #endif
18   #ifndef __cdecl
19     #define __cdecl
20   #endif
21   #ifndef __fastcall
22     #define __fastcall
23   #endif
24 #endif
25
26 #ifndef DL_IMPORT
27   #define DL_IMPORT(t) t
28 #endif
29 #ifndef DL_EXPORT
30   #define DL_EXPORT(t) t
31 #endif
32
33 #ifndef PY_LONG_LONG
34   #define PY_LONG_LONG LONG_LONG
35 #endif
36
37 #if PY_VERSION_HEX < 0x02040000
38   #define METH_COEXIST 0
39   #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
40   #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
41 #endif
42
43 #if PY_VERSION_HEX < 0x02050000
44   typedef int Py_ssize_t;
45   #define PY_SSIZE_T_MAX INT_MAX
46   #define PY_SSIZE_T_MIN INT_MIN
47   #define PY_FORMAT_SIZE_T ""
48   #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
49   #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
50   #define PyNumber_Index(o)    PyNumber_Int(o)
51   #define PyIndex_Check(o)     PyNumber_Check(o)
52   #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
53 #endif
54
55 #if PY_VERSION_HEX < 0x02060000
56   #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
57   #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
58   #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
59   #define PyVarObject_HEAD_INIT(type, size) \
60           PyObject_HEAD_INIT(type) size,
61   #define PyType_Modified(t)
62
63   typedef struct {
64      void *buf;
65      PyObject *obj;
66      Py_ssize_t len;
67      Py_ssize_t itemsize;
68      int readonly;
69      int ndim;
70      char *format;
71      Py_ssize_t *shape;
72      Py_ssize_t *strides;
73      Py_ssize_t *suboffsets;
74      void *internal;
75   } Py_buffer;
76
77   #define PyBUF_SIMPLE 0
78   #define PyBUF_WRITABLE 0x0001
79   #define PyBUF_FORMAT 0x0004
80   #define PyBUF_ND 0x0008
81   #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
82   #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
83   #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
84   #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
85   #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
86
87 #endif
88
89 #if PY_MAJOR_VERSION < 3
90   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
91 #else
92   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
93 #endif
94
95 #if PY_MAJOR_VERSION >= 3
96   #define Py_TPFLAGS_CHECKTYPES 0
97   #define Py_TPFLAGS_HAVE_INDEX 0
98 #endif
99
100 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
101   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
102 #endif
103
104 #if PY_MAJOR_VERSION >= 3
105   #define PyBaseString_Type            PyUnicode_Type
106   #define PyStringObject               PyUnicodeObject
107   #define PyString_Type                PyUnicode_Type
108   #define PyString_Check               PyUnicode_Check
109   #define PyString_CheckExact          PyUnicode_CheckExact
110 #endif
111
112 #if PY_VERSION_HEX < 0x02060000
113   #define PyBytesObject                PyStringObject
114   #define PyBytes_Type                 PyString_Type
115   #define PyBytes_Check                PyString_Check
116   #define PyBytes_CheckExact           PyString_CheckExact
117   #define PyBytes_FromString           PyString_FromString
118   #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
119   #define PyBytes_FromFormat           PyString_FromFormat
120   #define PyBytes_DecodeEscape         PyString_DecodeEscape
121   #define PyBytes_AsString             PyString_AsString
122   #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
123   #define PyBytes_Size                 PyString_Size
124   #define PyBytes_AS_STRING            PyString_AS_STRING
125   #define PyBytes_GET_SIZE             PyString_GET_SIZE
126   #define PyBytes_Repr                 PyString_Repr
127   #define PyBytes_Concat               PyString_Concat
128   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
129   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
130   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
131 #endif
132
133 #ifndef PySet_CheckExact
134 #  define PySet_CheckExact(obj)          (Py_TYPE(obj) == &PySet_Type)
135 #endif
136
137 #if PY_MAJOR_VERSION >= 3
138   #define PyInt_Type                   PyLong_Type
139   #define PyInt_Check(op)              PyLong_Check(op)
140   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
141   #define PyInt_FromString             PyLong_FromString
142   #define PyInt_FromUnicode            PyLong_FromUnicode
143   #define PyInt_FromLong               PyLong_FromLong
144   #define PyInt_FromSize_t             PyLong_FromSize_t
145   #define PyInt_FromSsize_t            PyLong_FromSsize_t
146   #define PyInt_AsLong                 PyLong_AsLong
147   #define PyInt_AS_LONG                PyLong_AS_LONG
148   #define PyInt_AsSsize_t              PyLong_AsSsize_t
149   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
150   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
151 #endif
152
153 #if PY_MAJOR_VERSION >= 3
154   #define PyBoolObject PyLongObject
155 #endif
156
157
158 #if PY_MAJOR_VERSION >= 3
159   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
160   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
161 #else
162   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
163   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
164 #endif
165
166 #if PY_MAJOR_VERSION >= 3
167   #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
168 #endif
169
170 #if PY_VERSION_HEX < 0x02050000
171   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
172   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
173   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
174 #else
175   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
176   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
177   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
178 #endif
179
180 #if PY_VERSION_HEX < 0x02050000
181   #define __Pyx_NAMESTR(n) ((char *)(n))
182   #define __Pyx_DOCSTR(n)  ((char *)(n))
183 #else
184   #define __Pyx_NAMESTR(n) (n)
185   #define __Pyx_DOCSTR(n)  (n)
186 #endif
187
188 #ifdef __cplusplus
189 #define __PYX_EXTERN_C extern "C"
190 #else
191 #define __PYX_EXTERN_C extern
192 #endif
193
194 #if defined(WIN32) || defined(MS_WINDOWS)
195 #define _USE_MATH_DEFINES
196 #endif
197 #include <math.h>
198 #define __PYX_HAVE_API__TabProxies
199 #include "stdlib.h"
200 #include "string.h"
201 #include "stdint.h"
202 #include "stdio.h"
203 #include "pythread.h"
204
205 /* inline attribute */
206 #ifndef CYTHON_INLINE
207   #if defined(__GNUC__)
208     #define CYTHON_INLINE __inline__
209   #elif defined(_MSC_VER)
210     #define CYTHON_INLINE __inline
211   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
212     #define CYTHON_INLINE inline
213   #else
214     #define CYTHON_INLINE 
215   #endif
216 #endif
217
218 /* unused attribute */
219 #ifndef CYTHON_UNUSED
220 # if defined(__GNUC__)
221 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
222 #     define CYTHON_UNUSED __attribute__ ((__unused__)) 
223 #   else
224 #     define CYTHON_UNUSED
225 #   endif
226 # elif defined(__ICC) || defined(__INTEL_COMPILER)
227 #   define CYTHON_UNUSED __attribute__ ((__unused__)) 
228 # else
229 #   define CYTHON_UNUSED 
230 # endif
231 #endif
232
233 typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
234
235
236 /* Type Conversion Predeclarations */
237
238 #define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
239 #define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
240
241 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
242 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
243 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
244
245 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
246 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
247 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
248
249 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
250
251
252 #ifdef __GNUC__
253 /* Test for GCC > 2.95 */
254 #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
255 #define likely(x)   __builtin_expect(!!(x), 1)
256 #define unlikely(x) __builtin_expect(!!(x), 0)
257 #else /* __GNUC__ > 2 ... */
258 #define likely(x)   (x)
259 #define unlikely(x) (x)
260 #endif /* __GNUC__ > 2 ... */
261 #else /* __GNUC__ */
262 #define likely(x)   (x)
263 #define unlikely(x) (x)
264 #endif /* __GNUC__ */
265     
266 static PyObject *__pyx_m;
267 static PyObject *__pyx_b;
268 static PyObject *__pyx_empty_tuple;
269 static PyObject *__pyx_empty_bytes;
270 static int __pyx_lineno;
271 static int __pyx_clineno = 0;
272 static const char * __pyx_cfilenm= __FILE__;
273 static const char *__pyx_filename;
274
275
276 static const char *__pyx_f[] = {
277   "TabProxies.pyx",
278   "bool.pxd",
279 };
280
281 /* Type declarations */
282
283 /* "pysam/TabProxies.pxd":42
284  *   ctypedef int uint64_t
285  * 
286  * cdef class TupleProxy:             # <<<<<<<<<<<<<<
287  * 
288  *     cdef:
289  */
290
291 struct __pyx_obj_10TabProxies_TupleProxy {
292   PyObject_HEAD
293   struct __pyx_vtabstruct_10TabProxies_TupleProxy *__pyx_vtab;
294   char *data;
295   char **fields;
296   int nfields;
297   int index;
298   int nbytes;
299   int offset;
300   int is_modified;
301 };
302
303 /* "pysam/TabProxies.pxd":77
304  *     cdef update( self, char * buffer, size_t nbytes )
305  * 
306  * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
307  *     pass
308  * 
309  */
310
311 struct __pyx_obj_10TabProxies_NamedTupleProxy {
312   struct __pyx_obj_10TabProxies_TupleProxy __pyx_base;
313 };
314
315 /* "pysam/TabProxies.pxd":91
316  *     cdef update( self, char * buffer, size_t nbytes )
317  * 
318  * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
319  * 
320  *     cdef:
321  */
322
323 struct __pyx_obj_10TabProxies_VCFProxy {
324   struct __pyx_obj_10TabProxies_NamedTupleProxy __pyx_base;
325   char *contig;
326   uint32_t pos;
327 };
328
329 /* "pysam/TabProxies.pxd":60
330  *     cdef update( self, char * buffer, size_t nbytes )
331  * 
332  * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
333  * 
334  *     cdef:
335  */
336
337 struct __pyx_obj_10TabProxies_GTFProxy {
338   struct __pyx_obj_10TabProxies_TupleProxy __pyx_base;
339   char *contig;
340   char *source;
341   char *feature;
342   uint32_t start;
343   uint32_t end;
344   char *score;
345   char *strand;
346   char *frame;
347   char *attributes;
348   int hasOwnAttributes;
349 };
350
351 /* "pysam/TabProxies.pxd":80
352  *     pass
353  * 
354  * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
355  * 
356  *     cdef:
357  */
358
359 struct __pyx_obj_10TabProxies_BedProxy {
360   struct __pyx_obj_10TabProxies_NamedTupleProxy __pyx_base;
361   char *contig;
362   uint32_t start;
363   uint32_t end;
364   int bedfields;
365 };
366
367
368 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":20
369  *      return not (buffer <= p < buffer + nbytes )
370  * 
371  * cdef class TupleProxy:             # <<<<<<<<<<<<<<
372  *     '''Proxy class for access to parsed row as a tuple.
373  * 
374  */
375
376 struct __pyx_vtabstruct_10TabProxies_TupleProxy {
377   int (*getMaxFields)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t);
378   PyObject *(*take)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
379   PyObject *(*present)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
380   PyObject *(*copy)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
381   PyObject *(*update)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
382 };
383 static struct __pyx_vtabstruct_10TabProxies_TupleProxy *__pyx_vtabptr_10TabProxies_TupleProxy;
384
385
386 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":488
387  *         self.fromDict( r )
388  * 
389  * cdef class NamedTupleProxy( TupleProxy ):             # <<<<<<<<<<<<<<
390  * 
391  *     map_key2field = {}
392  */
393
394 struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy {
395   struct __pyx_vtabstruct_10TabProxies_TupleProxy __pyx_base;
396 };
397 static struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
398
399
400 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":573
401  *         TupleProxy._setindex(self, idx, str(value) )
402  * 
403  * cdef class VCFProxy( NamedTupleProxy ):             # <<<<<<<<<<<<<<
404  *     '''Proxy class for access to VCF fields.
405  * 
406  */
407
408 struct __pyx_vtabstruct_10TabProxies_VCFProxy {
409   struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy __pyx_base;
410 };
411 static struct __pyx_vtabstruct_10TabProxies_VCFProxy *__pyx_vtabptr_10TabProxies_VCFProxy;
412
413
414 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":507
415  *         return f( self.fields[idx] )
416  * 
417  * cdef class BedProxy( NamedTupleProxy ):             # <<<<<<<<<<<<<<
418  *     '''Proxy class for access to Bed fields.
419  * 
420  */
421
422 struct __pyx_vtabstruct_10TabProxies_BedProxy {
423   struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy __pyx_base;
424 };
425 static struct __pyx_vtabstruct_10TabProxies_BedProxy *__pyx_vtabptr_10TabProxies_BedProxy;
426
427
428 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":231
429  *         return str(v)
430  * 
431  * cdef class GTFProxy( TupleProxy ):             # <<<<<<<<<<<<<<
432  *     '''Proxy class for access to GTF fields.
433  * 
434  */
435
436 struct __pyx_vtabstruct_10TabProxies_GTFProxy {
437   struct __pyx_vtabstruct_10TabProxies_TupleProxy __pyx_base;
438 };
439 static struct __pyx_vtabstruct_10TabProxies_GTFProxy *__pyx_vtabptr_10TabProxies_GTFProxy;
440
441 #ifndef CYTHON_REFNANNY
442   #define CYTHON_REFNANNY 0
443 #endif
444
445 #if CYTHON_REFNANNY
446   typedef struct {
447     void (*INCREF)(void*, PyObject*, int);
448     void (*DECREF)(void*, PyObject*, int);
449     void (*GOTREF)(void*, PyObject*, int);
450     void (*GIVEREF)(void*, PyObject*, int);
451     void* (*SetupContext)(const char*, int, const char*);
452     void (*FinishContext)(void**);
453   } __Pyx_RefNannyAPIStruct;
454   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
455   static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
456     PyObject *m = NULL, *p = NULL;
457     void *r = NULL;
458     m = PyImport_ImportModule((char *)modname);
459     if (!m) goto end;
460     p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
461     if (!p) goto end;
462     r = PyLong_AsVoidPtr(p);
463   end:
464     Py_XDECREF(p);
465     Py_XDECREF(m);
466     return (__Pyx_RefNannyAPIStruct *)r;
467   }
468   #define __Pyx_RefNannySetupContext(name)           void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
469   #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
470   #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
471   #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
472   #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
473   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
474   #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
475 #else
476   #define __Pyx_RefNannySetupContext(name)
477   #define __Pyx_RefNannyFinishContext()
478   #define __Pyx_INCREF(r) Py_INCREF(r)
479   #define __Pyx_DECREF(r) Py_DECREF(r)
480   #define __Pyx_GOTREF(r)
481   #define __Pyx_GIVEREF(r)
482   #define __Pyx_XDECREF(r) Py_XDECREF(r)
483 #endif /* CYTHON_REFNANNY */
484 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
485 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
486
487 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
488
489 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
490     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
491
492 static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
493     const char* function_name, int kw_allowed); /*proto*/
494
495 static void __Pyx_RaiseDoubleKeywordsError(
496     const char* func_name, PyObject* kw_name); /*proto*/
497
498 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
499
500 static CYTHON_INLINE long __Pyx_NegateNonNeg(long b) { return unlikely(b < 0) ? b : !b; }
501 static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
502     return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
503 }
504
505
506 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
507     PyObject *r;
508     if (!j) return NULL;
509     r = PyObject_GetItem(o, j);
510     Py_DECREF(j);
511     return r;
512 }
513
514
515 #define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
516                                                     __Pyx_GetItemInt_List_Fast(o, i) : \
517                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
518
519 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
520     if (likely(o != Py_None)) {
521         if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
522             PyObject *r = PyList_GET_ITEM(o, i);
523             Py_INCREF(r);
524             return r;
525         }
526         else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
527             PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
528             Py_INCREF(r);
529             return r;
530         }
531     }
532     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
533 }
534
535 #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
536                                                     __Pyx_GetItemInt_Tuple_Fast(o, i) : \
537                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
538
539 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
540     if (likely(o != Py_None)) {
541         if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
542             PyObject *r = PyTuple_GET_ITEM(o, i);
543             Py_INCREF(r);
544             return r;
545         }
546         else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
547             PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
548             Py_INCREF(r);
549             return r;
550         }
551     }
552     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
553 }
554
555
556 #define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
557                                                     __Pyx_GetItemInt_Fast(o, i) : \
558                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
559
560 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
561     PyObject *r;
562     if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
563         r = PyList_GET_ITEM(o, i);
564         Py_INCREF(r);
565     }
566     else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
567         r = PyTuple_GET_ITEM(o, i);
568         Py_INCREF(r);
569     }
570     else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
571         r = PySequence_GetItem(o, i);
572     }
573     else {
574         r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
575     }
576     return r;
577 }
578
579 static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
580
581 #define __Pyx_PyObject_AsDouble(obj) \
582     ((likely(PyFloat_CheckExact(obj))) ? \
583      PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
584
585 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
586
587 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
588
589 static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
590 static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/
591
592 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
593 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
594
595 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
596
597 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
598 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
599
600 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
601
602 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t);
603
604 static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject *);
605
606 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
607
608 static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
609
610 static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
611
612 static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
613
614 static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
615
616 static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
617
618 static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
619
620 static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
621
622 static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
623
624 static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
625
626 static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
627
628 static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
629
630 static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
631
632 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
633
634 static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
635
636 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
637
638 static void __Pyx_WriteUnraisable(const char *name); /*proto*/
639
640 static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
641
642 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/
643
644 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
645
646 static void __Pyx_AddTraceback(const char *funcname); /*proto*/
647
648 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
649 /* Module declarations from cpython.version */
650
651 /* Module declarations from cpython.ref */
652
653 /* Module declarations from cpython.exc */
654
655 /* Module declarations from cpython.module */
656
657 /* Module declarations from cpython.mem */
658
659 /* Module declarations from cpython.tuple */
660
661 /* Module declarations from cpython.list */
662
663 /* Module declarations from libc.stdio */
664
665 /* Module declarations from cpython.object */
666
667 /* Module declarations from cpython.sequence */
668
669 /* Module declarations from cpython.mapping */
670
671 /* Module declarations from cpython.iterator */
672
673 /* Module declarations from cpython.type */
674
675 /* Module declarations from cpython.number */
676
677 /* Module declarations from cpython.int */
678
679 /* Module declarations from __builtin__ */
680
681 /* Module declarations from cpython.bool */
682
683 static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
684 /* Module declarations from cpython.long */
685
686 /* Module declarations from cpython.float */
687
688 /* Module declarations from cpython.complex */
689
690 /* Module declarations from cpython.string */
691
692 /* Module declarations from cpython.unicode */
693
694 /* Module declarations from cpython.dict */
695
696 /* Module declarations from cpython.instance */
697
698 /* Module declarations from cpython.function */
699
700 /* Module declarations from cpython.method */
701
702 /* Module declarations from cpython.weakref */
703
704 /* Module declarations from cpython.getargs */
705
706 /* Module declarations from cpython.pythread */
707
708 /* Module declarations from cpython.cobject */
709
710 /* Module declarations from cpython.oldbuffer */
711
712 /* Module declarations from cpython.set */
713
714 /* Module declarations from cpython.buffer */
715
716 /* Module declarations from cpython.bytes */
717
718 /* Module declarations from cpython.pycapsule */
719
720 /* Module declarations from cpython */
721
722 /* Module declarations from TabProxies */
723
724 static PyTypeObject *__pyx_ptype_10TabProxies_TupleProxy = 0;
725 static PyTypeObject *__pyx_ptype_10TabProxies_GTFProxy = 0;
726 static PyTypeObject *__pyx_ptype_10TabProxies_NamedTupleProxy = 0;
727 static PyTypeObject *__pyx_ptype_10TabProxies_BedProxy = 0;
728 static PyTypeObject *__pyx_ptype_10TabProxies_VCFProxy = 0;
729 static char *__pyx_f_10TabProxies_nextItem(char *); /*proto*/
730 static char *__pyx_f_10TabProxies_StrOrEmpty(char *); /*proto*/
731 static int __pyx_f_10TabProxies_isNew(char *, char *, size_t); /*proto*/
732 #define __Pyx_MODULE_NAME "TabProxies"
733 int __pyx_module_is_main_TabProxies = 0;
734
735 /* Implementation of TabProxies */
736 static PyObject *__pyx_builtin_ValueError;
737 static PyObject *__pyx_builtin_IndexError;
738 static PyObject *__pyx_builtin_StopIteration;
739 static PyObject *__pyx_builtin_xrange;
740 static PyObject *__pyx_builtin_TypeError;
741 static PyObject *__pyx_builtin_AttributeError;
742 static PyObject *__pyx_builtin_KeyError;
743 static char __pyx_k_1[] = "malformatted entry at %s";
744 static char __pyx_k_2[] = "";
745 static char __pyx_k_3[] = "out of memory";
746 static char __pyx_k_4[] = "incomplete line at %s";
747 static char __pyx_k_5[] = "row too large - more than %i fields";
748 static char __pyx_k_6[] = "list index out of range";
749 static char __pyx_k_7[] = "\t";
750 static char __pyx_k_8[] = ".";
751 static char __pyx_k_9[] = "\"%s\"";
752 static char __pyx_k_10[] = ";";
753 static char __pyx_k_11[] = " ";
754 static char __pyx_k_12[] = "\"";
755 static char __pyx_k_13[] = "%s \"%s\"";
756 static char __pyx_k_14[] = "%s %s";
757 static char __pyx_k_15[] = "; ";
758 static char __pyx_k_16[] = "'GTFProxy' has no attribute '%s'";
759 static char __pyx_k_17[] = "field %s not set";
760 static char __pyx_k_18[] = "bed format requires at least three columns";
761 static char __pyx_k_19[] = "contig of feature.";
762 static char __pyx_k_20[] = "feature name.";
763 static char __pyx_k_21[] = "feature source.";
764 static char __pyx_k_22[] = "feature start (in 0-based open/closed coordinates).";
765 static char __pyx_k_23[] = "feature end (in 0-based open/closed coordinates).";
766 static char __pyx_k_24[] = "feature score.";
767 static char __pyx_k_25[] = "feature strand.";
768 static char __pyx_k_26[] = "feature frame.";
769 static char __pyx_k_27[] = "feature attributes (as a string).";
770 static char __pyx_k_28[] = "TupleProxy._setindex (line 154)";
771 static char __pyx_k_29[] = "TupleProxy.__setitem__ (line 177)";
772 static char __pyx_k_30[] = "TupleProxy.__next__ (line 192)";
773 static char __pyx_k_31[] = "TupleProxy.__str__ (line 202)";
774 static char __pyx_k_32[] = "toDot (line 219)";
775 static char __pyx_k_33[] = "quote (line 224)";
776 static char __pyx_k_34[] = "GTFProxy.asDict (line 350)";
777 static char __pyx_k_35[] = "GTFProxy.fromDict (line 385)";
778 static char __pyx_k_36[] = "GTFProxy.invert (line 430)";
779 static char __pyx_k_37[] = "GTFProxy.keys (line 441)";
780 static char __pyx_k_38[] = "GTFProxy.__getattr__ (line 449)";
781 static char __pyx_k_39[] = "GTFProxy.setAttribute (line 482)";
782 static char __pyx_k_40[] = "NamedTupleProxy.__setattr__ (line 492)";
783 static char __pyx_k_41[] = "BedProxy.__setattr__ (line 564)";
784 static char __pyx_k_42[] = "VCFProxy.__setattr__ (line 608)";
785 static char __pyx_k__id[] = "id";
786 static char __pyx_k__alt[] = "alt";
787 static char __pyx_k__end[] = "end";
788 static char __pyx_k__pos[] = "pos";
789 static char __pyx_k__ref[] = "ref";
790 static char __pyx_k__data[] = "data";
791 static char __pyx_k__info[] = "info";
792 static char __pyx_k__join[] = "join";
793 static char __pyx_k__keys[] = "keys";
794 static char __pyx_k__name[] = "name";
795 static char __pyx_k__qual[] = "qual";
796 static char __pyx_k__frame[] = "frame";
797 static char __pyx_k__index[] = "index";
798 static char __pyx_k__items[] = "items";
799 static char __pyx_k__quote[] = "quote";
800 static char __pyx_k__range[] = "range";
801 static char __pyx_k__score[] = "score";
802 static char __pyx_k__split[] = "split";
803 static char __pyx_k__start[] = "start";
804 static char __pyx_k__strip[] = "strip";
805 static char __pyx_k__toDot[] = "toDot";
806 static char __pyx_k__types[] = "types";
807 static char __pyx_k__value[] = "value";
808 static char __pyx_k__asDict[] = "asDict";
809 static char __pyx_k__contig[] = "contig";
810 static char __pyx_k__fields[] = "fields";
811 static char __pyx_k__filter[] = "filter";
812 static char __pyx_k__format[] = "format";
813 static char __pyx_k__invert[] = "invert";
814 static char __pyx_k__nbytes[] = "nbytes";
815 static char __pyx_k__offset[] = "offset";
816 static char __pyx_k__source[] = "source";
817 static char __pyx_k__strand[] = "strand";
818 static char __pyx_k__update[] = "update";
819 static char __pyx_k__xrange[] = "xrange";
820 static char __pyx_k____str__[] = "__str__";
821 static char __pyx_k__feature[] = "feature";
822 static char __pyx_k__itemRGB[] = "itemRGB";
823 static char __pyx_k__nfields[] = "nfields";
824 static char __pyx_k__BedProxy[] = "BedProxy";
825 static char __pyx_k__GTFProxy[] = "GTFProxy";
826 static char __pyx_k__KeyError[] = "KeyError";
827 static char __pyx_k__VCFProxy[] = "VCFProxy";
828 static char __pyx_k____main__[] = "__main__";
829 static char __pyx_k____next__[] = "__next__";
830 static char __pyx_k____test__[] = "__test__";
831 static char __pyx_k__fromDict[] = "fromDict";
832 static char __pyx_k__thickEnd[] = "thickEnd";
833 static char __pyx_k__TypeError[] = "TypeError";
834 static char __pyx_k___setindex[] = "_setindex";
835 static char __pyx_k__bedfields[] = "bedfields";
836 static char __pyx_k__IndexError[] = "IndexError";
837 static char __pyx_k__StringType[] = "StringType";
838 static char __pyx_k__TupleProxy[] = "TupleProxy";
839 static char __pyx_k__ValueError[] = "ValueError";
840 static char __pyx_k__attributes[] = "attributes";
841 static char __pyx_k__blockCount[] = "blockCount";
842 static char __pyx_k__blockSizes[] = "blockSizes";
843 static char __pyx_k__thickStart[] = "thickStart";
844 static char __pyx_k__StringTypes[] = "StringTypes";
845 static char __pyx_k____getattr__[] = "__getattr__";
846 static char __pyx_k____setattr__[] = "__setattr__";
847 static char __pyx_k____setitem__[] = "__setitem__";
848 static char __pyx_k__blockStarts[] = "blockStarts";
849 static char __pyx_k__is_modified[] = "is_modified";
850 static char __pyx_k__getMaxFields[] = "getMaxFields";
851 static char __pyx_k__setAttribute[] = "setAttribute";
852 static char __pyx_k__StopIteration[] = "StopIteration";
853 static char __pyx_k__map_key2field[] = "map_key2field";
854 static char __pyx_k__AttributeError[] = "AttributeError";
855 static char __pyx_k__NamedTupleProxy[] = "NamedTupleProxy";
856 static char __pyx_k__hasOwnAttributes[] = "hasOwnAttributes";
857 static PyObject *__pyx_kp_s_1;
858 static PyObject *__pyx_kp_s_10;
859 static PyObject *__pyx_kp_s_11;
860 static PyObject *__pyx_kp_s_12;
861 static PyObject *__pyx_kp_s_13;
862 static PyObject *__pyx_kp_s_14;
863 static PyObject *__pyx_kp_s_15;
864 static PyObject *__pyx_kp_s_16;
865 static PyObject *__pyx_kp_s_17;
866 static PyObject *__pyx_kp_s_18;
867 static PyObject *__pyx_kp_s_2;
868 static PyObject *__pyx_kp_u_28;
869 static PyObject *__pyx_kp_u_29;
870 static PyObject *__pyx_kp_s_3;
871 static PyObject *__pyx_kp_u_30;
872 static PyObject *__pyx_kp_u_31;
873 static PyObject *__pyx_kp_u_32;
874 static PyObject *__pyx_kp_u_33;
875 static PyObject *__pyx_kp_u_34;
876 static PyObject *__pyx_kp_u_35;
877 static PyObject *__pyx_kp_u_36;
878 static PyObject *__pyx_kp_u_37;
879 static PyObject *__pyx_kp_u_38;
880 static PyObject *__pyx_kp_u_39;
881 static PyObject *__pyx_kp_s_4;
882 static PyObject *__pyx_kp_u_40;
883 static PyObject *__pyx_kp_u_41;
884 static PyObject *__pyx_kp_u_42;
885 static PyObject *__pyx_kp_s_5;
886 static PyObject *__pyx_kp_s_6;
887 static PyObject *__pyx_kp_s_7;
888 static PyObject *__pyx_kp_s_8;
889 static PyObject *__pyx_kp_s_9;
890 static PyObject *__pyx_n_s__AttributeError;
891 static PyObject *__pyx_n_s__BedProxy;
892 static PyObject *__pyx_n_s__GTFProxy;
893 static PyObject *__pyx_n_s__IndexError;
894 static PyObject *__pyx_n_s__KeyError;
895 static PyObject *__pyx_n_s__NamedTupleProxy;
896 static PyObject *__pyx_n_s__StopIteration;
897 static PyObject *__pyx_n_s__StringType;
898 static PyObject *__pyx_n_s__StringTypes;
899 static PyObject *__pyx_n_s__TupleProxy;
900 static PyObject *__pyx_n_s__TypeError;
901 static PyObject *__pyx_n_s__VCFProxy;
902 static PyObject *__pyx_n_s__ValueError;
903 static PyObject *__pyx_n_s____getattr__;
904 static PyObject *__pyx_n_s____main__;
905 static PyObject *__pyx_n_s____next__;
906 static PyObject *__pyx_n_s____setattr__;
907 static PyObject *__pyx_n_s____setitem__;
908 static PyObject *__pyx_n_s____str__;
909 static PyObject *__pyx_n_s____test__;
910 static PyObject *__pyx_n_s___setindex;
911 static PyObject *__pyx_n_s__alt;
912 static PyObject *__pyx_n_s__asDict;
913 static PyObject *__pyx_n_s__attributes;
914 static PyObject *__pyx_n_s__bedfields;
915 static PyObject *__pyx_n_s__blockCount;
916 static PyObject *__pyx_n_s__blockSizes;
917 static PyObject *__pyx_n_s__blockStarts;
918 static PyObject *__pyx_n_s__contig;
919 static PyObject *__pyx_n_s__data;
920 static PyObject *__pyx_n_s__end;
921 static PyObject *__pyx_n_s__feature;
922 static PyObject *__pyx_n_s__fields;
923 static PyObject *__pyx_n_s__filter;
924 static PyObject *__pyx_n_s__format;
925 static PyObject *__pyx_n_s__frame;
926 static PyObject *__pyx_n_s__fromDict;
927 static PyObject *__pyx_n_s__getMaxFields;
928 static PyObject *__pyx_n_s__hasOwnAttributes;
929 static PyObject *__pyx_n_s__id;
930 static PyObject *__pyx_n_s__index;
931 static PyObject *__pyx_n_s__info;
932 static PyObject *__pyx_n_s__invert;
933 static PyObject *__pyx_n_s__is_modified;
934 static PyObject *__pyx_n_s__itemRGB;
935 static PyObject *__pyx_n_s__items;
936 static PyObject *__pyx_n_s__join;
937 static PyObject *__pyx_n_s__keys;
938 static PyObject *__pyx_n_s__map_key2field;
939 static PyObject *__pyx_n_s__name;
940 static PyObject *__pyx_n_s__nbytes;
941 static PyObject *__pyx_n_s__nfields;
942 static PyObject *__pyx_n_s__offset;
943 static PyObject *__pyx_n_s__pos;
944 static PyObject *__pyx_n_s__qual;
945 static PyObject *__pyx_n_s__quote;
946 static PyObject *__pyx_n_s__range;
947 static PyObject *__pyx_n_s__ref;
948 static PyObject *__pyx_n_s__score;
949 static PyObject *__pyx_n_s__setAttribute;
950 static PyObject *__pyx_n_s__source;
951 static PyObject *__pyx_n_s__split;
952 static PyObject *__pyx_n_s__start;
953 static PyObject *__pyx_n_s__strand;
954 static PyObject *__pyx_n_s__strip;
955 static PyObject *__pyx_n_s__thickEnd;
956 static PyObject *__pyx_n_s__thickStart;
957 static PyObject *__pyx_n_s__toDot;
958 static PyObject *__pyx_n_s__types;
959 static PyObject *__pyx_n_s__update;
960 static PyObject *__pyx_n_s__value;
961 static PyObject *__pyx_n_s__xrange;
962 static PyObject *__pyx_int_0;
963 static PyObject *__pyx_int_1;
964 static PyObject *__pyx_int_2;
965 static PyObject *__pyx_int_3;
966 static PyObject *__pyx_int_4;
967 static PyObject *__pyx_int_5;
968 static PyObject *__pyx_int_6;
969 static PyObject *__pyx_int_7;
970 static PyObject *__pyx_int_8;
971 static PyObject *__pyx_int_9;
972 static PyObject *__pyx_int_10;
973 static PyObject *__pyx_int_11;
974
975 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":4
976  * from cpython cimport PyString_FromStringAndSize, PyString_AsString, PyString_AS_STRING
977  * 
978  * cdef char * nextItem( char * buffer ):             # <<<<<<<<<<<<<<
979  *     cdef char * pos
980  *     pos = strchr( buffer, '\t' )
981  */
982
983 static  char *__pyx_f_10TabProxies_nextItem(char *__pyx_v_buffer) {
984   char *__pyx_v_pos;
985   char *__pyx_r;
986   int __pyx_t_1;
987   PyObject *__pyx_t_2 = NULL;
988   PyObject *__pyx_t_3 = NULL;
989   __Pyx_RefNannySetupContext("nextItem");
990
991   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":6
992  * cdef char * nextItem( char * buffer ):
993  *     cdef char * pos
994  *     pos = strchr( buffer, '\t' )             # <<<<<<<<<<<<<<
995  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
996  *     pos[0] = '\0'
997  */
998   __pyx_v_pos = strchr(__pyx_v_buffer, '\t');
999
1000   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":7
1001  *     cdef char * pos
1002  *     pos = strchr( buffer, '\t' )
1003  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )             # <<<<<<<<<<<<<<
1004  *     pos[0] = '\0'
1005  *     pos += 1
1006  */
1007   __pyx_t_1 = (__pyx_v_pos == NULL);
1008   if (__pyx_t_1) {
1009     __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1010     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1011     __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1012     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
1013     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1014     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1015     __Pyx_GOTREF(__pyx_t_2);
1016     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
1017     __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
1018     __pyx_t_3 = 0;
1019     __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1020     __Pyx_GOTREF(__pyx_t_3);
1021     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1022     __Pyx_Raise(__pyx_t_3, 0, 0);
1023     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1024     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1025     goto __pyx_L3;
1026   }
1027   __pyx_L3:;
1028
1029   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":8
1030  *     pos = strchr( buffer, '\t' )
1031  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
1032  *     pos[0] = '\0'             # <<<<<<<<<<<<<<
1033  *     pos += 1
1034  *     return pos
1035  */
1036   (__pyx_v_pos[0]) = '\x00';
1037
1038   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":9
1039  *     if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
1040  *     pos[0] = '\0'
1041  *     pos += 1             # <<<<<<<<<<<<<<
1042  *     return pos
1043  * 
1044  */
1045   __pyx_v_pos += 1;
1046
1047   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":10
1048  *     pos[0] = '\0'
1049  *     pos += 1
1050  *     return pos             # <<<<<<<<<<<<<<
1051  * 
1052  * cdef char *StrOrEmpty( char * buffer ):
1053  */
1054   __pyx_r = __pyx_v_pos;
1055   goto __pyx_L0;
1056
1057   __pyx_r = 0;
1058   goto __pyx_L0;
1059   __pyx_L1_error:;
1060   __Pyx_XDECREF(__pyx_t_2);
1061   __Pyx_XDECREF(__pyx_t_3);
1062   __Pyx_WriteUnraisable("TabProxies.nextItem");
1063   __pyx_r = 0;
1064   __pyx_L0:;
1065   __Pyx_RefNannyFinishContext();
1066   return __pyx_r;
1067 }
1068
1069 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":12
1070  *     return pos
1071  * 
1072  * cdef char *StrOrEmpty( char * buffer ):             # <<<<<<<<<<<<<<
1073  *      if buffer == NULL: return ""
1074  *      else: return buffer
1075  */
1076
1077 static  char *__pyx_f_10TabProxies_StrOrEmpty(char *__pyx_v_buffer) {
1078   char *__pyx_r;
1079   int __pyx_t_1;
1080   __Pyx_RefNannySetupContext("StrOrEmpty");
1081
1082   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":13
1083  * 
1084  * cdef char *StrOrEmpty( char * buffer ):
1085  *      if buffer == NULL: return ""             # <<<<<<<<<<<<<<
1086  *      else: return buffer
1087  * 
1088  */
1089   __pyx_t_1 = (__pyx_v_buffer == NULL);
1090   if (__pyx_t_1) {
1091     __pyx_r = __pyx_k_2;
1092     goto __pyx_L0;
1093     goto __pyx_L3;
1094   }
1095   /*else*/ {
1096
1097     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":14
1098  * cdef char *StrOrEmpty( char * buffer ):
1099  *      if buffer == NULL: return ""
1100  *      else: return buffer             # <<<<<<<<<<<<<<
1101  * 
1102  * cdef int isNew( char * p, char * buffer, size_t nbytes ):
1103  */
1104     __pyx_r = __pyx_v_buffer;
1105     goto __pyx_L0;
1106   }
1107   __pyx_L3:;
1108
1109   __pyx_r = 0;
1110   __pyx_L0:;
1111   __Pyx_RefNannyFinishContext();
1112   return __pyx_r;
1113 }
1114
1115 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":16
1116  *      else: return buffer
1117  * 
1118  * cdef int isNew( char * p, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
1119  *      if p == NULL: return 0
1120  *      return not (buffer <= p < buffer + nbytes )
1121  */
1122
1123 static  int __pyx_f_10TabProxies_isNew(char *__pyx_v_p, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1124   int __pyx_r;
1125   int __pyx_t_1;
1126   __Pyx_RefNannySetupContext("isNew");
1127
1128   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":17
1129  * 
1130  * cdef int isNew( char * p, char * buffer, size_t nbytes ):
1131  *      if p == NULL: return 0             # <<<<<<<<<<<<<<
1132  *      return not (buffer <= p < buffer + nbytes )
1133  * 
1134  */
1135   __pyx_t_1 = (__pyx_v_p == NULL);
1136   if (__pyx_t_1) {
1137     __pyx_r = 0;
1138     goto __pyx_L0;
1139     goto __pyx_L3;
1140   }
1141   __pyx_L3:;
1142
1143   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":18
1144  * cdef int isNew( char * p, char * buffer, size_t nbytes ):
1145  *      if p == NULL: return 0
1146  *      return not (buffer <= p < buffer + nbytes )             # <<<<<<<<<<<<<<
1147  * 
1148  * cdef class TupleProxy:
1149  */
1150   __pyx_t_1 = (__pyx_v_buffer <= __pyx_v_p);
1151   if (__pyx_t_1) {
1152     __pyx_t_1 = (__pyx_v_p < (__pyx_v_buffer + __pyx_v_nbytes));
1153   }
1154   __pyx_r = (!__pyx_t_1);
1155   goto __pyx_L0;
1156
1157   __pyx_r = 0;
1158   __pyx_L0:;
1159   __Pyx_RefNannyFinishContext();
1160   return __pyx_r;
1161 }
1162
1163 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":30
1164  *     '''
1165  * 
1166  *     def __cinit__(self ):             # <<<<<<<<<<<<<<
1167  *         self.data = NULL
1168  *         self.fields = NULL
1169  */
1170
1171 static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1172 static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1173   int __pyx_r;
1174   __Pyx_RefNannySetupContext("__cinit__");
1175   if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
1176     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
1177   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
1178
1179   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":31
1180  * 
1181  *     def __cinit__(self ):
1182  *         self.data = NULL             # <<<<<<<<<<<<<<
1183  *         self.fields = NULL
1184  *         self.index = 0
1185  */
1186   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data = NULL;
1187
1188   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":32
1189  *     def __cinit__(self ):
1190  *         self.data = NULL
1191  *         self.fields = NULL             # <<<<<<<<<<<<<<
1192  *         self.index = 0
1193  *         self.nbytes = 0
1194  */
1195   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields = NULL;
1196
1197   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":33
1198  *         self.data = NULL
1199  *         self.fields = NULL
1200  *         self.index = 0             # <<<<<<<<<<<<<<
1201  *         self.nbytes = 0
1202  *         self.is_modified = 0
1203  */
1204   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index = 0;
1205
1206   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":34
1207  *         self.fields = NULL
1208  *         self.index = 0
1209  *         self.nbytes = 0             # <<<<<<<<<<<<<<
1210  *         self.is_modified = 0
1211  *         self.nfields = 0
1212  */
1213   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes = 0;
1214
1215   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":35
1216  *         self.index = 0
1217  *         self.nbytes = 0
1218  *         self.is_modified = 0             # <<<<<<<<<<<<<<
1219  *         self.nfields = 0
1220  *         # start counting at field offset
1221  */
1222   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified = 0;
1223
1224   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":36
1225  *         self.nbytes = 0
1226  *         self.is_modified = 0
1227  *         self.nfields = 0             # <<<<<<<<<<<<<<
1228  *         # start counting at field offset
1229  *         self.offset = 0
1230  */
1231   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields = 0;
1232
1233   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":38
1234  *         self.nfields = 0
1235  *         # start counting at field offset
1236  *         self.offset = 0             # <<<<<<<<<<<<<<
1237  * 
1238  *     def __dealloc__(self):
1239  */
1240   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset = 0;
1241
1242   __pyx_r = 0;
1243   __Pyx_RefNannyFinishContext();
1244   return __pyx_r;
1245 }
1246
1247 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":40
1248  *         self.offset = 0
1249  * 
1250  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
1251  *         cdef int x
1252  *         if self.is_modified:
1253  */
1254
1255 static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_self); /*proto*/
1256 static void __pyx_pf_10TabProxies_10TupleProxy___dealloc__(PyObject *__pyx_v_self) {
1257   int __pyx_v_x;
1258   int __pyx_t_1;
1259   int __pyx_t_2;
1260   int __pyx_t_3;
1261   __Pyx_RefNannySetupContext("__dealloc__");
1262
1263   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":42
1264  *     def __dealloc__(self):
1265  *         cdef int x
1266  *         if self.is_modified:             # <<<<<<<<<<<<<<
1267  *             for x from 0 <= x < self.nfields:
1268  *                 if isNew( self.fields[x], self.data, self.nbytes ):
1269  */
1270   if (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified) {
1271
1272     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":43
1273  *         cdef int x
1274  *         if self.is_modified:
1275  *             for x from 0 <= x < self.nfields:             # <<<<<<<<<<<<<<
1276  *                 if isNew( self.fields[x], self.data, self.nbytes ):
1277  *                     free( self.fields[x] )
1278  */
1279     __pyx_t_1 = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
1280     for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_1; __pyx_v_x++) {
1281
1282       /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":44
1283  *         if self.is_modified:
1284  *             for x from 0 <= x < self.nfields:
1285  *                 if isNew( self.fields[x], self.data, self.nbytes ):             # <<<<<<<<<<<<<<
1286  *                     free( self.fields[x] )
1287  *                     self.fields[x] = NULL
1288  */
1289       __pyx_t_2 = __pyx_f_10TabProxies_isNew((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]), ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes);
1290       if (__pyx_t_2) {
1291
1292         /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":45
1293  *             for x from 0 <= x < self.nfields:
1294  *                 if isNew( self.fields[x], self.data, self.nbytes ):
1295  *                     free( self.fields[x] )             # <<<<<<<<<<<<<<
1296  *                     self.fields[x] = NULL
1297  * 
1298  */
1299         free((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]));
1300
1301         /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":46
1302  *                 if isNew( self.fields[x], self.data, self.nbytes ):
1303  *                     free( self.fields[x] )
1304  *                     self.fields[x] = NULL             # <<<<<<<<<<<<<<
1305  * 
1306  *         if self.data != NULL: free(self.data)
1307  */
1308         (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]) = NULL;
1309         goto __pyx_L8;
1310       }
1311       __pyx_L8:;
1312     }
1313     goto __pyx_L5;
1314   }
1315   __pyx_L5:;
1316
1317   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":48
1318  *                     self.fields[x] = NULL
1319  * 
1320  *         if self.data != NULL: free(self.data)             # <<<<<<<<<<<<<<
1321  *         if self.fields != NULL: free( self.fields )
1322  * 
1323  */
1324   __pyx_t_3 = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data != NULL);
1325   if (__pyx_t_3) {
1326     free(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data);
1327     goto __pyx_L9;
1328   }
1329   __pyx_L9:;
1330
1331   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":49
1332  * 
1333  *         if self.data != NULL: free(self.data)
1334  *         if self.fields != NULL: free( self.fields )             # <<<<<<<<<<<<<<
1335  * 
1336  *     cdef take( self, char * buffer, size_t nbytes ):
1337  */
1338   __pyx_t_3 = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields != NULL);
1339   if (__pyx_t_3) {
1340     free(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields);
1341     goto __pyx_L10;
1342   }
1343   __pyx_L10:;
1344
1345   __Pyx_RefNannyFinishContext();
1346 }
1347
1348 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":51
1349  *         if self.fields != NULL: free( self.fields )
1350  * 
1351  *     cdef take( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
1352  *         '''start presenting buffer.
1353  * 
1354  */
1355
1356 static  PyObject *__pyx_f_10TabProxies_10TupleProxy_take(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1357   PyObject *__pyx_r = NULL;
1358   PyObject *__pyx_t_1 = NULL;
1359   __Pyx_RefNannySetupContext("take");
1360
1361   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":56
1362  *         Take ownership of the pointer.
1363  *         '''
1364  *         self.data = buffer             # <<<<<<<<<<<<<<
1365  *         self.nbytes = nbytes
1366  *         self.update( buffer, nbytes )
1367  */
1368   __pyx_v_self->data = __pyx_v_buffer;
1369
1370   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":57
1371  *         '''
1372  *         self.data = buffer
1373  *         self.nbytes = nbytes             # <<<<<<<<<<<<<<
1374  *         self.update( buffer, nbytes )
1375  * 
1376  */
1377   __pyx_v_self->nbytes = __pyx_v_nbytes;
1378
1379   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":58
1380  *         self.data = buffer
1381  *         self.nbytes = nbytes
1382  *         self.update( buffer, nbytes )             # <<<<<<<<<<<<<<
1383  * 
1384  *     cdef present( self, char * buffer, size_t nbytes ):
1385  */
1386   __pyx_t_1 = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1387   __Pyx_GOTREF(__pyx_t_1);
1388   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1389
1390   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1391   goto __pyx_L0;
1392   __pyx_L1_error:;
1393   __Pyx_XDECREF(__pyx_t_1);
1394   __Pyx_AddTraceback("TabProxies.TupleProxy.take");
1395   __pyx_r = 0;
1396   __pyx_L0:;
1397   __Pyx_XGIVEREF(__pyx_r);
1398   __Pyx_RefNannyFinishContext();
1399   return __pyx_r;
1400 }
1401
1402 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":60
1403  *         self.update( buffer, nbytes )
1404  * 
1405  *     cdef present( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
1406  *         '''start presenting buffer.
1407  * 
1408  */
1409
1410 static  PyObject *__pyx_f_10TabProxies_10TupleProxy_present(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1411   PyObject *__pyx_r = NULL;
1412   PyObject *__pyx_t_1 = NULL;
1413   __Pyx_RefNannySetupContext("present");
1414
1415   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":65
1416  *         Do not take ownership of the pointer.
1417  *         '''
1418  *         self.update( buffer, nbytes )             # <<<<<<<<<<<<<<
1419  * 
1420  *     cdef copy( self, char * buffer, size_t nbytes ):
1421  */
1422   __pyx_t_1 = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1423   __Pyx_GOTREF(__pyx_t_1);
1424   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1425
1426   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1427   goto __pyx_L0;
1428   __pyx_L1_error:;
1429   __Pyx_XDECREF(__pyx_t_1);
1430   __Pyx_AddTraceback("TabProxies.TupleProxy.present");
1431   __pyx_r = 0;
1432   __pyx_L0:;
1433   __Pyx_XGIVEREF(__pyx_r);
1434   __Pyx_RefNannyFinishContext();
1435   return __pyx_r;
1436 }
1437
1438 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":67
1439  *         self.update( buffer, nbytes )
1440  * 
1441  *     cdef copy( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
1442  *         '''start presenting buffer.
1443  * 
1444  */
1445
1446 static  PyObject *__pyx_f_10TabProxies_10TupleProxy_copy(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1447   int __pyx_v_s;
1448   PyObject *__pyx_r = NULL;
1449   int __pyx_t_1;
1450   PyObject *__pyx_t_2 = NULL;
1451   PyObject *__pyx_t_3 = NULL;
1452   __Pyx_RefNannySetupContext("copy");
1453
1454   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":74
1455  *         cdef int s
1456  *         # +1 for '\0'
1457  *         s = sizeof(char) *  (nbytes + 1)             # <<<<<<<<<<<<<<
1458  *         self.data = <char*>malloc( s )
1459  *         if self.data == NULL:
1460  */
1461   __pyx_v_s = ((sizeof(char)) * (__pyx_v_nbytes + 1));
1462
1463   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":75
1464  *         # +1 for '\0'
1465  *         s = sizeof(char) *  (nbytes + 1)
1466  *         self.data = <char*>malloc( s )             # <<<<<<<<<<<<<<
1467  *         if self.data == NULL:
1468  *             raise ValueError("out of memory" )
1469  */
1470   __pyx_v_self->data = ((char *)malloc(__pyx_v_s));
1471
1472   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":76
1473  *         s = sizeof(char) *  (nbytes + 1)
1474  *         self.data = <char*>malloc( s )
1475  *         if self.data == NULL:             # <<<<<<<<<<<<<<
1476  *             raise ValueError("out of memory" )
1477  *         self.nbytes = nbytes
1478  */
1479   __pyx_t_1 = (__pyx_v_self->data == NULL);
1480   if (__pyx_t_1) {
1481
1482     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":77
1483  *         self.data = <char*>malloc( s )
1484  *         if self.data == NULL:
1485  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
1486  *         self.nbytes = nbytes
1487  *         memcpy( <char*>self.data, buffer, s )
1488  */
1489     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1490     __Pyx_GOTREF(__pyx_t_2);
1491     __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
1492     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_3));
1493     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
1494     __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1495     __Pyx_GOTREF(__pyx_t_3);
1496     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1497     __Pyx_Raise(__pyx_t_3, 0, 0);
1498     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1499     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1500     goto __pyx_L3;
1501   }
1502   __pyx_L3:;
1503
1504   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":78
1505  *         if self.data == NULL:
1506  *             raise ValueError("out of memory" )
1507  *         self.nbytes = nbytes             # <<<<<<<<<<<<<<
1508  *         memcpy( <char*>self.data, buffer, s )
1509  *         self.update( self.data, nbytes )
1510  */
1511   __pyx_v_self->nbytes = __pyx_v_nbytes;
1512
1513   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":79
1514  *             raise ValueError("out of memory" )
1515  *         self.nbytes = nbytes
1516  *         memcpy( <char*>self.data, buffer, s )             # <<<<<<<<<<<<<<
1517  *         self.update( self.data, nbytes )
1518  * 
1519  */
1520   memcpy(__pyx_v_self->data, __pyx_v_buffer, __pyx_v_s);
1521
1522   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":80
1523  *         self.nbytes = nbytes
1524  *         memcpy( <char*>self.data, buffer, s )
1525  *         self.update( self.data, nbytes )             # <<<<<<<<<<<<<<
1526  * 
1527  *     cdef int getMaxFields( self, size_t nbytes ):
1528  */
1529   __pyx_t_3 = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_self->data, __pyx_v_nbytes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1530   __Pyx_GOTREF(__pyx_t_3);
1531   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1532
1533   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1534   goto __pyx_L0;
1535   __pyx_L1_error:;
1536   __Pyx_XDECREF(__pyx_t_2);
1537   __Pyx_XDECREF(__pyx_t_3);
1538   __Pyx_AddTraceback("TabProxies.TupleProxy.copy");
1539   __pyx_r = 0;
1540   __pyx_L0:;
1541   __Pyx_XGIVEREF(__pyx_r);
1542   __Pyx_RefNannyFinishContext();
1543   return __pyx_r;
1544 }
1545
1546 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":82
1547  *         self.update( self.data, nbytes )
1548  * 
1549  *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
1550  *         '''initialize fields.'''
1551  *         return nbytes / 2
1552  */
1553
1554 static  int __pyx_f_10TabProxies_10TupleProxy_getMaxFields(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, size_t __pyx_v_nbytes) {
1555   int __pyx_r;
1556   __Pyx_RefNannySetupContext("getMaxFields");
1557
1558   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":84
1559  *     cdef int getMaxFields( self, size_t nbytes ):
1560  *         '''initialize fields.'''
1561  *         return nbytes / 2             # <<<<<<<<<<<<<<
1562  * 
1563  *     cdef update( self, char * buffer, size_t nbytes ):
1564  */
1565   __pyx_r = (__pyx_v_nbytes / 2);
1566   goto __pyx_L0;
1567
1568   __pyx_r = 0;
1569   __pyx_L0:;
1570   __Pyx_RefNannyFinishContext();
1571   return __pyx_r;
1572 }
1573
1574 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":86
1575  *         return nbytes / 2
1576  * 
1577  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
1578  *         '''update internal data.
1579  * 
1580  */
1581
1582 static  PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1583   char *__pyx_v_pos;
1584   char *__pyx_v_old_pos;
1585   int __pyx_v_field;
1586   int __pyx_v_max_fields;
1587   PyObject *__pyx_r = NULL;
1588   int __pyx_t_1;
1589   PyObject *__pyx_t_2 = NULL;
1590   PyObject *__pyx_t_3 = NULL;
1591   int __pyx_t_4;
1592   int __pyx_t_5;
1593   __Pyx_RefNannySetupContext("update");
1594
1595   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":101
1596  *         cdef int max_fields, x
1597  * 
1598  *         if buffer[nbytes] != 0:             # <<<<<<<<<<<<<<
1599  *             raise ValueError( "incomplete line at %s" % buffer )
1600  * 
1601  */
1602   __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0);
1603   if (__pyx_t_1) {
1604
1605     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":102
1606  * 
1607  *         if buffer[nbytes] != 0:
1608  *             raise ValueError( "incomplete line at %s" % buffer )             # <<<<<<<<<<<<<<
1609  * 
1610  *         #################################
1611  */
1612     __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1613     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1614     __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1615     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
1616     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1617     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1618     __Pyx_GOTREF(__pyx_t_2);
1619     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
1620     __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
1621     __pyx_t_3 = 0;
1622     __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1623     __Pyx_GOTREF(__pyx_t_3);
1624     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1625     __Pyx_Raise(__pyx_t_3, 0, 0);
1626     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1627     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1628     goto __pyx_L3;
1629   }
1630   __pyx_L3:;
1631
1632   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":106
1633  *         #################################
1634  *         # clear data
1635  *         if self.fields != NULL: free(self.fields)             # <<<<<<<<<<<<<<
1636  * 
1637  *         for field from 0 <= field < self.nfields:
1638  */
1639   __pyx_t_1 = (__pyx_v_self->fields != NULL);
1640   if (__pyx_t_1) {
1641     free(__pyx_v_self->fields);
1642     goto __pyx_L4;
1643   }
1644   __pyx_L4:;
1645
1646   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":108
1647  *         if self.fields != NULL: free(self.fields)
1648  * 
1649  *         for field from 0 <= field < self.nfields:             # <<<<<<<<<<<<<<
1650  *             if isNew( self.fields[field], self.data, self.nbytes ):
1651  *                 free( self.fields[field] )
1652  */
1653   __pyx_t_4 = __pyx_v_self->nfields;
1654   for (__pyx_v_field = 0; __pyx_v_field < __pyx_t_4; __pyx_v_field++) {
1655
1656     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":109
1657  * 
1658  *         for field from 0 <= field < self.nfields:
1659  *             if isNew( self.fields[field], self.data, self.nbytes ):             # <<<<<<<<<<<<<<
1660  *                 free( self.fields[field] )
1661  * 
1662  */
1663     __pyx_t_5 = __pyx_f_10TabProxies_isNew((__pyx_v_self->fields[__pyx_v_field]), __pyx_v_self->data, __pyx_v_self->nbytes);
1664     if (__pyx_t_5) {
1665
1666       /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":110
1667  *         for field from 0 <= field < self.nfields:
1668  *             if isNew( self.fields[field], self.data, self.nbytes ):
1669  *                 free( self.fields[field] )             # <<<<<<<<<<<<<<
1670  * 
1671  *         self.is_modified = self.nfields = 0
1672  */
1673       free((__pyx_v_self->fields[__pyx_v_field]));
1674       goto __pyx_L7;
1675     }
1676     __pyx_L7:;
1677   }
1678
1679   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":112
1680  *                 free( self.fields[field] )
1681  * 
1682  *         self.is_modified = self.nfields = 0             # <<<<<<<<<<<<<<
1683  * 
1684  *         #################################
1685  */
1686   __pyx_v_self->is_modified = 0;
1687   __pyx_v_self->nfields = 0;
1688
1689   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":116
1690  *         #################################
1691  *         # allocate new
1692  *         max_fields = self.getMaxFields( nbytes )             # <<<<<<<<<<<<<<
1693  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )
1694  *         if self.fields == NULL:
1695  */
1696   __pyx_v_max_fields = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->getMaxFields(__pyx_v_self, __pyx_v_nbytes);
1697
1698   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":117
1699  *         # allocate new
1700  *         max_fields = self.getMaxFields( nbytes )
1701  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )             # <<<<<<<<<<<<<<
1702  *         if self.fields == NULL:
1703  *             raise ValueError("out of memory" )
1704  */
1705   __pyx_v_self->fields = ((char **)calloc(__pyx_v_max_fields, (sizeof(char *))));
1706
1707   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":118
1708  *         max_fields = self.getMaxFields( nbytes )
1709  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )
1710  *         if self.fields == NULL:             # <<<<<<<<<<<<<<
1711  *             raise ValueError("out of memory" )
1712  * 
1713  */
1714   __pyx_t_1 = (__pyx_v_self->fields == NULL);
1715   if (__pyx_t_1) {
1716
1717     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":119
1718  *         self.fields = <char **>calloc( max_fields, sizeof(char *) )
1719  *         if self.fields == NULL:
1720  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
1721  * 
1722  *         #################################
1723  */
1724     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1725     __Pyx_GOTREF(__pyx_t_3);
1726     __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
1727     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
1728     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
1729     __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1730     __Pyx_GOTREF(__pyx_t_2);
1731     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1732     __Pyx_Raise(__pyx_t_2, 0, 0);
1733     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1734     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1735     goto __pyx_L8;
1736   }
1737   __pyx_L8:;
1738
1739   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":123
1740  *         #################################
1741  *         # start filling
1742  *         field = 0             # <<<<<<<<<<<<<<
1743  *         self.fields[field] = pos = buffer
1744  *         field += 1
1745  */
1746   __pyx_v_field = 0;
1747
1748   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":124
1749  *         # start filling
1750  *         field = 0
1751  *         self.fields[field] = pos = buffer             # <<<<<<<<<<<<<<
1752  *         field += 1
1753  *         old_pos = pos
1754  */
1755   (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_buffer;
1756   __pyx_v_pos = __pyx_v_buffer;
1757
1758   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":125
1759  *         field = 0
1760  *         self.fields[field] = pos = buffer
1761  *         field += 1             # <<<<<<<<<<<<<<
1762  *         old_pos = pos
1763  * 
1764  */
1765   __pyx_v_field += 1;
1766
1767   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":126
1768  *         self.fields[field] = pos = buffer
1769  *         field += 1
1770  *         old_pos = pos             # <<<<<<<<<<<<<<
1771  * 
1772  *         while 1:
1773  */
1774   __pyx_v_old_pos = __pyx_v_pos;
1775
1776   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":128
1777  *         old_pos = pos
1778  * 
1779  *         while 1:             # <<<<<<<<<<<<<<
1780  * 
1781  *             pos = <char*>memchr( pos, '\t', nbytes )
1782  */
1783   while (1) {
1784     if (!1) break;
1785
1786     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":130
1787  *         while 1:
1788  * 
1789  *             pos = <char*>memchr( pos, '\t', nbytes )             # <<<<<<<<<<<<<<
1790  *             if pos == NULL: break
1791  *             pos[0] = '\0'
1792  */
1793     __pyx_v_pos = ((char *)memchr(__pyx_v_pos, '\t', __pyx_v_nbytes));
1794
1795     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":131
1796  * 
1797  *             pos = <char*>memchr( pos, '\t', nbytes )
1798  *             if pos == NULL: break             # <<<<<<<<<<<<<<
1799  *             pos[0] = '\0'
1800  *             pos += 1
1801  */
1802     __pyx_t_1 = (__pyx_v_pos == NULL);
1803     if (__pyx_t_1) {
1804       goto __pyx_L10_break;
1805       goto __pyx_L11;
1806     }
1807     __pyx_L11:;
1808
1809     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":132
1810  *             pos = <char*>memchr( pos, '\t', nbytes )
1811  *             if pos == NULL: break
1812  *             pos[0] = '\0'             # <<<<<<<<<<<<<<
1813  *             pos += 1
1814  *             self.fields[field] = pos
1815  */
1816     (__pyx_v_pos[0]) = '\x00';
1817
1818     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":133
1819  *             if pos == NULL: break
1820  *             pos[0] = '\0'
1821  *             pos += 1             # <<<<<<<<<<<<<<
1822  *             self.fields[field] = pos
1823  *             field += 1
1824  */
1825     __pyx_v_pos += 1;
1826
1827     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":134
1828  *             pos[0] = '\0'
1829  *             pos += 1
1830  *             self.fields[field] = pos             # <<<<<<<<<<<<<<
1831  *             field += 1
1832  *             if field >= max_fields:
1833  */
1834     (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_pos;
1835
1836     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":135
1837  *             pos += 1
1838  *             self.fields[field] = pos
1839  *             field += 1             # <<<<<<<<<<<<<<
1840  *             if field >= max_fields:
1841  *                 raise ValueError("row too large - more than %i fields" % max_fields )
1842  */
1843     __pyx_v_field += 1;
1844
1845     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":136
1846  *             self.fields[field] = pos
1847  *             field += 1
1848  *             if field >= max_fields:             # <<<<<<<<<<<<<<
1849  *                 raise ValueError("row too large - more than %i fields" % max_fields )
1850  *             nbytes -= pos - old_pos
1851  */
1852     __pyx_t_1 = (__pyx_v_field >= __pyx_v_max_fields);
1853     if (__pyx_t_1) {
1854
1855       /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":137
1856  *             field += 1
1857  *             if field >= max_fields:
1858  *                 raise ValueError("row too large - more than %i fields" % max_fields )             # <<<<<<<<<<<<<<
1859  *             nbytes -= pos - old_pos
1860  *             if nbytes < 0: break
1861  */
1862       __pyx_t_2 = PyInt_FromLong(__pyx_v_max_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1863       __Pyx_GOTREF(__pyx_t_2);
1864       __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1865       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
1866       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1867       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1868       __Pyx_GOTREF(__pyx_t_2);
1869       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
1870       __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
1871       __pyx_t_3 = 0;
1872       __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1873       __Pyx_GOTREF(__pyx_t_3);
1874       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1875       __Pyx_Raise(__pyx_t_3, 0, 0);
1876       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1877       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1878       goto __pyx_L12;
1879     }
1880     __pyx_L12:;
1881
1882     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":138
1883  *             if field >= max_fields:
1884  *                 raise ValueError("row too large - more than %i fields" % max_fields )
1885  *             nbytes -= pos - old_pos             # <<<<<<<<<<<<<<
1886  *             if nbytes < 0: break
1887  *             old_pos = pos
1888  */
1889     __pyx_v_nbytes -= (__pyx_v_pos - __pyx_v_old_pos);
1890
1891     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":139
1892  *                 raise ValueError("row too large - more than %i fields" % max_fields )
1893  *             nbytes -= pos - old_pos
1894  *             if nbytes < 0: break             # <<<<<<<<<<<<<<
1895  *             old_pos = pos
1896  * 
1897  */
1898     __pyx_t_1 = (__pyx_v_nbytes < 0);
1899     if (__pyx_t_1) {
1900       goto __pyx_L10_break;
1901       goto __pyx_L13;
1902     }
1903     __pyx_L13:;
1904
1905     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":140
1906  *             nbytes -= pos - old_pos
1907  *             if nbytes < 0: break
1908  *             old_pos = pos             # <<<<<<<<<<<<<<
1909  * 
1910  *         self.nfields = field
1911  */
1912     __pyx_v_old_pos = __pyx_v_pos;
1913   }
1914   __pyx_L10_break:;
1915
1916   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":142
1917  *             old_pos = pos
1918  * 
1919  *         self.nfields = field             # <<<<<<<<<<<<<<
1920  * 
1921  *     def __getitem__( self, key ):
1922  */
1923   __pyx_v_self->nfields = __pyx_v_field;
1924
1925   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1926   goto __pyx_L0;
1927   __pyx_L1_error:;
1928   __Pyx_XDECREF(__pyx_t_2);
1929   __Pyx_XDECREF(__pyx_t_3);
1930   __Pyx_AddTraceback("TabProxies.TupleProxy.update");
1931   __pyx_r = 0;
1932   __pyx_L0:;
1933   __Pyx_XGIVEREF(__pyx_r);
1934   __Pyx_RefNannyFinishContext();
1935   return __pyx_r;
1936 }
1937
1938 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":144
1939  *         self.nfields = field
1940  * 
1941  *     def __getitem__( self, key ):             # <<<<<<<<<<<<<<
1942  * 
1943  *         cdef int i = key
1944  */
1945
1946 static PyObject *__pyx_pf_10TabProxies_10TupleProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
1947 static PyObject *__pyx_pf_10TabProxies_10TupleProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
1948   int __pyx_v_i;
1949   PyObject *__pyx_r = NULL;
1950   int __pyx_t_1;
1951   int __pyx_t_2;
1952   PyObject *__pyx_t_3 = NULL;
1953   PyObject *__pyx_t_4 = NULL;
1954   __Pyx_RefNannySetupContext("__getitem__");
1955
1956   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":146
1957  *     def __getitem__( self, key ):
1958  * 
1959  *         cdef int i = key             # <<<<<<<<<<<<<<
1960  *         if i < 0: i += self.nfields
1961  *         if i < 0: raise IndexError( "list index out of range" )
1962  */
1963   __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_key); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1964   __pyx_v_i = __pyx_t_1;
1965
1966   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":147
1967  * 
1968  *         cdef int i = key
1969  *         if i < 0: i += self.nfields             # <<<<<<<<<<<<<<
1970  *         if i < 0: raise IndexError( "list index out of range" )
1971  *         i += self.offset
1972  */
1973   __pyx_t_2 = (__pyx_v_i < 0);
1974   if (__pyx_t_2) {
1975     __pyx_v_i += ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
1976     goto __pyx_L5;
1977   }
1978   __pyx_L5:;
1979
1980   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":148
1981  *         cdef int i = key
1982  *         if i < 0: i += self.nfields
1983  *         if i < 0: raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
1984  *         i += self.offset
1985  *         if i >= self.nfields:
1986  */
1987   __pyx_t_2 = (__pyx_v_i < 0);
1988   if (__pyx_t_2) {
1989     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1990     __Pyx_GOTREF(__pyx_t_3);
1991     __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
1992     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_6));
1993     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
1994     __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1995     __Pyx_GOTREF(__pyx_t_4);
1996     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1997     __Pyx_Raise(__pyx_t_4, 0, 0);
1998     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1999     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2000     goto __pyx_L6;
2001   }
2002   __pyx_L6:;
2003
2004   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":149
2005  *         if i < 0: i += self.nfields
2006  *         if i < 0: raise IndexError( "list index out of range" )
2007  *         i += self.offset             # <<<<<<<<<<<<<<
2008  *         if i >= self.nfields:
2009  *             raise IndexError( "list index out of range" )
2010  */
2011   __pyx_v_i += ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset;
2012
2013   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":150
2014  *         if i < 0: raise IndexError( "list index out of range" )
2015  *         i += self.offset
2016  *         if i >= self.nfields:             # <<<<<<<<<<<<<<
2017  *             raise IndexError( "list index out of range" )
2018  *         return self.fields[i]
2019  */
2020   __pyx_t_2 = (__pyx_v_i >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
2021   if (__pyx_t_2) {
2022
2023     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":151
2024  *         i += self.offset
2025  *         if i >= self.nfields:
2026  *             raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
2027  *         return self.fields[i]
2028  * 
2029  */
2030     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2031     __Pyx_GOTREF(__pyx_t_4);
2032     __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
2033     PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_6));
2034     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
2035     __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2036     __Pyx_GOTREF(__pyx_t_3);
2037     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2038     __Pyx_Raise(__pyx_t_3, 0, 0);
2039     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2040     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2041     goto __pyx_L7;
2042   }
2043   __pyx_L7:;
2044
2045   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":152
2046  *         if i >= self.nfields:
2047  *             raise IndexError( "list index out of range" )
2048  *         return self.fields[i]             # <<<<<<<<<<<<<<
2049  * 
2050  *     def _setindex( self, index, value ):
2051  */
2052   __Pyx_XDECREF(__pyx_r);
2053   __pyx_t_3 = PyBytes_FromString((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2054   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
2055   __pyx_r = ((PyObject *)__pyx_t_3);
2056   __pyx_t_3 = 0;
2057   goto __pyx_L0;
2058
2059   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2060   goto __pyx_L0;
2061   __pyx_L1_error:;
2062   __Pyx_XDECREF(__pyx_t_3);
2063   __Pyx_XDECREF(__pyx_t_4);
2064   __Pyx_AddTraceback("TabProxies.TupleProxy.__getitem__");
2065   __pyx_r = NULL;
2066   __pyx_L0:;
2067   __Pyx_XGIVEREF(__pyx_r);
2068   __Pyx_RefNannyFinishContext();
2069   return __pyx_r;
2070 }
2071
2072 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":154
2073  *         return self.fields[i]
2074  * 
2075  *     def _setindex( self, index, value ):             # <<<<<<<<<<<<<<
2076  *         '''set item at idx index.'''
2077  *         cdef int idx = index
2078  */
2079
2080 static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2081 static char __pyx_doc_10TabProxies_10TupleProxy__setindex[] = "set item at idx index.";
2082 static PyObject *__pyx_pf_10TabProxies_10TupleProxy__setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2083   PyObject *__pyx_v_index = 0;
2084   PyObject *__pyx_v_value = 0;
2085   int __pyx_v_idx;
2086   char *__pyx_v_tmp;
2087   PyObject *__pyx_r = NULL;
2088   int __pyx_t_1;
2089   int __pyx_t_2;
2090   PyObject *__pyx_t_3 = NULL;
2091   PyObject *__pyx_t_4 = NULL;
2092   char *__pyx_t_5;
2093   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__value,0};
2094   __Pyx_RefNannySetupContext("_setindex");
2095   if (unlikely(__pyx_kwds)) {
2096     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
2097     PyObject* values[2] = {0,0};
2098     switch (PyTuple_GET_SIZE(__pyx_args)) {
2099       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2100       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2101       case  0: break;
2102       default: goto __pyx_L5_argtuple_error;
2103     }
2104     switch (PyTuple_GET_SIZE(__pyx_args)) {
2105       case  0:
2106       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
2107       if (likely(values[0])) kw_args--;
2108       else goto __pyx_L5_argtuple_error;
2109       case  1:
2110       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
2111       if (likely(values[1])) kw_args--;
2112       else {
2113         __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2114       }
2115     }
2116     if (unlikely(kw_args > 0)) {
2117       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_setindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2118     }
2119     __pyx_v_index = values[0];
2120     __pyx_v_value = values[1];
2121   } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
2122     goto __pyx_L5_argtuple_error;
2123   } else {
2124     __pyx_v_index = PyTuple_GET_ITEM(__pyx_args, 0);
2125     __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
2126   }
2127   goto __pyx_L4_argument_unpacking_done;
2128   __pyx_L5_argtuple_error:;
2129   __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2130   __pyx_L3_error:;
2131   __Pyx_AddTraceback("TabProxies.TupleProxy._setindex");
2132   __Pyx_RefNannyFinishContext();
2133   return NULL;
2134   __pyx_L4_argument_unpacking_done:;
2135
2136   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":156
2137  *     def _setindex( self, index, value ):
2138  *         '''set item at idx index.'''
2139  *         cdef int idx = index             # <<<<<<<<<<<<<<
2140  *         if idx < 0: raise IndexError( "list index out of range" )
2141  *         if idx >= self.nfields:
2142  */
2143   __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2144   __pyx_v_idx = __pyx_t_1;
2145
2146   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":157
2147  *         '''set item at idx index.'''
2148  *         cdef int idx = index
2149  *         if idx < 0: raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
2150  *         if idx >= self.nfields:
2151  *             raise IndexError( "list index out of range" )
2152  */
2153   __pyx_t_2 = (__pyx_v_idx < 0);
2154   if (__pyx_t_2) {
2155     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2156     __Pyx_GOTREF(__pyx_t_3);
2157     __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
2158     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_6));
2159     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
2160     __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2161     __Pyx_GOTREF(__pyx_t_4);
2162     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2163     __Pyx_Raise(__pyx_t_4, 0, 0);
2164     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2165     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2166     goto __pyx_L6;
2167   }
2168   __pyx_L6:;
2169
2170   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":158
2171  *         cdef int idx = index
2172  *         if idx < 0: raise IndexError( "list index out of range" )
2173  *         if idx >= self.nfields:             # <<<<<<<<<<<<<<
2174  *             raise IndexError( "list index out of range" )
2175  * 
2176  */
2177   __pyx_t_2 = (__pyx_v_idx >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
2178   if (__pyx_t_2) {
2179
2180     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":159
2181  *         if idx < 0: raise IndexError( "list index out of range" )
2182  *         if idx >= self.nfields:
2183  *             raise IndexError( "list index out of range" )             # <<<<<<<<<<<<<<
2184  * 
2185  *         if isNew( self.fields[idx], self.data, self.nbytes ):
2186  */
2187     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2188     __Pyx_GOTREF(__pyx_t_4);
2189     __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
2190     PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_6));
2191     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
2192     __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2193     __Pyx_GOTREF(__pyx_t_3);
2194     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2195     __Pyx_Raise(__pyx_t_3, 0, 0);
2196     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2197     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2198     goto __pyx_L7;
2199   }
2200   __pyx_L7:;
2201
2202   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":161
2203  *             raise IndexError( "list index out of range" )
2204  * 
2205  *         if isNew( self.fields[idx], self.data, self.nbytes ):             # <<<<<<<<<<<<<<
2206  *             free( self.fields[idx] )
2207  * 
2208  */
2209   __pyx_t_1 = __pyx_f_10TabProxies_isNew((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]), ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes);
2210   if (__pyx_t_1) {
2211
2212     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":162
2213  * 
2214  *         if isNew( self.fields[idx], self.data, self.nbytes ):
2215  *             free( self.fields[idx] )             # <<<<<<<<<<<<<<
2216  * 
2217  *         self.is_modified = 1
2218  */
2219     free((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]));
2220     goto __pyx_L8;
2221   }
2222   __pyx_L8:;
2223
2224   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":164
2225  *             free( self.fields[idx] )
2226  * 
2227  *         self.is_modified = 1             # <<<<<<<<<<<<<<
2228  * 
2229  *         if value == None:
2230  */
2231   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified = 1;
2232
2233   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":166
2234  *         self.is_modified = 1
2235  * 
2236  *         if value == None:             # <<<<<<<<<<<<<<
2237  *             self.fields[idx] = NULL
2238  *             return
2239  */
2240   __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, Py_None, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2241   __Pyx_GOTREF(__pyx_t_3);
2242   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2243   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2244   if (__pyx_t_2) {
2245
2246     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":167
2247  * 
2248  *         if value == None:
2249  *             self.fields[idx] = NULL             # <<<<<<<<<<<<<<
2250  *             return
2251  * 
2252  */
2253     (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]) = NULL;
2254
2255     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":168
2256  *         if value == None:
2257  *             self.fields[idx] = NULL
2258  *             return             # <<<<<<<<<<<<<<
2259  * 
2260  *         # conversion with error checking
2261  */
2262     __Pyx_XDECREF(__pyx_r);
2263     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2264     goto __pyx_L0;
2265     goto __pyx_L9;
2266   }
2267   __pyx_L9:;
2268
2269   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":171
2270  * 
2271  *         # conversion with error checking
2272  *         cdef char * tmp = PyString_AsString( value )             # <<<<<<<<<<<<<<
2273  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
2274  *         if self.fields[idx] == NULL:
2275  */
2276   __pyx_t_5 = PyString_AsString(__pyx_v_value); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2277   __pyx_v_tmp = __pyx_t_5;
2278
2279   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":172
2280  *         # conversion with error checking
2281  *         cdef char * tmp = PyString_AsString( value )
2282  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )             # <<<<<<<<<<<<<<
2283  *         if self.fields[idx] == NULL:
2284  *             raise ValueError("out of memory" )
2285  */
2286   (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]) = ((char *)malloc(((strlen(__pyx_v_tmp) + 1) * (sizeof(char)))));
2287
2288   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":173
2289  *         cdef char * tmp = PyString_AsString( value )
2290  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
2291  *         if self.fields[idx] == NULL:             # <<<<<<<<<<<<<<
2292  *             raise ValueError("out of memory" )
2293  *         strcpy( self.fields[idx], tmp )
2294  */
2295   __pyx_t_2 = ((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]) == NULL);
2296   if (__pyx_t_2) {
2297
2298     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":174
2299  *         self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
2300  *         if self.fields[idx] == NULL:
2301  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
2302  *         strcpy( self.fields[idx], tmp )
2303  * 
2304  */
2305     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2306     __Pyx_GOTREF(__pyx_t_3);
2307     __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
2308     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
2309     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
2310     __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2311     __Pyx_GOTREF(__pyx_t_4);
2312     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2313     __Pyx_Raise(__pyx_t_4, 0, 0);
2314     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2315     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2316     goto __pyx_L10;
2317   }
2318   __pyx_L10:;
2319
2320   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":175
2321  *         if self.fields[idx] == NULL:
2322  *             raise ValueError("out of memory" )
2323  *         strcpy( self.fields[idx], tmp )             # <<<<<<<<<<<<<<
2324  * 
2325  *     def __setitem__(self, index, value ):
2326  */
2327   strcpy((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]), __pyx_v_tmp);
2328
2329   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2330   goto __pyx_L0;
2331   __pyx_L1_error:;
2332   __Pyx_XDECREF(__pyx_t_3);
2333   __Pyx_XDECREF(__pyx_t_4);
2334   __Pyx_AddTraceback("TabProxies.TupleProxy._setindex");
2335   __pyx_r = NULL;
2336   __pyx_L0:;
2337   __Pyx_XGIVEREF(__pyx_r);
2338   __Pyx_RefNannyFinishContext();
2339   return __pyx_r;
2340 }
2341
2342 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":177
2343  *         strcpy( self.fields[idx], tmp )
2344  * 
2345  *     def __setitem__(self, index, value ):             # <<<<<<<<<<<<<<
2346  *         '''set item at *index* to *value*'''
2347  *         cdef int i = index
2348  */
2349
2350 static int __pyx_pf_10TabProxies_10TupleProxy___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
2351 static char __pyx_doc_10TabProxies_10TupleProxy___setitem__[] = "set item at *index* to *value*";
2352 struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy___setitem__;
2353 static int __pyx_pf_10TabProxies_10TupleProxy___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
2354   int __pyx_v_i;
2355   int __pyx_r;
2356   int __pyx_t_1;
2357   int __pyx_t_2;
2358   PyObject *__pyx_t_3 = NULL;
2359   PyObject *__pyx_t_4 = NULL;
2360   PyObject *__pyx_t_5 = NULL;
2361   __Pyx_RefNannySetupContext("__setitem__");
2362
2363   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":179
2364  *     def __setitem__(self, index, value ):
2365  *         '''set item at *index* to *value*'''
2366  *         cdef int i = index             # <<<<<<<<<<<<<<
2367  *         if i < 0: i += self.nfields
2368  *         i += self.offset
2369  */
2370   __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2371   __pyx_v_i = __pyx_t_1;
2372
2373   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":180
2374  *         '''set item at *index* to *value*'''
2375  *         cdef int i = index
2376  *         if i < 0: i += self.nfields             # <<<<<<<<<<<<<<
2377  *         i += self.offset
2378  * 
2379  */
2380   __pyx_t_2 = (__pyx_v_i < 0);
2381   if (__pyx_t_2) {
2382     __pyx_v_i += ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
2383     goto __pyx_L5;
2384   }
2385   __pyx_L5:;
2386
2387   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":181
2388  *         cdef int i = index
2389  *         if i < 0: i += self.nfields
2390  *         i += self.offset             # <<<<<<<<<<<<<<
2391  * 
2392  *         self._setindex( i, value )
2393  */
2394   __pyx_v_i += ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset;
2395
2396   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":183
2397  *         i += self.offset
2398  * 
2399  *         self._setindex( i, value )             # <<<<<<<<<<<<<<
2400  * 
2401  *     def __len__(self):
2402  */
2403   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___setindex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2404   __Pyx_GOTREF(__pyx_t_3);
2405   __pyx_t_4 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2406   __Pyx_GOTREF(__pyx_t_4);
2407   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2408   __Pyx_GOTREF(__pyx_t_5);
2409   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
2410   __Pyx_GIVEREF(__pyx_t_4);
2411   __Pyx_INCREF(__pyx_v_value);
2412   PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
2413   __Pyx_GIVEREF(__pyx_v_value);
2414   __pyx_t_4 = 0;
2415   __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2416   __Pyx_GOTREF(__pyx_t_4);
2417   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2418   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2419   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2420
2421   __pyx_r = 0;
2422   goto __pyx_L0;
2423   __pyx_L1_error:;
2424   __Pyx_XDECREF(__pyx_t_3);
2425   __Pyx_XDECREF(__pyx_t_4);
2426   __Pyx_XDECREF(__pyx_t_5);
2427   __Pyx_AddTraceback("TabProxies.TupleProxy.__setitem__");
2428   __pyx_r = -1;
2429   __pyx_L0:;
2430   __Pyx_RefNannyFinishContext();
2431   return __pyx_r;
2432 }
2433
2434 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":185
2435  *         self._setindex( i, value )
2436  * 
2437  *     def __len__(self):             # <<<<<<<<<<<<<<
2438  *         return self.nfields
2439  * 
2440  */
2441
2442 static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy___len__(PyObject *__pyx_v_self); /*proto*/
2443 static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy___len__(PyObject *__pyx_v_self) {
2444   Py_ssize_t __pyx_r;
2445   __Pyx_RefNannySetupContext("__len__");
2446
2447   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":186
2448  * 
2449  *     def __len__(self):
2450  *         return self.nfields             # <<<<<<<<<<<<<<
2451  * 
2452  *     def __iter__(self):
2453  */
2454   __pyx_r = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
2455   goto __pyx_L0;
2456
2457   __pyx_r = 0;
2458   __pyx_L0:;
2459   __Pyx_RefNannyFinishContext();
2460   return __pyx_r;
2461 }
2462
2463 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":188
2464  *         return self.nfields
2465  * 
2466  *     def __iter__(self):             # <<<<<<<<<<<<<<
2467  *         self.index = 0
2468  *         return self
2469  */
2470
2471 static PyObject *__pyx_pf_10TabProxies_10TupleProxy___iter__(PyObject *__pyx_v_self); /*proto*/
2472 static PyObject *__pyx_pf_10TabProxies_10TupleProxy___iter__(PyObject *__pyx_v_self) {
2473   PyObject *__pyx_r = NULL;
2474   __Pyx_RefNannySetupContext("__iter__");
2475
2476   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":189
2477  * 
2478  *     def __iter__(self):
2479  *         self.index = 0             # <<<<<<<<<<<<<<
2480  *         return self
2481  * 
2482  */
2483   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index = 0;
2484
2485   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":190
2486  *     def __iter__(self):
2487  *         self.index = 0
2488  *         return self             # <<<<<<<<<<<<<<
2489  * 
2490  *     def __next__(self):
2491  */
2492   __Pyx_XDECREF(__pyx_r);
2493   __Pyx_INCREF(__pyx_v_self);
2494   __pyx_r = __pyx_v_self;
2495   goto __pyx_L0;
2496
2497   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2498   __pyx_L0:;
2499   __Pyx_XGIVEREF(__pyx_r);
2500   __Pyx_RefNannyFinishContext();
2501   return __pyx_r;
2502 }
2503
2504 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":192
2505  *         return self
2506  * 
2507  *     def __next__(self):             # <<<<<<<<<<<<<<
2508  *         """python version of next().
2509  *         """
2510  */
2511
2512 static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_self); /*proto*/
2513 static char __pyx_doc_10TabProxies_10TupleProxy___next__[] = "python version of next().\n        ";
2514 struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy___next__;
2515 static PyObject *__pyx_pf_10TabProxies_10TupleProxy___next__(PyObject *__pyx_v_self) {
2516   char *__pyx_v_retval;
2517   PyObject *__pyx_r = NULL;
2518   int __pyx_t_1;
2519   PyObject *__pyx_t_2 = NULL;
2520   __Pyx_RefNannySetupContext("__next__");
2521
2522   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":195
2523  *         """python version of next().
2524  *         """
2525  *         if self.index >= self.nfields:             # <<<<<<<<<<<<<<
2526  *             raise StopIteration
2527  *         cdef char * retval = self.fields[self.index]
2528  */
2529   __pyx_t_1 = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
2530   if (__pyx_t_1) {
2531
2532     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":196
2533  *         """
2534  *         if self.index >= self.nfields:
2535  *             raise StopIteration             # <<<<<<<<<<<<<<
2536  *         cdef char * retval = self.fields[self.index]
2537  *         self.index += 1
2538  */
2539     __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0);
2540     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2541     goto __pyx_L5;
2542   }
2543   __pyx_L5:;
2544
2545   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":197
2546  *         if self.index >= self.nfields:
2547  *             raise StopIteration
2548  *         cdef char * retval = self.fields[self.index]             # <<<<<<<<<<<<<<
2549  *         self.index += 1
2550  *         if retval == NULL: return None
2551  */
2552   __pyx_v_retval = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index]);
2553
2554   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":198
2555  *             raise StopIteration
2556  *         cdef char * retval = self.fields[self.index]
2557  *         self.index += 1             # <<<<<<<<<<<<<<
2558  *         if retval == NULL: return None
2559  *         else: return retval
2560  */
2561   ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index += 1;
2562
2563   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":199
2564  *         cdef char * retval = self.fields[self.index]
2565  *         self.index += 1
2566  *         if retval == NULL: return None             # <<<<<<<<<<<<<<
2567  *         else: return retval
2568  * 
2569  */
2570   __pyx_t_1 = (__pyx_v_retval == NULL);
2571   if (__pyx_t_1) {
2572     __Pyx_XDECREF(__pyx_r);
2573     __Pyx_INCREF(Py_None);
2574     __pyx_r = Py_None;
2575     goto __pyx_L0;
2576     goto __pyx_L6;
2577   }
2578   /*else*/ {
2579
2580     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":200
2581  *         self.index += 1
2582  *         if retval == NULL: return None
2583  *         else: return retval             # <<<<<<<<<<<<<<
2584  * 
2585  *     def __str__(self):
2586  */
2587     __Pyx_XDECREF(__pyx_r);
2588     __pyx_t_2 = PyBytes_FromString(__pyx_v_retval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2589     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
2590     __pyx_r = ((PyObject *)__pyx_t_2);
2591     __pyx_t_2 = 0;
2592     goto __pyx_L0;
2593   }
2594   __pyx_L6:;
2595
2596   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2597   goto __pyx_L0;
2598   __pyx_L1_error:;
2599   __Pyx_XDECREF(__pyx_t_2);
2600   __Pyx_AddTraceback("TabProxies.TupleProxy.__next__");
2601   __pyx_r = NULL;
2602   __pyx_L0:;
2603   __Pyx_XGIVEREF(__pyx_r);
2604   __Pyx_RefNannyFinishContext();
2605   return __pyx_r;
2606 }
2607
2608 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":202
2609  *         else: return retval
2610  * 
2611  *     def __str__(self):             # <<<<<<<<<<<<<<
2612  *         '''return original data'''
2613  *         # copy and replace \0 bytes with \t characters
2614  */
2615
2616 static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_self); /*proto*/
2617 static char __pyx_doc_10TabProxies_10TupleProxy___str__[] = "return original data";
2618 struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy___str__;
2619 static PyObject *__pyx_pf_10TabProxies_10TupleProxy___str__(PyObject *__pyx_v_self) {
2620   char *__pyx_v_cpy;
2621   long __pyx_v_x;
2622   PyObject *__pyx_v_result;
2623   PyObject *__pyx_r = NULL;
2624   PyObject *__pyx_t_1 = NULL;
2625   PyObject *__pyx_t_2 = NULL;
2626   int __pyx_t_3;
2627   long __pyx_t_4;
2628   PyObject *__pyx_t_5 = NULL;
2629   int __pyx_t_6;
2630   __Pyx_RefNannySetupContext("__str__");
2631   __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
2632
2633   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":205
2634  *         '''return original data'''
2635  *         # copy and replace \0 bytes with \t characters
2636  *         if self.is_modified:             # <<<<<<<<<<<<<<
2637  *             # todo: treat NULL values
2638  *             return "\t".join( [StrOrEmpty( self.fields[x]) for x in xrange(0, self.nfields ) ] )
2639  */
2640   if (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified) {
2641
2642     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":207
2643  *         if self.is_modified:
2644  *             # todo: treat NULL values
2645  *             return "\t".join( [StrOrEmpty( self.fields[x]) for x in xrange(0, self.nfields ) ] )             # <<<<<<<<<<<<<<
2646  *         else:
2647  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
2648  */
2649     __Pyx_XDECREF(__pyx_r);
2650     __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2651     __Pyx_GOTREF(__pyx_t_1);
2652     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2653     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
2654     __pyx_t_3 = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
2655     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
2656       __pyx_v_x = __pyx_t_4;
2657       __pyx_t_5 = PyBytes_FromString(__pyx_f_10TabProxies_StrOrEmpty((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2658       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
2659       if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2660       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2661     }
2662     __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2663     __Pyx_GOTREF(__pyx_t_5);
2664     __Pyx_INCREF(((PyObject *)__pyx_t_2));
2665     PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
2666     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
2667     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
2668     __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2669     __Pyx_GOTREF(__pyx_t_2);
2670     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2671     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2672     __pyx_r = __pyx_t_2;
2673     __pyx_t_2 = 0;
2674     goto __pyx_L0;
2675     goto __pyx_L5;
2676   }
2677   /*else*/ {
2678
2679     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":209
2680  *             return "\t".join( [StrOrEmpty( self.fields[x]) for x in xrange(0, self.nfields ) ] )
2681  *         else:
2682  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )             # <<<<<<<<<<<<<<
2683  *             if cpy == NULL:
2684  *                 raise ValueError("out of memory" )
2685  */
2686     __pyx_v_cpy = ((char *)calloc((sizeof(char)), (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes + 1)));
2687
2688     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":210
2689  *         else:
2690  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
2691  *             if cpy == NULL:             # <<<<<<<<<<<<<<
2692  *                 raise ValueError("out of memory" )
2693  *             memcpy( cpy, self.data, self.nbytes+1)
2694  */
2695     __pyx_t_6 = (__pyx_v_cpy == NULL);
2696     if (__pyx_t_6) {
2697
2698       /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":211
2699  *             cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
2700  *             if cpy == NULL:
2701  *                 raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
2702  *             memcpy( cpy, self.data, self.nbytes+1)
2703  *             for x from 0 <= x < self.nbytes:
2704  */
2705       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2706       __Pyx_GOTREF(__pyx_t_2);
2707       __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
2708       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_3));
2709       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
2710       __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2711       __Pyx_GOTREF(__pyx_t_5);
2712       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2713       __Pyx_Raise(__pyx_t_5, 0, 0);
2714       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2715       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2716       goto __pyx_L8;
2717     }
2718     __pyx_L8:;
2719
2720     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":212
2721  *             if cpy == NULL:
2722  *                 raise ValueError("out of memory" )
2723  *             memcpy( cpy, self.data, self.nbytes+1)             # <<<<<<<<<<<<<<
2724  *             for x from 0 <= x < self.nbytes:
2725  *                 if cpy[x] == '\0': cpy[x] = '\t'
2726  */
2727     memcpy(__pyx_v_cpy, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data, (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes + 1));
2728
2729     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":213
2730  *                 raise ValueError("out of memory" )
2731  *             memcpy( cpy, self.data, self.nbytes+1)
2732  *             for x from 0 <= x < self.nbytes:             # <<<<<<<<<<<<<<
2733  *                 if cpy[x] == '\0': cpy[x] = '\t'
2734  *             result = PyString_FromStringAndSize(cpy, self.nbytes)
2735  */
2736     __pyx_t_3 = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes;
2737     for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
2738
2739       /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":214
2740  *             memcpy( cpy, self.data, self.nbytes+1)
2741  *             for x from 0 <= x < self.nbytes:
2742  *                 if cpy[x] == '\0': cpy[x] = '\t'             # <<<<<<<<<<<<<<
2743  *             result = PyString_FromStringAndSize(cpy, self.nbytes)
2744  *             free(cpy)
2745  */
2746       __pyx_t_6 = ((__pyx_v_cpy[__pyx_v_x]) == '\x00');
2747       if (__pyx_t_6) {
2748         (__pyx_v_cpy[__pyx_v_x]) = '\t';
2749         goto __pyx_L11;
2750       }
2751       __pyx_L11:;
2752     }
2753
2754     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":215
2755  *             for x from 0 <= x < self.nbytes:
2756  *                 if cpy[x] == '\0': cpy[x] = '\t'
2757  *             result = PyString_FromStringAndSize(cpy, self.nbytes)             # <<<<<<<<<<<<<<
2758  *             free(cpy)
2759  *             return result
2760  */
2761     __pyx_t_5 = PyString_FromStringAndSize(__pyx_v_cpy, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2762     __Pyx_GOTREF(__pyx_t_5);
2763     __Pyx_DECREF(__pyx_v_result);
2764     __pyx_v_result = __pyx_t_5;
2765     __pyx_t_5 = 0;
2766
2767     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":216
2768  *                 if cpy[x] == '\0': cpy[x] = '\t'
2769  *             result = PyString_FromStringAndSize(cpy, self.nbytes)
2770  *             free(cpy)             # <<<<<<<<<<<<<<
2771  *             return result
2772  * 
2773  */
2774     free(__pyx_v_cpy);
2775
2776     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":217
2777  *             result = PyString_FromStringAndSize(cpy, self.nbytes)
2778  *             free(cpy)
2779  *             return result             # <<<<<<<<<<<<<<
2780  * 
2781  * def toDot( v ):
2782  */
2783     __Pyx_XDECREF(__pyx_r);
2784     __Pyx_INCREF(__pyx_v_result);
2785     __pyx_r = __pyx_v_result;
2786     goto __pyx_L0;
2787   }
2788   __pyx_L5:;
2789
2790   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2791   goto __pyx_L0;
2792   __pyx_L1_error:;
2793   __Pyx_XDECREF(__pyx_t_1);
2794   __Pyx_XDECREF(__pyx_t_2);
2795   __Pyx_XDECREF(__pyx_t_5);
2796   __Pyx_AddTraceback("TabProxies.TupleProxy.__str__");
2797   __pyx_r = NULL;
2798   __pyx_L0:;
2799   __Pyx_DECREF(__pyx_v_result);
2800   __Pyx_XGIVEREF(__pyx_r);
2801   __Pyx_RefNannyFinishContext();
2802   return __pyx_r;
2803 }
2804
2805 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":219
2806  *             return result
2807  * 
2808  * def toDot( v ):             # <<<<<<<<<<<<<<
2809  *     '''convert value to '.' if None'''
2810  *     if v == None: return "."
2811  */
2812
2813 static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
2814 static char __pyx_doc_10TabProxies_toDot[] = "convert value to '.' if None";
2815 static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__pyx_v_v) {
2816   PyObject *__pyx_r = NULL;
2817   PyObject *__pyx_t_1 = NULL;
2818   int __pyx_t_2;
2819   PyObject *__pyx_t_3 = NULL;
2820   __Pyx_RefNannySetupContext("toDot");
2821   __pyx_self = __pyx_self;
2822
2823   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":221
2824  * def toDot( v ):
2825  *     '''convert value to '.' if None'''
2826  *     if v == None: return "."             # <<<<<<<<<<<<<<
2827  *     else: return str(v)
2828  * 
2829  */
2830   __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2831   __Pyx_GOTREF(__pyx_t_1);
2832   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2833   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2834   if (__pyx_t_2) {
2835     __Pyx_XDECREF(__pyx_r);
2836     __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
2837     __pyx_r = ((PyObject *)__pyx_kp_s_8);
2838     goto __pyx_L0;
2839     goto __pyx_L5;
2840   }
2841   /*else*/ {
2842
2843     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":222
2844  *     '''convert value to '.' if None'''
2845  *     if v == None: return "."
2846  *     else: return str(v)             # <<<<<<<<<<<<<<
2847  * 
2848  * def quote( v ):
2849  */
2850     __Pyx_XDECREF(__pyx_r);
2851     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2852     __Pyx_GOTREF(__pyx_t_1);
2853     __Pyx_INCREF(__pyx_v_v);
2854     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v);
2855     __Pyx_GIVEREF(__pyx_v_v);
2856     __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2857     __Pyx_GOTREF(__pyx_t_3);
2858     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2859     __pyx_r = __pyx_t_3;
2860     __pyx_t_3 = 0;
2861     goto __pyx_L0;
2862   }
2863   __pyx_L5:;
2864
2865   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2866   goto __pyx_L0;
2867   __pyx_L1_error:;
2868   __Pyx_XDECREF(__pyx_t_1);
2869   __Pyx_XDECREF(__pyx_t_3);
2870   __Pyx_AddTraceback("TabProxies.toDot");
2871   __pyx_r = NULL;
2872   __pyx_L0:;
2873   __Pyx_XGIVEREF(__pyx_r);
2874   __Pyx_RefNannyFinishContext();
2875   return __pyx_r;
2876 }
2877
2878 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":224
2879  *     else: return str(v)
2880  * 
2881  * def quote( v ):             # <<<<<<<<<<<<<<
2882  *     '''return a quoted attribute.'''
2883  *     if type(v) in types.StringTypes:
2884  */
2885
2886 static PyObject *__pyx_pf_10TabProxies_quote(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
2887 static char __pyx_doc_10TabProxies_quote[] = "return a quoted attribute.";
2888 static PyObject *__pyx_pf_10TabProxies_quote(PyObject *__pyx_self, PyObject *__pyx_v_v) {
2889   PyObject *__pyx_r = NULL;
2890   PyObject *__pyx_t_1 = NULL;
2891   PyObject *__pyx_t_2 = NULL;
2892   int __pyx_t_3;
2893   __Pyx_RefNannySetupContext("quote");
2894   __pyx_self = __pyx_self;
2895
2896   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":226
2897  * def quote( v ):
2898  *     '''return a quoted attribute.'''
2899  *     if type(v) in types.StringTypes:             # <<<<<<<<<<<<<<
2900  *         return '"%s"' % v
2901  *     else:
2902  */
2903   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2904   __Pyx_GOTREF(__pyx_t_1);
2905   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__StringTypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2906   __Pyx_GOTREF(__pyx_t_2);
2907   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2908   __pyx_t_3 = ((PySequence_Contains(__pyx_t_2, ((PyObject *)Py_TYPE(__pyx_v_v))))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2909   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2910   if (__pyx_t_3) {
2911
2912     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":227
2913  *     '''return a quoted attribute.'''
2914  *     if type(v) in types.StringTypes:
2915  *         return '"%s"' % v             # <<<<<<<<<<<<<<
2916  *     else:
2917  *         return str(v)
2918  */
2919     __Pyx_XDECREF(__pyx_r);
2920     __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2921     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
2922     __pyx_r = ((PyObject *)__pyx_t_2);
2923     __pyx_t_2 = 0;
2924     goto __pyx_L0;
2925     goto __pyx_L5;
2926   }
2927   /*else*/ {
2928
2929     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":229
2930  *         return '"%s"' % v
2931  *     else:
2932  *         return str(v)             # <<<<<<<<<<<<<<
2933  * 
2934  * cdef class GTFProxy( TupleProxy ):
2935  */
2936     __Pyx_XDECREF(__pyx_r);
2937     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2938     __Pyx_GOTREF(__pyx_t_2);
2939     __Pyx_INCREF(__pyx_v_v);
2940     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v);
2941     __Pyx_GIVEREF(__pyx_v_v);
2942     __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2943     __Pyx_GOTREF(__pyx_t_1);
2944     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2945     __pyx_r = __pyx_t_1;
2946     __pyx_t_1 = 0;
2947     goto __pyx_L0;
2948   }
2949   __pyx_L5:;
2950
2951   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2952   goto __pyx_L0;
2953   __pyx_L1_error:;
2954   __Pyx_XDECREF(__pyx_t_1);
2955   __Pyx_XDECREF(__pyx_t_2);
2956   __Pyx_AddTraceback("TabProxies.quote");
2957   __pyx_r = NULL;
2958   __pyx_L0:;
2959   __Pyx_XGIVEREF(__pyx_r);
2960   __Pyx_RefNannyFinishContext();
2961   return __pyx_r;
2962 }
2963
2964 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":245
2965  *     '''
2966  * 
2967  *     def __cinit__(self ):             # <<<<<<<<<<<<<<
2968  *         # automatically calls TupleProxy.__cinit__
2969  *         self.hasOwnAttributes = False
2970  */
2971
2972 static int __pyx_pf_10TabProxies_8GTFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2973 static int __pyx_pf_10TabProxies_8GTFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2974   int __pyx_r;
2975   __Pyx_RefNannySetupContext("__cinit__");
2976   if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
2977     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
2978   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
2979
2980   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":247
2981  *     def __cinit__(self ):
2982  *         # automatically calls TupleProxy.__cinit__
2983  *         self.hasOwnAttributes = False             # <<<<<<<<<<<<<<
2984  * 
2985  *     def __dealloc__(self):
2986  */
2987   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes = 0;
2988
2989   __pyx_r = 0;
2990   __Pyx_RefNannyFinishContext();
2991   return __pyx_r;
2992 }
2993
2994 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":249
2995  *         self.hasOwnAttributes = False
2996  * 
2997  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
2998  *         # automatically calls TupleProxy.__dealloc__
2999  *         if self.hasOwnAttributes:
3000  */
3001
3002 static void __pyx_pf_10TabProxies_8GTFProxy___dealloc__(PyObject *__pyx_v_self); /*proto*/
3003 static void __pyx_pf_10TabProxies_8GTFProxy___dealloc__(PyObject *__pyx_v_self) {
3004   __Pyx_RefNannySetupContext("__dealloc__");
3005
3006   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":251
3007  *     def __dealloc__(self):
3008  *         # automatically calls TupleProxy.__dealloc__
3009  *         if self.hasOwnAttributes:             # <<<<<<<<<<<<<<
3010  *             free(self.attributes)
3011  * 
3012  */
3013   if (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes) {
3014
3015     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":252
3016  *         # automatically calls TupleProxy.__dealloc__
3017  *         if self.hasOwnAttributes:
3018  *             free(self.attributes)             # <<<<<<<<<<<<<<
3019  * 
3020  *     cdef int getMaxFields( self, size_t nbytes ):
3021  */
3022     free(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes);
3023     goto __pyx_L5;
3024   }
3025   __pyx_L5:;
3026
3027   __Pyx_RefNannyFinishContext();
3028 }
3029
3030 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":254
3031  *             free(self.attributes)
3032  * 
3033  *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
3034  *         '''return max number of fields.'''
3035  *         return 9
3036  */
3037
3038 static  int __pyx_f_10TabProxies_8GTFProxy_getMaxFields(struct __pyx_obj_10TabProxies_GTFProxy *__pyx_v_self, size_t __pyx_v_nbytes) {
3039   int __pyx_r;
3040   __Pyx_RefNannySetupContext("getMaxFields");
3041
3042   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":256
3043  *     cdef int getMaxFields( self, size_t nbytes ):
3044  *         '''return max number of fields.'''
3045  *         return 9             # <<<<<<<<<<<<<<
3046  * 
3047  *     cdef update( self, char * buffer, size_t nbytes ):
3048  */
3049   __pyx_r = 9;
3050   goto __pyx_L0;
3051
3052   __pyx_r = 0;
3053   __pyx_L0:;
3054   __Pyx_RefNannyFinishContext();
3055   return __pyx_r;
3056 }
3057
3058 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":258
3059  *         return 9
3060  * 
3061  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
3062  *         '''update internal data.
3063  * 
3064  */
3065
3066 static  PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabProxies_GTFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
3067   char *__pyx_v_cstart;
3068   char *__pyx_v_cend;
3069   char *__pyx_v_pos;
3070   PyObject *__pyx_r = NULL;
3071   int __pyx_t_1;
3072   PyObject *__pyx_t_2 = NULL;
3073   PyObject *__pyx_t_3 = NULL;
3074   char *__pyx_t_4;
3075   __Pyx_RefNannySetupContext("update");
3076
3077   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":265
3078  *         cdef int end
3079  *         cdef char * cstart, * cend, * cscore
3080  *         self.contig = buffer             # <<<<<<<<<<<<<<
3081  *         cdef char * pos
3082  * 
3083  */
3084   __pyx_v_self->contig = __pyx_v_buffer;
3085
3086   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":268
3087  *         cdef char * pos
3088  * 
3089  *         if buffer[nbytes] != 0:             # <<<<<<<<<<<<<<
3090  *             raise ValueError( "incomplete line at %s" % buffer )
3091  * 
3092  */
3093   __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0);
3094   if (__pyx_t_1) {
3095
3096     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":269
3097  * 
3098  *         if buffer[nbytes] != 0:
3099  *             raise ValueError( "incomplete line at %s" % buffer )             # <<<<<<<<<<<<<<
3100  * 
3101  *         self.source = pos = nextItem( buffer )
3102  */
3103     __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3104     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3105     __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3106     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
3107     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3108     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3109     __Pyx_GOTREF(__pyx_t_2);
3110     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
3111     __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
3112     __pyx_t_3 = 0;
3113     __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3114     __Pyx_GOTREF(__pyx_t_3);
3115     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3116     __Pyx_Raise(__pyx_t_3, 0, 0);
3117     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3118     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3119     goto __pyx_L3;
3120   }
3121   __pyx_L3:;
3122
3123   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":271
3124  *             raise ValueError( "incomplete line at %s" % buffer )
3125  * 
3126  *         self.source = pos = nextItem( buffer )             # <<<<<<<<<<<<<<
3127  *         self.feature = pos = nextItem( pos )
3128  *         cstart = pos = nextItem( pos )
3129  */
3130   __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_buffer);
3131   __pyx_v_self->source = __pyx_t_4;
3132   __pyx_v_pos = __pyx_t_4;
3133
3134   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":272
3135  * 
3136  *         self.source = pos = nextItem( buffer )
3137  *         self.feature = pos = nextItem( pos )             # <<<<<<<<<<<<<<
3138  *         cstart = pos = nextItem( pos )
3139  *         cend = pos = nextItem( pos )
3140  */
3141   __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3142   __pyx_v_self->feature = __pyx_t_4;
3143   __pyx_v_pos = __pyx_t_4;
3144
3145   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":273
3146  *         self.source = pos = nextItem( buffer )
3147  *         self.feature = pos = nextItem( pos )
3148  *         cstart = pos = nextItem( pos )             # <<<<<<<<<<<<<<
3149  *         cend = pos = nextItem( pos )
3150  *         self.score = pos = nextItem( pos )
3151  */
3152   __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3153   __pyx_v_cstart = __pyx_t_4;
3154   __pyx_v_pos = __pyx_t_4;
3155
3156   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":274
3157  *         self.feature = pos = nextItem( pos )
3158  *         cstart = pos = nextItem( pos )
3159  *         cend = pos = nextItem( pos )             # <<<<<<<<<<<<<<
3160  *         self.score = pos = nextItem( pos )
3161  *         self.strand = pos = nextItem( pos )
3162  */
3163   __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3164   __pyx_v_cend = __pyx_t_4;
3165   __pyx_v_pos = __pyx_t_4;
3166
3167   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":275
3168  *         cstart = pos = nextItem( pos )
3169  *         cend = pos = nextItem( pos )
3170  *         self.score = pos = nextItem( pos )             # <<<<<<<<<<<<<<
3171  *         self.strand = pos = nextItem( pos )
3172  *         self.frame = pos = nextItem( pos )
3173  */
3174   __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3175   __pyx_v_self->score = __pyx_t_4;
3176   __pyx_v_pos = __pyx_t_4;
3177
3178   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":276
3179  *         cend = pos = nextItem( pos )
3180  *         self.score = pos = nextItem( pos )
3181  *         self.strand = pos = nextItem( pos )             # <<<<<<<<<<<<<<
3182  *         self.frame = pos = nextItem( pos )
3183  *         self.attributes = pos = nextItem( pos )
3184  */
3185   __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3186   __pyx_v_self->strand = __pyx_t_4;
3187   __pyx_v_pos = __pyx_t_4;
3188
3189   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":277
3190  *         self.score = pos = nextItem( pos )
3191  *         self.strand = pos = nextItem( pos )
3192  *         self.frame = pos = nextItem( pos )             # <<<<<<<<<<<<<<
3193  *         self.attributes = pos = nextItem( pos )
3194  * 
3195  */
3196   __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3197   __pyx_v_self->frame = __pyx_t_4;
3198   __pyx_v_pos = __pyx_t_4;
3199
3200   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":278
3201  *         self.strand = pos = nextItem( pos )
3202  *         self.frame = pos = nextItem( pos )
3203  *         self.attributes = pos = nextItem( pos )             # <<<<<<<<<<<<<<
3204  * 
3205  *         self.start = atoi( cstart ) - 1
3206  */
3207   __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3208   __pyx_v_self->attributes = __pyx_t_4;
3209   __pyx_v_pos = __pyx_t_4;
3210
3211   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":280
3212  *         self.attributes = pos = nextItem( pos )
3213  * 
3214  *         self.start = atoi( cstart ) - 1             # <<<<<<<<<<<<<<
3215  *         self.end = atoi( cend )
3216  * 
3217  */
3218   __pyx_v_self->start = (atoi(__pyx_v_cstart) - 1);
3219
3220   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":281
3221  * 
3222  *         self.start = atoi( cstart ) - 1
3223  *         self.end = atoi( cend )             # <<<<<<<<<<<<<<
3224  * 
3225  *     property contig:
3226  */
3227   __pyx_v_self->end = atoi(__pyx_v_cend);
3228
3229   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3230   goto __pyx_L0;
3231   __pyx_L1_error:;
3232   __Pyx_XDECREF(__pyx_t_2);
3233   __Pyx_XDECREF(__pyx_t_3);
3234   __Pyx_AddTraceback("TabProxies.GTFProxy.update");
3235   __pyx_r = 0;
3236   __pyx_L0:;
3237   __Pyx_XGIVEREF(__pyx_r);
3238   __Pyx_RefNannyFinishContext();
3239   return __pyx_r;
3240 }
3241
3242 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":285
3243  *     property contig:
3244  *        '''contig of feature.'''
3245  *        def __get__( self ): return self.contig             # <<<<<<<<<<<<<<
3246  *        def __set__( self, value ):
3247  *            self.is_modified = True
3248  */
3249
3250 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6contig___get__(PyObject *__pyx_v_self); /*proto*/
3251 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6contig___get__(PyObject *__pyx_v_self) {
3252   PyObject *__pyx_r = NULL;
3253   PyObject *__pyx_t_1 = NULL;
3254   __Pyx_RefNannySetupContext("__get__");
3255   __Pyx_XDECREF(__pyx_r);
3256   __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3257   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3258   __pyx_r = ((PyObject *)__pyx_t_1);
3259   __pyx_t_1 = 0;
3260   goto __pyx_L0;
3261
3262   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3263   goto __pyx_L0;
3264   __pyx_L1_error:;
3265   __Pyx_XDECREF(__pyx_t_1);
3266   __Pyx_AddTraceback("TabProxies.GTFProxy.contig.__get__");
3267   __pyx_r = NULL;
3268   __pyx_L0:;
3269   __Pyx_XGIVEREF(__pyx_r);
3270   __Pyx_RefNannyFinishContext();
3271   return __pyx_r;
3272 }
3273
3274 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":286
3275  *        '''contig of feature.'''
3276  *        def __get__( self ): return self.contig
3277  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
3278  *            self.is_modified = True
3279  *            self.contig = value
3280  */
3281
3282 static int __pyx_pf_10TabProxies_8GTFProxy_6contig___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3283 static int __pyx_pf_10TabProxies_8GTFProxy_6contig___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3284   int __pyx_r;
3285   char *__pyx_t_1;
3286   __Pyx_RefNannySetupContext("__set__");
3287
3288   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":287
3289  *        def __get__( self ): return self.contig
3290  *        def __set__( self, value ):
3291  *            self.is_modified = True             # <<<<<<<<<<<<<<
3292  *            self.contig = value
3293  * 
3294  */
3295   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3296
3297   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":288
3298  *        def __set__( self, value ):
3299  *            self.is_modified = True
3300  *            self.contig = value             # <<<<<<<<<<<<<<
3301  * 
3302  *     property feature:
3303  */
3304   __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3305   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig = __pyx_t_1;
3306
3307   __pyx_r = 0;
3308   goto __pyx_L0;
3309   __pyx_L1_error:;
3310   __Pyx_AddTraceback("TabProxies.GTFProxy.contig.__set__");
3311   __pyx_r = -1;
3312   __pyx_L0:;
3313   __Pyx_RefNannyFinishContext();
3314   return __pyx_r;
3315 }
3316
3317 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":292
3318  *     property feature:
3319  *        '''feature name.'''
3320  *        def __get__( self ): return self.feature             # <<<<<<<<<<<<<<
3321  *        def __set__( self, value ):
3322  *            self.is_modified = True
3323  */
3324
3325 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7feature___get__(PyObject *__pyx_v_self); /*proto*/
3326 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7feature___get__(PyObject *__pyx_v_self) {
3327   PyObject *__pyx_r = NULL;
3328   PyObject *__pyx_t_1 = NULL;
3329   __Pyx_RefNannySetupContext("__get__");
3330   __Pyx_XDECREF(__pyx_r);
3331   __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3332   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3333   __pyx_r = ((PyObject *)__pyx_t_1);
3334   __pyx_t_1 = 0;
3335   goto __pyx_L0;
3336
3337   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3338   goto __pyx_L0;
3339   __pyx_L1_error:;
3340   __Pyx_XDECREF(__pyx_t_1);
3341   __Pyx_AddTraceback("TabProxies.GTFProxy.feature.__get__");
3342   __pyx_r = NULL;
3343   __pyx_L0:;
3344   __Pyx_XGIVEREF(__pyx_r);
3345   __Pyx_RefNannyFinishContext();
3346   return __pyx_r;
3347 }
3348
3349 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":293
3350  *        '''feature name.'''
3351  *        def __get__( self ): return self.feature
3352  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
3353  *            self.is_modified = True
3354  *            self.feature = value
3355  */
3356
3357 static int __pyx_pf_10TabProxies_8GTFProxy_7feature___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3358 static int __pyx_pf_10TabProxies_8GTFProxy_7feature___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3359   int __pyx_r;
3360   char *__pyx_t_1;
3361   __Pyx_RefNannySetupContext("__set__");
3362
3363   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":294
3364  *        def __get__( self ): return self.feature
3365  *        def __set__( self, value ):
3366  *            self.is_modified = True             # <<<<<<<<<<<<<<
3367  *            self.feature = value
3368  * 
3369  */
3370   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3371
3372   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":295
3373  *        def __set__( self, value ):
3374  *            self.is_modified = True
3375  *            self.feature = value             # <<<<<<<<<<<<<<
3376  * 
3377  *     property source:
3378  */
3379   __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3380   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature = __pyx_t_1;
3381
3382   __pyx_r = 0;
3383   goto __pyx_L0;
3384   __pyx_L1_error:;
3385   __Pyx_AddTraceback("TabProxies.GTFProxy.feature.__set__");
3386   __pyx_r = -1;
3387   __pyx_L0:;
3388   __Pyx_RefNannyFinishContext();
3389   return __pyx_r;
3390 }
3391
3392 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":299
3393  *     property source:
3394  *        '''feature source.'''
3395  *        def __get__( self ): return self.source             # <<<<<<<<<<<<<<
3396  *        def __set__( self, value ):
3397  *            self.is_modified = True
3398  */
3399
3400 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6source___get__(PyObject *__pyx_v_self); /*proto*/
3401 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6source___get__(PyObject *__pyx_v_self) {
3402   PyObject *__pyx_r = NULL;
3403   PyObject *__pyx_t_1 = NULL;
3404   __Pyx_RefNannySetupContext("__get__");
3405   __Pyx_XDECREF(__pyx_r);
3406   __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3407   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3408   __pyx_r = ((PyObject *)__pyx_t_1);
3409   __pyx_t_1 = 0;
3410   goto __pyx_L0;
3411
3412   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3413   goto __pyx_L0;
3414   __pyx_L1_error:;
3415   __Pyx_XDECREF(__pyx_t_1);
3416   __Pyx_AddTraceback("TabProxies.GTFProxy.source.__get__");
3417   __pyx_r = NULL;
3418   __pyx_L0:;
3419   __Pyx_XGIVEREF(__pyx_r);
3420   __Pyx_RefNannyFinishContext();
3421   return __pyx_r;
3422 }
3423
3424 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":300
3425  *        '''feature source.'''
3426  *        def __get__( self ): return self.source
3427  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
3428  *            self.is_modified = True
3429  *            self.source = value
3430  */
3431
3432 static int __pyx_pf_10TabProxies_8GTFProxy_6source___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3433 static int __pyx_pf_10TabProxies_8GTFProxy_6source___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3434   int __pyx_r;
3435   char *__pyx_t_1;
3436   __Pyx_RefNannySetupContext("__set__");
3437
3438   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":301
3439  *        def __get__( self ): return self.source
3440  *        def __set__( self, value ):
3441  *            self.is_modified = True             # <<<<<<<<<<<<<<
3442  *            self.source = value
3443  * 
3444  */
3445   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3446
3447   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":302
3448  *        def __set__( self, value ):
3449  *            self.is_modified = True
3450  *            self.source = value             # <<<<<<<<<<<<<<
3451  * 
3452  *     property start:
3453  */
3454   __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3455   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source = __pyx_t_1;
3456
3457   __pyx_r = 0;
3458   goto __pyx_L0;
3459   __pyx_L1_error:;
3460   __Pyx_AddTraceback("TabProxies.GTFProxy.source.__set__");
3461   __pyx_r = -1;
3462   __pyx_L0:;
3463   __Pyx_RefNannyFinishContext();
3464   return __pyx_r;
3465 }
3466
3467 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":306
3468  *     property start:
3469  *        '''feature start (in 0-based open/closed coordinates).'''
3470  *        def __get__( self ): return self.start             # <<<<<<<<<<<<<<
3471  *        def __set__( self, value ):
3472  *            self.is_modified = True
3473  */
3474
3475 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5start___get__(PyObject *__pyx_v_self); /*proto*/
3476 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5start___get__(PyObject *__pyx_v_self) {
3477   PyObject *__pyx_r = NULL;
3478   PyObject *__pyx_t_1 = NULL;
3479   __Pyx_RefNannySetupContext("__get__");
3480   __Pyx_XDECREF(__pyx_r);
3481   __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3482   __Pyx_GOTREF(__pyx_t_1);
3483   __pyx_r = __pyx_t_1;
3484   __pyx_t_1 = 0;
3485   goto __pyx_L0;
3486
3487   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3488   goto __pyx_L0;
3489   __pyx_L1_error:;
3490   __Pyx_XDECREF(__pyx_t_1);
3491   __Pyx_AddTraceback("TabProxies.GTFProxy.start.__get__");
3492   __pyx_r = NULL;
3493   __pyx_L0:;
3494   __Pyx_XGIVEREF(__pyx_r);
3495   __Pyx_RefNannyFinishContext();
3496   return __pyx_r;
3497 }
3498
3499 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":307
3500  *        '''feature start (in 0-based open/closed coordinates).'''
3501  *        def __get__( self ): return self.start
3502  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
3503  *            self.is_modified = True
3504  *            self.start = value
3505  */
3506
3507 static int __pyx_pf_10TabProxies_8GTFProxy_5start___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3508 static int __pyx_pf_10TabProxies_8GTFProxy_5start___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3509   int __pyx_r;
3510   uint32_t __pyx_t_1;
3511   __Pyx_RefNannySetupContext("__set__");
3512
3513   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":308
3514  *        def __get__( self ): return self.start
3515  *        def __set__( self, value ):
3516  *            self.is_modified = True             # <<<<<<<<<<<<<<
3517  *            self.start = value
3518  * 
3519  */
3520   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3521
3522   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":309
3523  *        def __set__( self, value ):
3524  *            self.is_modified = True
3525  *            self.start = value             # <<<<<<<<<<<<<<
3526  * 
3527  *     property end:
3528  */
3529   __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3530   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start = __pyx_t_1;
3531
3532   __pyx_r = 0;
3533   goto __pyx_L0;
3534   __pyx_L1_error:;
3535   __Pyx_AddTraceback("TabProxies.GTFProxy.start.__set__");
3536   __pyx_r = -1;
3537   __pyx_L0:;
3538   __Pyx_RefNannyFinishContext();
3539   return __pyx_r;
3540 }
3541
3542 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":313
3543  *     property end:
3544  *        '''feature end (in 0-based open/closed coordinates).'''
3545  *        def __get__( self ): return self.end             # <<<<<<<<<<<<<<
3546  *        def __set__( self, value ):
3547  *            self.is_modified = True
3548  */
3549
3550 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3end___get__(PyObject *__pyx_v_self); /*proto*/
3551 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3end___get__(PyObject *__pyx_v_self) {
3552   PyObject *__pyx_r = NULL;
3553   PyObject *__pyx_t_1 = NULL;
3554   __Pyx_RefNannySetupContext("__get__");
3555   __Pyx_XDECREF(__pyx_r);
3556   __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3557   __Pyx_GOTREF(__pyx_t_1);
3558   __pyx_r = __pyx_t_1;
3559   __pyx_t_1 = 0;
3560   goto __pyx_L0;
3561
3562   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3563   goto __pyx_L0;
3564   __pyx_L1_error:;
3565   __Pyx_XDECREF(__pyx_t_1);
3566   __Pyx_AddTraceback("TabProxies.GTFProxy.end.__get__");
3567   __pyx_r = NULL;
3568   __pyx_L0:;
3569   __Pyx_XGIVEREF(__pyx_r);
3570   __Pyx_RefNannyFinishContext();
3571   return __pyx_r;
3572 }
3573
3574 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":314
3575  *        '''feature end (in 0-based open/closed coordinates).'''
3576  *        def __get__( self ): return self.end
3577  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
3578  *            self.is_modified = True
3579  *            self.end = value
3580  */
3581
3582 static int __pyx_pf_10TabProxies_8GTFProxy_3end___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3583 static int __pyx_pf_10TabProxies_8GTFProxy_3end___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3584   int __pyx_r;
3585   uint32_t __pyx_t_1;
3586   __Pyx_RefNannySetupContext("__set__");
3587
3588   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":315
3589  *        def __get__( self ): return self.end
3590  *        def __set__( self, value ):
3591  *            self.is_modified = True             # <<<<<<<<<<<<<<
3592  *            self.end = value
3593  * 
3594  */
3595   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3596
3597   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":316
3598  *        def __set__( self, value ):
3599  *            self.is_modified = True
3600  *            self.end = value             # <<<<<<<<<<<<<<
3601  * 
3602  *     property score:
3603  */
3604   __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3605   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end = __pyx_t_1;
3606
3607   __pyx_r = 0;
3608   goto __pyx_L0;
3609   __pyx_L1_error:;
3610   __Pyx_AddTraceback("TabProxies.GTFProxy.end.__set__");
3611   __pyx_r = -1;
3612   __pyx_L0:;
3613   __Pyx_RefNannyFinishContext();
3614   return __pyx_r;
3615 }
3616
3617 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":320
3618  *     property score:
3619  *        '''feature score.'''
3620  *        def __get__( self ):             # <<<<<<<<<<<<<<
3621  *            if self.score[0] == '.' and self.score[1] == '\0' :
3622  *                return None
3623  */
3624
3625 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_v_self); /*proto*/
3626 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_v_self) {
3627   PyObject *__pyx_r = NULL;
3628   int __pyx_t_1;
3629   int __pyx_t_2;
3630   int __pyx_t_3;
3631   PyObject *__pyx_t_4 = NULL;
3632   __Pyx_RefNannySetupContext("__get__");
3633
3634   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":321
3635  *        '''feature score.'''
3636  *        def __get__( self ):
3637  *            if self.score[0] == '.' and self.score[1] == '\0' :             # <<<<<<<<<<<<<<
3638  *                return None
3639  *            else:
3640  */
3641   __pyx_t_1 = ((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score[0]) == '.');
3642   if (__pyx_t_1) {
3643     __pyx_t_2 = ((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score[1]) == '\x00');
3644     __pyx_t_3 = __pyx_t_2;
3645   } else {
3646     __pyx_t_3 = __pyx_t_1;
3647   }
3648   if (__pyx_t_3) {
3649
3650     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":322
3651  *        def __get__( self ):
3652  *            if self.score[0] == '.' and self.score[1] == '\0' :
3653  *                return None             # <<<<<<<<<<<<<<
3654  *            else:
3655  *                return atof(self.score)
3656  */
3657     __Pyx_XDECREF(__pyx_r);
3658     __Pyx_INCREF(Py_None);
3659     __pyx_r = Py_None;
3660     goto __pyx_L0;
3661     goto __pyx_L5;
3662   }
3663   /*else*/ {
3664
3665     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":324
3666  *                return None
3667  *            else:
3668  *                return atof(self.score)             # <<<<<<<<<<<<<<
3669  *        def __set__( self, value ):
3670  *            self.is_modified = True
3671  */
3672     __Pyx_XDECREF(__pyx_r);
3673     __pyx_t_4 = PyFloat_FromDouble(atof(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3674     __Pyx_GOTREF(__pyx_t_4);
3675     __pyx_r = __pyx_t_4;
3676     __pyx_t_4 = 0;
3677     goto __pyx_L0;
3678   }
3679   __pyx_L5:;
3680
3681   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3682   goto __pyx_L0;
3683   __pyx_L1_error:;
3684   __Pyx_XDECREF(__pyx_t_4);
3685   __Pyx_AddTraceback("TabProxies.GTFProxy.score.__get__");
3686   __pyx_r = NULL;
3687   __pyx_L0:;
3688   __Pyx_XGIVEREF(__pyx_r);
3689   __Pyx_RefNannyFinishContext();
3690   return __pyx_r;
3691 }
3692
3693 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":325
3694  *            else:
3695  *                return atof(self.score)
3696  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
3697  *            self.is_modified = True
3698  *            self.score = value
3699  */
3700
3701 static int __pyx_pf_10TabProxies_8GTFProxy_5score___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3702 static int __pyx_pf_10TabProxies_8GTFProxy_5score___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3703   int __pyx_r;
3704   char *__pyx_t_1;
3705   __Pyx_RefNannySetupContext("__set__");
3706
3707   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":326
3708  *                return atof(self.score)
3709  *        def __set__( self, value ):
3710  *            self.is_modified = True             # <<<<<<<<<<<<<<
3711  *            self.score = value
3712  * 
3713  */
3714   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3715
3716   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":327
3717  *        def __set__( self, value ):
3718  *            self.is_modified = True
3719  *            self.score = value             # <<<<<<<<<<<<<<
3720  * 
3721  *     property strand:
3722  */
3723   __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3724   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score = __pyx_t_1;
3725
3726   __pyx_r = 0;
3727   goto __pyx_L0;
3728   __pyx_L1_error:;
3729   __Pyx_AddTraceback("TabProxies.GTFProxy.score.__set__");
3730   __pyx_r = -1;
3731   __pyx_L0:;
3732   __Pyx_RefNannyFinishContext();
3733   return __pyx_r;
3734 }
3735
3736 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":331
3737  *     property strand:
3738  *        '''feature strand.'''
3739  *        def __get__( self ): return self.strand             # <<<<<<<<<<<<<<
3740  *        def __set__( self, value ):
3741  *            self.is_modified = True
3742  */
3743
3744 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6strand___get__(PyObject *__pyx_v_self); /*proto*/
3745 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6strand___get__(PyObject *__pyx_v_self) {
3746   PyObject *__pyx_r = NULL;
3747   PyObject *__pyx_t_1 = NULL;
3748   __Pyx_RefNannySetupContext("__get__");
3749   __Pyx_XDECREF(__pyx_r);
3750   __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3751   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3752   __pyx_r = ((PyObject *)__pyx_t_1);
3753   __pyx_t_1 = 0;
3754   goto __pyx_L0;
3755
3756   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3757   goto __pyx_L0;
3758   __pyx_L1_error:;
3759   __Pyx_XDECREF(__pyx_t_1);
3760   __Pyx_AddTraceback("TabProxies.GTFProxy.strand.__get__");
3761   __pyx_r = NULL;
3762   __pyx_L0:;
3763   __Pyx_XGIVEREF(__pyx_r);
3764   __Pyx_RefNannyFinishContext();
3765   return __pyx_r;
3766 }
3767
3768 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":332
3769  *        '''feature strand.'''
3770  *        def __get__( self ): return self.strand
3771  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
3772  *            self.is_modified = True
3773  *            self.strand = value
3774  */
3775
3776 static int __pyx_pf_10TabProxies_8GTFProxy_6strand___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3777 static int __pyx_pf_10TabProxies_8GTFProxy_6strand___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3778   int __pyx_r;
3779   char *__pyx_t_1;
3780   __Pyx_RefNannySetupContext("__set__");
3781
3782   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":333
3783  *        def __get__( self ): return self.strand
3784  *        def __set__( self, value ):
3785  *            self.is_modified = True             # <<<<<<<<<<<<<<
3786  *            self.strand = value
3787  * 
3788  */
3789   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3790
3791   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":334
3792  *        def __set__( self, value ):
3793  *            self.is_modified = True
3794  *            self.strand = value             # <<<<<<<<<<<<<<
3795  * 
3796  *     property frame:
3797  */
3798   __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3799   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand = __pyx_t_1;
3800
3801   __pyx_r = 0;
3802   goto __pyx_L0;
3803   __pyx_L1_error:;
3804   __Pyx_AddTraceback("TabProxies.GTFProxy.strand.__set__");
3805   __pyx_r = -1;
3806   __pyx_L0:;
3807   __Pyx_RefNannyFinishContext();
3808   return __pyx_r;
3809 }
3810
3811 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":338
3812  *     property frame:
3813  *        '''feature frame.'''
3814  *        def __get__( self ): return self.frame             # <<<<<<<<<<<<<<
3815  *        def __set__( self, value ):
3816  *            self.is_modified = True
3817  */
3818
3819 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5frame___get__(PyObject *__pyx_v_self); /*proto*/
3820 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5frame___get__(PyObject *__pyx_v_self) {
3821   PyObject *__pyx_r = NULL;
3822   PyObject *__pyx_t_1 = NULL;
3823   __Pyx_RefNannySetupContext("__get__");
3824   __Pyx_XDECREF(__pyx_r);
3825   __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3826   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3827   __pyx_r = ((PyObject *)__pyx_t_1);
3828   __pyx_t_1 = 0;
3829   goto __pyx_L0;
3830
3831   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3832   goto __pyx_L0;
3833   __pyx_L1_error:;
3834   __Pyx_XDECREF(__pyx_t_1);
3835   __Pyx_AddTraceback("TabProxies.GTFProxy.frame.__get__");
3836   __pyx_r = NULL;
3837   __pyx_L0:;
3838   __Pyx_XGIVEREF(__pyx_r);
3839   __Pyx_RefNannyFinishContext();
3840   return __pyx_r;
3841 }
3842
3843 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":339
3844  *        '''feature frame.'''
3845  *        def __get__( self ): return self.frame
3846  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
3847  *            self.is_modified = True
3848  *            self.frame = value
3849  */
3850
3851 static int __pyx_pf_10TabProxies_8GTFProxy_5frame___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3852 static int __pyx_pf_10TabProxies_8GTFProxy_5frame___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3853   int __pyx_r;
3854   char *__pyx_t_1;
3855   __Pyx_RefNannySetupContext("__set__");
3856
3857   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":340
3858  *        def __get__( self ): return self.frame
3859  *        def __set__( self, value ):
3860  *            self.is_modified = True             # <<<<<<<<<<<<<<
3861  *            self.frame = value
3862  * 
3863  */
3864   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3865
3866   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":341
3867  *        def __set__( self, value ):
3868  *            self.is_modified = True
3869  *            self.frame = value             # <<<<<<<<<<<<<<
3870  * 
3871  *     property attributes:
3872  */
3873   __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3874   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame = __pyx_t_1;
3875
3876   __pyx_r = 0;
3877   goto __pyx_L0;
3878   __pyx_L1_error:;
3879   __Pyx_AddTraceback("TabProxies.GTFProxy.frame.__set__");
3880   __pyx_r = -1;
3881   __pyx_L0:;
3882   __Pyx_RefNannyFinishContext();
3883   return __pyx_r;
3884 }
3885
3886 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":345
3887  *     property attributes:
3888  *        '''feature attributes (as a string).'''
3889  *        def __get__( self ): return self.attributes             # <<<<<<<<<<<<<<
3890  *        def __set__( self, value ):
3891  *            self.is_modified = True
3892  */
3893
3894 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_10attributes___get__(PyObject *__pyx_v_self); /*proto*/
3895 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_10attributes___get__(PyObject *__pyx_v_self) {
3896   PyObject *__pyx_r = NULL;
3897   PyObject *__pyx_t_1 = NULL;
3898   __Pyx_RefNannySetupContext("__get__");
3899   __Pyx_XDECREF(__pyx_r);
3900   __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3901   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3902   __pyx_r = ((PyObject *)__pyx_t_1);
3903   __pyx_t_1 = 0;
3904   goto __pyx_L0;
3905
3906   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3907   goto __pyx_L0;
3908   __pyx_L1_error:;
3909   __Pyx_XDECREF(__pyx_t_1);
3910   __Pyx_AddTraceback("TabProxies.GTFProxy.attributes.__get__");
3911   __pyx_r = NULL;
3912   __pyx_L0:;
3913   __Pyx_XGIVEREF(__pyx_r);
3914   __Pyx_RefNannyFinishContext();
3915   return __pyx_r;
3916 }
3917
3918 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":346
3919  *        '''feature attributes (as a string).'''
3920  *        def __get__( self ): return self.attributes
3921  *        def __set__( self, value ):             # <<<<<<<<<<<<<<
3922  *            self.is_modified = True
3923  *            self.attributes = value
3924  */
3925
3926 static int __pyx_pf_10TabProxies_8GTFProxy_10attributes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3927 static int __pyx_pf_10TabProxies_8GTFProxy_10attributes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3928   int __pyx_r;
3929   char *__pyx_t_1;
3930   __Pyx_RefNannySetupContext("__set__");
3931
3932   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":347
3933  *        def __get__( self ): return self.attributes
3934  *        def __set__( self, value ):
3935  *            self.is_modified = True             # <<<<<<<<<<<<<<
3936  *            self.attributes = value
3937  * 
3938  */
3939   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3940
3941   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":348
3942  *        def __set__( self, value ):
3943  *            self.is_modified = True
3944  *            self.attributes = value             # <<<<<<<<<<<<<<
3945  * 
3946  *     def asDict( self ):
3947  */
3948   __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3949   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes = __pyx_t_1;
3950
3951   __pyx_r = 0;
3952   goto __pyx_L0;
3953   __pyx_L1_error:;
3954   __Pyx_AddTraceback("TabProxies.GTFProxy.attributes.__set__");
3955   __pyx_r = -1;
3956   __pyx_L0:;
3957   __Pyx_RefNannyFinishContext();
3958   return __pyx_r;
3959 }
3960
3961 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":350
3962  *            self.attributes = value
3963  * 
3964  *     def asDict( self ):             # <<<<<<<<<<<<<<
3965  *         """parse attributes - return as dict
3966  *         """
3967  */
3968
3969 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3970 static char __pyx_doc_10TabProxies_8GTFProxy_asDict[] = "parse attributes - return as dict\n        ";
3971 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3972   char *__pyx_v_attributes;
3973   PyObject *__pyx_v_fields;
3974   PyObject *__pyx_v_result;
3975   PyObject *__pyx_v_f;
3976   PyObject *__pyx_v_d;
3977   PyObject *__pyx_v_n;
3978   PyObject *__pyx_v_v;
3979   PyObject *__pyx_v_x;
3980   PyObject *__pyx_r = NULL;
3981   PyObject *__pyx_t_1 = NULL;
3982   Py_ssize_t __pyx_t_2;
3983   PyObject *__pyx_t_3 = NULL;
3984   PyObject *__pyx_t_4 = NULL;
3985   PyObject *__pyx_t_5 = NULL;
3986   Py_ssize_t __pyx_t_6;
3987   PyObject *__pyx_t_7 = NULL;
3988   int __pyx_t_8;
3989   int __pyx_t_9;
3990   int __pyx_t_10;
3991   double __pyx_t_11;
3992   int __pyx_t_12;
3993   __Pyx_RefNannySetupContext("asDict");
3994   __pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
3995   __pyx_v_result = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
3996   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
3997   __pyx_v_d = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
3998   __pyx_v_n = Py_None; __Pyx_INCREF(Py_None);
3999   __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
4000   __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
4001
4002   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":355
4003  * 
4004  *         # remove comments
4005  *         attributes = self.attributes             # <<<<<<<<<<<<<<
4006  * 
4007  *         # separate into fields
4008  */
4009   __pyx_v_attributes = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes;
4010
4011   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":358
4012  * 
4013  *         # separate into fields
4014  *         fields = [ x.strip() for x in attributes.split(";")[:-1]]             # <<<<<<<<<<<<<<
4015  * 
4016  *         result = {}
4017  */
4018   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4019   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4020   __pyx_t_3 = PyBytes_FromString(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4021   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4022   __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4023   __Pyx_GOTREF(__pyx_t_4);
4024   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4025   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4026   __Pyx_GOTREF(__pyx_t_3);
4027   __Pyx_INCREF(((PyObject *)__pyx_kp_s_10));
4028   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_10));
4029   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_10));
4030   __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4031   __Pyx_GOTREF(__pyx_t_5);
4032   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4033   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4034   __pyx_t_3 = PySequence_GetSlice(__pyx_t_5, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4035   __Pyx_GOTREF(__pyx_t_3);
4036   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4037   if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
4038     __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5);
4039   } else {
4040     __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4041     __Pyx_GOTREF(__pyx_t_5);
4042   }
4043   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4044   for (;;) {
4045     if (likely(PyList_CheckExact(__pyx_t_5))) {
4046       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
4047       __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
4048     } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
4049       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
4050       __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
4051     } else {
4052       __pyx_t_3 = PyIter_Next(__pyx_t_5);
4053       if (!__pyx_t_3) {
4054         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4055         break;
4056       }
4057       __Pyx_GOTREF(__pyx_t_3);
4058     }
4059     __Pyx_DECREF(__pyx_v_x);
4060     __pyx_v_x = __pyx_t_3;
4061     __pyx_t_3 = 0;
4062     __pyx_t_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4063     __Pyx_GOTREF(__pyx_t_3);
4064     __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4065     __Pyx_GOTREF(__pyx_t_4);
4066     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4067     if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4068     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4069   }
4070   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4071   __Pyx_INCREF(((PyObject *)__pyx_t_1));
4072   __Pyx_DECREF(((PyObject *)__pyx_v_fields));
4073   __pyx_v_fields = __pyx_t_1;
4074   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
4075
4076   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":360
4077  *         fields = [ x.strip() for x in attributes.split(";")[:-1]]
4078  * 
4079  *         result = {}             # <<<<<<<<<<<<<<
4080  * 
4081  *         for f in fields:
4082  */
4083   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4084   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4085   __Pyx_DECREF(((PyObject *)__pyx_v_result));
4086   __pyx_v_result = __pyx_t_1;
4087   __pyx_t_1 = 0;
4088
4089   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":362
4090  *         result = {}
4091  * 
4092  *         for f in fields:             # <<<<<<<<<<<<<<
4093  * 
4094  *             d = [ x.strip() for x in f.split(" ")]
4095  */
4096   if (likely(((PyObject *)__pyx_v_fields) != Py_None)) {
4097     __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_fields); __Pyx_INCREF(__pyx_t_1);
4098   } else {
4099     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4100   }
4101   for (;;) {
4102     if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
4103     __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
4104     __Pyx_DECREF(__pyx_v_f);
4105     __pyx_v_f = __pyx_t_5;
4106     __pyx_t_5 = 0;
4107
4108     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":364
4109  *         for f in fields:
4110  * 
4111  *             d = [ x.strip() for x in f.split(" ")]             # <<<<<<<<<<<<<<
4112  * 
4113  *             n,v = d[0], d[1]
4114  */
4115     __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4116     __Pyx_GOTREF(((PyObject *)__pyx_t_5));
4117     __pyx_t_4 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4118     __Pyx_GOTREF(__pyx_t_4);
4119     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4120     __Pyx_GOTREF(__pyx_t_3);
4121     __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
4122     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_11));
4123     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
4124     __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4125     __Pyx_GOTREF(__pyx_t_7);
4126     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4127     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4128     if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
4129       __pyx_t_6 = 0; __pyx_t_3 = __pyx_t_7; __Pyx_INCREF(__pyx_t_3);
4130     } else {
4131       __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4132       __Pyx_GOTREF(__pyx_t_3);
4133     }
4134     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4135     for (;;) {
4136       if (likely(PyList_CheckExact(__pyx_t_3))) {
4137         if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
4138         __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++;
4139       } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
4140         if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
4141         __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++;
4142       } else {
4143         __pyx_t_7 = PyIter_Next(__pyx_t_3);
4144         if (!__pyx_t_7) {
4145           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4146           break;
4147         }
4148         __Pyx_GOTREF(__pyx_t_7);
4149       }
4150       __Pyx_DECREF(__pyx_v_x);
4151       __pyx_v_x = __pyx_t_7;
4152       __pyx_t_7 = 0;
4153       __pyx_t_7 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4154       __Pyx_GOTREF(__pyx_t_7);
4155       __pyx_t_4 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4156       __Pyx_GOTREF(__pyx_t_4);
4157       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4158       if (unlikely(PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4159       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4160     }
4161     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4162     __Pyx_INCREF(((PyObject *)__pyx_t_5));
4163     __Pyx_DECREF(((PyObject *)__pyx_v_d));
4164     __pyx_v_d = __pyx_t_5;
4165     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
4166
4167     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":366
4168  *             d = [ x.strip() for x in f.split(" ")]
4169  * 
4170  *             n,v = d[0], d[1]             # <<<<<<<<<<<<<<
4171  *             if len(d) > 2: v = d[1:]
4172  * 
4173  */
4174     __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4175     __Pyx_GOTREF(__pyx_t_5);
4176     __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4177     __Pyx_GOTREF(__pyx_t_3);
4178     __Pyx_DECREF(__pyx_v_n);
4179     __pyx_v_n = __pyx_t_5;
4180     __pyx_t_5 = 0;
4181     __Pyx_DECREF(__pyx_v_v);
4182     __pyx_v_v = __pyx_t_3;
4183     __pyx_t_3 = 0;
4184
4185     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":367
4186  * 
4187  *             n,v = d[0], d[1]
4188  *             if len(d) > 2: v = d[1:]             # <<<<<<<<<<<<<<
4189  * 
4190  *             if v[0] == '"' and v[-1] == '"':
4191  */
4192     if (unlikely(__pyx_v_d == Py_None)) {
4193       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
4194     }
4195     __pyx_t_6 = PyList_GET_SIZE(((PyObject *)__pyx_v_d)); 
4196     __pyx_t_8 = (__pyx_t_6 > 2);
4197     if (__pyx_t_8) {
4198       __pyx_t_3 = PySequence_GetSlice(((PyObject *)__pyx_v_d), 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4199       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4200       __Pyx_DECREF(__pyx_v_v);
4201       __pyx_v_v = ((PyObject *)__pyx_t_3);
4202       __pyx_t_3 = 0;
4203       goto __pyx_L11;
4204     }
4205     __pyx_L11:;
4206
4207     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":369
4208  *             if len(d) > 2: v = d[1:]
4209  * 
4210  *             if v[0] == '"' and v[-1] == '"':             # <<<<<<<<<<<<<<
4211  *                 v = v[1:-1]
4212  *             else:
4213  */
4214     __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4215     __Pyx_GOTREF(__pyx_t_3);
4216     __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_kp_s_12), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4217     __Pyx_GOTREF(__pyx_t_5);
4218     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4219     __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4220     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4221     if (__pyx_t_8) {
4222       __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_v, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4223       __Pyx_GOTREF(__pyx_t_5);
4224       __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_12), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4225       __Pyx_GOTREF(__pyx_t_3);
4226       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4227       __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4228       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4229       __pyx_t_10 = __pyx_t_9;
4230     } else {
4231       __pyx_t_10 = __pyx_t_8;
4232     }
4233     if (__pyx_t_10) {
4234
4235       /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":370
4236  * 
4237  *             if v[0] == '"' and v[-1] == '"':
4238  *                 v = v[1:-1]             # <<<<<<<<<<<<<<
4239  *             else:
4240  *                 ## try to convert to a value
4241  */
4242       __pyx_t_3 = PySequence_GetSlice(__pyx_v_v, 1, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4243       __Pyx_GOTREF(__pyx_t_3);
4244       __Pyx_DECREF(__pyx_v_v);
4245       __pyx_v_v = __pyx_t_3;
4246       __pyx_t_3 = 0;
4247       goto __pyx_L12;
4248     }
4249     /*else*/ {
4250
4251       /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":373
4252  *             else:
4253  *                 ## try to convert to a value
4254  *                 try:             # <<<<<<<<<<<<<<
4255  *                     v = float( v )
4256  *                     v = int( v )
4257  */
4258       {
4259         PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
4260         __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
4261         __Pyx_XGOTREF(__pyx_save_exc_type);
4262         __Pyx_XGOTREF(__pyx_save_exc_value);
4263         __Pyx_XGOTREF(__pyx_save_exc_tb);
4264         /*try:*/ {
4265
4266           /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":374
4267  *                 ## try to convert to a value
4268  *                 try:
4269  *                     v = float( v )             # <<<<<<<<<<<<<<
4270  *                     v = int( v )
4271  *                 except ValueError:
4272  */
4273           __pyx_t_11 = __Pyx_PyObject_AsDouble(__pyx_v_v); if (unlikely(__pyx_t_11 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
4274           __pyx_t_3 = PyFloat_FromDouble(__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
4275           __Pyx_GOTREF(__pyx_t_3);
4276           __Pyx_DECREF(__pyx_v_v);
4277           __pyx_v_v = __pyx_t_3;
4278           __pyx_t_3 = 0;
4279
4280           /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":375
4281  *                 try:
4282  *                     v = float( v )
4283  *                     v = int( v )             # <<<<<<<<<<<<<<
4284  *                 except ValueError:
4285  *                     pass
4286  */
4287           __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
4288           __Pyx_GOTREF(__pyx_t_3);
4289           __Pyx_INCREF(__pyx_v_v);
4290           PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_v);
4291           __Pyx_GIVEREF(__pyx_v_v);
4292           __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
4293           __Pyx_GOTREF(__pyx_t_5);
4294           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4295           __Pyx_DECREF(__pyx_v_v);
4296           __pyx_v_v = __pyx_t_5;
4297           __pyx_t_5 = 0;
4298         }
4299         __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
4300         __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
4301         __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
4302         goto __pyx_L20_try_end;
4303         __pyx_L13_error:;
4304         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4305         __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4306         __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4307         __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4308
4309         /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":376
4310  *                     v = float( v )
4311  *                     v = int( v )
4312  *                 except ValueError:             # <<<<<<<<<<<<<<
4313  *                     pass
4314  *                 except TypeError:
4315  */
4316         __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
4317         if (__pyx_t_12) {
4318           PyErr_Restore(0,0,0);
4319           goto __pyx_L14_exception_handled;
4320         }
4321
4322         /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":378
4323  *                 except ValueError:
4324  *                     pass
4325  *                 except TypeError:             # <<<<<<<<<<<<<<
4326  *                     pass
4327  * 
4328  */
4329         __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
4330         if (__pyx_t_12) {
4331           PyErr_Restore(0,0,0);
4332           goto __pyx_L14_exception_handled;
4333         }
4334         __Pyx_XGIVEREF(__pyx_save_exc_type);
4335         __Pyx_XGIVEREF(__pyx_save_exc_value);
4336         __Pyx_XGIVEREF(__pyx_save_exc_tb);
4337         __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
4338         goto __pyx_L1_error;
4339         __pyx_L14_exception_handled:;
4340         __Pyx_XGIVEREF(__pyx_save_exc_type);
4341         __Pyx_XGIVEREF(__pyx_save_exc_value);
4342         __Pyx_XGIVEREF(__pyx_save_exc_tb);
4343         __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
4344         __pyx_L20_try_end:;
4345       }
4346     }
4347     __pyx_L12:;
4348
4349     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":381
4350  *                     pass
4351  * 
4352  *             result[n] = v             # <<<<<<<<<<<<<<
4353  * 
4354  *         return result
4355  */
4356     if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_n, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4357   }
4358   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4359
4360   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":383
4361  *             result[n] = v
4362  * 
4363  *         return result             # <<<<<<<<<<<<<<
4364  * 
4365  *     def fromDict( self, d ):
4366  */
4367   __Pyx_XDECREF(__pyx_r);
4368   __Pyx_INCREF(((PyObject *)__pyx_v_result));
4369   __pyx_r = ((PyObject *)__pyx_v_result);
4370   goto __pyx_L0;
4371
4372   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4373   goto __pyx_L0;
4374   __pyx_L1_error:;
4375   __Pyx_XDECREF(__pyx_t_1);
4376   __Pyx_XDECREF(__pyx_t_3);
4377   __Pyx_XDECREF(__pyx_t_4);
4378   __Pyx_XDECREF(__pyx_t_5);
4379   __Pyx_XDECREF(__pyx_t_7);
4380   __Pyx_AddTraceback("TabProxies.GTFProxy.asDict");
4381   __pyx_r = NULL;
4382   __pyx_L0:;
4383   __Pyx_DECREF(__pyx_v_fields);
4384   __Pyx_DECREF(__pyx_v_result);
4385   __Pyx_DECREF(__pyx_v_f);
4386   __Pyx_DECREF(__pyx_v_d);
4387   __Pyx_DECREF(__pyx_v_n);
4388   __Pyx_DECREF(__pyx_v_v);
4389   __Pyx_DECREF(__pyx_v_x);
4390   __Pyx_XGIVEREF(__pyx_r);
4391   __Pyx_RefNannyFinishContext();
4392   return __pyx_r;
4393 }
4394
4395 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":385
4396  *         return result
4397  * 
4398  *     def fromDict( self, d ):             # <<<<<<<<<<<<<<
4399  *         '''set attributes from a dictionary.'''
4400  *         cdef char * p
4401  */
4402
4403 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d); /*proto*/
4404 static char __pyx_doc_10TabProxies_8GTFProxy_fromDict[] = "set attributes from a dictionary.";
4405 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d) {
4406   char *__pyx_v_p;
4407   int __pyx_v_l;
4408   PyObject *__pyx_v_aa;
4409   PyObject *__pyx_v_k;
4410   PyObject *__pyx_v_v;
4411   PyObject *__pyx_v_a;
4412   PyObject *__pyx_r = NULL;
4413   PyObject *__pyx_t_1 = NULL;
4414   Py_ssize_t __pyx_t_2;
4415   PyObject *__pyx_t_3 = NULL;
4416   PyObject *__pyx_t_4 = NULL;
4417   PyObject *__pyx_t_5 = NULL;
4418   PyObject *__pyx_t_6 = NULL;
4419   int __pyx_t_7;
4420   int __pyx_t_8;
4421   char *__pyx_t_9;
4422   __Pyx_RefNannySetupContext("fromDict");
4423   __pyx_v_aa = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
4424   __pyx_v_k = Py_None; __Pyx_INCREF(Py_None);
4425   __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
4426   __pyx_v_a = Py_None; __Pyx_INCREF(Py_None);
4427
4428   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":391
4429  * 
4430  *         # clean up if this field is set twice
4431  *         if self.hasOwnAttributes:             # <<<<<<<<<<<<<<
4432  *             free(self.attributes)
4433  * 
4434  */
4435   if (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes) {
4436
4437     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":392
4438  *         # clean up if this field is set twice
4439  *         if self.hasOwnAttributes:
4440  *             free(self.attributes)             # <<<<<<<<<<<<<<
4441  * 
4442  *         aa = []
4443  */
4444     free(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes);
4445     goto __pyx_L5;
4446   }
4447   __pyx_L5:;
4448
4449   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":394
4450  *             free(self.attributes)
4451  * 
4452  *         aa = []             # <<<<<<<<<<<<<<
4453  *         for k,v in d.items():
4454  *             if type(v) == types.StringType:
4455  */
4456   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4457   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4458   __Pyx_DECREF(((PyObject *)__pyx_v_aa));
4459   __pyx_v_aa = __pyx_t_1;
4460   __pyx_t_1 = 0;
4461
4462   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":395
4463  * 
4464  *         aa = []
4465  *         for k,v in d.items():             # <<<<<<<<<<<<<<
4466  *             if type(v) == types.StringType:
4467  *                 aa.append( '%s "%s"' % (k,v) )
4468  */
4469   __pyx_t_1 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4470   __Pyx_GOTREF(__pyx_t_1);
4471   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4472   __Pyx_GOTREF(__pyx_t_3);
4473   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4474   if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
4475     __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
4476   } else {
4477     __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4478     __Pyx_GOTREF(__pyx_t_1);
4479   }
4480   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4481   for (;;) {
4482     if (likely(PyList_CheckExact(__pyx_t_1))) {
4483       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
4484       __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
4485     } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
4486       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
4487       __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
4488     } else {
4489       __pyx_t_3 = PyIter_Next(__pyx_t_1);
4490       if (!__pyx_t_3) {
4491         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4492         break;
4493       }
4494       __Pyx_GOTREF(__pyx_t_3);
4495     }
4496     if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
4497       PyObject* tuple = __pyx_t_3;
4498       __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
4499       __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
4500       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4501       __Pyx_DECREF(__pyx_v_k);
4502       __pyx_v_k = __pyx_t_4;
4503       __pyx_t_4 = 0;
4504       __Pyx_DECREF(__pyx_v_v);
4505       __pyx_v_v = __pyx_t_5;
4506       __pyx_t_5 = 0;
4507     } else {
4508       __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4509       __Pyx_GOTREF(__pyx_t_6);
4510       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4511       __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4512       __Pyx_GOTREF(__pyx_t_4);
4513       __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4514       __Pyx_GOTREF(__pyx_t_5);
4515       if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4516       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4517       __Pyx_DECREF(__pyx_v_k);
4518       __pyx_v_k = __pyx_t_4;
4519       __pyx_t_4 = 0;
4520       __Pyx_DECREF(__pyx_v_v);
4521       __pyx_v_v = __pyx_t_5;
4522       __pyx_t_5 = 0;
4523     }
4524
4525     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":396
4526  *         aa = []
4527  *         for k,v in d.items():
4528  *             if type(v) == types.StringType:             # <<<<<<<<<<<<<<
4529  *                 aa.append( '%s "%s"' % (k,v) )
4530  *             else:
4531  */
4532     __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4533     __Pyx_GOTREF(__pyx_t_3);
4534     __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__StringType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4535     __Pyx_GOTREF(__pyx_t_5);
4536     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4537     __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4538     __Pyx_GOTREF(__pyx_t_3);
4539     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4540     __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4541     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4542     if (__pyx_t_7) {
4543
4544       /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":397
4545  *         for k,v in d.items():
4546  *             if type(v) == types.StringType:
4547  *                 aa.append( '%s "%s"' % (k,v) )             # <<<<<<<<<<<<<<
4548  *             else:
4549  *                 aa.append( '%s %s' % (k,str(v)) )
4550  */
4551       if (unlikely(__pyx_v_aa == Py_None)) {
4552         PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
4553       }
4554       __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4555       __Pyx_GOTREF(__pyx_t_3);
4556       __Pyx_INCREF(__pyx_v_k);
4557       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_k);
4558       __Pyx_GIVEREF(__pyx_v_k);
4559       __Pyx_INCREF(__pyx_v_v);
4560       PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_v);
4561       __Pyx_GIVEREF(__pyx_v_v);
4562       __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4563       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
4564       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4565       __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_aa), ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4566       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
4567       goto __pyx_L8;
4568     }
4569     /*else*/ {
4570
4571       /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":399
4572  *                 aa.append( '%s "%s"' % (k,v) )
4573  *             else:
4574  *                 aa.append( '%s %s' % (k,str(v)) )             # <<<<<<<<<<<<<<
4575  * 
4576  *         a = "; ".join( aa ) + ";"
4577  */
4578       if (unlikely(__pyx_v_aa == Py_None)) {
4579         PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
4580       }
4581       __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4582       __Pyx_GOTREF(__pyx_t_5);
4583       __Pyx_INCREF(__pyx_v_v);
4584       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v);
4585       __Pyx_GIVEREF(__pyx_v_v);
4586       __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4587       __Pyx_GOTREF(__pyx_t_3);
4588       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4589       __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4590       __Pyx_GOTREF(__pyx_t_5);
4591       __Pyx_INCREF(__pyx_v_k);
4592       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_k);
4593       __Pyx_GIVEREF(__pyx_v_k);
4594       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
4595       __Pyx_GIVEREF(__pyx_t_3);
4596       __pyx_t_3 = 0;
4597       __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4598       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4599       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4600       __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_aa), ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4601       __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4602     }
4603     __pyx_L8:;
4604   }
4605   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4606
4607   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":401
4608  *                 aa.append( '%s %s' % (k,str(v)) )
4609  * 
4610  *         a = "; ".join( aa ) + ";"             # <<<<<<<<<<<<<<
4611  *         p = a
4612  *         l = len(a)
4613  */
4614   __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_15), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4615   __Pyx_GOTREF(__pyx_t_1);
4616   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4617   __Pyx_GOTREF(__pyx_t_3);
4618   __Pyx_INCREF(((PyObject *)__pyx_v_aa));
4619   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_aa));
4620   __Pyx_GIVEREF(((PyObject *)__pyx_v_aa));
4621   __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4622   __Pyx_GOTREF(__pyx_t_5);
4623   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4624   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4625   __pyx_t_3 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_10)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4626   __Pyx_GOTREF(__pyx_t_3);
4627   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4628   __Pyx_DECREF(__pyx_v_a);
4629   __pyx_v_a = __pyx_t_3;
4630   __pyx_t_3 = 0;
4631
4632   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":402
4633  * 
4634  *         a = "; ".join( aa ) + ";"
4635  *         p = a             # <<<<<<<<<<<<<<
4636  *         l = len(a)
4637  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )
4638  */
4639   __pyx_t_9 = PyBytes_AsString(__pyx_v_a); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4640   __pyx_v_p = __pyx_t_9;
4641
4642   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":403
4643  *         a = "; ".join( aa ) + ";"
4644  *         p = a
4645  *         l = len(a)             # <<<<<<<<<<<<<<
4646  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )
4647  *         if self.attributes == NULL:
4648  */
4649   __pyx_t_2 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4650   __pyx_v_l = __pyx_t_2;
4651
4652   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":404
4653  *         p = a
4654  *         l = len(a)
4655  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )             # <<<<<<<<<<<<<<
4656  *         if self.attributes == NULL:
4657  *             raise ValueError("out of memory" )
4658  */
4659   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes = ((char *)calloc((__pyx_v_l + 1), (sizeof(char))));
4660
4661   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":405
4662  *         l = len(a)
4663  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )
4664  *         if self.attributes == NULL:             # <<<<<<<<<<<<<<
4665  *             raise ValueError("out of memory" )
4666  *         memcpy( self.attributes, p, l )
4667  */
4668   __pyx_t_7 = (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes == NULL);
4669   if (__pyx_t_7) {
4670
4671     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":406
4672  *         self.attributes = <char *>calloc( l + 1, sizeof(char) )
4673  *         if self.attributes == NULL:
4674  *             raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
4675  *         memcpy( self.attributes, p, l )
4676  * 
4677  */
4678     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4679     __Pyx_GOTREF(__pyx_t_3);
4680     __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
4681     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
4682     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
4683     __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4684     __Pyx_GOTREF(__pyx_t_5);
4685     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4686     __Pyx_Raise(__pyx_t_5, 0, 0);
4687     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4688     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4689     goto __pyx_L9;
4690   }
4691   __pyx_L9:;
4692
4693   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":407
4694  *         if self.attributes == NULL:
4695  *             raise ValueError("out of memory" )
4696  *         memcpy( self.attributes, p, l )             # <<<<<<<<<<<<<<
4697  * 
4698  *         self.hasOwnAttributes = True
4699  */
4700   memcpy(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes, __pyx_v_p, __pyx_v_l);
4701
4702   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":409
4703  *         memcpy( self.attributes, p, l )
4704  * 
4705  *         self.hasOwnAttributes = True             # <<<<<<<<<<<<<<
4706  *         self.is_modified = True
4707  * 
4708  */
4709   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes = 1;
4710
4711   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":410
4712  * 
4713  *         self.hasOwnAttributes = True
4714  *         self.is_modified = True             # <<<<<<<<<<<<<<
4715  * 
4716  *     def __str__(self):
4717  */
4718   ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
4719
4720   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4721   goto __pyx_L0;
4722   __pyx_L1_error:;
4723   __Pyx_XDECREF(__pyx_t_1);
4724   __Pyx_XDECREF(__pyx_t_3);
4725   __Pyx_XDECREF(__pyx_t_4);
4726   __Pyx_XDECREF(__pyx_t_5);
4727   __Pyx_XDECREF(__pyx_t_6);
4728   __Pyx_AddTraceback("TabProxies.GTFProxy.fromDict");
4729   __pyx_r = NULL;
4730   __pyx_L0:;
4731   __Pyx_DECREF(__pyx_v_aa);
4732   __Pyx_DECREF(__pyx_v_k);
4733   __Pyx_DECREF(__pyx_v_v);
4734   __Pyx_DECREF(__pyx_v_a);
4735   __Pyx_XGIVEREF(__pyx_r);
4736   __Pyx_RefNannyFinishContext();
4737   return __pyx_r;
4738 }
4739
4740 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":412
4741  *         self.is_modified = True
4742  * 
4743  *     def __str__(self):             # <<<<<<<<<<<<<<
4744  *         cdef char * cpy
4745  *         cdef int x
4746  */
4747
4748 static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self); /*proto*/
4749 static PyObject *__pyx_pf_10TabProxies_8GTFProxy___str__(PyObject *__pyx_v_self) {
4750   PyObject *__pyx_r = NULL;
4751   PyObject *__pyx_t_1 = NULL;
4752   PyObject *__pyx_t_2 = NULL;
4753   PyObject *__pyx_t_3 = NULL;
4754   PyObject *__pyx_t_4 = NULL;
4755   PyObject *__pyx_t_5 = NULL;
4756   PyObject *__pyx_t_6 = NULL;
4757   PyObject *__pyx_t_7 = NULL;
4758   PyObject *__pyx_t_8 = NULL;
4759   PyObject *__pyx_t_9 = NULL;
4760   PyObject *__pyx_t_10 = NULL;
4761   PyObject *__pyx_t_11 = NULL;
4762   __Pyx_RefNannySetupContext("__str__");
4763
4764   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":416
4765  *         cdef int x
4766  * 
4767  *         if self.is_modified:             # <<<<<<<<<<<<<<
4768  *             return "\t".join(
4769  *                 (self.contig,
4770  */
4771   if (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified) {
4772
4773     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":417
4774  * 
4775  *         if self.is_modified:
4776  *             return "\t".join(             # <<<<<<<<<<<<<<
4777  *                 (self.contig,
4778  *                  self.source,
4779  */
4780     __Pyx_XDECREF(__pyx_r);
4781     __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4782     __Pyx_GOTREF(__pyx_t_1);
4783
4784     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":418
4785  *         if self.is_modified:
4786  *             return "\t".join(
4787  *                 (self.contig,             # <<<<<<<<<<<<<<
4788  *                  self.source,
4789  *                  self.feature,
4790  */
4791     __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4792     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4793
4794     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":419
4795  *             return "\t".join(
4796  *                 (self.contig,
4797  *                  self.source,             # <<<<<<<<<<<<<<
4798  *                  self.feature,
4799  *                  str(self.start+1),
4800  */
4801     __pyx_t_3 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4802     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4803
4804     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":420
4805  *                 (self.contig,
4806  *                  self.source,
4807  *                  self.feature,             # <<<<<<<<<<<<<<
4808  *                  str(self.start+1),
4809  *                  str(self.end),
4810  */
4811     __pyx_t_4 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4812     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
4813
4814     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":421
4815  *                  self.source,
4816  *                  self.feature,
4817  *                  str(self.start+1),             # <<<<<<<<<<<<<<
4818  *                  str(self.end),
4819  *                  toDot(self.score),
4820  */
4821     __pyx_t_5 = PyInt_FromLong((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4822     __Pyx_GOTREF(__pyx_t_5);
4823     __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4824     __Pyx_GOTREF(__pyx_t_6);
4825     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
4826     __Pyx_GIVEREF(__pyx_t_5);
4827     __pyx_t_5 = 0;
4828     __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4829     __Pyx_GOTREF(__pyx_t_5);
4830     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4831
4832     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":422
4833  *                  self.feature,
4834  *                  str(self.start+1),
4835  *                  str(self.end),             # <<<<<<<<<<<<<<
4836  *                  toDot(self.score),
4837  *                  self.strand,
4838  */
4839     __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4840     __Pyx_GOTREF(__pyx_t_6);
4841     __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4842     __Pyx_GOTREF(__pyx_t_7);
4843     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
4844     __Pyx_GIVEREF(__pyx_t_6);
4845     __pyx_t_6 = 0;
4846     __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4847     __Pyx_GOTREF(__pyx_t_6);
4848     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4849
4850     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":423
4851  *                  str(self.start+1),
4852  *                  str(self.end),
4853  *                  toDot(self.score),             # <<<<<<<<<<<<<<
4854  *                  self.strand,
4855  *                  self.frame,
4856  */
4857     __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__toDot); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4858     __Pyx_GOTREF(__pyx_t_7);
4859     __pyx_t_8 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4860     __Pyx_GOTREF(((PyObject *)__pyx_t_8));
4861     __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4862     __Pyx_GOTREF(__pyx_t_9);
4863     PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
4864     __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
4865     __pyx_t_8 = 0;
4866     __pyx_t_8 = PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4867     __Pyx_GOTREF(__pyx_t_8);
4868     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4869     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4870
4871     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":424
4872  *                  str(self.end),
4873  *                  toDot(self.score),
4874  *                  self.strand,             # <<<<<<<<<<<<<<
4875  *                  self.frame,
4876  *                  self.attributes ) )
4877  */
4878     __pyx_t_9 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4879     __Pyx_GOTREF(((PyObject *)__pyx_t_9));
4880
4881     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":425
4882  *                  toDot(self.score),
4883  *                  self.strand,
4884  *                  self.frame,             # <<<<<<<<<<<<<<
4885  *                  self.attributes ) )
4886  *         else:
4887  */
4888     __pyx_t_7 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4889     __Pyx_GOTREF(((PyObject *)__pyx_t_7));
4890
4891     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":426
4892  *                  self.strand,
4893  *                  self.frame,
4894  *                  self.attributes ) )             # <<<<<<<<<<<<<<
4895  *         else:
4896  *             return TupleProxy.__str__(self)
4897  */
4898     __pyx_t_10 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4899     __Pyx_GOTREF(((PyObject *)__pyx_t_10));
4900     __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4901     __Pyx_GOTREF(__pyx_t_11);
4902     PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_2));
4903     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
4904     PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_t_3));
4905     __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
4906     PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_t_4));
4907     __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
4908     PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_5);
4909     __Pyx_GIVEREF(__pyx_t_5);
4910     PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_6);
4911     __Pyx_GIVEREF(__pyx_t_6);
4912     PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_8);
4913     __Pyx_GIVEREF(__pyx_t_8);
4914     PyTuple_SET_ITEM(__pyx_t_11, 6, ((PyObject *)__pyx_t_9));
4915     __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
4916     PyTuple_SET_ITEM(__pyx_t_11, 7, ((PyObject *)__pyx_t_7));
4917     __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
4918     PyTuple_SET_ITEM(__pyx_t_11, 8, ((PyObject *)__pyx_t_10));
4919     __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
4920     __pyx_t_2 = 0;
4921     __pyx_t_3 = 0;
4922     __pyx_t_4 = 0;
4923     __pyx_t_5 = 0;
4924     __pyx_t_6 = 0;
4925     __pyx_t_8 = 0;
4926     __pyx_t_9 = 0;
4927     __pyx_t_7 = 0;
4928     __pyx_t_10 = 0;
4929     __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4930     __Pyx_GOTREF(__pyx_t_10);
4931     PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
4932     __Pyx_GIVEREF(__pyx_t_11);
4933     __pyx_t_11 = 0;
4934     __pyx_t_11 = PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4935     __Pyx_GOTREF(__pyx_t_11);
4936     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4937     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4938     __pyx_r = __pyx_t_11;
4939     __pyx_t_11 = 0;
4940     goto __pyx_L0;
4941     goto __pyx_L5;
4942   }
4943   /*else*/ {
4944
4945     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":428
4946  *                  self.attributes ) )
4947  *         else:
4948  *             return TupleProxy.__str__(self)             # <<<<<<<<<<<<<<
4949  * 
4950  *     def invert( self, int lcontig ):
4951  */
4952     __Pyx_XDECREF(__pyx_r);
4953     __pyx_t_11 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4954     __Pyx_GOTREF(__pyx_t_11);
4955     __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4956     __Pyx_GOTREF(__pyx_t_10);
4957     __Pyx_INCREF(__pyx_v_self);
4958     PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self);
4959     __Pyx_GIVEREF(__pyx_v_self);
4960     __pyx_t_1 = PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4961     __Pyx_GOTREF(__pyx_t_1);
4962     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4963     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4964     __pyx_r = __pyx_t_1;
4965     __pyx_t_1 = 0;
4966     goto __pyx_L0;
4967   }
4968   __pyx_L5:;
4969
4970   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4971   goto __pyx_L0;
4972   __pyx_L1_error:;
4973   __Pyx_XDECREF(__pyx_t_1);
4974   __Pyx_XDECREF(__pyx_t_2);
4975   __Pyx_XDECREF(__pyx_t_3);
4976   __Pyx_XDECREF(__pyx_t_4);
4977   __Pyx_XDECREF(__pyx_t_5);
4978   __Pyx_XDECREF(__pyx_t_6);
4979   __Pyx_XDECREF(__pyx_t_7);
4980   __Pyx_XDECREF(__pyx_t_8);
4981   __Pyx_XDECREF(__pyx_t_9);
4982   __Pyx_XDECREF(__pyx_t_10);
4983   __Pyx_XDECREF(__pyx_t_11);
4984   __Pyx_AddTraceback("TabProxies.GTFProxy.__str__");
4985   __pyx_r = NULL;
4986   __pyx_L0:;
4987   __Pyx_XGIVEREF(__pyx_r);
4988   __Pyx_RefNannyFinishContext();
4989   return __pyx_r;
4990 }
4991
4992 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":430
4993  *             return TupleProxy.__str__(self)
4994  * 
4995  *     def invert( self, int lcontig ):             # <<<<<<<<<<<<<<
4996  *         '''invert coordinates to negative strand coordinates
4997  * 
4998  */
4999
5000 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig); /*proto*/
5001 static char __pyx_doc_10TabProxies_8GTFProxy_invert[] = "invert coordinates to negative strand coordinates\n        \n        This method will only act if the feature is on the\n        negative strand.";
5002 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig) {
5003   int __pyx_v_lcontig;
5004   PyObject *__pyx_v_start;
5005   PyObject *__pyx_v_end;
5006   PyObject *__pyx_r = NULL;
5007   int __pyx_t_1;
5008   uint32_t __pyx_t_2;
5009   uint32_t __pyx_t_3;
5010   uint32_t __pyx_t_4;
5011   PyObject *__pyx_t_5 = NULL;
5012   PyObject *__pyx_t_6 = NULL;
5013   __Pyx_RefNannySetupContext("invert");
5014   assert(__pyx_arg_lcontig); {
5015     __pyx_v_lcontig = __Pyx_PyInt_AsInt(__pyx_arg_lcontig); if (unlikely((__pyx_v_lcontig == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5016   }
5017   goto __pyx_L4_argument_unpacking_done;
5018   __pyx_L3_error:;
5019   __Pyx_AddTraceback("TabProxies.GTFProxy.invert");
5020   __Pyx_RefNannyFinishContext();
5021   return NULL;
5022   __pyx_L4_argument_unpacking_done:;
5023   __pyx_v_start = Py_None; __Pyx_INCREF(Py_None);
5024   __pyx_v_end = Py_None; __Pyx_INCREF(Py_None);
5025
5026   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":436
5027  *         negative strand.'''
5028  * 
5029  *         if self.strand[0] == '-':             # <<<<<<<<<<<<<<
5030  *             start = min(self.start, self.end)
5031  *             end = max(self.start, self.end)
5032  */
5033   __pyx_t_1 = ((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand[0]) == '-');
5034   if (__pyx_t_1) {
5035
5036     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":437
5037  * 
5038  *         if self.strand[0] == '-':
5039  *             start = min(self.start, self.end)             # <<<<<<<<<<<<<<
5040  *             end = max(self.start, self.end)
5041  *             self.start, self.end = lcontig - end, lcontig - start
5042  */
5043     __pyx_t_2 = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end;
5044     __pyx_t_3 = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start;
5045     if ((__pyx_t_2 < __pyx_t_3)) {
5046       __pyx_t_4 = __pyx_t_2;
5047     } else {
5048       __pyx_t_4 = __pyx_t_3;
5049     }
5050     __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5051     __Pyx_GOTREF(__pyx_t_5);
5052     __Pyx_DECREF(__pyx_v_start);
5053     __pyx_v_start = __pyx_t_5;
5054     __pyx_t_5 = 0;
5055
5056     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":438
5057  *         if self.strand[0] == '-':
5058  *             start = min(self.start, self.end)
5059  *             end = max(self.start, self.end)             # <<<<<<<<<<<<<<
5060  *             self.start, self.end = lcontig - end, lcontig - start
5061  * 
5062  */
5063     __pyx_t_4 = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end;
5064     __pyx_t_2 = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start;
5065     if ((__pyx_t_4 > __pyx_t_2)) {
5066       __pyx_t_3 = __pyx_t_4;
5067     } else {
5068       __pyx_t_3 = __pyx_t_2;
5069     }
5070     __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5071     __Pyx_GOTREF(__pyx_t_5);
5072     __Pyx_DECREF(__pyx_v_end);
5073     __pyx_v_end = __pyx_t_5;
5074     __pyx_t_5 = 0;
5075
5076     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":439
5077  *             start = min(self.start, self.end)
5078  *             end = max(self.start, self.end)
5079  *             self.start, self.end = lcontig - end, lcontig - start             # <<<<<<<<<<<<<<
5080  * 
5081  *     def keys( self ):
5082  */
5083     __pyx_t_5 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5084     __Pyx_GOTREF(__pyx_t_5);
5085     __pyx_t_6 = PyNumber_Subtract(__pyx_t_5, __pyx_v_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5086     __Pyx_GOTREF(__pyx_t_6);
5087     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5088     __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5089     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5090     __pyx_t_6 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5091     __Pyx_GOTREF(__pyx_t_6);
5092     __pyx_t_5 = PyNumber_Subtract(__pyx_t_6, __pyx_v_start); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5093     __Pyx_GOTREF(__pyx_t_5);
5094     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5095     __pyx_t_4 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_4 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5096     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5097     ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start = __pyx_t_3;
5098     ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end = __pyx_t_4;
5099     goto __pyx_L5;
5100   }
5101   __pyx_L5:;
5102
5103   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5104   goto __pyx_L0;
5105   __pyx_L1_error:;
5106   __Pyx_XDECREF(__pyx_t_5);
5107   __Pyx_XDECREF(__pyx_t_6);
5108   __Pyx_AddTraceback("TabProxies.GTFProxy.invert");
5109   __pyx_r = NULL;
5110   __pyx_L0:;
5111   __Pyx_DECREF(__pyx_v_start);
5112   __Pyx_DECREF(__pyx_v_end);
5113   __Pyx_XGIVEREF(__pyx_r);
5114   __Pyx_RefNannyFinishContext();
5115   return __pyx_r;
5116 }
5117
5118 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":441
5119  *             self.start, self.end = lcontig - end, lcontig - start
5120  * 
5121  *     def keys( self ):             # <<<<<<<<<<<<<<
5122  *         '''return a list of attributes defined in this entry.'''
5123  *         r = self.attributes
5124  */
5125
5126 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5127 static char __pyx_doc_10TabProxies_8GTFProxy_keys[] = "return a list of attributes defined in this entry.";
5128 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5129   char *__pyx_v_r;
5130   PyObject *__pyx_v_x;
5131   PyObject *__pyx_r = NULL;
5132   PyObject *__pyx_t_1 = NULL;
5133   Py_ssize_t __pyx_t_2;
5134   PyObject *__pyx_t_3 = NULL;
5135   PyObject *__pyx_t_4 = NULL;
5136   PyObject *__pyx_t_5 = NULL;
5137   int __pyx_t_6;
5138   PyObject *__pyx_t_7 = NULL;
5139   __Pyx_RefNannySetupContext("keys");
5140   __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
5141
5142   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":443
5143  *     def keys( self ):
5144  *         '''return a list of attributes defined in this entry.'''
5145  *         r = self.attributes             # <<<<<<<<<<<<<<
5146  *         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]
5147  * 
5148  */
5149   __pyx_v_r = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes;
5150
5151   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":444
5152  *         '''return a list of attributes defined in this entry.'''
5153  *         r = self.attributes
5154  *         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]             # <<<<<<<<<<<<<<
5155  * 
5156  *     def __getitem__(self, item):
5157  */
5158   __Pyx_XDECREF(__pyx_r);
5159   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5160   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
5161   __pyx_t_3 = PyBytes_FromString(__pyx_v_r); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5162   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
5163   __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5164   __Pyx_GOTREF(__pyx_t_4);
5165   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
5166   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5167   __Pyx_GOTREF(__pyx_t_3);
5168   __Pyx_INCREF(((PyObject *)__pyx_kp_s_10));
5169   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_10));
5170   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_10));
5171   __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5172   __Pyx_GOTREF(__pyx_t_5);
5173   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5174   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5175   if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
5176     __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3);
5177   } else {
5178     __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5179     __Pyx_GOTREF(__pyx_t_3);
5180   }
5181   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5182   for (;;) {
5183     if (likely(PyList_CheckExact(__pyx_t_3))) {
5184       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
5185       __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
5186     } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
5187       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
5188       __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
5189     } else {
5190       __pyx_t_5 = PyIter_Next(__pyx_t_3);
5191       if (!__pyx_t_5) {
5192         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5193         break;
5194       }
5195       __Pyx_GOTREF(__pyx_t_5);
5196     }
5197     __Pyx_DECREF(__pyx_v_x);
5198     __pyx_v_x = __pyx_t_5;
5199     __pyx_t_5 = 0;
5200     __pyx_t_5 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5201     __Pyx_GOTREF(__pyx_t_5);
5202     __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5203     __Pyx_GOTREF(__pyx_t_4);
5204     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5205     __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_s_2), Py_NE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5206     __Pyx_GOTREF(__pyx_t_5);
5207     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5208     __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5209     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5210     if (__pyx_t_6) {
5211       __pyx_t_5 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5212       __Pyx_GOTREF(__pyx_t_5);
5213       __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5214       __Pyx_GOTREF(__pyx_t_4);
5215       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5216       __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5217       __Pyx_GOTREF(__pyx_t_5);
5218       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5219       __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5220       __Pyx_GOTREF(__pyx_t_4);
5221       __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
5222       PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_11));
5223       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
5224       __pyx_t_7 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5225       __Pyx_GOTREF(__pyx_t_7);
5226       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5227       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5228       __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5229       __Pyx_GOTREF(__pyx_t_4);
5230       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5231       if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5232       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5233       goto __pyx_L7;
5234     }
5235     __pyx_L7:;
5236   }
5237   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5238   __Pyx_INCREF(((PyObject *)__pyx_t_1));
5239   __pyx_r = ((PyObject *)__pyx_t_1);
5240   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5241   goto __pyx_L0;
5242
5243   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5244   goto __pyx_L0;
5245   __pyx_L1_error:;
5246   __Pyx_XDECREF(__pyx_t_1);
5247   __Pyx_XDECREF(__pyx_t_3);
5248   __Pyx_XDECREF(__pyx_t_4);
5249   __Pyx_XDECREF(__pyx_t_5);
5250   __Pyx_XDECREF(__pyx_t_7);
5251   __Pyx_AddTraceback("TabProxies.GTFProxy.keys");
5252   __pyx_r = NULL;
5253   __pyx_L0:;
5254   __Pyx_DECREF(__pyx_v_x);
5255   __Pyx_XGIVEREF(__pyx_r);
5256   __Pyx_RefNannyFinishContext();
5257   return __pyx_r;
5258 }
5259
5260 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":446
5261  *         return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]
5262  * 
5263  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
5264  *         return self.__getattr__( item )
5265  * 
5266  */
5267
5268 static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
5269 static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
5270   PyObject *__pyx_r = NULL;
5271   PyObject *__pyx_t_1 = NULL;
5272   PyObject *__pyx_t_2 = NULL;
5273   PyObject *__pyx_t_3 = NULL;
5274   __Pyx_RefNannySetupContext("__getitem__");
5275
5276   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":447
5277  * 
5278  *     def __getitem__(self, item):
5279  *         return self.__getattr__( item )             # <<<<<<<<<<<<<<
5280  * 
5281  *     def __getattr__(self, item ):
5282  */
5283   __Pyx_XDECREF(__pyx_r);
5284   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____getattr__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5285   __Pyx_GOTREF(__pyx_t_1);
5286   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5287   __Pyx_GOTREF(__pyx_t_2);
5288   __Pyx_INCREF(__pyx_v_item);
5289   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_item);
5290   __Pyx_GIVEREF(__pyx_v_item);
5291   __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5292   __Pyx_GOTREF(__pyx_t_3);
5293   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5294   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5295   __pyx_r = __pyx_t_3;
5296   __pyx_t_3 = 0;
5297   goto __pyx_L0;
5298
5299   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5300   goto __pyx_L0;
5301   __pyx_L1_error:;
5302   __Pyx_XDECREF(__pyx_t_1);
5303   __Pyx_XDECREF(__pyx_t_2);
5304   __Pyx_XDECREF(__pyx_t_3);
5305   __Pyx_AddTraceback("TabProxies.GTFProxy.__getitem__");
5306   __pyx_r = NULL;
5307   __pyx_L0:;
5308   __Pyx_XGIVEREF(__pyx_r);
5309   __Pyx_RefNannyFinishContext();
5310   return __pyx_r;
5311 }
5312
5313 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":449
5314  *         return self.__getattr__( item )
5315  * 
5316  *     def __getattr__(self, item ):             # <<<<<<<<<<<<<<
5317  *         """Generic lookup of attribute from GFF/GTF attributes
5318  *         Only called if there *isn't* an attribute with this name
5319  */
5320
5321 static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
5322 static char __pyx_doc_10TabProxies_8GTFProxy___getattr__[] = "Generic lookup of attribute from GFF/GTF attributes \n        Only called if there *isn't* an attribute with this name\n        ";
5323 struct wrapperbase __pyx_wrapperbase_10TabProxies_8GTFProxy___getattr__;
5324 static PyObject *__pyx_pf_10TabProxies_8GTFProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
5325   char *__pyx_v_start;
5326   char *__pyx_v_query;
5327   char *__pyx_v_cpy;
5328   char *__pyx_v_end;
5329   int __pyx_v_l;
5330   char *__pyx_v_result;
5331   PyObject *__pyx_r = NULL;
5332   char *__pyx_t_1;
5333   int __pyx_t_2;
5334   PyObject *__pyx_t_3 = NULL;
5335   PyObject *__pyx_t_4 = NULL;
5336   int __pyx_t_5;
5337   int __pyx_t_6;
5338   __Pyx_RefNannySetupContext("__getattr__");
5339
5340   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":458
5341  *         cdef char * end
5342  *         cdef int l
5343  *         query = item             # <<<<<<<<<<<<<<
5344  * 
5345  *         start = strstr( self.attributes, query)
5346  */
5347   __pyx_t_1 = PyBytes_AsString(__pyx_v_item); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5348   __pyx_v_query = __pyx_t_1;
5349
5350   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":460
5351  *         query = item
5352  * 
5353  *         start = strstr( self.attributes, query)             # <<<<<<<<<<<<<<
5354  *         if start == NULL:
5355  *             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
5356  */
5357   __pyx_v_start = strstr(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes, __pyx_v_query);
5358
5359   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":461
5360  * 
5361  *         start = strstr( self.attributes, query)
5362  *         if start == NULL:             # <<<<<<<<<<<<<<
5363  *             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
5364  * 
5365  */
5366   __pyx_t_2 = (__pyx_v_start == NULL);
5367   if (__pyx_t_2) {
5368
5369     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":462
5370  *         start = strstr( self.attributes, query)
5371  *         if start == NULL:
5372  *             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )             # <<<<<<<<<<<<<<
5373  * 
5374  *         start += strlen(query) + 1
5375  */
5376     __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_v_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5377     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
5378     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5379     __Pyx_GOTREF(__pyx_t_4);
5380     PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
5381     __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
5382     __pyx_t_3 = 0;
5383     __pyx_t_3 = PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5384     __Pyx_GOTREF(__pyx_t_3);
5385     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5386     __Pyx_Raise(__pyx_t_3, 0, 0);
5387     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5388     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5389     goto __pyx_L5;
5390   }
5391   __pyx_L5:;
5392
5393   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":464
5394  *             raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
5395  * 
5396  *         start += strlen(query) + 1             # <<<<<<<<<<<<<<
5397  *         # skip gaps before
5398  *         while start[0] == " ": start += 1
5399  */
5400   __pyx_v_start += (strlen(__pyx_v_query) + 1);
5401
5402   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":466
5403  *         start += strlen(query) + 1
5404  *         # skip gaps before
5405  *         while start[0] == " ": start += 1             # <<<<<<<<<<<<<<
5406  *         if start[0] == '"':
5407  *             start += 1
5408  */
5409   while (1) {
5410     __pyx_t_2 = ((__pyx_v_start[0]) == ' ');
5411     if (!__pyx_t_2) break;
5412     __pyx_v_start += 1;
5413   }
5414
5415   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":467
5416  *         # skip gaps before
5417  *         while start[0] == " ": start += 1
5418  *         if start[0] == '"':             # <<<<<<<<<<<<<<
5419  *             start += 1
5420  *             end = start
5421  */
5422   __pyx_t_2 = ((__pyx_v_start[0]) == '"');
5423   if (__pyx_t_2) {
5424
5425     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":468
5426  *         while start[0] == " ": start += 1
5427  *         if start[0] == '"':
5428  *             start += 1             # <<<<<<<<<<<<<<
5429  *             end = start
5430  *             while end[0] != '\0' and end[0] != '"': end += 1
5431  */
5432     __pyx_v_start += 1;
5433
5434     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":469
5435  *         if start[0] == '"':
5436  *             start += 1
5437  *             end = start             # <<<<<<<<<<<<<<
5438  *             while end[0] != '\0' and end[0] != '"': end += 1
5439  *             l = end - start + 1
5440  */
5441     __pyx_v_end = __pyx_v_start;
5442
5443     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":470
5444  *             start += 1
5445  *             end = start
5446  *             while end[0] != '\0' and end[0] != '"': end += 1             # <<<<<<<<<<<<<<
5447  *             l = end - start + 1
5448  *             cpy = <char*>calloc( l, sizeof(char ) )
5449  */
5450     while (1) {
5451       __pyx_t_2 = ((__pyx_v_end[0]) != '\x00');
5452       if (__pyx_t_2) {
5453         __pyx_t_5 = ((__pyx_v_end[0]) != '"');
5454         __pyx_t_6 = __pyx_t_5;
5455       } else {
5456         __pyx_t_6 = __pyx_t_2;
5457       }
5458       if (!__pyx_t_6) break;
5459       __pyx_v_end += 1;
5460     }
5461
5462     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":471
5463  *             end = start
5464  *             while end[0] != '\0' and end[0] != '"': end += 1
5465  *             l = end - start + 1             # <<<<<<<<<<<<<<
5466  *             cpy = <char*>calloc( l, sizeof(char ) )
5467  *             if cpy == NULL: raise ValueError("out of memory" )
5468  */
5469     __pyx_v_l = ((__pyx_v_end - __pyx_v_start) + 1);
5470
5471     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":472
5472  *             while end[0] != '\0' and end[0] != '"': end += 1
5473  *             l = end - start + 1
5474  *             cpy = <char*>calloc( l, sizeof(char ) )             # <<<<<<<<<<<<<<
5475  *             if cpy == NULL: raise ValueError("out of memory" )
5476  *             memcpy( cpy, start, l )
5477  */
5478     __pyx_v_cpy = ((char *)calloc(__pyx_v_l, (sizeof(char))));
5479
5480     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":473
5481  *             l = end - start + 1
5482  *             cpy = <char*>calloc( l, sizeof(char ) )
5483  *             if cpy == NULL: raise ValueError("out of memory" )             # <<<<<<<<<<<<<<
5484  *             memcpy( cpy, start, l )
5485  *             cpy[l-1] = '\0'
5486  */
5487     __pyx_t_6 = (__pyx_v_cpy == NULL);
5488     if (__pyx_t_6) {
5489       __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5490       __Pyx_GOTREF(__pyx_t_3);
5491       __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
5492       PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
5493       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
5494       __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5495       __Pyx_GOTREF(__pyx_t_4);
5496       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5497       __Pyx_Raise(__pyx_t_4, 0, 0);
5498       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5499       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5500       goto __pyx_L11;
5501     }
5502     __pyx_L11:;
5503
5504     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":474
5505  *             cpy = <char*>calloc( l, sizeof(char ) )
5506  *             if cpy == NULL: raise ValueError("out of memory" )
5507  *             memcpy( cpy, start, l )             # <<<<<<<<<<<<<<
5508  *             cpy[l-1] = '\0'
5509  *             result = cpy
5510  */
5511     memcpy(__pyx_v_cpy, __pyx_v_start, __pyx_v_l);
5512
5513     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":475
5514  *             if cpy == NULL: raise ValueError("out of memory" )
5515  *             memcpy( cpy, start, l )
5516  *             cpy[l-1] = '\0'             # <<<<<<<<<<<<<<
5517  *             result = cpy
5518  *             free(cpy)
5519  */
5520     (__pyx_v_cpy[(__pyx_v_l - 1)]) = '\x00';
5521
5522     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":476
5523  *             memcpy( cpy, start, l )
5524  *             cpy[l-1] = '\0'
5525  *             result = cpy             # <<<<<<<<<<<<<<
5526  *             free(cpy)
5527  *             return result
5528  */
5529     __pyx_v_result = __pyx_v_cpy;
5530
5531     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":477
5532  *             cpy[l-1] = '\0'
5533  *             result = cpy
5534  *             free(cpy)             # <<<<<<<<<<<<<<
5535  *             return result
5536  *         else:
5537  */
5538     free(__pyx_v_cpy);
5539
5540     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":478
5541  *             result = cpy
5542  *             free(cpy)
5543  *             return result             # <<<<<<<<<<<<<<
5544  *         else:
5545  *             return start
5546  */
5547     __Pyx_XDECREF(__pyx_r);
5548     __pyx_t_4 = PyBytes_FromString(__pyx_v_result); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5549     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5550     __pyx_r = ((PyObject *)__pyx_t_4);
5551     __pyx_t_4 = 0;
5552     goto __pyx_L0;
5553     goto __pyx_L8;
5554   }
5555   /*else*/ {
5556
5557     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":480
5558  *             return result
5559  *         else:
5560  *             return start             # <<<<<<<<<<<<<<
5561  * 
5562  *     def setAttribute( self, name, value ):
5563  */
5564     __Pyx_XDECREF(__pyx_r);
5565     __pyx_t_4 = PyBytes_FromString(__pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5566     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5567     __pyx_r = ((PyObject *)__pyx_t_4);
5568     __pyx_t_4 = 0;
5569     goto __pyx_L0;
5570   }
5571   __pyx_L8:;
5572
5573   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5574   goto __pyx_L0;
5575   __pyx_L1_error:;
5576   __Pyx_XDECREF(__pyx_t_3);
5577   __Pyx_XDECREF(__pyx_t_4);
5578   __Pyx_AddTraceback("TabProxies.GTFProxy.__getattr__");
5579   __pyx_r = NULL;
5580   __pyx_L0:;
5581   __Pyx_XGIVEREF(__pyx_r);
5582   __Pyx_RefNannyFinishContext();
5583   return __pyx_r;
5584 }
5585
5586 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":482
5587  *             return start
5588  * 
5589  *     def setAttribute( self, name, value ):             # <<<<<<<<<<<<<<
5590  *         '''convenience method to set an attribute.'''
5591  *         r = self.asDict()
5592  */
5593
5594 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5595 static char __pyx_doc_10TabProxies_8GTFProxy_setAttribute[] = "convenience method to set an attribute.";
5596 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5597   PyObject *__pyx_v_name = 0;
5598   PyObject *__pyx_v_value = 0;
5599   PyObject *__pyx_v_r;
5600   PyObject *__pyx_r = NULL;
5601   PyObject *__pyx_t_1 = NULL;
5602   PyObject *__pyx_t_2 = NULL;
5603   PyObject *__pyx_t_3 = NULL;
5604   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__value,0};
5605   __Pyx_RefNannySetupContext("setAttribute");
5606   if (unlikely(__pyx_kwds)) {
5607     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
5608     PyObject* values[2] = {0,0};
5609     switch (PyTuple_GET_SIZE(__pyx_args)) {
5610       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5611       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5612       case  0: break;
5613       default: goto __pyx_L5_argtuple_error;
5614     }
5615     switch (PyTuple_GET_SIZE(__pyx_args)) {
5616       case  0:
5617       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
5618       if (likely(values[0])) kw_args--;
5619       else goto __pyx_L5_argtuple_error;
5620       case  1:
5621       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
5622       if (likely(values[1])) kw_args--;
5623       else {
5624         __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5625       }
5626     }
5627     if (unlikely(kw_args > 0)) {
5628       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "setAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5629     }
5630     __pyx_v_name = values[0];
5631     __pyx_v_value = values[1];
5632   } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5633     goto __pyx_L5_argtuple_error;
5634   } else {
5635     __pyx_v_name = PyTuple_GET_ITEM(__pyx_args, 0);
5636     __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
5637   }
5638   goto __pyx_L4_argument_unpacking_done;
5639   __pyx_L5_argtuple_error:;
5640   __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5641   __pyx_L3_error:;
5642   __Pyx_AddTraceback("TabProxies.GTFProxy.setAttribute");
5643   __Pyx_RefNannyFinishContext();
5644   return NULL;
5645   __pyx_L4_argument_unpacking_done:;
5646   __pyx_v_r = Py_None; __Pyx_INCREF(Py_None);
5647
5648   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":484
5649  *     def setAttribute( self, name, value ):
5650  *         '''convenience method to set an attribute.'''
5651  *         r = self.asDict()             # <<<<<<<<<<<<<<
5652  *         r[name] = value
5653  *         self.fromDict( r )
5654  */
5655   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__asDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5656   __Pyx_GOTREF(__pyx_t_1);
5657   __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 = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5658   __Pyx_GOTREF(__pyx_t_2);
5659   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5660   __Pyx_DECREF(__pyx_v_r);
5661   __pyx_v_r = __pyx_t_2;
5662   __pyx_t_2 = 0;
5663
5664   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":485
5665  *         '''convenience method to set an attribute.'''
5666  *         r = self.asDict()
5667  *         r[name] = value             # <<<<<<<<<<<<<<
5668  *         self.fromDict( r )
5669  * 
5670  */
5671   if (PyObject_SetItem(__pyx_v_r, __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5672
5673   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":486
5674  *         r = self.asDict()
5675  *         r[name] = value
5676  *         self.fromDict( r )             # <<<<<<<<<<<<<<
5677  * 
5678  * cdef class NamedTupleProxy( TupleProxy ):
5679  */
5680   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fromDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5681   __Pyx_GOTREF(__pyx_t_2);
5682   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5683   __Pyx_GOTREF(__pyx_t_1);
5684   __Pyx_INCREF(__pyx_v_r);
5685   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r);
5686   __Pyx_GIVEREF(__pyx_v_r);
5687   __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5688   __Pyx_GOTREF(__pyx_t_3);
5689   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5690   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5691   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5692
5693   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5694   goto __pyx_L0;
5695   __pyx_L1_error:;
5696   __Pyx_XDECREF(__pyx_t_1);
5697   __Pyx_XDECREF(__pyx_t_2);
5698   __Pyx_XDECREF(__pyx_t_3);
5699   __Pyx_AddTraceback("TabProxies.GTFProxy.setAttribute");
5700   __pyx_r = NULL;
5701   __pyx_L0:;
5702   __Pyx_DECREF(__pyx_v_r);
5703   __Pyx_XGIVEREF(__pyx_r);
5704   __Pyx_RefNannyFinishContext();
5705   return __pyx_r;
5706 }
5707
5708 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":492
5709  *     map_key2field = {}
5710  * 
5711  *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
5712  *         '''set attribute.'''
5713  *         cdef int idx
5714  */
5715
5716 static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
5717 static char __pyx_doc_10TabProxies_15NamedTupleProxy___setattr__[] = "set attribute.";
5718 struct wrapperbase __pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__;
5719 static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
5720   int __pyx_v_idx;
5721   PyObject *__pyx_v_f;
5722   int __pyx_r;
5723   PyObject *__pyx_t_1 = NULL;
5724   PyObject *__pyx_t_2 = NULL;
5725   PyObject *__pyx_t_3 = NULL;
5726   int __pyx_t_4;
5727   PyObject *__pyx_t_5 = NULL;
5728   int __pyx_t_6;
5729   __Pyx_RefNannySetupContext("__setattr__");
5730   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
5731
5732   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":495
5733  *         '''set attribute.'''
5734  *         cdef int idx
5735  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
5736  *         if self.nfields < idx:
5737  *             raise KeyError( "field %s not set" % key )
5738  */
5739   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5740   __Pyx_GOTREF(__pyx_t_1);
5741   __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5742   __Pyx_GOTREF(__pyx_t_2);
5743   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5744   if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
5745     PyObject* tuple = __pyx_t_2;
5746     __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
5747     __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5748     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5749     __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
5750     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5751     __pyx_v_idx = __pyx_t_4;
5752     __Pyx_DECREF(__pyx_v_f);
5753     __pyx_v_f = __pyx_t_3;
5754     __pyx_t_3 = 0;
5755   } else {
5756     __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5757     __Pyx_GOTREF(__pyx_t_5);
5758     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5759     __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5760     __Pyx_GOTREF(__pyx_t_1);
5761     __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5762     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5763     __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5764     __Pyx_GOTREF(__pyx_t_3);
5765     if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5766     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5767     __pyx_v_idx = __pyx_t_4;
5768     __Pyx_DECREF(__pyx_v_f);
5769     __pyx_v_f = __pyx_t_3;
5770     __pyx_t_3 = 0;
5771   }
5772
5773   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":496
5774  *         cdef int idx
5775  *         idx, f = self.map_key2field[key]
5776  *         if self.nfields < idx:             # <<<<<<<<<<<<<<
5777  *             raise KeyError( "field %s not set" % key )
5778  *         TupleProxy.__setitem__(self, idx, str(value) )
5779  */
5780   __pyx_t_6 = (((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.nfields < __pyx_v_idx);
5781   if (__pyx_t_6) {
5782
5783     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":497
5784  *         idx, f = self.map_key2field[key]
5785  *         if self.nfields < idx:
5786  *             raise KeyError( "field %s not set" % key )             # <<<<<<<<<<<<<<
5787  *         TupleProxy.__setitem__(self, idx, str(value) )
5788  * 
5789  */
5790     __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5791     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
5792     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5793     __Pyx_GOTREF(__pyx_t_3);
5794     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
5795     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
5796     __pyx_t_2 = 0;
5797     __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5798     __Pyx_GOTREF(__pyx_t_2);
5799     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5800     __Pyx_Raise(__pyx_t_2, 0, 0);
5801     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5802     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5803     goto __pyx_L5;
5804   }
5805   __pyx_L5:;
5806
5807   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":498
5808  *         if self.nfields < idx:
5809  *             raise KeyError( "field %s not set" % key )
5810  *         TupleProxy.__setitem__(self, idx, str(value) )             # <<<<<<<<<<<<<<
5811  * 
5812  *     def __getattr__(self, key ):
5813  */
5814   __pyx_t_2 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____setitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5815   __Pyx_GOTREF(__pyx_t_2);
5816   __pyx_t_3 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5817   __Pyx_GOTREF(__pyx_t_3);
5818   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5819   __Pyx_GOTREF(__pyx_t_1);
5820   __Pyx_INCREF(__pyx_v_value);
5821   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
5822   __Pyx_GIVEREF(__pyx_v_value);
5823   __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5824   __Pyx_GOTREF(__pyx_t_5);
5825   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5826   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5827   __Pyx_GOTREF(__pyx_t_1);
5828   __Pyx_INCREF(__pyx_v_self);
5829   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
5830   __Pyx_GIVEREF(__pyx_v_self);
5831   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
5832   __Pyx_GIVEREF(__pyx_t_3);
5833   PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
5834   __Pyx_GIVEREF(__pyx_t_5);
5835   __pyx_t_3 = 0;
5836   __pyx_t_5 = 0;
5837   __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5838   __Pyx_GOTREF(__pyx_t_5);
5839   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5840   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5841   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5842
5843   __pyx_r = 0;
5844   goto __pyx_L0;
5845   __pyx_L1_error:;
5846   __Pyx_XDECREF(__pyx_t_1);
5847   __Pyx_XDECREF(__pyx_t_2);
5848   __Pyx_XDECREF(__pyx_t_3);
5849   __Pyx_XDECREF(__pyx_t_5);
5850   __Pyx_AddTraceback("TabProxies.NamedTupleProxy.__setattr__");
5851   __pyx_r = -1;
5852   __pyx_L0:;
5853   __Pyx_DECREF(__pyx_v_f);
5854   __Pyx_RefNannyFinishContext();
5855   return __pyx_r;
5856 }
5857
5858 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":500
5859  *         TupleProxy.__setitem__(self, idx, str(value) )
5860  * 
5861  *     def __getattr__(self, key ):             # <<<<<<<<<<<<<<
5862  *         cdef int idx
5863  *         idx, f = self.map_key2field[key]
5864  */
5865
5866 static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
5867 static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
5868   int __pyx_v_idx;
5869   PyObject *__pyx_v_f;
5870   PyObject *__pyx_r = NULL;
5871   PyObject *__pyx_t_1 = NULL;
5872   PyObject *__pyx_t_2 = NULL;
5873   PyObject *__pyx_t_3 = NULL;
5874   int __pyx_t_4;
5875   PyObject *__pyx_t_5 = NULL;
5876   int __pyx_t_6;
5877   __Pyx_RefNannySetupContext("__getattr__");
5878   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
5879
5880   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":502
5881  *     def __getattr__(self, key ):
5882  *         cdef int idx
5883  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
5884  *         if self.nfields < idx:
5885  *             raise KeyError( "field %s not set" % key )
5886  */
5887   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5888   __Pyx_GOTREF(__pyx_t_1);
5889   __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5890   __Pyx_GOTREF(__pyx_t_2);
5891   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5892   if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
5893     PyObject* tuple = __pyx_t_2;
5894     __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
5895     __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5896     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5897     __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
5898     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5899     __pyx_v_idx = __pyx_t_4;
5900     __Pyx_DECREF(__pyx_v_f);
5901     __pyx_v_f = __pyx_t_3;
5902     __pyx_t_3 = 0;
5903   } else {
5904     __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5905     __Pyx_GOTREF(__pyx_t_5);
5906     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5907     __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5908     __Pyx_GOTREF(__pyx_t_1);
5909     __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5910     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5911     __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5912     __Pyx_GOTREF(__pyx_t_3);
5913     if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5914     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5915     __pyx_v_idx = __pyx_t_4;
5916     __Pyx_DECREF(__pyx_v_f);
5917     __pyx_v_f = __pyx_t_3;
5918     __pyx_t_3 = 0;
5919   }
5920
5921   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":503
5922  *         cdef int idx
5923  *         idx, f = self.map_key2field[key]
5924  *         if self.nfields < idx:             # <<<<<<<<<<<<<<
5925  *             raise KeyError( "field %s not set" % key )
5926  *         return f( self.fields[idx] )
5927  */
5928   __pyx_t_6 = (((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.nfields < __pyx_v_idx);
5929   if (__pyx_t_6) {
5930
5931     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":504
5932  *         idx, f = self.map_key2field[key]
5933  *         if self.nfields < idx:
5934  *             raise KeyError( "field %s not set" % key )             # <<<<<<<<<<<<<<
5935  *         return f( self.fields[idx] )
5936  * 
5937  */
5938     __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5939     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
5940     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5941     __Pyx_GOTREF(__pyx_t_3);
5942     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
5943     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
5944     __pyx_t_2 = 0;
5945     __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5946     __Pyx_GOTREF(__pyx_t_2);
5947     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5948     __Pyx_Raise(__pyx_t_2, 0, 0);
5949     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5950     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5951     goto __pyx_L5;
5952   }
5953   __pyx_L5:;
5954
5955   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":505
5956  *         if self.nfields < idx:
5957  *             raise KeyError( "field %s not set" % key )
5958  *         return f( self.fields[idx] )             # <<<<<<<<<<<<<<
5959  * 
5960  * cdef class BedProxy( NamedTupleProxy ):
5961  */
5962   __Pyx_XDECREF(__pyx_r);
5963   __pyx_t_2 = PyBytes_FromString((((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.fields[__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5964   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
5965   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5966   __Pyx_GOTREF(__pyx_t_3);
5967   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
5968   __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
5969   __pyx_t_2 = 0;
5970   __pyx_t_2 = PyObject_Call(__pyx_v_f, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5971   __Pyx_GOTREF(__pyx_t_2);
5972   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5973   __pyx_r = __pyx_t_2;
5974   __pyx_t_2 = 0;
5975   goto __pyx_L0;
5976
5977   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5978   goto __pyx_L0;
5979   __pyx_L1_error:;
5980   __Pyx_XDECREF(__pyx_t_1);
5981   __Pyx_XDECREF(__pyx_t_2);
5982   __Pyx_XDECREF(__pyx_t_3);
5983   __Pyx_XDECREF(__pyx_t_5);
5984   __Pyx_AddTraceback("TabProxies.NamedTupleProxy.__getattr__");
5985   __pyx_r = NULL;
5986   __pyx_L0:;
5987   __Pyx_DECREF(__pyx_v_f);
5988   __Pyx_XGIVEREF(__pyx_r);
5989   __Pyx_RefNannyFinishContext();
5990   return __pyx_r;
5991 }
5992
5993 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":526
5994  *         'blockStarts': (11,str), }
5995  * 
5996  *     cdef int getMaxFields( self, size_t nbytes ):             # <<<<<<<<<<<<<<
5997  *         '''return max number of fields.'''
5998  *         return 12
5999  */
6000
6001 static  int __pyx_f_10TabProxies_8BedProxy_getMaxFields(struct __pyx_obj_10TabProxies_BedProxy *__pyx_v_self, size_t __pyx_v_nbytes) {
6002   int __pyx_r;
6003   __Pyx_RefNannySetupContext("getMaxFields");
6004
6005   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":528
6006  *     cdef int getMaxFields( self, size_t nbytes ):
6007  *         '''return max number of fields.'''
6008  *         return 12             # <<<<<<<<<<<<<<
6009  * 
6010  *     cdef update( self, char * buffer, size_t nbytes ):
6011  */
6012   __pyx_r = 12;
6013   goto __pyx_L0;
6014
6015   __pyx_r = 0;
6016   __pyx_L0:;
6017   __Pyx_RefNannyFinishContext();
6018   return __pyx_r;
6019 }
6020
6021 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":530
6022  *         return 12
6023  * 
6024  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
6025  *         '''update internal data.
6026  * 
6027  */
6028
6029 static  PyObject *__pyx_f_10TabProxies_8BedProxy_update(struct __pyx_obj_10TabProxies_BedProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
6030   PyObject *__pyx_r = NULL;
6031   PyObject *__pyx_t_1 = NULL;
6032   int __pyx_t_2;
6033   PyObject *__pyx_t_3 = NULL;
6034   __Pyx_RefNannySetupContext("update");
6035
6036   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":535
6037  *         nbytes does not include the terminal '\0'.
6038  *         '''
6039  *         TupleProxy.update( self, buffer, nbytes )             # <<<<<<<<<<<<<<
6040  * 
6041  *         if self.nfields < 3:
6042  */
6043   __pyx_t_1 = __pyx_vtabptr_10TabProxies_TupleProxy->update(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6044   __Pyx_GOTREF(__pyx_t_1);
6045   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6046
6047   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":537
6048  *         TupleProxy.update( self, buffer, nbytes )
6049  * 
6050  *         if self.nfields < 3:             # <<<<<<<<<<<<<<
6051  *             raise ValueError( "bed format requires at least three columns" )
6052  * 
6053  */
6054   __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.nfields < 3);
6055   if (__pyx_t_2) {
6056
6057     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":538
6058  * 
6059  *         if self.nfields < 3:
6060  *             raise ValueError( "bed format requires at least three columns" )             # <<<<<<<<<<<<<<
6061  * 
6062  *         # determines bed format
6063  */
6064     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6065     __Pyx_GOTREF(__pyx_t_1);
6066     __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
6067     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_18));
6068     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
6069     __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6070     __Pyx_GOTREF(__pyx_t_3);
6071     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6072     __Pyx_Raise(__pyx_t_3, 0, 0);
6073     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6074     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6075     goto __pyx_L3;
6076   }
6077   __pyx_L3:;
6078
6079   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":541
6080  * 
6081  *         # determines bed format
6082  *         self.bedfields = self.nfields             # <<<<<<<<<<<<<<
6083  * 
6084  *         # do automatic conversion
6085  */
6086   __pyx_v_self->bedfields = __pyx_v_self->__pyx_base.__pyx_base.nfields;
6087
6088   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":544
6089  * 
6090  *         # do automatic conversion
6091  *         self.contig = self.fields[0]             # <<<<<<<<<<<<<<
6092  *         self.start = atoi( self.fields[1] )
6093  *         self.end = atoi( self.fields[2] )
6094  */
6095   __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]);
6096
6097   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":545
6098  *         # do automatic conversion
6099  *         self.contig = self.fields[0]
6100  *         self.start = atoi( self.fields[1] )             # <<<<<<<<<<<<<<
6101  *         self.end = atoi( self.fields[2] )
6102  * 
6103  */
6104   __pyx_v_self->start = atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[1]));
6105
6106   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":546
6107  *         self.contig = self.fields[0]
6108  *         self.start = atoi( self.fields[1] )
6109  *         self.end = atoi( self.fields[2] )             # <<<<<<<<<<<<<<
6110  * 
6111  *     # __setattr__ in base class seems to take precedence
6112  */
6113   __pyx_v_self->end = atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[2]));
6114
6115   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6116   goto __pyx_L0;
6117   __pyx_L1_error:;
6118   __Pyx_XDECREF(__pyx_t_1);
6119   __Pyx_XDECREF(__pyx_t_3);
6120   __Pyx_AddTraceback("TabProxies.BedProxy.update");
6121   __pyx_r = 0;
6122   __pyx_L0:;
6123   __Pyx_XGIVEREF(__pyx_r);
6124   __Pyx_RefNannyFinishContext();
6125   return __pyx_r;
6126 }
6127
6128 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":555
6129  *     #    def __get__( self ): return self.end
6130  * 
6131  *     def __str__(self):             # <<<<<<<<<<<<<<
6132  * 
6133  *         cdef int save_fields = self.nfields
6134  */
6135
6136 static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self); /*proto*/
6137 static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self) {
6138   int __pyx_v_save_fields;
6139   PyObject *__pyx_v_retval;
6140   PyObject *__pyx_r = NULL;
6141   PyObject *__pyx_t_1 = NULL;
6142   PyObject *__pyx_t_2 = NULL;
6143   PyObject *__pyx_t_3 = NULL;
6144   __Pyx_RefNannySetupContext("__str__");
6145   __pyx_v_retval = Py_None; __Pyx_INCREF(Py_None);
6146
6147   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":557
6148  *     def __str__(self):
6149  * 
6150  *         cdef int save_fields = self.nfields             # <<<<<<<<<<<<<<
6151  *         # ensure fields to use correct format
6152  *         self.nfields = self.bedfields
6153  */
6154   __pyx_v_save_fields = ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields;
6155
6156   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":559
6157  *         cdef int save_fields = self.nfields
6158  *         # ensure fields to use correct format
6159  *         self.nfields = self.bedfields             # <<<<<<<<<<<<<<
6160  *         retval = TupleProxy.__str__( self )
6161  *         self.nfields = save_fields
6162  */
6163   ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields = ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->bedfields;
6164
6165   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":560
6166  *         # ensure fields to use correct format
6167  *         self.nfields = self.bedfields
6168  *         retval = TupleProxy.__str__( self )             # <<<<<<<<<<<<<<
6169  *         self.nfields = save_fields
6170  *         return retval
6171  */
6172   __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6173   __Pyx_GOTREF(__pyx_t_1);
6174   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6175   __Pyx_GOTREF(__pyx_t_2);
6176   __Pyx_INCREF(__pyx_v_self);
6177   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
6178   __Pyx_GIVEREF(__pyx_v_self);
6179   __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6180   __Pyx_GOTREF(__pyx_t_3);
6181   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6182   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6183   __Pyx_DECREF(__pyx_v_retval);
6184   __pyx_v_retval = __pyx_t_3;
6185   __pyx_t_3 = 0;
6186
6187   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":561
6188  *         self.nfields = self.bedfields
6189  *         retval = TupleProxy.__str__( self )
6190  *         self.nfields = save_fields             # <<<<<<<<<<<<<<
6191  *         return retval
6192  * 
6193  */
6194   ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields = __pyx_v_save_fields;
6195
6196   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":562
6197  *         retval = TupleProxy.__str__( self )
6198  *         self.nfields = save_fields
6199  *         return retval             # <<<<<<<<<<<<<<
6200  * 
6201  *     def __setattr__(self, key, value ):
6202  */
6203   __Pyx_XDECREF(__pyx_r);
6204   __Pyx_INCREF(__pyx_v_retval);
6205   __pyx_r = __pyx_v_retval;
6206   goto __pyx_L0;
6207
6208   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6209   goto __pyx_L0;
6210   __pyx_L1_error:;
6211   __Pyx_XDECREF(__pyx_t_1);
6212   __Pyx_XDECREF(__pyx_t_2);
6213   __Pyx_XDECREF(__pyx_t_3);
6214   __Pyx_AddTraceback("TabProxies.BedProxy.__str__");
6215   __pyx_r = NULL;
6216   __pyx_L0:;
6217   __Pyx_DECREF(__pyx_v_retval);
6218   __Pyx_XGIVEREF(__pyx_r);
6219   __Pyx_RefNannyFinishContext();
6220   return __pyx_r;
6221 }
6222
6223 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":564
6224  *         return retval
6225  * 
6226  *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
6227  *         '''set attribute.'''
6228  *         if key == "start": self.start = value
6229  */
6230
6231 static int __pyx_pf_10TabProxies_8BedProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
6232 static char __pyx_doc_10TabProxies_8BedProxy___setattr__[] = "set attribute.";
6233 struct wrapperbase __pyx_wrapperbase_10TabProxies_8BedProxy___setattr__;
6234 static int __pyx_pf_10TabProxies_8BedProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
6235   int __pyx_v_idx;
6236   PyObject *__pyx_v_f;
6237   int __pyx_r;
6238   PyObject *__pyx_t_1 = NULL;
6239   int __pyx_t_2;
6240   uint32_t __pyx_t_3;
6241   PyObject *__pyx_t_4 = NULL;
6242   PyObject *__pyx_t_5 = NULL;
6243   int __pyx_t_6;
6244   PyObject *__pyx_t_7 = NULL;
6245   __Pyx_RefNannySetupContext("__setattr__");
6246   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
6247
6248   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":566
6249  *     def __setattr__(self, key, value ):
6250  *         '''set attribute.'''
6251  *         if key == "start": self.start = value             # <<<<<<<<<<<<<<
6252  *         elif key == "end": self.end = value
6253  * 
6254  */
6255   __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__start), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6256   __Pyx_GOTREF(__pyx_t_1);
6257   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6258   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6259   if (__pyx_t_2) {
6260     __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6261     ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->start = __pyx_t_3;
6262     goto __pyx_L5;
6263   }
6264
6265   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":567
6266  *         '''set attribute.'''
6267  *         if key == "start": self.start = value
6268  *         elif key == "end": self.end = value             # <<<<<<<<<<<<<<
6269  * 
6270  *         cdef int idx
6271  */
6272   __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__end), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6273   __Pyx_GOTREF(__pyx_t_1);
6274   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6275   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6276   if (__pyx_t_2) {
6277     __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6278     ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->end = __pyx_t_3;
6279     goto __pyx_L5;
6280   }
6281   __pyx_L5:;
6282
6283   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":570
6284  * 
6285  *         cdef int idx
6286  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
6287  *         TupleProxy._setindex(self, idx, str(value) )
6288  * 
6289  */
6290   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6291   __Pyx_GOTREF(__pyx_t_1);
6292   __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6293   __Pyx_GOTREF(__pyx_t_4);
6294   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6295   if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
6296     PyObject* tuple = __pyx_t_4;
6297     __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
6298     __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6299     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6300     __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
6301     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6302     __pyx_v_idx = __pyx_t_6;
6303     __Pyx_DECREF(__pyx_v_f);
6304     __pyx_v_f = __pyx_t_5;
6305     __pyx_t_5 = 0;
6306   } else {
6307     __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6308     __Pyx_GOTREF(__pyx_t_7);
6309     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6310     __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6311     __Pyx_GOTREF(__pyx_t_1);
6312     __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6313     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6314     __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6315     __Pyx_GOTREF(__pyx_t_5);
6316     if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6317     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6318     __pyx_v_idx = __pyx_t_6;
6319     __Pyx_DECREF(__pyx_v_f);
6320     __pyx_v_f = __pyx_t_5;
6321     __pyx_t_5 = 0;
6322   }
6323
6324   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":571
6325  *         cdef int idx
6326  *         idx, f = self.map_key2field[key]
6327  *         TupleProxy._setindex(self, idx, str(value) )             # <<<<<<<<<<<<<<
6328  * 
6329  * cdef class VCFProxy( NamedTupleProxy ):
6330  */
6331   __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6332   __Pyx_GOTREF(__pyx_t_4);
6333   __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6334   __Pyx_GOTREF(__pyx_t_5);
6335   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6336   __Pyx_GOTREF(__pyx_t_1);
6337   __Pyx_INCREF(__pyx_v_value);
6338   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
6339   __Pyx_GIVEREF(__pyx_v_value);
6340   __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6341   __Pyx_GOTREF(__pyx_t_7);
6342   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6343   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6344   __Pyx_GOTREF(__pyx_t_1);
6345   __Pyx_INCREF(__pyx_v_self);
6346   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
6347   __Pyx_GIVEREF(__pyx_v_self);
6348   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
6349   __Pyx_GIVEREF(__pyx_t_5);
6350   PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
6351   __Pyx_GIVEREF(__pyx_t_7);
6352   __pyx_t_5 = 0;
6353   __pyx_t_7 = 0;
6354   __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6355   __Pyx_GOTREF(__pyx_t_7);
6356   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6357   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6358   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6359
6360   __pyx_r = 0;
6361   goto __pyx_L0;
6362   __pyx_L1_error:;
6363   __Pyx_XDECREF(__pyx_t_1);
6364   __Pyx_XDECREF(__pyx_t_4);
6365   __Pyx_XDECREF(__pyx_t_5);
6366   __Pyx_XDECREF(__pyx_t_7);
6367   __Pyx_AddTraceback("TabProxies.BedProxy.__setattr__");
6368   __pyx_r = -1;
6369   __pyx_L0:;
6370   __Pyx_DECREF(__pyx_v_f);
6371   __Pyx_RefNannyFinishContext();
6372   return __pyx_r;
6373 }
6374
6375 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":589
6376  *         'format' : (8,str) }
6377  * 
6378  *     def __cinit__(self ):             # <<<<<<<<<<<<<<
6379  *         # automatically calls TupleProxy.__cinit__
6380  *         # start indexed access at genotypes
6381  */
6382
6383 static int __pyx_pf_10TabProxies_8VCFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6384 static int __pyx_pf_10TabProxies_8VCFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6385   int __pyx_r;
6386   __Pyx_RefNannySetupContext("__cinit__");
6387   if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
6388     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
6389   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
6390
6391   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":592
6392  *         # automatically calls TupleProxy.__cinit__
6393  *         # start indexed access at genotypes
6394  *         self.offset = 9             # <<<<<<<<<<<<<<
6395  * 
6396  *     cdef update( self, char * buffer, size_t nbytes ):
6397  */
6398   ((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->__pyx_base.__pyx_base.offset = 9;
6399
6400   __pyx_r = 0;
6401   __Pyx_RefNannyFinishContext();
6402   return __pyx_r;
6403 }
6404
6405 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":594
6406  *         self.offset = 9
6407  * 
6408  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
6409  *         '''update internal data.
6410  * 
6411  */
6412
6413 static  PyObject *__pyx_f_10TabProxies_8VCFProxy_update(struct __pyx_obj_10TabProxies_VCFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
6414   PyObject *__pyx_r = NULL;
6415   PyObject *__pyx_t_1 = NULL;
6416   __Pyx_RefNannySetupContext("update");
6417
6418   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":599
6419  *         nbytes does not include the terminal '\0'.
6420  *         '''
6421  *         TupleProxy.update( self, buffer, nbytes )             # <<<<<<<<<<<<<<
6422  * 
6423  *         self.contig = self.fields[0]
6424  */
6425   __pyx_t_1 = __pyx_vtabptr_10TabProxies_TupleProxy->update(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6426   __Pyx_GOTREF(__pyx_t_1);
6427   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6428
6429   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":601
6430  *         TupleProxy.update( self, buffer, nbytes )
6431  * 
6432  *         self.contig = self.fields[0]             # <<<<<<<<<<<<<<
6433  *         # vcf counts from 1 - correct here
6434  *         self.pos = atoi( self.fields[1] ) - 1
6435  */
6436   __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]);
6437
6438   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":603
6439  *         self.contig = self.fields[0]
6440  *         # vcf counts from 1 - correct here
6441  *         self.pos = atoi( self.fields[1] ) - 1             # <<<<<<<<<<<<<<
6442  * 
6443  *     def __len__(self):
6444  */
6445   __pyx_v_self->pos = (atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[1])) - 1);
6446
6447   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6448   goto __pyx_L0;
6449   __pyx_L1_error:;
6450   __Pyx_XDECREF(__pyx_t_1);
6451   __Pyx_AddTraceback("TabProxies.VCFProxy.update");
6452   __pyx_r = 0;
6453   __pyx_L0:;
6454   __Pyx_XGIVEREF(__pyx_r);
6455   __Pyx_RefNannyFinishContext();
6456   return __pyx_r;
6457 }
6458
6459 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":605
6460  *         self.pos = atoi( self.fields[1] ) - 1
6461  * 
6462  *     def __len__(self):             # <<<<<<<<<<<<<<
6463  *         return max(0, self.nfields - 9)
6464  * 
6465  */
6466
6467 static Py_ssize_t __pyx_pf_10TabProxies_8VCFProxy___len__(PyObject *__pyx_v_self); /*proto*/
6468 static Py_ssize_t __pyx_pf_10TabProxies_8VCFProxy___len__(PyObject *__pyx_v_self) {
6469   Py_ssize_t __pyx_r;
6470   long __pyx_t_1;
6471   long __pyx_t_2;
6472   long __pyx_t_3;
6473   __Pyx_RefNannySetupContext("__len__");
6474
6475   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":606
6476  * 
6477  *     def __len__(self):
6478  *         return max(0, self.nfields - 9)             # <<<<<<<<<<<<<<
6479  * 
6480  *     def __setattr__(self, key, value ):
6481  */
6482   __pyx_t_1 = (((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields - 9);
6483   __pyx_t_2 = 0;
6484   if ((__pyx_t_1 > __pyx_t_2)) {
6485     __pyx_t_3 = __pyx_t_1;
6486   } else {
6487     __pyx_t_3 = __pyx_t_2;
6488   }
6489   __pyx_r = __pyx_t_3;
6490   goto __pyx_L0;
6491
6492   __pyx_r = 0;
6493   __pyx_L0:;
6494   __Pyx_RefNannyFinishContext();
6495   return __pyx_r;
6496 }
6497
6498 /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":608
6499  *         return max(0, self.nfields - 9)
6500  * 
6501  *     def __setattr__(self, key, value ):             # <<<<<<<<<<<<<<
6502  *         '''set attribute.'''
6503  *         if key == "pos":
6504  */
6505
6506 static int __pyx_pf_10TabProxies_8VCFProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
6507 static char __pyx_doc_10TabProxies_8VCFProxy___setattr__[] = "set attribute.";
6508 struct wrapperbase __pyx_wrapperbase_10TabProxies_8VCFProxy___setattr__;
6509 static int __pyx_pf_10TabProxies_8VCFProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
6510   int __pyx_v_idx;
6511   PyObject *__pyx_v_f;
6512   int __pyx_r;
6513   PyObject *__pyx_t_1 = NULL;
6514   int __pyx_t_2;
6515   uint32_t __pyx_t_3;
6516   PyObject *__pyx_t_4 = NULL;
6517   PyObject *__pyx_t_5 = NULL;
6518   int __pyx_t_6;
6519   PyObject *__pyx_t_7 = NULL;
6520   __Pyx_RefNannySetupContext("__setattr__");
6521   __Pyx_INCREF(__pyx_v_value);
6522   __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
6523
6524   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":610
6525  *     def __setattr__(self, key, value ):
6526  *         '''set attribute.'''
6527  *         if key == "pos":             # <<<<<<<<<<<<<<
6528  *             self.pos = value
6529  *             value += 1
6530  */
6531   __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__pos), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6532   __Pyx_GOTREF(__pyx_t_1);
6533   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6534   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6535   if (__pyx_t_2) {
6536
6537     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":611
6538  *         '''set attribute.'''
6539  *         if key == "pos":
6540  *             self.pos = value             # <<<<<<<<<<<<<<
6541  *             value += 1
6542  * 
6543  */
6544     __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6545     ((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->pos = __pyx_t_3;
6546
6547     /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":612
6548  *         if key == "pos":
6549  *             self.pos = value
6550  *             value += 1             # <<<<<<<<<<<<<<
6551  * 
6552  *         cdef int idx
6553  */
6554     __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_value, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6555     __Pyx_GOTREF(__pyx_t_1);
6556     __Pyx_DECREF(__pyx_v_value);
6557     __pyx_v_value = __pyx_t_1;
6558     __pyx_t_1 = 0;
6559     goto __pyx_L5;
6560   }
6561   __pyx_L5:;
6562
6563   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":615
6564  * 
6565  *         cdef int idx
6566  *         idx, f = self.map_key2field[key]             # <<<<<<<<<<<<<<
6567  *         TupleProxy._setindex(self, idx, str(value) )
6568  * 
6569  */
6570   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6571   __Pyx_GOTREF(__pyx_t_1);
6572   __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6573   __Pyx_GOTREF(__pyx_t_4);
6574   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6575   if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
6576     PyObject* tuple = __pyx_t_4;
6577     __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
6578     __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6579     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6580     __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
6581     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6582     __pyx_v_idx = __pyx_t_6;
6583     __Pyx_DECREF(__pyx_v_f);
6584     __pyx_v_f = __pyx_t_5;
6585     __pyx_t_5 = 0;
6586   } else {
6587     __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6588     __Pyx_GOTREF(__pyx_t_7);
6589     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6590     __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6591     __Pyx_GOTREF(__pyx_t_1);
6592     __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6593     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6594     __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6595     __Pyx_GOTREF(__pyx_t_5);
6596     if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6597     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6598     __pyx_v_idx = __pyx_t_6;
6599     __Pyx_DECREF(__pyx_v_f);
6600     __pyx_v_f = __pyx_t_5;
6601     __pyx_t_5 = 0;
6602   }
6603
6604   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":616
6605  *         cdef int idx
6606  *         idx, f = self.map_key2field[key]
6607  *         TupleProxy._setindex(self, idx, str(value) )             # <<<<<<<<<<<<<<
6608  * 
6609  */
6610   __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6611   __Pyx_GOTREF(__pyx_t_4);
6612   __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6613   __Pyx_GOTREF(__pyx_t_5);
6614   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6615   __Pyx_GOTREF(__pyx_t_1);
6616   __Pyx_INCREF(__pyx_v_value);
6617   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
6618   __Pyx_GIVEREF(__pyx_v_value);
6619   __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6620   __Pyx_GOTREF(__pyx_t_7);
6621   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6622   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6623   __Pyx_GOTREF(__pyx_t_1);
6624   __Pyx_INCREF(__pyx_v_self);
6625   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
6626   __Pyx_GIVEREF(__pyx_v_self);
6627   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
6628   __Pyx_GIVEREF(__pyx_t_5);
6629   PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
6630   __Pyx_GIVEREF(__pyx_t_7);
6631   __pyx_t_5 = 0;
6632   __pyx_t_7 = 0;
6633   __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6634   __Pyx_GOTREF(__pyx_t_7);
6635   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6636   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6637   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6638
6639   __pyx_r = 0;
6640   goto __pyx_L0;
6641   __pyx_L1_error:;
6642   __Pyx_XDECREF(__pyx_t_1);
6643   __Pyx_XDECREF(__pyx_t_4);
6644   __Pyx_XDECREF(__pyx_t_5);
6645   __Pyx_XDECREF(__pyx_t_7);
6646   __Pyx_AddTraceback("TabProxies.VCFProxy.__setattr__");
6647   __pyx_r = -1;
6648   __pyx_L0:;
6649   __Pyx_DECREF(__pyx_v_f);
6650   __Pyx_DECREF(__pyx_v_value);
6651   __Pyx_RefNannyFinishContext();
6652   return __pyx_r;
6653 }
6654 static struct __pyx_vtabstruct_10TabProxies_TupleProxy __pyx_vtable_10TabProxies_TupleProxy;
6655
6656 static PyObject *__pyx_tp_new_10TabProxies_TupleProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
6657   struct __pyx_obj_10TabProxies_TupleProxy *p;
6658   PyObject *o = (*t->tp_alloc)(t, 0);
6659   if (!o) return 0;
6660   p = ((struct __pyx_obj_10TabProxies_TupleProxy *)o);
6661   p->__pyx_vtab = __pyx_vtabptr_10TabProxies_TupleProxy;
6662   if (__pyx_pf_10TabProxies_10TupleProxy___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
6663     Py_DECREF(o); o = 0;
6664   }
6665   return o;
6666 }
6667
6668 static void __pyx_tp_dealloc_10TabProxies_TupleProxy(PyObject *o) {
6669   {
6670     PyObject *etype, *eval, *etb;
6671     PyErr_Fetch(&etype, &eval, &etb);
6672     ++Py_REFCNT(o);
6673     __pyx_pf_10TabProxies_10TupleProxy___dealloc__(o);
6674     if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
6675     --Py_REFCNT(o);
6676     PyErr_Restore(etype, eval, etb);
6677   }
6678   (*Py_TYPE(o)->tp_free)(o);
6679 }
6680 static PyObject *__pyx_sq_item_10TabProxies_TupleProxy(PyObject *o, Py_ssize_t i) {
6681   PyObject *r;
6682   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
6683   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
6684   Py_DECREF(x);
6685   return r;
6686 }
6687
6688 static int __pyx_mp_ass_subscript_10TabProxies_TupleProxy(PyObject *o, PyObject *i, PyObject *v) {
6689   if (v) {
6690     return __pyx_pf_10TabProxies_10TupleProxy___setitem__(o, i, v);
6691   }
6692   else {
6693     PyErr_Format(PyExc_NotImplementedError,
6694       "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name);
6695     return -1;
6696   }
6697 }
6698
6699 static PyMethodDef __pyx_methods_10TabProxies_TupleProxy[] = {
6700   {__Pyx_NAMESTR("_setindex"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy__setindex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy__setindex)},
6701   {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy___next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy___next__)},
6702   {0, 0, 0, 0}
6703 };
6704
6705 static PyNumberMethods __pyx_tp_as_number_TupleProxy = {
6706   0, /*nb_add*/
6707   0, /*nb_subtract*/
6708   0, /*nb_multiply*/
6709   #if PY_MAJOR_VERSION < 3
6710   0, /*nb_divide*/
6711   #endif
6712   0, /*nb_remainder*/
6713   0, /*nb_divmod*/
6714   0, /*nb_power*/
6715   0, /*nb_negative*/
6716   0, /*nb_positive*/
6717   0, /*nb_absolute*/
6718   0, /*nb_nonzero*/
6719   0, /*nb_invert*/
6720   0, /*nb_lshift*/
6721   0, /*nb_rshift*/
6722   0, /*nb_and*/
6723   0, /*nb_xor*/
6724   0, /*nb_or*/
6725   #if PY_MAJOR_VERSION < 3
6726   0, /*nb_coerce*/
6727   #endif
6728   0, /*nb_int*/
6729   #if PY_MAJOR_VERSION < 3
6730   0, /*nb_long*/
6731   #else
6732   0, /*reserved*/
6733   #endif
6734   0, /*nb_float*/
6735   #if PY_MAJOR_VERSION < 3
6736   0, /*nb_oct*/
6737   #endif
6738   #if PY_MAJOR_VERSION < 3
6739   0, /*nb_hex*/
6740   #endif
6741   0, /*nb_inplace_add*/
6742   0, /*nb_inplace_subtract*/
6743   0, /*nb_inplace_multiply*/
6744   #if PY_MAJOR_VERSION < 3
6745   0, /*nb_inplace_divide*/
6746   #endif
6747   0, /*nb_inplace_remainder*/
6748   0, /*nb_inplace_power*/
6749   0, /*nb_inplace_lshift*/
6750   0, /*nb_inplace_rshift*/
6751   0, /*nb_inplace_and*/
6752   0, /*nb_inplace_xor*/
6753   0, /*nb_inplace_or*/
6754   0, /*nb_floor_divide*/
6755   0, /*nb_true_divide*/
6756   0, /*nb_inplace_floor_divide*/
6757   0, /*nb_inplace_true_divide*/
6758   #if PY_VERSION_HEX >= 0x02050000
6759   0, /*nb_index*/
6760   #endif
6761 };
6762
6763 static PySequenceMethods __pyx_tp_as_sequence_TupleProxy = {
6764   __pyx_pf_10TabProxies_10TupleProxy___len__, /*sq_length*/
6765   0, /*sq_concat*/
6766   0, /*sq_repeat*/
6767   __pyx_sq_item_10TabProxies_TupleProxy, /*sq_item*/
6768   0, /*sq_slice*/
6769   0, /*sq_ass_item*/
6770   0, /*sq_ass_slice*/
6771   0, /*sq_contains*/
6772   0, /*sq_inplace_concat*/
6773   0, /*sq_inplace_repeat*/
6774 };
6775
6776 static PyMappingMethods __pyx_tp_as_mapping_TupleProxy = {
6777   __pyx_pf_10TabProxies_10TupleProxy___len__, /*mp_length*/
6778   __pyx_pf_10TabProxies_10TupleProxy___getitem__, /*mp_subscript*/
6779   __pyx_mp_ass_subscript_10TabProxies_TupleProxy, /*mp_ass_subscript*/
6780 };
6781
6782 static PyBufferProcs __pyx_tp_as_buffer_TupleProxy = {
6783   #if PY_MAJOR_VERSION < 3
6784   0, /*bf_getreadbuffer*/
6785   #endif
6786   #if PY_MAJOR_VERSION < 3
6787   0, /*bf_getwritebuffer*/
6788   #endif
6789   #if PY_MAJOR_VERSION < 3
6790   0, /*bf_getsegcount*/
6791   #endif
6792   #if PY_MAJOR_VERSION < 3
6793   0, /*bf_getcharbuffer*/
6794   #endif
6795   #if PY_VERSION_HEX >= 0x02060000
6796   0, /*bf_getbuffer*/
6797   #endif
6798   #if PY_VERSION_HEX >= 0x02060000
6799   0, /*bf_releasebuffer*/
6800   #endif
6801 };
6802
6803 PyTypeObject __pyx_type_10TabProxies_TupleProxy = {
6804   PyVarObject_HEAD_INIT(0, 0)
6805   __Pyx_NAMESTR("TabProxies.TupleProxy"), /*tp_name*/
6806   sizeof(struct __pyx_obj_10TabProxies_TupleProxy), /*tp_basicsize*/
6807   0, /*tp_itemsize*/
6808   __pyx_tp_dealloc_10TabProxies_TupleProxy, /*tp_dealloc*/
6809   0, /*tp_print*/
6810   0, /*tp_getattr*/
6811   0, /*tp_setattr*/
6812   #if PY_MAJOR_VERSION < 3
6813   0, /*tp_compare*/
6814   #else
6815   0, /*reserved*/
6816   #endif
6817   0, /*tp_repr*/
6818   &__pyx_tp_as_number_TupleProxy, /*tp_as_number*/
6819   &__pyx_tp_as_sequence_TupleProxy, /*tp_as_sequence*/
6820   &__pyx_tp_as_mapping_TupleProxy, /*tp_as_mapping*/
6821   0, /*tp_hash*/
6822   0, /*tp_call*/
6823   __pyx_pf_10TabProxies_10TupleProxy___str__, /*tp_str*/
6824   0, /*tp_getattro*/
6825   0, /*tp_setattro*/
6826   &__pyx_tp_as_buffer_TupleProxy, /*tp_as_buffer*/
6827   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
6828   __Pyx_DOCSTR("Proxy class for access to parsed row as a tuple.\n\n    This class represents a table row for fast read-access.\n\n    Access to individual fields is via the [] operator.\n    \n    Only read-only access is implemented.\n    "), /*tp_doc*/
6829   0, /*tp_traverse*/
6830   0, /*tp_clear*/
6831   0, /*tp_richcompare*/
6832   0, /*tp_weaklistoffset*/
6833   __pyx_pf_10TabProxies_10TupleProxy___iter__, /*tp_iter*/
6834   __pyx_pf_10TabProxies_10TupleProxy___next__, /*tp_iternext*/
6835   __pyx_methods_10TabProxies_TupleProxy, /*tp_methods*/
6836   0, /*tp_members*/
6837   0, /*tp_getset*/
6838   0, /*tp_base*/
6839   0, /*tp_dict*/
6840   0, /*tp_descr_get*/
6841   0, /*tp_descr_set*/
6842   0, /*tp_dictoffset*/
6843   0, /*tp_init*/
6844   0, /*tp_alloc*/
6845   __pyx_tp_new_10TabProxies_TupleProxy, /*tp_new*/
6846   0, /*tp_free*/
6847   0, /*tp_is_gc*/
6848   0, /*tp_bases*/
6849   0, /*tp_mro*/
6850   0, /*tp_cache*/
6851   0, /*tp_subclasses*/
6852   0, /*tp_weaklist*/
6853   0, /*tp_del*/
6854   #if PY_VERSION_HEX >= 0x02060000
6855   0, /*tp_version_tag*/
6856   #endif
6857 };
6858 static struct __pyx_vtabstruct_10TabProxies_GTFProxy __pyx_vtable_10TabProxies_GTFProxy;
6859
6860 static PyObject *__pyx_tp_new_10TabProxies_GTFProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
6861   struct __pyx_obj_10TabProxies_GTFProxy *p;
6862   PyObject *o = __pyx_tp_new_10TabProxies_TupleProxy(t, a, k);
6863   if (!o) return 0;
6864   p = ((struct __pyx_obj_10TabProxies_GTFProxy *)o);
6865   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_10TabProxies_GTFProxy;
6866   if (__pyx_pf_10TabProxies_8GTFProxy___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
6867     Py_DECREF(o); o = 0;
6868   }
6869   return o;
6870 }
6871
6872 static void __pyx_tp_dealloc_10TabProxies_GTFProxy(PyObject *o) {
6873   {
6874     PyObject *etype, *eval, *etb;
6875     PyErr_Fetch(&etype, &eval, &etb);
6876     ++Py_REFCNT(o);
6877     __pyx_pf_10TabProxies_8GTFProxy___dealloc__(o);
6878     if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
6879     --Py_REFCNT(o);
6880     PyErr_Restore(etype, eval, etb);
6881   }
6882   __pyx_tp_dealloc_10TabProxies_TupleProxy(o);
6883 }
6884 static PyObject *__pyx_sq_item_10TabProxies_GTFProxy(PyObject *o, Py_ssize_t i) {
6885   PyObject *r;
6886   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
6887   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
6888   Py_DECREF(x);
6889   return r;
6890 }
6891
6892 static PyObject *__pyx_tp_getattro_10TabProxies_GTFProxy(PyObject *o, PyObject *n) {
6893   PyObject *v = PyObject_GenericGetAttr(o, n);
6894   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
6895     PyErr_Clear();
6896     v = __pyx_pf_10TabProxies_8GTFProxy___getattr__(o, n);
6897   }
6898   return v;
6899 }
6900
6901 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_contig(PyObject *o, void *x) {
6902   return __pyx_pf_10TabProxies_8GTFProxy_6contig___get__(o);
6903 }
6904
6905 static int __pyx_setprop_10TabProxies_8GTFProxy_contig(PyObject *o, PyObject *v, void *x) {
6906   if (v) {
6907     return __pyx_pf_10TabProxies_8GTFProxy_6contig___set__(o, v);
6908   }
6909   else {
6910     PyErr_SetString(PyExc_NotImplementedError, "__del__");
6911     return -1;
6912   }
6913 }
6914
6915 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_feature(PyObject *o, void *x) {
6916   return __pyx_pf_10TabProxies_8GTFProxy_7feature___get__(o);
6917 }
6918
6919 static int __pyx_setprop_10TabProxies_8GTFProxy_feature(PyObject *o, PyObject *v, void *x) {
6920   if (v) {
6921     return __pyx_pf_10TabProxies_8GTFProxy_7feature___set__(o, v);
6922   }
6923   else {
6924     PyErr_SetString(PyExc_NotImplementedError, "__del__");
6925     return -1;
6926   }
6927 }
6928
6929 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_source(PyObject *o, void *x) {
6930   return __pyx_pf_10TabProxies_8GTFProxy_6source___get__(o);
6931 }
6932
6933 static int __pyx_setprop_10TabProxies_8GTFProxy_source(PyObject *o, PyObject *v, void *x) {
6934   if (v) {
6935     return __pyx_pf_10TabProxies_8GTFProxy_6source___set__(o, v);
6936   }
6937   else {
6938     PyErr_SetString(PyExc_NotImplementedError, "__del__");
6939     return -1;
6940   }
6941 }
6942
6943 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_start(PyObject *o, void *x) {
6944   return __pyx_pf_10TabProxies_8GTFProxy_5start___get__(o);
6945 }
6946
6947 static int __pyx_setprop_10TabProxies_8GTFProxy_start(PyObject *o, PyObject *v, void *x) {
6948   if (v) {
6949     return __pyx_pf_10TabProxies_8GTFProxy_5start___set__(o, v);
6950   }
6951   else {
6952     PyErr_SetString(PyExc_NotImplementedError, "__del__");
6953     return -1;
6954   }
6955 }
6956
6957 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_end(PyObject *o, void *x) {
6958   return __pyx_pf_10TabProxies_8GTFProxy_3end___get__(o);
6959 }
6960
6961 static int __pyx_setprop_10TabProxies_8GTFProxy_end(PyObject *o, PyObject *v, void *x) {
6962   if (v) {
6963     return __pyx_pf_10TabProxies_8GTFProxy_3end___set__(o, v);
6964   }
6965   else {
6966     PyErr_SetString(PyExc_NotImplementedError, "__del__");
6967     return -1;
6968   }
6969 }
6970
6971 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_score(PyObject *o, void *x) {
6972   return __pyx_pf_10TabProxies_8GTFProxy_5score___get__(o);
6973 }
6974
6975 static int __pyx_setprop_10TabProxies_8GTFProxy_score(PyObject *o, PyObject *v, void *x) {
6976   if (v) {
6977     return __pyx_pf_10TabProxies_8GTFProxy_5score___set__(o, v);
6978   }
6979   else {
6980     PyErr_SetString(PyExc_NotImplementedError, "__del__");
6981     return -1;
6982   }
6983 }
6984
6985 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_strand(PyObject *o, void *x) {
6986   return __pyx_pf_10TabProxies_8GTFProxy_6strand___get__(o);
6987 }
6988
6989 static int __pyx_setprop_10TabProxies_8GTFProxy_strand(PyObject *o, PyObject *v, void *x) {
6990   if (v) {
6991     return __pyx_pf_10TabProxies_8GTFProxy_6strand___set__(o, v);
6992   }
6993   else {
6994     PyErr_SetString(PyExc_NotImplementedError, "__del__");
6995     return -1;
6996   }
6997 }
6998
6999 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_frame(PyObject *o, void *x) {
7000   return __pyx_pf_10TabProxies_8GTFProxy_5frame___get__(o);
7001 }
7002
7003 static int __pyx_setprop_10TabProxies_8GTFProxy_frame(PyObject *o, PyObject *v, void *x) {
7004   if (v) {
7005     return __pyx_pf_10TabProxies_8GTFProxy_5frame___set__(o, v);
7006   }
7007   else {
7008     PyErr_SetString(PyExc_NotImplementedError, "__del__");
7009     return -1;
7010   }
7011 }
7012
7013 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_attributes(PyObject *o, void *x) {
7014   return __pyx_pf_10TabProxies_8GTFProxy_10attributes___get__(o);
7015 }
7016
7017 static int __pyx_setprop_10TabProxies_8GTFProxy_attributes(PyObject *o, PyObject *v, void *x) {
7018   if (v) {
7019     return __pyx_pf_10TabProxies_8GTFProxy_10attributes___set__(o, v);
7020   }
7021   else {
7022     PyErr_SetString(PyExc_NotImplementedError, "__del__");
7023     return -1;
7024   }
7025 }
7026
7027 static PyMethodDef __pyx_methods_10TabProxies_GTFProxy[] = {
7028   {__Pyx_NAMESTR("asDict"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_asDict, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_asDict)},
7029   {__Pyx_NAMESTR("fromDict"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_fromDict, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_fromDict)},
7030   {__Pyx_NAMESTR("invert"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_invert, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_invert)},
7031   {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_keys, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_keys)},
7032   {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy___getattr__)},
7033   {__Pyx_NAMESTR("setAttribute"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_setAttribute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_setAttribute)},
7034   {0, 0, 0, 0}
7035 };
7036
7037 static struct PyGetSetDef __pyx_getsets_10TabProxies_GTFProxy[] = {
7038   {(char *)"contig", __pyx_getprop_10TabProxies_8GTFProxy_contig, __pyx_setprop_10TabProxies_8GTFProxy_contig, __Pyx_DOCSTR(__pyx_k_19), 0},
7039   {(char *)"feature", __pyx_getprop_10TabProxies_8GTFProxy_feature, __pyx_setprop_10TabProxies_8GTFProxy_feature, __Pyx_DOCSTR(__pyx_k_20), 0},
7040   {(char *)"source", __pyx_getprop_10TabProxies_8GTFProxy_source, __pyx_setprop_10TabProxies_8GTFProxy_source, __Pyx_DOCSTR(__pyx_k_21), 0},
7041   {(char *)"start", __pyx_getprop_10TabProxies_8GTFProxy_start, __pyx_setprop_10TabProxies_8GTFProxy_start, __Pyx_DOCSTR(__pyx_k_22), 0},
7042   {(char *)"end", __pyx_getprop_10TabProxies_8GTFProxy_end, __pyx_setprop_10TabProxies_8GTFProxy_end, __Pyx_DOCSTR(__pyx_k_23), 0},
7043   {(char *)"score", __pyx_getprop_10TabProxies_8GTFProxy_score, __pyx_setprop_10TabProxies_8GTFProxy_score, __Pyx_DOCSTR(__pyx_k_24), 0},
7044   {(char *)"strand", __pyx_getprop_10TabProxies_8GTFProxy_strand, __pyx_setprop_10TabProxies_8GTFProxy_strand, __Pyx_DOCSTR(__pyx_k_25), 0},
7045   {(char *)"frame", __pyx_getprop_10TabProxies_8GTFProxy_frame, __pyx_setprop_10TabProxies_8GTFProxy_frame, __Pyx_DOCSTR(__pyx_k_26), 0},
7046   {(char *)"attributes", __pyx_getprop_10TabProxies_8GTFProxy_attributes, __pyx_setprop_10TabProxies_8GTFProxy_attributes, __Pyx_DOCSTR(__pyx_k_27), 0},
7047   {0, 0, 0, 0, 0}
7048 };
7049
7050 static PyNumberMethods __pyx_tp_as_number_GTFProxy = {
7051   0, /*nb_add*/
7052   0, /*nb_subtract*/
7053   0, /*nb_multiply*/
7054   #if PY_MAJOR_VERSION < 3
7055   0, /*nb_divide*/
7056   #endif
7057   0, /*nb_remainder*/
7058   0, /*nb_divmod*/
7059   0, /*nb_power*/
7060   0, /*nb_negative*/
7061   0, /*nb_positive*/
7062   0, /*nb_absolute*/
7063   0, /*nb_nonzero*/
7064   0, /*nb_invert*/
7065   0, /*nb_lshift*/
7066   0, /*nb_rshift*/
7067   0, /*nb_and*/
7068   0, /*nb_xor*/
7069   0, /*nb_or*/
7070   #if PY_MAJOR_VERSION < 3
7071   0, /*nb_coerce*/
7072   #endif
7073   0, /*nb_int*/
7074   #if PY_MAJOR_VERSION < 3
7075   0, /*nb_long*/
7076   #else
7077   0, /*reserved*/
7078   #endif
7079   0, /*nb_float*/
7080   #if PY_MAJOR_VERSION < 3
7081   0, /*nb_oct*/
7082   #endif
7083   #if PY_MAJOR_VERSION < 3
7084   0, /*nb_hex*/
7085   #endif
7086   0, /*nb_inplace_add*/
7087   0, /*nb_inplace_subtract*/
7088   0, /*nb_inplace_multiply*/
7089   #if PY_MAJOR_VERSION < 3
7090   0, /*nb_inplace_divide*/
7091   #endif
7092   0, /*nb_inplace_remainder*/
7093   0, /*nb_inplace_power*/
7094   0, /*nb_inplace_lshift*/
7095   0, /*nb_inplace_rshift*/
7096   0, /*nb_inplace_and*/
7097   0, /*nb_inplace_xor*/
7098   0, /*nb_inplace_or*/
7099   0, /*nb_floor_divide*/
7100   0, /*nb_true_divide*/
7101   0, /*nb_inplace_floor_divide*/
7102   0, /*nb_inplace_true_divide*/
7103   #if PY_VERSION_HEX >= 0x02050000
7104   0, /*nb_index*/
7105   #endif
7106 };
7107
7108 static PySequenceMethods __pyx_tp_as_sequence_GTFProxy = {
7109   0, /*sq_length*/
7110   0, /*sq_concat*/
7111   0, /*sq_repeat*/
7112   __pyx_sq_item_10TabProxies_GTFProxy, /*sq_item*/
7113   0, /*sq_slice*/
7114   0, /*sq_ass_item*/
7115   0, /*sq_ass_slice*/
7116   0, /*sq_contains*/
7117   0, /*sq_inplace_concat*/
7118   0, /*sq_inplace_repeat*/
7119 };
7120
7121 static PyMappingMethods __pyx_tp_as_mapping_GTFProxy = {
7122   0, /*mp_length*/
7123   __pyx_pf_10TabProxies_8GTFProxy___getitem__, /*mp_subscript*/
7124   0, /*mp_ass_subscript*/
7125 };
7126
7127 static PyBufferProcs __pyx_tp_as_buffer_GTFProxy = {
7128   #if PY_MAJOR_VERSION < 3
7129   0, /*bf_getreadbuffer*/
7130   #endif
7131   #if PY_MAJOR_VERSION < 3
7132   0, /*bf_getwritebuffer*/
7133   #endif
7134   #if PY_MAJOR_VERSION < 3
7135   0, /*bf_getsegcount*/
7136   #endif
7137   #if PY_MAJOR_VERSION < 3
7138   0, /*bf_getcharbuffer*/
7139   #endif
7140   #if PY_VERSION_HEX >= 0x02060000
7141   0, /*bf_getbuffer*/
7142   #endif
7143   #if PY_VERSION_HEX >= 0x02060000
7144   0, /*bf_releasebuffer*/
7145   #endif
7146 };
7147
7148 PyTypeObject __pyx_type_10TabProxies_GTFProxy = {
7149   PyVarObject_HEAD_INIT(0, 0)
7150   __Pyx_NAMESTR("TabProxies.GTFProxy"), /*tp_name*/
7151   sizeof(struct __pyx_obj_10TabProxies_GTFProxy), /*tp_basicsize*/
7152   0, /*tp_itemsize*/
7153   __pyx_tp_dealloc_10TabProxies_GTFProxy, /*tp_dealloc*/
7154   0, /*tp_print*/
7155   0, /*tp_getattr*/
7156   0, /*tp_setattr*/
7157   #if PY_MAJOR_VERSION < 3
7158   0, /*tp_compare*/
7159   #else
7160   0, /*reserved*/
7161   #endif
7162   0, /*tp_repr*/
7163   &__pyx_tp_as_number_GTFProxy, /*tp_as_number*/
7164   &__pyx_tp_as_sequence_GTFProxy, /*tp_as_sequence*/
7165   &__pyx_tp_as_mapping_GTFProxy, /*tp_as_mapping*/
7166   0, /*tp_hash*/
7167   0, /*tp_call*/
7168   __pyx_pf_10TabProxies_8GTFProxy___str__, /*tp_str*/
7169   __pyx_tp_getattro_10TabProxies_GTFProxy, /*tp_getattro*/
7170   0, /*tp_setattro*/
7171   &__pyx_tp_as_buffer_GTFProxy, /*tp_as_buffer*/
7172   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
7173   __Pyx_DOCSTR("Proxy class for access to GTF fields.\n\n    This class represents a GTF entry for fast read-access.\n    Write-access has been added as well, though some care must\n    be taken. If any of the string fields (contig, source, ...)\n    are set, the new value is tied to the lifetime of the\n    argument that was supplied.\n\n    The only exception is the attributes field when set from\n    a dictionary - this field will manage its own memory.\n\n    "), /*tp_doc*/
7174   0, /*tp_traverse*/
7175   0, /*tp_clear*/
7176   0, /*tp_richcompare*/
7177   0, /*tp_weaklistoffset*/
7178   0, /*tp_iter*/
7179   0, /*tp_iternext*/
7180   __pyx_methods_10TabProxies_GTFProxy, /*tp_methods*/
7181   0, /*tp_members*/
7182   __pyx_getsets_10TabProxies_GTFProxy, /*tp_getset*/
7183   0, /*tp_base*/
7184   0, /*tp_dict*/
7185   0, /*tp_descr_get*/
7186   0, /*tp_descr_set*/
7187   0, /*tp_dictoffset*/
7188   0, /*tp_init*/
7189   0, /*tp_alloc*/
7190   __pyx_tp_new_10TabProxies_GTFProxy, /*tp_new*/
7191   0, /*tp_free*/
7192   0, /*tp_is_gc*/
7193   0, /*tp_bases*/
7194   0, /*tp_mro*/
7195   0, /*tp_cache*/
7196   0, /*tp_subclasses*/
7197   0, /*tp_weaklist*/
7198   0, /*tp_del*/
7199   #if PY_VERSION_HEX >= 0x02060000
7200   0, /*tp_version_tag*/
7201   #endif
7202 };
7203 static struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy __pyx_vtable_10TabProxies_NamedTupleProxy;
7204
7205 static PyObject *__pyx_tp_new_10TabProxies_NamedTupleProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
7206   struct __pyx_obj_10TabProxies_NamedTupleProxy *p;
7207   PyObject *o = __pyx_tp_new_10TabProxies_TupleProxy(t, a, k);
7208   if (!o) return 0;
7209   p = ((struct __pyx_obj_10TabProxies_NamedTupleProxy *)o);
7210   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_10TabProxies_NamedTupleProxy;
7211   return o;
7212 }
7213
7214 static PyObject *__pyx_tp_getattro_10TabProxies_NamedTupleProxy(PyObject *o, PyObject *n) {
7215   PyObject *v = PyObject_GenericGetAttr(o, n);
7216   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
7217     PyErr_Clear();
7218     v = __pyx_pf_10TabProxies_15NamedTupleProxy___getattr__(o, n);
7219   }
7220   return v;
7221 }
7222
7223 static int __pyx_tp_setattro_10TabProxies_NamedTupleProxy(PyObject *o, PyObject *n, PyObject *v) {
7224   if (v) {
7225     return __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(o, n, v);
7226   }
7227   else {
7228     if (__pyx_ptype_10TabProxies_TupleProxy->tp_setattro)
7229       return __pyx_ptype_10TabProxies_TupleProxy->tp_setattro(o, n, v);
7230     return PyObject_GenericSetAttr(o, n, 0);
7231   }
7232 }
7233
7234 static PyMethodDef __pyx_methods_10TabProxies_NamedTupleProxy[] = {
7235   {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_10TabProxies_15NamedTupleProxy___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
7236   {0, 0, 0, 0}
7237 };
7238
7239 static PyNumberMethods __pyx_tp_as_number_NamedTupleProxy = {
7240   0, /*nb_add*/
7241   0, /*nb_subtract*/
7242   0, /*nb_multiply*/
7243   #if PY_MAJOR_VERSION < 3
7244   0, /*nb_divide*/
7245   #endif
7246   0, /*nb_remainder*/
7247   0, /*nb_divmod*/
7248   0, /*nb_power*/
7249   0, /*nb_negative*/
7250   0, /*nb_positive*/
7251   0, /*nb_absolute*/
7252   0, /*nb_nonzero*/
7253   0, /*nb_invert*/
7254   0, /*nb_lshift*/
7255   0, /*nb_rshift*/
7256   0, /*nb_and*/
7257   0, /*nb_xor*/
7258   0, /*nb_or*/
7259   #if PY_MAJOR_VERSION < 3
7260   0, /*nb_coerce*/
7261   #endif
7262   0, /*nb_int*/
7263   #if PY_MAJOR_VERSION < 3
7264   0, /*nb_long*/
7265   #else
7266   0, /*reserved*/
7267   #endif
7268   0, /*nb_float*/
7269   #if PY_MAJOR_VERSION < 3
7270   0, /*nb_oct*/
7271   #endif
7272   #if PY_MAJOR_VERSION < 3
7273   0, /*nb_hex*/
7274   #endif
7275   0, /*nb_inplace_add*/
7276   0, /*nb_inplace_subtract*/
7277   0, /*nb_inplace_multiply*/
7278   #if PY_MAJOR_VERSION < 3
7279   0, /*nb_inplace_divide*/
7280   #endif
7281   0, /*nb_inplace_remainder*/
7282   0, /*nb_inplace_power*/
7283   0, /*nb_inplace_lshift*/
7284   0, /*nb_inplace_rshift*/
7285   0, /*nb_inplace_and*/
7286   0, /*nb_inplace_xor*/
7287   0, /*nb_inplace_or*/
7288   0, /*nb_floor_divide*/
7289   0, /*nb_true_divide*/
7290   0, /*nb_inplace_floor_divide*/
7291   0, /*nb_inplace_true_divide*/
7292   #if PY_VERSION_HEX >= 0x02050000
7293   0, /*nb_index*/
7294   #endif
7295 };
7296
7297 static PySequenceMethods __pyx_tp_as_sequence_NamedTupleProxy = {
7298   0, /*sq_length*/
7299   0, /*sq_concat*/
7300   0, /*sq_repeat*/
7301   0, /*sq_item*/
7302   0, /*sq_slice*/
7303   0, /*sq_ass_item*/
7304   0, /*sq_ass_slice*/
7305   0, /*sq_contains*/
7306   0, /*sq_inplace_concat*/
7307   0, /*sq_inplace_repeat*/
7308 };
7309
7310 static PyMappingMethods __pyx_tp_as_mapping_NamedTupleProxy = {
7311   0, /*mp_length*/
7312   0, /*mp_subscript*/
7313   0, /*mp_ass_subscript*/
7314 };
7315
7316 static PyBufferProcs __pyx_tp_as_buffer_NamedTupleProxy = {
7317   #if PY_MAJOR_VERSION < 3
7318   0, /*bf_getreadbuffer*/
7319   #endif
7320   #if PY_MAJOR_VERSION < 3
7321   0, /*bf_getwritebuffer*/
7322   #endif
7323   #if PY_MAJOR_VERSION < 3
7324   0, /*bf_getsegcount*/
7325   #endif
7326   #if PY_MAJOR_VERSION < 3
7327   0, /*bf_getcharbuffer*/
7328   #endif
7329   #if PY_VERSION_HEX >= 0x02060000
7330   0, /*bf_getbuffer*/
7331   #endif
7332   #if PY_VERSION_HEX >= 0x02060000
7333   0, /*bf_releasebuffer*/
7334   #endif
7335 };
7336
7337 PyTypeObject __pyx_type_10TabProxies_NamedTupleProxy = {
7338   PyVarObject_HEAD_INIT(0, 0)
7339   __Pyx_NAMESTR("TabProxies.NamedTupleProxy"), /*tp_name*/
7340   sizeof(struct __pyx_obj_10TabProxies_NamedTupleProxy), /*tp_basicsize*/
7341   0, /*tp_itemsize*/
7342   __pyx_tp_dealloc_10TabProxies_TupleProxy, /*tp_dealloc*/
7343   0, /*tp_print*/
7344   0, /*tp_getattr*/
7345   0, /*tp_setattr*/
7346   #if PY_MAJOR_VERSION < 3
7347   0, /*tp_compare*/
7348   #else
7349   0, /*reserved*/
7350   #endif
7351   0, /*tp_repr*/
7352   &__pyx_tp_as_number_NamedTupleProxy, /*tp_as_number*/
7353   &__pyx_tp_as_sequence_NamedTupleProxy, /*tp_as_sequence*/
7354   &__pyx_tp_as_mapping_NamedTupleProxy, /*tp_as_mapping*/
7355   0, /*tp_hash*/
7356   0, /*tp_call*/
7357   0, /*tp_str*/
7358   __pyx_tp_getattro_10TabProxies_NamedTupleProxy, /*tp_getattro*/
7359   __pyx_tp_setattro_10TabProxies_NamedTupleProxy, /*tp_setattro*/
7360   &__pyx_tp_as_buffer_NamedTupleProxy, /*tp_as_buffer*/
7361   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
7362   0, /*tp_doc*/
7363   0, /*tp_traverse*/
7364   0, /*tp_clear*/
7365   0, /*tp_richcompare*/
7366   0, /*tp_weaklistoffset*/
7367   0, /*tp_iter*/
7368   0, /*tp_iternext*/
7369   __pyx_methods_10TabProxies_NamedTupleProxy, /*tp_methods*/
7370   0, /*tp_members*/
7371   0, /*tp_getset*/
7372   0, /*tp_base*/
7373   0, /*tp_dict*/
7374   0, /*tp_descr_get*/
7375   0, /*tp_descr_set*/
7376   0, /*tp_dictoffset*/
7377   0, /*tp_init*/
7378   0, /*tp_alloc*/
7379   __pyx_tp_new_10TabProxies_NamedTupleProxy, /*tp_new*/
7380   0, /*tp_free*/
7381   0, /*tp_is_gc*/
7382   0, /*tp_bases*/
7383   0, /*tp_mro*/
7384   0, /*tp_cache*/
7385   0, /*tp_subclasses*/
7386   0, /*tp_weaklist*/
7387   0, /*tp_del*/
7388   #if PY_VERSION_HEX >= 0x02060000
7389   0, /*tp_version_tag*/
7390   #endif
7391 };
7392 static struct __pyx_vtabstruct_10TabProxies_BedProxy __pyx_vtable_10TabProxies_BedProxy;
7393
7394 static PyObject *__pyx_tp_new_10TabProxies_BedProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
7395   struct __pyx_obj_10TabProxies_BedProxy *p;
7396   PyObject *o = __pyx_tp_new_10TabProxies_TupleProxy(t, a, k);
7397   if (!o) return 0;
7398   p = ((struct __pyx_obj_10TabProxies_BedProxy *)o);
7399   p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_10TabProxies_BedProxy;
7400   return o;
7401 }
7402
7403 static int __pyx_tp_setattro_10TabProxies_BedProxy(PyObject *o, PyObject *n, PyObject *v) {
7404   if (v) {
7405     return __pyx_pf_10TabProxies_8BedProxy___setattr__(o, n, v);
7406   }
7407   else {
7408     if (__pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro)
7409       return __pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro(o, n, v);
7410     return PyObject_GenericSetAttr(o, n, 0);
7411   }
7412 }
7413
7414 static PyMethodDef __pyx_methods_10TabProxies_BedProxy[] = {
7415   {0, 0, 0, 0}
7416 };
7417
7418 static PyNumberMethods __pyx_tp_as_number_BedProxy = {
7419   0, /*nb_add*/
7420   0, /*nb_subtract*/
7421   0, /*nb_multiply*/
7422   #if PY_MAJOR_VERSION < 3
7423   0, /*nb_divide*/
7424   #endif
7425   0, /*nb_remainder*/
7426   0, /*nb_divmod*/
7427   0, /*nb_power*/
7428   0, /*nb_negative*/
7429   0, /*nb_positive*/
7430   0, /*nb_absolute*/
7431   0, /*nb_nonzero*/
7432   0, /*nb_invert*/
7433   0, /*nb_lshift*/
7434   0, /*nb_rshift*/
7435   0, /*nb_and*/
7436   0, /*nb_xor*/
7437   0, /*nb_or*/
7438   #if PY_MAJOR_VERSION < 3
7439   0, /*nb_coerce*/
7440   #endif
7441   0, /*nb_int*/
7442   #if PY_MAJOR_VERSION < 3
7443   0, /*nb_long*/
7444   #else
7445   0, /*reserved*/
7446   #endif
7447   0, /*nb_float*/
7448   #if PY_MAJOR_VERSION < 3
7449   0, /*nb_oct*/
7450   #endif
7451   #if PY_MAJOR_VERSION < 3
7452   0, /*nb_hex*/
7453   #endif
7454   0, /*nb_inplace_add*/
7455   0, /*nb_inplace_subtract*/
7456   0, /*nb_inplace_multiply*/
7457   #if PY_MAJOR_VERSION < 3
7458   0, /*nb_inplace_divide*/
7459   #endif
7460   0, /*nb_inplace_remainder*/
7461   0, /*nb_inplace_power*/
7462   0, /*nb_inplace_lshift*/
7463   0, /*nb_inplace_rshift*/
7464   0, /*nb_inplace_and*/
7465   0, /*nb_inplace_xor*/
7466   0, /*nb_inplace_or*/
7467   0, /*nb_floor_divide*/
7468   0, /*nb_true_divide*/
7469   0, /*nb_inplace_floor_divide*/
7470   0, /*nb_inplace_true_divide*/
7471   #if PY_VERSION_HEX >= 0x02050000
7472   0, /*nb_index*/
7473   #endif
7474 };
7475
7476 static PySequenceMethods __pyx_tp_as_sequence_BedProxy = {
7477   0, /*sq_length*/
7478   0, /*sq_concat*/
7479   0, /*sq_repeat*/
7480   0, /*sq_item*/
7481   0, /*sq_slice*/
7482   0, /*sq_ass_item*/
7483   0, /*sq_ass_slice*/
7484   0, /*sq_contains*/
7485   0, /*sq_inplace_concat*/
7486   0, /*sq_inplace_repeat*/
7487 };
7488
7489 static PyMappingMethods __pyx_tp_as_mapping_BedProxy = {
7490   0, /*mp_length*/
7491   0, /*mp_subscript*/
7492   0, /*mp_ass_subscript*/
7493 };
7494
7495 static PyBufferProcs __pyx_tp_as_buffer_BedProxy = {
7496   #if PY_MAJOR_VERSION < 3
7497   0, /*bf_getreadbuffer*/
7498   #endif
7499   #if PY_MAJOR_VERSION < 3
7500   0, /*bf_getwritebuffer*/
7501   #endif
7502   #if PY_MAJOR_VERSION < 3
7503   0, /*bf_getsegcount*/
7504   #endif
7505   #if PY_MAJOR_VERSION < 3
7506   0, /*bf_getcharbuffer*/
7507   #endif
7508   #if PY_VERSION_HEX >= 0x02060000
7509   0, /*bf_getbuffer*/
7510   #endif
7511   #if PY_VERSION_HEX >= 0x02060000
7512   0, /*bf_releasebuffer*/
7513   #endif
7514 };
7515
7516 PyTypeObject __pyx_type_10TabProxies_BedProxy = {
7517   PyVarObject_HEAD_INIT(0, 0)
7518   __Pyx_NAMESTR("TabProxies.BedProxy"), /*tp_name*/
7519   sizeof(struct __pyx_obj_10TabProxies_BedProxy), /*tp_basicsize*/
7520   0, /*tp_itemsize*/
7521   __pyx_tp_dealloc_10TabProxies_TupleProxy, /*tp_dealloc*/
7522   0, /*tp_print*/
7523   0, /*tp_getattr*/
7524   0, /*tp_setattr*/
7525   #if PY_MAJOR_VERSION < 3
7526   0, /*tp_compare*/
7527   #else
7528   0, /*reserved*/
7529   #endif
7530   0, /*tp_repr*/
7531   &__pyx_tp_as_number_BedProxy, /*tp_as_number*/
7532   &__pyx_tp_as_sequence_BedProxy, /*tp_as_sequence*/
7533   &__pyx_tp_as_mapping_BedProxy, /*tp_as_mapping*/
7534   0, /*tp_hash*/
7535   0, /*tp_call*/
7536   __pyx_pf_10TabProxies_8BedProxy___str__, /*tp_str*/
7537   0, /*tp_getattro*/
7538   __pyx_tp_setattro_10TabProxies_BedProxy, /*tp_setattro*/
7539   &__pyx_tp_as_buffer_BedProxy, /*tp_as_buffer*/
7540   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
7541   __Pyx_DOCSTR("Proxy class for access to Bed fields.\n\n    This class represents a GTF entry for fast read-access.\n    "), /*tp_doc*/
7542   0, /*tp_traverse*/
7543   0, /*tp_clear*/
7544   0, /*tp_richcompare*/
7545   0, /*tp_weaklistoffset*/
7546   0, /*tp_iter*/
7547   0, /*tp_iternext*/
7548   __pyx_methods_10TabProxies_BedProxy, /*tp_methods*/
7549   0, /*tp_members*/
7550   0, /*tp_getset*/
7551   0, /*tp_base*/
7552   0, /*tp_dict*/
7553   0, /*tp_descr_get*/
7554   0, /*tp_descr_set*/
7555   0, /*tp_dictoffset*/
7556   0, /*tp_init*/
7557   0, /*tp_alloc*/
7558   __pyx_tp_new_10TabProxies_BedProxy, /*tp_new*/
7559   0, /*tp_free*/
7560   0, /*tp_is_gc*/
7561   0, /*tp_bases*/
7562   0, /*tp_mro*/
7563   0, /*tp_cache*/
7564   0, /*tp_subclasses*/
7565   0, /*tp_weaklist*/
7566   0, /*tp_del*/
7567   #if PY_VERSION_HEX >= 0x02060000
7568   0, /*tp_version_tag*/
7569   #endif
7570 };
7571 static struct __pyx_vtabstruct_10TabProxies_VCFProxy __pyx_vtable_10TabProxies_VCFProxy;
7572
7573 static PyObject *__pyx_tp_new_10TabProxies_VCFProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
7574   struct __pyx_obj_10TabProxies_VCFProxy *p;
7575   PyObject *o = __pyx_tp_new_10TabProxies_TupleProxy(t, a, k);
7576   if (!o) return 0;
7577   p = ((struct __pyx_obj_10TabProxies_VCFProxy *)o);
7578   p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_10TabProxies_VCFProxy;
7579   if (__pyx_pf_10TabProxies_8VCFProxy___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
7580     Py_DECREF(o); o = 0;
7581   }
7582   return o;
7583 }
7584
7585 static int __pyx_tp_setattro_10TabProxies_VCFProxy(PyObject *o, PyObject *n, PyObject *v) {
7586   if (v) {
7587     return __pyx_pf_10TabProxies_8VCFProxy___setattr__(o, n, v);
7588   }
7589   else {
7590     if (__pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro)
7591       return __pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro(o, n, v);
7592     return PyObject_GenericSetAttr(o, n, 0);
7593   }
7594 }
7595
7596 static PyMethodDef __pyx_methods_10TabProxies_VCFProxy[] = {
7597   {0, 0, 0, 0}
7598 };
7599
7600 static PyNumberMethods __pyx_tp_as_number_VCFProxy = {
7601   0, /*nb_add*/
7602   0, /*nb_subtract*/
7603   0, /*nb_multiply*/
7604   #if PY_MAJOR_VERSION < 3
7605   0, /*nb_divide*/
7606   #endif
7607   0, /*nb_remainder*/
7608   0, /*nb_divmod*/
7609   0, /*nb_power*/
7610   0, /*nb_negative*/
7611   0, /*nb_positive*/
7612   0, /*nb_absolute*/
7613   0, /*nb_nonzero*/
7614   0, /*nb_invert*/
7615   0, /*nb_lshift*/
7616   0, /*nb_rshift*/
7617   0, /*nb_and*/
7618   0, /*nb_xor*/
7619   0, /*nb_or*/
7620   #if PY_MAJOR_VERSION < 3
7621   0, /*nb_coerce*/
7622   #endif
7623   0, /*nb_int*/
7624   #if PY_MAJOR_VERSION < 3
7625   0, /*nb_long*/
7626   #else
7627   0, /*reserved*/
7628   #endif
7629   0, /*nb_float*/
7630   #if PY_MAJOR_VERSION < 3
7631   0, /*nb_oct*/
7632   #endif
7633   #if PY_MAJOR_VERSION < 3
7634   0, /*nb_hex*/
7635   #endif
7636   0, /*nb_inplace_add*/
7637   0, /*nb_inplace_subtract*/
7638   0, /*nb_inplace_multiply*/
7639   #if PY_MAJOR_VERSION < 3
7640   0, /*nb_inplace_divide*/
7641   #endif
7642   0, /*nb_inplace_remainder*/
7643   0, /*nb_inplace_power*/
7644   0, /*nb_inplace_lshift*/
7645   0, /*nb_inplace_rshift*/
7646   0, /*nb_inplace_and*/
7647   0, /*nb_inplace_xor*/
7648   0, /*nb_inplace_or*/
7649   0, /*nb_floor_divide*/
7650   0, /*nb_true_divide*/
7651   0, /*nb_inplace_floor_divide*/
7652   0, /*nb_inplace_true_divide*/
7653   #if PY_VERSION_HEX >= 0x02050000
7654   0, /*nb_index*/
7655   #endif
7656 };
7657
7658 static PySequenceMethods __pyx_tp_as_sequence_VCFProxy = {
7659   __pyx_pf_10TabProxies_8VCFProxy___len__, /*sq_length*/
7660   0, /*sq_concat*/
7661   0, /*sq_repeat*/
7662   0, /*sq_item*/
7663   0, /*sq_slice*/
7664   0, /*sq_ass_item*/
7665   0, /*sq_ass_slice*/
7666   0, /*sq_contains*/
7667   0, /*sq_inplace_concat*/
7668   0, /*sq_inplace_repeat*/
7669 };
7670
7671 static PyMappingMethods __pyx_tp_as_mapping_VCFProxy = {
7672   __pyx_pf_10TabProxies_8VCFProxy___len__, /*mp_length*/
7673   0, /*mp_subscript*/
7674   0, /*mp_ass_subscript*/
7675 };
7676
7677 static PyBufferProcs __pyx_tp_as_buffer_VCFProxy = {
7678   #if PY_MAJOR_VERSION < 3
7679   0, /*bf_getreadbuffer*/
7680   #endif
7681   #if PY_MAJOR_VERSION < 3
7682   0, /*bf_getwritebuffer*/
7683   #endif
7684   #if PY_MAJOR_VERSION < 3
7685   0, /*bf_getsegcount*/
7686   #endif
7687   #if PY_MAJOR_VERSION < 3
7688   0, /*bf_getcharbuffer*/
7689   #endif
7690   #if PY_VERSION_HEX >= 0x02060000
7691   0, /*bf_getbuffer*/
7692   #endif
7693   #if PY_VERSION_HEX >= 0x02060000
7694   0, /*bf_releasebuffer*/
7695   #endif
7696 };
7697
7698 PyTypeObject __pyx_type_10TabProxies_VCFProxy = {
7699   PyVarObject_HEAD_INIT(0, 0)
7700   __Pyx_NAMESTR("TabProxies.VCFProxy"), /*tp_name*/
7701   sizeof(struct __pyx_obj_10TabProxies_VCFProxy), /*tp_basicsize*/
7702   0, /*tp_itemsize*/
7703   __pyx_tp_dealloc_10TabProxies_TupleProxy, /*tp_dealloc*/
7704   0, /*tp_print*/
7705   0, /*tp_getattr*/
7706   0, /*tp_setattr*/
7707   #if PY_MAJOR_VERSION < 3
7708   0, /*tp_compare*/
7709   #else
7710   0, /*reserved*/
7711   #endif
7712   0, /*tp_repr*/
7713   &__pyx_tp_as_number_VCFProxy, /*tp_as_number*/
7714   &__pyx_tp_as_sequence_VCFProxy, /*tp_as_sequence*/
7715   &__pyx_tp_as_mapping_VCFProxy, /*tp_as_mapping*/
7716   0, /*tp_hash*/
7717   0, /*tp_call*/
7718   0, /*tp_str*/
7719   0, /*tp_getattro*/
7720   __pyx_tp_setattro_10TabProxies_VCFProxy, /*tp_setattro*/
7721   &__pyx_tp_as_buffer_VCFProxy, /*tp_as_buffer*/
7722   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
7723   __Pyx_DOCSTR("Proxy class for access to VCF fields.\n\n    The genotypes are accessed via index.\n    "), /*tp_doc*/
7724   0, /*tp_traverse*/
7725   0, /*tp_clear*/
7726   0, /*tp_richcompare*/
7727   0, /*tp_weaklistoffset*/
7728   0, /*tp_iter*/
7729   0, /*tp_iternext*/
7730   __pyx_methods_10TabProxies_VCFProxy, /*tp_methods*/
7731   0, /*tp_members*/
7732   0, /*tp_getset*/
7733   0, /*tp_base*/
7734   0, /*tp_dict*/
7735   0, /*tp_descr_get*/
7736   0, /*tp_descr_set*/
7737   0, /*tp_dictoffset*/
7738   0, /*tp_init*/
7739   0, /*tp_alloc*/
7740   __pyx_tp_new_10TabProxies_VCFProxy, /*tp_new*/
7741   0, /*tp_free*/
7742   0, /*tp_is_gc*/
7743   0, /*tp_bases*/
7744   0, /*tp_mro*/
7745   0, /*tp_cache*/
7746   0, /*tp_subclasses*/
7747   0, /*tp_weaklist*/
7748   0, /*tp_del*/
7749   #if PY_VERSION_HEX >= 0x02060000
7750   0, /*tp_version_tag*/
7751   #endif
7752 };
7753
7754 static PyMethodDef __pyx_methods[] = {
7755   {__Pyx_NAMESTR("toDot"), (PyCFunction)__pyx_pf_10TabProxies_toDot, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_toDot)},
7756   {__Pyx_NAMESTR("quote"), (PyCFunction)__pyx_pf_10TabProxies_quote, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_quote)},
7757   {0, 0, 0, 0}
7758 };
7759
7760 #if PY_MAJOR_VERSION >= 3
7761 static struct PyModuleDef __pyx_moduledef = {
7762     PyModuleDef_HEAD_INIT,
7763     __Pyx_NAMESTR("TabProxies"),
7764     0, /* m_doc */
7765     -1, /* m_size */
7766     __pyx_methods /* m_methods */,
7767     NULL, /* m_reload */
7768     NULL, /* m_traverse */
7769     NULL, /* m_clear */
7770     NULL /* m_free */
7771 };
7772 #endif
7773
7774 static __Pyx_StringTabEntry __pyx_string_tab[] = {
7775   {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
7776   {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
7777   {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
7778   {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
7779   {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
7780   {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
7781   {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
7782   {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
7783   {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
7784   {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
7785   {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
7786   {&__pyx_kp_u_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 1, 0, 0},
7787   {&__pyx_kp_u_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 1, 0, 0},
7788   {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
7789   {&__pyx_kp_u_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 1, 0, 0},
7790   {&__pyx_kp_u_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 1, 0, 0},
7791   {&__pyx_kp_u_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 1, 0, 0},
7792   {&__pyx_kp_u_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 1, 0, 0},
7793   {&__pyx_kp_u_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 1, 0, 0},
7794   {&__pyx_kp_u_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 1, 0, 0},
7795   {&__pyx_kp_u_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 1, 0, 0},
7796   {&__pyx_kp_u_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 1, 0, 0},
7797   {&__pyx_kp_u_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 1, 0, 0},
7798   {&__pyx_kp_u_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 1, 0, 0},
7799   {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
7800   {&__pyx_kp_u_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 1, 0, 0},
7801   {&__pyx_kp_u_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 1, 0, 0},
7802   {&__pyx_kp_u_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 1, 0, 0},
7803   {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
7804   {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
7805   {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
7806   {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
7807   {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
7808   {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
7809   {&__pyx_n_s__BedProxy, __pyx_k__BedProxy, sizeof(__pyx_k__BedProxy), 0, 0, 1, 1},
7810   {&__pyx_n_s__GTFProxy, __pyx_k__GTFProxy, sizeof(__pyx_k__GTFProxy), 0, 0, 1, 1},
7811   {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
7812   {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
7813   {&__pyx_n_s__NamedTupleProxy, __pyx_k__NamedTupleProxy, sizeof(__pyx_k__NamedTupleProxy), 0, 0, 1, 1},
7814   {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
7815   {&__pyx_n_s__StringType, __pyx_k__StringType, sizeof(__pyx_k__StringType), 0, 0, 1, 1},
7816   {&__pyx_n_s__StringTypes, __pyx_k__StringTypes, sizeof(__pyx_k__StringTypes), 0, 0, 1, 1},
7817   {&__pyx_n_s__TupleProxy, __pyx_k__TupleProxy, sizeof(__pyx_k__TupleProxy), 0, 0, 1, 1},
7818   {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
7819   {&__pyx_n_s__VCFProxy, __pyx_k__VCFProxy, sizeof(__pyx_k__VCFProxy), 0, 0, 1, 1},
7820   {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
7821   {&__pyx_n_s____getattr__, __pyx_k____getattr__, sizeof(__pyx_k____getattr__), 0, 0, 1, 1},
7822   {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
7823   {&__pyx_n_s____next__, __pyx_k____next__, sizeof(__pyx_k____next__), 0, 0, 1, 1},
7824   {&__pyx_n_s____setattr__, __pyx_k____setattr__, sizeof(__pyx_k____setattr__), 0, 0, 1, 1},
7825   {&__pyx_n_s____setitem__, __pyx_k____setitem__, sizeof(__pyx_k____setitem__), 0, 0, 1, 1},
7826   {&__pyx_n_s____str__, __pyx_k____str__, sizeof(__pyx_k____str__), 0, 0, 1, 1},
7827   {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
7828   {&__pyx_n_s___setindex, __pyx_k___setindex, sizeof(__pyx_k___setindex), 0, 0, 1, 1},
7829   {&__pyx_n_s__alt, __pyx_k__alt, sizeof(__pyx_k__alt), 0, 0, 1, 1},
7830   {&__pyx_n_s__asDict, __pyx_k__asDict, sizeof(__pyx_k__asDict), 0, 0, 1, 1},
7831   {&__pyx_n_s__attributes, __pyx_k__attributes, sizeof(__pyx_k__attributes), 0, 0, 1, 1},
7832   {&__pyx_n_s__bedfields, __pyx_k__bedfields, sizeof(__pyx_k__bedfields), 0, 0, 1, 1},
7833   {&__pyx_n_s__blockCount, __pyx_k__blockCount, sizeof(__pyx_k__blockCount), 0, 0, 1, 1},
7834   {&__pyx_n_s__blockSizes, __pyx_k__blockSizes, sizeof(__pyx_k__blockSizes), 0, 0, 1, 1},
7835   {&__pyx_n_s__blockStarts, __pyx_k__blockStarts, sizeof(__pyx_k__blockStarts), 0, 0, 1, 1},
7836   {&__pyx_n_s__contig, __pyx_k__contig, sizeof(__pyx_k__contig), 0, 0, 1, 1},
7837   {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
7838   {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
7839   {&__pyx_n_s__feature, __pyx_k__feature, sizeof(__pyx_k__feature), 0, 0, 1, 1},
7840   {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
7841   {&__pyx_n_s__filter, __pyx_k__filter, sizeof(__pyx_k__filter), 0, 0, 1, 1},
7842   {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
7843   {&__pyx_n_s__frame, __pyx_k__frame, sizeof(__pyx_k__frame), 0, 0, 1, 1},
7844   {&__pyx_n_s__fromDict, __pyx_k__fromDict, sizeof(__pyx_k__fromDict), 0, 0, 1, 1},
7845   {&__pyx_n_s__getMaxFields, __pyx_k__getMaxFields, sizeof(__pyx_k__getMaxFields), 0, 0, 1, 1},
7846   {&__pyx_n_s__hasOwnAttributes, __pyx_k__hasOwnAttributes, sizeof(__pyx_k__hasOwnAttributes), 0, 0, 1, 1},
7847   {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
7848   {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1},
7849   {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1},
7850   {&__pyx_n_s__invert, __pyx_k__invert, sizeof(__pyx_k__invert), 0, 0, 1, 1},
7851   {&__pyx_n_s__is_modified, __pyx_k__is_modified, sizeof(__pyx_k__is_modified), 0, 0, 1, 1},
7852   {&__pyx_n_s__itemRGB, __pyx_k__itemRGB, sizeof(__pyx_k__itemRGB), 0, 0, 1, 1},
7853   {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1},
7854   {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
7855   {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1},
7856   {&__pyx_n_s__map_key2field, __pyx_k__map_key2field, sizeof(__pyx_k__map_key2field), 0, 0, 1, 1},
7857   {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
7858   {&__pyx_n_s__nbytes, __pyx_k__nbytes, sizeof(__pyx_k__nbytes), 0, 0, 1, 1},
7859   {&__pyx_n_s__nfields, __pyx_k__nfields, sizeof(__pyx_k__nfields), 0, 0, 1, 1},
7860   {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1},
7861   {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
7862   {&__pyx_n_s__qual, __pyx_k__qual, sizeof(__pyx_k__qual), 0, 0, 1, 1},
7863   {&__pyx_n_s__quote, __pyx_k__quote, sizeof(__pyx_k__quote), 0, 0, 1, 1},
7864   {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
7865   {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1},
7866   {&__pyx_n_s__score, __pyx_k__score, sizeof(__pyx_k__score), 0, 0, 1, 1},
7867   {&__pyx_n_s__setAttribute, __pyx_k__setAttribute, sizeof(__pyx_k__setAttribute), 0, 0, 1, 1},
7868   {&__pyx_n_s__source, __pyx_k__source, sizeof(__pyx_k__source), 0, 0, 1, 1},
7869   {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
7870   {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
7871   {&__pyx_n_s__strand, __pyx_k__strand, sizeof(__pyx_k__strand), 0, 0, 1, 1},
7872   {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1},
7873   {&__pyx_n_s__thickEnd, __pyx_k__thickEnd, sizeof(__pyx_k__thickEnd), 0, 0, 1, 1},
7874   {&__pyx_n_s__thickStart, __pyx_k__thickStart, sizeof(__pyx_k__thickStart), 0, 0, 1, 1},
7875   {&__pyx_n_s__toDot, __pyx_k__toDot, sizeof(__pyx_k__toDot), 0, 0, 1, 1},
7876   {&__pyx_n_s__types, __pyx_k__types, sizeof(__pyx_k__types), 0, 0, 1, 1},
7877   {&__pyx_n_s__update, __pyx_k__update, sizeof(__pyx_k__update), 0, 0, 1, 1},
7878   {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
7879   {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1},
7880   {0, 0, 0, 0, 0, 0, 0}
7881 };
7882 static int __Pyx_InitCachedBuiltins(void) {
7883   __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7884   __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7885   __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7886   #if PY_MAJOR_VERSION >= 3
7887   __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7888   #else
7889   __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7890   #endif
7891   __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7892   __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7893   __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7894   return 0;
7895   __pyx_L1_error:;
7896   return -1;
7897 }
7898
7899 static int __Pyx_InitGlobals(void) {
7900   if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7901   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7902   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7903   __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7904   __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7905   __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7906   __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7907   __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7908   __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7909   __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7910   __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7911   __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7912   __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7913   return 0;
7914   __pyx_L1_error:;
7915   return -1;
7916 }
7917
7918 #if PY_MAJOR_VERSION < 3
7919 PyMODINIT_FUNC initTabProxies(void); /*proto*/
7920 PyMODINIT_FUNC initTabProxies(void)
7921 #else
7922 PyMODINIT_FUNC PyInit_TabProxies(void); /*proto*/
7923 PyMODINIT_FUNC PyInit_TabProxies(void)
7924 #endif
7925 {
7926   PyObject *__pyx_t_1 = NULL;
7927   PyObject *__pyx_t_2 = NULL;
7928   PyObject *__pyx_t_3 = NULL;
7929   #if CYTHON_REFNANNY
7930   void* __pyx_refnanny = NULL;
7931   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
7932   if (!__Pyx_RefNanny) {
7933       PyErr_Clear();
7934       __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
7935       if (!__Pyx_RefNanny)
7936           Py_FatalError("failed to import 'refnanny' module");
7937   }
7938   __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_TabProxies(void)", __LINE__, __FILE__);
7939   #endif
7940   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7941   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7942   #ifdef __pyx_binding_PyCFunctionType_USED
7943   if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7944   #endif
7945   /*--- Library function declarations ---*/
7946   /*--- Threads initialization code ---*/
7947   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
7948   #ifdef WITH_THREAD /* Python build with threading support? */
7949   PyEval_InitThreads();
7950   #endif
7951   #endif
7952   /*--- Module creation code ---*/
7953   #if PY_MAJOR_VERSION < 3
7954   __pyx_m = Py_InitModule4(__Pyx_NAMESTR("TabProxies"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
7955   #else
7956   __pyx_m = PyModule_Create(&__pyx_moduledef);
7957   #endif
7958   if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7959   #if PY_MAJOR_VERSION < 3
7960   Py_INCREF(__pyx_m);
7961   #endif
7962   __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
7963   if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7964   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7965   /*--- Initialize various global constants etc. ---*/
7966   if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7967   if (__pyx_module_is_main_TabProxies) {
7968     if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
7969   }
7970   /*--- Builtin init code ---*/
7971   if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7972   /*--- Global init code ---*/
7973   /*--- Function export code ---*/
7974   /*--- Type init code ---*/
7975   __pyx_vtabptr_10TabProxies_TupleProxy = &__pyx_vtable_10TabProxies_TupleProxy;
7976   #if PY_MAJOR_VERSION >= 3
7977   __pyx_vtable_10TabProxies_TupleProxy.getMaxFields = (int (*)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t))__pyx_f_10TabProxies_10TupleProxy_getMaxFields;
7978   __pyx_vtable_10TabProxies_TupleProxy.take = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_take;
7979   __pyx_vtable_10TabProxies_TupleProxy.present = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_present;
7980   __pyx_vtable_10TabProxies_TupleProxy.copy = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_copy;
7981   __pyx_vtable_10TabProxies_TupleProxy.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_update;
7982   #else
7983   *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.getMaxFields = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_getMaxFields;
7984   *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.take = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_take;
7985   *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.present = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_present;
7986   *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.copy = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_copy;
7987   *(void(**)(void))&__pyx_vtable_10TabProxies_TupleProxy.update = (void(*)(void))__pyx_f_10TabProxies_10TupleProxy_update;
7988   #endif
7989   if (PyType_Ready(&__pyx_type_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7990   {
7991     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_TupleProxy, "__setitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7992     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
7993       __pyx_wrapperbase_10TabProxies_10TupleProxy___setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
7994       __pyx_wrapperbase_10TabProxies_10TupleProxy___setitem__.doc = __pyx_doc_10TabProxies_10TupleProxy___setitem__;
7995       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy___setitem__;
7996     }
7997   }
7998   {
7999     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_TupleProxy, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8000     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8001       __pyx_wrapperbase_10TabProxies_10TupleProxy___next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8002       __pyx_wrapperbase_10TabProxies_10TupleProxy___next__.doc = __pyx_doc_10TabProxies_10TupleProxy___next__;
8003       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy___next__;
8004     }
8005   }
8006   {
8007     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_TupleProxy, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8008     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8009       __pyx_wrapperbase_10TabProxies_10TupleProxy___str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8010       __pyx_wrapperbase_10TabProxies_10TupleProxy___str__.doc = __pyx_doc_10TabProxies_10TupleProxy___str__;
8011       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy___str__;
8012     }
8013   }
8014   if (__Pyx_SetVtable(__pyx_type_10TabProxies_TupleProxy.tp_dict, __pyx_vtabptr_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8015   if (__Pyx_SetAttrString(__pyx_m, "TupleProxy", (PyObject *)&__pyx_type_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8016   __pyx_ptype_10TabProxies_TupleProxy = &__pyx_type_10TabProxies_TupleProxy;
8017   __pyx_vtabptr_10TabProxies_GTFProxy = &__pyx_vtable_10TabProxies_GTFProxy;
8018   __pyx_vtable_10TabProxies_GTFProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_TupleProxy;
8019   #if PY_MAJOR_VERSION >= 3
8020   __pyx_vtable_10TabProxies_GTFProxy.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t))__pyx_f_10TabProxies_8GTFProxy_getMaxFields;
8021   __pyx_vtable_10TabProxies_GTFProxy.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_8GTFProxy_update;
8022   #else
8023   *(void(**)(void))&__pyx_vtable_10TabProxies_GTFProxy.__pyx_base.getMaxFields = (void(*)(void))__pyx_f_10TabProxies_8GTFProxy_getMaxFields;
8024   *(void(**)(void))&__pyx_vtable_10TabProxies_GTFProxy.__pyx_base.update = (void(*)(void))__pyx_f_10TabProxies_8GTFProxy_update;
8025   #endif
8026   __pyx_type_10TabProxies_GTFProxy.tp_base = __pyx_ptype_10TabProxies_TupleProxy;
8027   if (PyType_Ready(&__pyx_type_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8028   {
8029     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_GTFProxy, "__getattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8030     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8031       __pyx_wrapperbase_10TabProxies_8GTFProxy___getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8032       __pyx_wrapperbase_10TabProxies_8GTFProxy___getattr__.doc = __pyx_doc_10TabProxies_8GTFProxy___getattr__;
8033       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8GTFProxy___getattr__;
8034     }
8035   }
8036   if (__Pyx_SetVtable(__pyx_type_10TabProxies_GTFProxy.tp_dict, __pyx_vtabptr_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8037   if (__Pyx_SetAttrString(__pyx_m, "GTFProxy", (PyObject *)&__pyx_type_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8038   __pyx_ptype_10TabProxies_GTFProxy = &__pyx_type_10TabProxies_GTFProxy;
8039   __pyx_vtabptr_10TabProxies_NamedTupleProxy = &__pyx_vtable_10TabProxies_NamedTupleProxy;
8040   __pyx_vtable_10TabProxies_NamedTupleProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_TupleProxy;
8041   __pyx_type_10TabProxies_NamedTupleProxy.tp_base = __pyx_ptype_10TabProxies_TupleProxy;
8042   if (PyType_Ready(&__pyx_type_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8043   {
8044     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_NamedTupleProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8045     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8046       __pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8047       __pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__.doc = __pyx_doc_10TabProxies_15NamedTupleProxy___setattr__;
8048       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__;
8049     }
8050   }
8051   if (__Pyx_SetVtable(__pyx_type_10TabProxies_NamedTupleProxy.tp_dict, __pyx_vtabptr_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8052   if (__Pyx_SetAttrString(__pyx_m, "NamedTupleProxy", (PyObject *)&__pyx_type_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8053   __pyx_ptype_10TabProxies_NamedTupleProxy = &__pyx_type_10TabProxies_NamedTupleProxy;
8054   __pyx_vtabptr_10TabProxies_BedProxy = &__pyx_vtable_10TabProxies_BedProxy;
8055   __pyx_vtable_10TabProxies_BedProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
8056   #if PY_MAJOR_VERSION >= 3
8057   __pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t))__pyx_f_10TabProxies_8BedProxy_getMaxFields;
8058   __pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_8BedProxy_update;
8059   #else
8060   *(void(**)(void))&__pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.getMaxFields = (void(*)(void))__pyx_f_10TabProxies_8BedProxy_getMaxFields;
8061   *(void(**)(void))&__pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.update = (void(*)(void))__pyx_f_10TabProxies_8BedProxy_update;
8062   #endif
8063   __pyx_type_10TabProxies_BedProxy.tp_base = __pyx_ptype_10TabProxies_NamedTupleProxy;
8064   if (PyType_Ready(&__pyx_type_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8065   {
8066     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_BedProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8067     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8068       __pyx_wrapperbase_10TabProxies_8BedProxy___setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8069       __pyx_wrapperbase_10TabProxies_8BedProxy___setattr__.doc = __pyx_doc_10TabProxies_8BedProxy___setattr__;
8070       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8BedProxy___setattr__;
8071     }
8072   }
8073   if (__Pyx_SetVtable(__pyx_type_10TabProxies_BedProxy.tp_dict, __pyx_vtabptr_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8074   if (__Pyx_SetAttrString(__pyx_m, "BedProxy", (PyObject *)&__pyx_type_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8075   __pyx_ptype_10TabProxies_BedProxy = &__pyx_type_10TabProxies_BedProxy;
8076   __pyx_vtabptr_10TabProxies_VCFProxy = &__pyx_vtable_10TabProxies_VCFProxy;
8077   __pyx_vtable_10TabProxies_VCFProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
8078   #if PY_MAJOR_VERSION >= 3
8079   __pyx_vtable_10TabProxies_VCFProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_8VCFProxy_update;
8080   #else
8081   *(void(**)(void))&__pyx_vtable_10TabProxies_VCFProxy.__pyx_base.__pyx_base.update = (void(*)(void))__pyx_f_10TabProxies_8VCFProxy_update;
8082   #endif
8083   __pyx_type_10TabProxies_VCFProxy.tp_base = __pyx_ptype_10TabProxies_NamedTupleProxy;
8084   if (PyType_Ready(&__pyx_type_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8085   {
8086     PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_VCFProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8087     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8088       __pyx_wrapperbase_10TabProxies_8VCFProxy___setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8089       __pyx_wrapperbase_10TabProxies_8VCFProxy___setattr__.doc = __pyx_doc_10TabProxies_8VCFProxy___setattr__;
8090       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8VCFProxy___setattr__;
8091     }
8092   }
8093   if (__Pyx_SetVtable(__pyx_type_10TabProxies_VCFProxy.tp_dict, __pyx_vtabptr_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8094   if (__Pyx_SetAttrString(__pyx_m, "VCFProxy", (PyObject *)&__pyx_type_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8095   __pyx_ptype_10TabProxies_VCFProxy = &__pyx_type_10TabProxies_VCFProxy;
8096   /*--- Type import code ---*/
8097   __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8098   /*--- Function import code ---*/
8099   /*--- Execution code ---*/
8100
8101   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":1
8102  * import types             # <<<<<<<<<<<<<<
8103  * from cpython cimport PyString_FromStringAndSize, PyString_AsString, PyString_AS_STRING
8104  * 
8105  */
8106   __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__types), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8107   __Pyx_GOTREF(__pyx_t_1);
8108   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8109   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8110
8111   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":490
8112  * cdef class NamedTupleProxy( TupleProxy ):
8113  * 
8114  *     map_key2field = {}             # <<<<<<<<<<<<<<
8115  * 
8116  *     def __setattr__(self, key, value ):
8117  */
8118   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8119   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
8120   if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_NamedTupleProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8121   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8122   PyType_Modified(__pyx_ptype_10TabProxies_NamedTupleProxy);
8123
8124   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":512
8125  *     This class represents a GTF entry for fast read-access.
8126  *     '''
8127  *     map_key2field = {             # <<<<<<<<<<<<<<
8128  *         'contig' : (0, str),
8129  *         'start' : (1, int),
8130  */
8131   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8132   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
8133
8134   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":513
8135  *     '''
8136  *     map_key2field = {
8137  *         'contig' : (0, str),             # <<<<<<<<<<<<<<
8138  *         'start' : (1, int),
8139  *         'end' : (2, int),
8140  */
8141   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8142   __Pyx_GOTREF(__pyx_t_2);
8143   __Pyx_INCREF(__pyx_int_0);
8144   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
8145   __Pyx_GIVEREF(__pyx_int_0);
8146   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8147   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8148   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8149   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8150   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8151
8152   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":514
8153  *     map_key2field = {
8154  *         'contig' : (0, str),
8155  *         'start' : (1, int),             # <<<<<<<<<<<<<<
8156  *         'end' : (2, int),
8157  *         'name' : (3, str),
8158  */
8159   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8160   __Pyx_GOTREF(__pyx_t_2);
8161   __Pyx_INCREF(__pyx_int_1);
8162   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
8163   __Pyx_GIVEREF(__pyx_int_1);
8164   __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
8165   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
8166   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
8167   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__start), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8168   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8169
8170   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":515
8171  *         'contig' : (0, str),
8172  *         'start' : (1, int),
8173  *         'end' : (2, int),             # <<<<<<<<<<<<<<
8174  *         'name' : (3, str),
8175  *         'score' : (4, float),
8176  */
8177   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8178   __Pyx_GOTREF(__pyx_t_2);
8179   __Pyx_INCREF(__pyx_int_2);
8180   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
8181   __Pyx_GIVEREF(__pyx_int_2);
8182   __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
8183   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
8184   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
8185   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__end), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8186   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8187
8188   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":516
8189  *         'start' : (1, int),
8190  *         'end' : (2, int),
8191  *         'name' : (3, str),             # <<<<<<<<<<<<<<
8192  *         'score' : (4, float),
8193  *         'strand' : (5, str),
8194  */
8195   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8196   __Pyx_GOTREF(__pyx_t_2);
8197   __Pyx_INCREF(__pyx_int_3);
8198   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
8199   __Pyx_GIVEREF(__pyx_int_3);
8200   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8201   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8202   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8203   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__name), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8204   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8205
8206   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":517
8207  *         'end' : (2, int),
8208  *         'name' : (3, str),
8209  *         'score' : (4, float),             # <<<<<<<<<<<<<<
8210  *         'strand' : (5, str),
8211  *         'thickStart' : (6,int ),
8212  */
8213   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8214   __Pyx_GOTREF(__pyx_t_2);
8215   __Pyx_INCREF(__pyx_int_4);
8216   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
8217   __Pyx_GIVEREF(__pyx_int_4);
8218   __Pyx_INCREF(((PyObject *)((PyObject*)&PyFloat_Type)));
8219   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyFloat_Type)));
8220   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyFloat_Type)));
8221   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__score), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8222   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8223
8224   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":518
8225  *         'name' : (3, str),
8226  *         'score' : (4, float),
8227  *         'strand' : (5, str),             # <<<<<<<<<<<<<<
8228  *         'thickStart' : (6,int ),
8229  *         'thickEnd' : (7,int),
8230  */
8231   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8232   __Pyx_GOTREF(__pyx_t_2);
8233   __Pyx_INCREF(__pyx_int_5);
8234   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_5);
8235   __Pyx_GIVEREF(__pyx_int_5);
8236   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8237   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8238   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8239   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__strand), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8240   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8241
8242   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":519
8243  *         'score' : (4, float),
8244  *         'strand' : (5, str),
8245  *         'thickStart' : (6,int ),             # <<<<<<<<<<<<<<
8246  *         'thickEnd' : (7,int),
8247  *         'itemRGB' : (8,str),
8248  */
8249   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8250   __Pyx_GOTREF(__pyx_t_2);
8251   __Pyx_INCREF(__pyx_int_6);
8252   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_6);
8253   __Pyx_GIVEREF(__pyx_int_6);
8254   __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
8255   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
8256   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
8257   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__thickStart), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8258   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8259
8260   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":520
8261  *         'strand' : (5, str),
8262  *         'thickStart' : (6,int ),
8263  *         'thickEnd' : (7,int),             # <<<<<<<<<<<<<<
8264  *         'itemRGB' : (8,str),
8265  *         'blockCount': (9,int),
8266  */
8267   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8268   __Pyx_GOTREF(__pyx_t_2);
8269   __Pyx_INCREF(__pyx_int_7);
8270   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_7);
8271   __Pyx_GIVEREF(__pyx_int_7);
8272   __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
8273   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
8274   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
8275   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__thickEnd), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8276   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8277
8278   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":521
8279  *         'thickStart' : (6,int ),
8280  *         'thickEnd' : (7,int),
8281  *         'itemRGB' : (8,str),             # <<<<<<<<<<<<<<
8282  *         'blockCount': (9,int),
8283  *         'blockSizes': (10,str),
8284  */
8285   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8286   __Pyx_GOTREF(__pyx_t_2);
8287   __Pyx_INCREF(__pyx_int_8);
8288   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_8);
8289   __Pyx_GIVEREF(__pyx_int_8);
8290   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8291   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8292   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8293   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__itemRGB), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8294   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8295
8296   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":522
8297  *         'thickEnd' : (7,int),
8298  *         'itemRGB' : (8,str),
8299  *         'blockCount': (9,int),             # <<<<<<<<<<<<<<
8300  *         'blockSizes': (10,str),
8301  *         'blockStarts': (11,str), }
8302  */
8303   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8304   __Pyx_GOTREF(__pyx_t_2);
8305   __Pyx_INCREF(__pyx_int_9);
8306   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_9);
8307   __Pyx_GIVEREF(__pyx_int_9);
8308   __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
8309   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
8310   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
8311   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockCount), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8312   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8313
8314   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":523
8315  *         'itemRGB' : (8,str),
8316  *         'blockCount': (9,int),
8317  *         'blockSizes': (10,str),             # <<<<<<<<<<<<<<
8318  *         'blockStarts': (11,str), }
8319  * 
8320  */
8321   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8322   __Pyx_GOTREF(__pyx_t_2);
8323   __Pyx_INCREF(__pyx_int_10);
8324   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_10);
8325   __Pyx_GIVEREF(__pyx_int_10);
8326   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8327   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8328   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8329   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockSizes), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8330   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8331
8332   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":524
8333  *         'blockCount': (9,int),
8334  *         'blockSizes': (10,str),
8335  *         'blockStarts': (11,str), }             # <<<<<<<<<<<<<<
8336  * 
8337  *     cdef int getMaxFields( self, size_t nbytes ):
8338  */
8339   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8340   __Pyx_GOTREF(__pyx_t_2);
8341   __Pyx_INCREF(__pyx_int_11);
8342   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_11);
8343   __Pyx_GIVEREF(__pyx_int_11);
8344   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8345   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8346   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8347   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockStarts), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8348   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8349   if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_BedProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8350   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8351   PyType_Modified(__pyx_ptype_10TabProxies_BedProxy);
8352
8353   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":578
8354  *     The genotypes are accessed via index.
8355  *     '''
8356  *     map_key2field = {             # <<<<<<<<<<<<<<
8357  *         'contig' : (0, str),
8358  *         'pos' : (1, int),
8359  */
8360   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8361   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
8362
8363   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":579
8364  *     '''
8365  *     map_key2field = {
8366  *         'contig' : (0, str),             # <<<<<<<<<<<<<<
8367  *         'pos' : (1, int),
8368  *         'id' : (2, str),
8369  */
8370   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8371   __Pyx_GOTREF(__pyx_t_2);
8372   __Pyx_INCREF(__pyx_int_0);
8373   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
8374   __Pyx_GIVEREF(__pyx_int_0);
8375   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8376   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8377   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8378   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8379   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8380
8381   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":580
8382  *     map_key2field = {
8383  *         'contig' : (0, str),
8384  *         'pos' : (1, int),             # <<<<<<<<<<<<<<
8385  *         'id' : (2, str),
8386  *         'ref' : (3, str),
8387  */
8388   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8389   __Pyx_GOTREF(__pyx_t_2);
8390   __Pyx_INCREF(__pyx_int_1);
8391   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
8392   __Pyx_GIVEREF(__pyx_int_1);
8393   __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
8394   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
8395   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
8396   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8397   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8398
8399   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":581
8400  *         'contig' : (0, str),
8401  *         'pos' : (1, int),
8402  *         'id' : (2, str),             # <<<<<<<<<<<<<<
8403  *         'ref' : (3, str),
8404  *         'alt' : (4, str),
8405  */
8406   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8407   __Pyx_GOTREF(__pyx_t_2);
8408   __Pyx_INCREF(__pyx_int_2);
8409   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
8410   __Pyx_GIVEREF(__pyx_int_2);
8411   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8412   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8413   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8414   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__id), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8415   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8416
8417   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":582
8418  *         'pos' : (1, int),
8419  *         'id' : (2, str),
8420  *         'ref' : (3, str),             # <<<<<<<<<<<<<<
8421  *         'alt' : (4, str),
8422  *         'qual' : (5, str),
8423  */
8424   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8425   __Pyx_GOTREF(__pyx_t_2);
8426   __Pyx_INCREF(__pyx_int_3);
8427   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
8428   __Pyx_GIVEREF(__pyx_int_3);
8429   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8430   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8431   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8432   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ref), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8433   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8434
8435   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":583
8436  *         'id' : (2, str),
8437  *         'ref' : (3, str),
8438  *         'alt' : (4, str),             # <<<<<<<<<<<<<<
8439  *         'qual' : (5, str),
8440  *         'filter' : (6,str),
8441  */
8442   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8443   __Pyx_GOTREF(__pyx_t_2);
8444   __Pyx_INCREF(__pyx_int_4);
8445   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
8446   __Pyx_GIVEREF(__pyx_int_4);
8447   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8448   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8449   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8450   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__alt), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8451   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8452
8453   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":584
8454  *         'ref' : (3, str),
8455  *         'alt' : (4, str),
8456  *         'qual' : (5, str),             # <<<<<<<<<<<<<<
8457  *         'filter' : (6,str),
8458  *         'info' : (7,str),
8459  */
8460   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8461   __Pyx_GOTREF(__pyx_t_2);
8462   __Pyx_INCREF(__pyx_int_5);
8463   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_5);
8464   __Pyx_GIVEREF(__pyx_int_5);
8465   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8466   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8467   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8468   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8469   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8470
8471   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":585
8472  *         'alt' : (4, str),
8473  *         'qual' : (5, str),
8474  *         'filter' : (6,str),             # <<<<<<<<<<<<<<
8475  *         'info' : (7,str),
8476  *         'format' : (8,str) }
8477  */
8478   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8479   __Pyx_GOTREF(__pyx_t_2);
8480   __Pyx_INCREF(__pyx_int_6);
8481   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_6);
8482   __Pyx_GIVEREF(__pyx_int_6);
8483   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8484   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8485   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8486   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__filter), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8487   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8488
8489   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":586
8490  *         'qual' : (5, str),
8491  *         'filter' : (6,str),
8492  *         'info' : (7,str),             # <<<<<<<<<<<<<<
8493  *         'format' : (8,str) }
8494  * 
8495  */
8496   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8497   __Pyx_GOTREF(__pyx_t_2);
8498   __Pyx_INCREF(__pyx_int_7);
8499   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_7);
8500   __Pyx_GIVEREF(__pyx_int_7);
8501   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8502   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8503   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8504   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__info), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8505   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8506
8507   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":587
8508  *         'filter' : (6,str),
8509  *         'info' : (7,str),
8510  *         'format' : (8,str) }             # <<<<<<<<<<<<<<
8511  * 
8512  *     def __cinit__(self ):
8513  */
8514   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8515   __Pyx_GOTREF(__pyx_t_2);
8516   __Pyx_INCREF(__pyx_int_8);
8517   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_8);
8518   __Pyx_GIVEREF(__pyx_int_8);
8519   __Pyx_INCREF(((PyObject *)((PyObject*)&PyString_Type)));
8520   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)&PyString_Type)));
8521   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyString_Type)));
8522   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__format), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8523   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8524   if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_VCFProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8525   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8526   PyType_Modified(__pyx_ptype_10TabProxies_VCFProxy);
8527
8528   /* "/ifs/devel/pysam/pysam/pysam/TabProxies.pyx":1
8529  * import types             # <<<<<<<<<<<<<<
8530  * from cpython cimport PyString_FromStringAndSize, PyString_AsString, PyString_AS_STRING
8531  * 
8532  */
8533   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8534   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
8535   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8536   __Pyx_GOTREF(__pyx_t_2);
8537   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s___setindex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8538   __Pyx_GOTREF(__pyx_t_3);
8539   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8540   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8541   __Pyx_GOTREF(__pyx_t_2);
8542   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8543   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_28), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8544   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8545   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8546   __Pyx_GOTREF(__pyx_t_2);
8547   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____setitem__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8548   __Pyx_GOTREF(__pyx_t_3);
8549   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8550   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8551   __Pyx_GOTREF(__pyx_t_2);
8552   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8553   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_29), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8554   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8555   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8556   __Pyx_GOTREF(__pyx_t_2);
8557   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____next__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8558   __Pyx_GOTREF(__pyx_t_3);
8559   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8560   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8561   __Pyx_GOTREF(__pyx_t_2);
8562   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8563   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_30), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8564   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8565   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8566   __Pyx_GOTREF(__pyx_t_2);
8567   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____str__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8568   __Pyx_GOTREF(__pyx_t_3);
8569   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8570   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8571   __Pyx_GOTREF(__pyx_t_2);
8572   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8573   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_31), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8574   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8575   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__toDot); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8576   __Pyx_GOTREF(__pyx_t_2);
8577   __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_2, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8578   __Pyx_GOTREF(__pyx_t_3);
8579   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8580   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_32), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8581   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8582   __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__quote); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8583   __Pyx_GOTREF(__pyx_t_3);
8584   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8585   __Pyx_GOTREF(__pyx_t_2);
8586   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8587   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_33), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8588   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8589   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8590   __Pyx_GOTREF(__pyx_t_2);
8591   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__asDict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8592   __Pyx_GOTREF(__pyx_t_3);
8593   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8594   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8595   __Pyx_GOTREF(__pyx_t_2);
8596   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8597   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_34), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8598   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8599   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8600   __Pyx_GOTREF(__pyx_t_2);
8601   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__fromDict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8602   __Pyx_GOTREF(__pyx_t_3);
8603   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8604   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8605   __Pyx_GOTREF(__pyx_t_2);
8606   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8607   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_35), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8608   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8609   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8610   __Pyx_GOTREF(__pyx_t_2);
8611   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__invert); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8612   __Pyx_GOTREF(__pyx_t_3);
8613   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8614   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8615   __Pyx_GOTREF(__pyx_t_2);
8616   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8617   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_36), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8618   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8619   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8620   __Pyx_GOTREF(__pyx_t_2);
8621   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8622   __Pyx_GOTREF(__pyx_t_3);
8623   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8624   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8625   __Pyx_GOTREF(__pyx_t_2);
8626   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8627   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_37), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8628   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8629   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8630   __Pyx_GOTREF(__pyx_t_2);
8631   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____getattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8632   __Pyx_GOTREF(__pyx_t_3);
8633   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8634   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8635   __Pyx_GOTREF(__pyx_t_2);
8636   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8637   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_38), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8638   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8639   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__GTFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8640   __Pyx_GOTREF(__pyx_t_2);
8641   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__setAttribute); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8642   __Pyx_GOTREF(__pyx_t_3);
8643   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8644   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8645   __Pyx_GOTREF(__pyx_t_2);
8646   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8647   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_39), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8648   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8649   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__NamedTupleProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8650   __Pyx_GOTREF(__pyx_t_2);
8651   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8652   __Pyx_GOTREF(__pyx_t_3);
8653   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8654   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8655   __Pyx_GOTREF(__pyx_t_2);
8656   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8657   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_40), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8658   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8659   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__BedProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8660   __Pyx_GOTREF(__pyx_t_2);
8661   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8662   __Pyx_GOTREF(__pyx_t_3);
8663   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8664   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8665   __Pyx_GOTREF(__pyx_t_2);
8666   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8667   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_41), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8668   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8669   __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__VCFProxy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8670   __Pyx_GOTREF(__pyx_t_2);
8671   __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____setattr__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8672   __Pyx_GOTREF(__pyx_t_3);
8673   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8674   __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8675   __Pyx_GOTREF(__pyx_t_2);
8676   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8677   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_42), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8678   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8679   if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8680   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8681
8682   /* "/ifs/apps/apps/python-2.7.1/lib/python2.7/site-packages/Cython-0.13-py2.7-linux-x86_64.egg/Cython/Includes/cpython/type.pxd":2
8683  * 
8684  * cdef extern from "Python.h":             # <<<<<<<<<<<<<<
8685  *     # The C structure of the objects used to describe built-in types.
8686  * 
8687  */
8688   goto __pyx_L0;
8689   __pyx_L1_error:;
8690   __Pyx_XDECREF(__pyx_t_1);
8691   __Pyx_XDECREF(__pyx_t_2);
8692   __Pyx_XDECREF(__pyx_t_3);
8693   if (__pyx_m) {
8694     __Pyx_AddTraceback("init TabProxies");
8695     Py_DECREF(__pyx_m); __pyx_m = 0;
8696   } else if (!PyErr_Occurred()) {
8697     PyErr_SetString(PyExc_ImportError, "init TabProxies");
8698   }
8699   __pyx_L0:;
8700   __Pyx_RefNannyFinishContext();
8701   #if PY_MAJOR_VERSION < 3
8702   return;
8703   #else
8704   return __pyx_m;
8705   #endif
8706 }
8707
8708 /* Runtime support code */
8709
8710 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
8711     PyObject *result;
8712     result = PyObject_GetAttr(dict, name);
8713     if (!result)
8714         PyErr_SetObject(PyExc_NameError, name);
8715     return result;
8716 }
8717
8718 static void __Pyx_RaiseArgtupleInvalid(
8719     const char* func_name,
8720     int exact,
8721     Py_ssize_t num_min,
8722     Py_ssize_t num_max,
8723     Py_ssize_t num_found)
8724 {
8725     Py_ssize_t num_expected;
8726     const char *number, *more_or_less;
8727
8728     if (num_found < num_min) {
8729         num_expected = num_min;
8730         more_or_less = "at least";
8731     } else {
8732         num_expected = num_max;
8733         more_or_less = "at most";
8734     }
8735     if (exact) {
8736         more_or_less = "exactly";
8737     }
8738     number = (num_expected == 1) ? "" : "s";
8739     PyErr_Format(PyExc_TypeError,
8740         #if PY_VERSION_HEX < 0x02050000
8741             "%s() takes %s %d positional argument%s (%d given)",
8742         #else
8743             "%s() takes %s %zd positional argument%s (%zd given)",
8744         #endif
8745         func_name, more_or_less, num_expected, number, num_found);
8746 }
8747
8748 static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
8749     PyObject *kwdict,
8750     const char* function_name,
8751     int kw_allowed)
8752 {
8753     PyObject* key = 0;
8754     Py_ssize_t pos = 0;
8755     while (PyDict_Next(kwdict, &pos, &key, 0)) {
8756         #if PY_MAJOR_VERSION < 3
8757         if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
8758         #else
8759         if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
8760         #endif
8761             goto invalid_keyword_type;
8762     }
8763     if ((!kw_allowed) && unlikely(key))
8764         goto invalid_keyword;
8765     return 1;
8766 invalid_keyword_type:
8767     PyErr_Format(PyExc_TypeError,
8768         "%s() keywords must be strings", function_name);
8769     return 0;
8770 invalid_keyword:
8771     PyErr_Format(PyExc_TypeError,
8772     #if PY_MAJOR_VERSION < 3
8773         "%s() got an unexpected keyword argument '%s'",
8774         function_name, PyString_AsString(key));
8775     #else
8776         "%s() got an unexpected keyword argument '%U'",
8777         function_name, key);
8778     #endif
8779     return 0;
8780 }
8781
8782 static void __Pyx_RaiseDoubleKeywordsError(
8783     const char* func_name,
8784     PyObject* kw_name)
8785 {
8786     PyErr_Format(PyExc_TypeError,
8787         #if PY_MAJOR_VERSION >= 3
8788         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
8789         #else
8790         "%s() got multiple values for keyword argument '%s'", func_name,
8791         PyString_AS_STRING(kw_name));
8792         #endif
8793 }
8794
8795 static int __Pyx_ParseOptionalKeywords(
8796     PyObject *kwds,
8797     PyObject **argnames[],
8798     PyObject *kwds2,
8799     PyObject *values[],
8800     Py_ssize_t num_pos_args,
8801     const char* function_name)
8802 {
8803     PyObject *key = 0, *value = 0;
8804     Py_ssize_t pos = 0;
8805     PyObject*** name;
8806     PyObject*** first_kw_arg = argnames + num_pos_args;
8807
8808     while (PyDict_Next(kwds, &pos, &key, &value)) {
8809         name = first_kw_arg;
8810         while (*name && (**name != key)) name++;
8811         if (*name) {
8812             values[name-argnames] = value;
8813         } else {
8814             #if PY_MAJOR_VERSION < 3
8815             if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
8816             #else
8817             if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
8818             #endif
8819                 goto invalid_keyword_type;
8820             } else {
8821                 for (name = first_kw_arg; *name; name++) {
8822                     #if PY_MAJOR_VERSION >= 3
8823                     if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
8824                         PyUnicode_Compare(**name, key) == 0) break;
8825                     #else
8826                     if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
8827                         _PyString_Eq(**name, key)) break;
8828                     #endif
8829                 }
8830                 if (*name) {
8831                     values[name-argnames] = value;
8832                 } else {
8833                     /* unexpected keyword found */
8834                     for (name=argnames; name != first_kw_arg; name++) {
8835                         if (**name == key) goto arg_passed_twice;
8836                         #if PY_MAJOR_VERSION >= 3
8837                         if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
8838                             PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
8839                         #else
8840                         if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
8841                             _PyString_Eq(**name, key)) goto arg_passed_twice;
8842                         #endif
8843                     }
8844                     if (kwds2) {
8845                         if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
8846                     } else {
8847                         goto invalid_keyword;
8848                     }
8849                 }
8850             }
8851         }
8852     }
8853     return 0;
8854 arg_passed_twice:
8855     __Pyx_RaiseDoubleKeywordsError(function_name, **name);
8856     goto bad;
8857 invalid_keyword_type:
8858     PyErr_Format(PyExc_TypeError,
8859         "%s() keywords must be strings", function_name);
8860     goto bad;
8861 invalid_keyword:
8862     PyErr_Format(PyExc_TypeError,
8863     #if PY_MAJOR_VERSION < 3
8864         "%s() got an unexpected keyword argument '%s'",
8865         function_name, PyString_AsString(key));
8866     #else
8867         "%s() got an unexpected keyword argument '%U'",
8868         function_name, key);
8869     #endif
8870 bad:
8871     return -1;
8872 }
8873
8874
8875 static double __Pyx__PyObject_AsDouble(PyObject* obj) {
8876     PyObject* float_value;
8877     if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
8878         return PyFloat_AsDouble(obj);
8879     } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
8880 #if PY_MAJOR_VERSION >= 3
8881         float_value = PyFloat_FromString(obj);
8882 #else
8883         float_value = PyFloat_FromString(obj, 0);
8884 #endif
8885     } else {
8886         PyObject* args = PyTuple_New(1);
8887         if (unlikely(!args)) goto bad;
8888         PyTuple_SET_ITEM(args, 0, obj);
8889         float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
8890         PyTuple_SET_ITEM(args, 0, 0);
8891         Py_DECREF(args);
8892     }
8893     if (likely(float_value)) {
8894         double value = PyFloat_AS_DOUBLE(float_value);
8895         Py_DECREF(float_value);
8896         return value;
8897     }
8898 bad:
8899     return (double)-1;
8900 }
8901
8902 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
8903     PyErr_Format(PyExc_ValueError,
8904         #if PY_VERSION_HEX < 0x02050000
8905                  "need more than %d value%s to unpack", (int)index,
8906         #else
8907                  "need more than %zd value%s to unpack", index,
8908         #endif
8909                  (index == 1) ? "" : "s");
8910 }
8911
8912 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
8913     PyErr_Format(PyExc_ValueError,
8914         #if PY_VERSION_HEX < 0x02050000
8915             "too many values to unpack (expected %d)", (int)expected);
8916         #else
8917             "too many values to unpack (expected %zd)", expected);
8918         #endif
8919 }
8920
8921 static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
8922     PyObject *item;
8923     if (!(item = PyIter_Next(iter))) {
8924         if (!PyErr_Occurred()) {
8925             __Pyx_RaiseNeedMoreValuesError(index);
8926         }
8927     }
8928     return item;
8929 }
8930
8931 static int __Pyx_EndUnpack(PyObject *iter, Py_ssize_t expected) {
8932     PyObject *item;
8933     if ((item = PyIter_Next(iter))) {
8934         Py_DECREF(item);
8935         __Pyx_RaiseTooManyValuesError(expected);
8936         return -1;
8937     }
8938     else if (!PyErr_Occurred())
8939         return 0;
8940     else
8941         return -1;
8942 }
8943
8944 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
8945     PyThreadState *tstate = PyThreadState_GET();
8946     *type = tstate->exc_type;
8947     *value = tstate->exc_value;
8948     *tb = tstate->exc_traceback;
8949     Py_XINCREF(*type);
8950     Py_XINCREF(*value);
8951     Py_XINCREF(*tb);
8952 }
8953
8954 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
8955     PyObject *tmp_type, *tmp_value, *tmp_tb;
8956     PyThreadState *tstate = PyThreadState_GET();
8957     tmp_type = tstate->exc_type;
8958     tmp_value = tstate->exc_value;
8959     tmp_tb = tstate->exc_traceback;
8960     tstate->exc_type = type;
8961     tstate->exc_value = value;
8962     tstate->exc_traceback = tb;
8963     Py_XDECREF(tmp_type);
8964     Py_XDECREF(tmp_value);
8965     Py_XDECREF(tmp_tb);
8966 }
8967
8968 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
8969     PyObject *py_import = 0;
8970     PyObject *empty_list = 0;
8971     PyObject *module = 0;
8972     PyObject *global_dict = 0;
8973     PyObject *empty_dict = 0;
8974     PyObject *list;
8975     py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
8976     if (!py_import)
8977         goto bad;
8978     if (from_list)
8979         list = from_list;
8980     else {
8981         empty_list = PyList_New(0);
8982         if (!empty_list)
8983             goto bad;
8984         list = empty_list;
8985     }
8986     global_dict = PyModule_GetDict(__pyx_m);
8987     if (!global_dict)
8988         goto bad;
8989     empty_dict = PyDict_New();
8990     if (!empty_dict)
8991         goto bad;
8992     module = PyObject_CallFunctionObjArgs(py_import,
8993         name, global_dict, empty_dict, list, NULL);
8994 bad:
8995     Py_XDECREF(empty_list);
8996     Py_XDECREF(py_import);
8997     Py_XDECREF(empty_dict);
8998     return module;
8999 }
9000
9001 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
9002     PyObject *tmp_type, *tmp_value, *tmp_tb;
9003     PyThreadState *tstate = PyThreadState_GET();
9004
9005     tmp_type = tstate->curexc_type;
9006     tmp_value = tstate->curexc_value;
9007     tmp_tb = tstate->curexc_traceback;
9008     tstate->curexc_type = type;
9009     tstate->curexc_value = value;
9010     tstate->curexc_traceback = tb;
9011     Py_XDECREF(tmp_type);
9012     Py_XDECREF(tmp_value);
9013     Py_XDECREF(tmp_tb);
9014 }
9015
9016 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
9017     PyThreadState *tstate = PyThreadState_GET();
9018     *type = tstate->curexc_type;
9019     *value = tstate->curexc_value;
9020     *tb = tstate->curexc_traceback;
9021
9022     tstate->curexc_type = 0;
9023     tstate->curexc_value = 0;
9024     tstate->curexc_traceback = 0;
9025 }
9026
9027
9028 #if PY_MAJOR_VERSION < 3
9029 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
9030     Py_XINCREF(type);
9031     Py_XINCREF(value);
9032     Py_XINCREF(tb);
9033     /* First, check the traceback argument, replacing None with NULL. */
9034     if (tb == Py_None) {
9035         Py_DECREF(tb);
9036         tb = 0;
9037     }
9038     else if (tb != NULL && !PyTraceBack_Check(tb)) {
9039         PyErr_SetString(PyExc_TypeError,
9040             "raise: arg 3 must be a traceback or None");
9041         goto raise_error;
9042     }
9043     /* Next, replace a missing value with None */
9044     if (value == NULL) {
9045         value = Py_None;
9046         Py_INCREF(value);
9047     }
9048     #if PY_VERSION_HEX < 0x02050000
9049     if (!PyClass_Check(type))
9050     #else
9051     if (!PyType_Check(type))
9052     #endif
9053     {
9054         /* Raising an instance.  The value should be a dummy. */
9055         if (value != Py_None) {
9056             PyErr_SetString(PyExc_TypeError,
9057                 "instance exception may not have a separate value");
9058             goto raise_error;
9059         }
9060         /* Normalize to raise <class>, <instance> */
9061         Py_DECREF(value);
9062         value = type;
9063         #if PY_VERSION_HEX < 0x02050000
9064             if (PyInstance_Check(type)) {
9065                 type = (PyObject*) ((PyInstanceObject*)type)->in_class;
9066                 Py_INCREF(type);
9067             }
9068             else {
9069                 type = 0;
9070                 PyErr_SetString(PyExc_TypeError,
9071                     "raise: exception must be an old-style class or instance");
9072                 goto raise_error;
9073             }
9074         #else
9075             type = (PyObject*) Py_TYPE(type);
9076             Py_INCREF(type);
9077             if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
9078                 PyErr_SetString(PyExc_TypeError,
9079                     "raise: exception class must be a subclass of BaseException");
9080                 goto raise_error;
9081             }
9082         #endif
9083     }
9084
9085     __Pyx_ErrRestore(type, value, tb);
9086     return;
9087 raise_error:
9088     Py_XDECREF(value);
9089     Py_XDECREF(type);
9090     Py_XDECREF(tb);
9091     return;
9092 }
9093
9094 #else /* Python 3+ */
9095
9096 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
9097     if (tb == Py_None) {
9098         tb = 0;
9099     } else if (tb && !PyTraceBack_Check(tb)) {
9100         PyErr_SetString(PyExc_TypeError,
9101             "raise: arg 3 must be a traceback or None");
9102         goto bad;
9103     }
9104     if (value == Py_None)
9105         value = 0;
9106
9107     if (PyExceptionInstance_Check(type)) {
9108         if (value) {
9109             PyErr_SetString(PyExc_TypeError,
9110                 "instance exception may not have a separate value");
9111             goto bad;
9112         }
9113         value = type;
9114         type = (PyObject*) Py_TYPE(value);
9115     } else if (!PyExceptionClass_Check(type)) {
9116         PyErr_SetString(PyExc_TypeError,
9117             "raise: exception class must be a subclass of BaseException");
9118         goto bad;
9119     }
9120
9121     PyErr_SetObject(type, value);
9122
9123     if (tb) {
9124         PyThreadState *tstate = PyThreadState_GET();
9125         PyObject* tmp_tb = tstate->curexc_traceback;
9126         if (tb != tmp_tb) {
9127             Py_INCREF(tb);
9128             tstate->curexc_traceback = tb;
9129             Py_XDECREF(tmp_tb);
9130         }
9131     }
9132
9133 bad:
9134     return;
9135 }
9136 #endif
9137
9138 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t val) {
9139     const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0;
9140     const int is_unsigned = const_zero < neg_one;
9141     if ((sizeof(uint32_t) == sizeof(char))  ||
9142         (sizeof(uint32_t) == sizeof(short))) {
9143         return PyInt_FromLong((long)val);
9144     } else if ((sizeof(uint32_t) == sizeof(int)) ||
9145                (sizeof(uint32_t) == sizeof(long))) {
9146         if (is_unsigned)
9147             return PyLong_FromUnsignedLong((unsigned long)val);
9148         else
9149             return PyInt_FromLong((long)val);
9150     } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
9151         if (is_unsigned)
9152             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
9153         else
9154             return PyLong_FromLongLong((PY_LONG_LONG)val);
9155     } else {
9156         int one = 1; int little = (int)*(unsigned char *)&one;
9157         unsigned char *bytes = (unsigned char *)&val;
9158         return _PyLong_FromByteArray(bytes, sizeof(uint32_t), 
9159                                      little, !is_unsigned);
9160     }
9161 }
9162
9163 static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject* x) {
9164     const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0;
9165     const int is_unsigned = const_zero < neg_one;
9166     if (sizeof(uint32_t) == sizeof(char)) {
9167         if (is_unsigned)
9168             return (uint32_t)__Pyx_PyInt_AsUnsignedChar(x);
9169         else
9170             return (uint32_t)__Pyx_PyInt_AsSignedChar(x);
9171     } else if (sizeof(uint32_t) == sizeof(short)) {
9172         if (is_unsigned)
9173             return (uint32_t)__Pyx_PyInt_AsUnsignedShort(x);
9174         else
9175             return (uint32_t)__Pyx_PyInt_AsSignedShort(x);
9176     } else if (sizeof(uint32_t) == sizeof(int)) {
9177         if (is_unsigned)
9178             return (uint32_t)__Pyx_PyInt_AsUnsignedInt(x);
9179         else
9180             return (uint32_t)__Pyx_PyInt_AsSignedInt(x);
9181     } else if (sizeof(uint32_t) == sizeof(long)) {
9182         if (is_unsigned)
9183             return (uint32_t)__Pyx_PyInt_AsUnsignedLong(x);
9184         else
9185             return (uint32_t)__Pyx_PyInt_AsSignedLong(x);
9186     } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
9187         if (is_unsigned)
9188             return (uint32_t)__Pyx_PyInt_AsUnsignedLongLong(x);
9189         else
9190             return (uint32_t)__Pyx_PyInt_AsSignedLongLong(x);
9191     }  else {
9192         uint32_t val;
9193         PyObject *v = __Pyx_PyNumber_Int(x);
9194         #if PY_VERSION_HEX < 0x03000000
9195         if (likely(v) && !PyLong_Check(v)) {
9196             PyObject *tmp = v;
9197             v = PyNumber_Long(tmp);
9198             Py_DECREF(tmp);
9199         }
9200         #endif
9201         if (likely(v)) {
9202             int one = 1; int is_little = (int)*(unsigned char *)&one;
9203             unsigned char *bytes = (unsigned char *)&val;
9204             int ret = _PyLong_AsByteArray((PyLongObject *)v,
9205                                           bytes, sizeof(val),
9206                                           is_little, !is_unsigned);
9207             Py_DECREF(v);
9208             if (likely(!ret))
9209                 return val;
9210         }
9211         return (uint32_t)-1;
9212     }
9213 }
9214
9215 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
9216     const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
9217     const int is_unsigned = neg_one > const_zero;
9218     if (sizeof(unsigned char) < sizeof(long)) {
9219         long val = __Pyx_PyInt_AsLong(x);
9220         if (unlikely(val != (long)(unsigned char)val)) {
9221             if (!unlikely(val == -1 && PyErr_Occurred())) {
9222                 PyErr_SetString(PyExc_OverflowError,
9223                     (is_unsigned && unlikely(val < 0)) ?
9224                     "can't convert negative value to unsigned char" :
9225                     "value too large to convert to unsigned char");
9226             }
9227             return (unsigned char)-1;
9228         }
9229         return (unsigned char)val;
9230     }
9231     return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
9232 }
9233
9234 static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
9235     const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
9236     const int is_unsigned = neg_one > const_zero;
9237     if (sizeof(unsigned short) < sizeof(long)) {
9238         long val = __Pyx_PyInt_AsLong(x);
9239         if (unlikely(val != (long)(unsigned short)val)) {
9240             if (!unlikely(val == -1 && PyErr_Occurred())) {
9241                 PyErr_SetString(PyExc_OverflowError,
9242                     (is_unsigned && unlikely(val < 0)) ?
9243                     "can't convert negative value to unsigned short" :
9244                     "value too large to convert to unsigned short");
9245             }
9246             return (unsigned short)-1;
9247         }
9248         return (unsigned short)val;
9249     }
9250     return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
9251 }
9252
9253 static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
9254     const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
9255     const int is_unsigned = neg_one > const_zero;
9256     if (sizeof(unsigned int) < sizeof(long)) {
9257         long val = __Pyx_PyInt_AsLong(x);
9258         if (unlikely(val != (long)(unsigned int)val)) {
9259             if (!unlikely(val == -1 && PyErr_Occurred())) {
9260                 PyErr_SetString(PyExc_OverflowError,
9261                     (is_unsigned && unlikely(val < 0)) ?
9262                     "can't convert negative value to unsigned int" :
9263                     "value too large to convert to unsigned int");
9264             }
9265             return (unsigned int)-1;
9266         }
9267         return (unsigned int)val;
9268     }
9269     return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
9270 }
9271
9272 static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
9273     const char neg_one = (char)-1, const_zero = 0;
9274     const int is_unsigned = neg_one > const_zero;
9275     if (sizeof(char) < sizeof(long)) {
9276         long val = __Pyx_PyInt_AsLong(x);
9277         if (unlikely(val != (long)(char)val)) {
9278             if (!unlikely(val == -1 && PyErr_Occurred())) {
9279                 PyErr_SetString(PyExc_OverflowError,
9280                     (is_unsigned && unlikely(val < 0)) ?
9281                     "can't convert negative value to char" :
9282                     "value too large to convert to char");
9283             }
9284             return (char)-1;
9285         }
9286         return (char)val;
9287     }
9288     return (char)__Pyx_PyInt_AsLong(x);
9289 }
9290
9291 static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
9292     const short neg_one = (short)-1, const_zero = 0;
9293     const int is_unsigned = neg_one > const_zero;
9294     if (sizeof(short) < sizeof(long)) {
9295         long val = __Pyx_PyInt_AsLong(x);
9296         if (unlikely(val != (long)(short)val)) {
9297             if (!unlikely(val == -1 && PyErr_Occurred())) {
9298                 PyErr_SetString(PyExc_OverflowError,
9299                     (is_unsigned && unlikely(val < 0)) ?
9300                     "can't convert negative value to short" :
9301                     "value too large to convert to short");
9302             }
9303             return (short)-1;
9304         }
9305         return (short)val;
9306     }
9307     return (short)__Pyx_PyInt_AsLong(x);
9308 }
9309
9310 static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
9311     const int neg_one = (int)-1, const_zero = 0;
9312     const int is_unsigned = neg_one > const_zero;
9313     if (sizeof(int) < sizeof(long)) {
9314         long val = __Pyx_PyInt_AsLong(x);
9315         if (unlikely(val != (long)(int)val)) {
9316             if (!unlikely(val == -1 && PyErr_Occurred())) {
9317                 PyErr_SetString(PyExc_OverflowError,
9318                     (is_unsigned && unlikely(val < 0)) ?
9319                     "can't convert negative value to int" :
9320                     "value too large to convert to int");
9321             }
9322             return (int)-1;
9323         }
9324         return (int)val;
9325     }
9326     return (int)__Pyx_PyInt_AsLong(x);
9327 }
9328
9329 static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
9330     const signed char neg_one = (signed char)-1, const_zero = 0;
9331     const int is_unsigned = neg_one > const_zero;
9332     if (sizeof(signed char) < sizeof(long)) {
9333         long val = __Pyx_PyInt_AsLong(x);
9334         if (unlikely(val != (long)(signed char)val)) {
9335             if (!unlikely(val == -1 && PyErr_Occurred())) {
9336                 PyErr_SetString(PyExc_OverflowError,
9337                     (is_unsigned && unlikely(val < 0)) ?
9338                     "can't convert negative value to signed char" :
9339                     "value too large to convert to signed char");
9340             }
9341             return (signed char)-1;
9342         }
9343         return (signed char)val;
9344     }
9345     return (signed char)__Pyx_PyInt_AsSignedLong(x);
9346 }
9347
9348 static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
9349     const signed short neg_one = (signed short)-1, const_zero = 0;
9350     const int is_unsigned = neg_one > const_zero;
9351     if (sizeof(signed short) < sizeof(long)) {
9352         long val = __Pyx_PyInt_AsLong(x);
9353         if (unlikely(val != (long)(signed short)val)) {
9354             if (!unlikely(val == -1 && PyErr_Occurred())) {
9355                 PyErr_SetString(PyExc_OverflowError,
9356                     (is_unsigned && unlikely(val < 0)) ?
9357                     "can't convert negative value to signed short" :
9358                     "value too large to convert to signed short");
9359             }
9360             return (signed short)-1;
9361         }
9362         return (signed short)val;
9363     }
9364     return (signed short)__Pyx_PyInt_AsSignedLong(x);
9365 }
9366
9367 static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
9368     const signed int neg_one = (signed int)-1, const_zero = 0;
9369     const int is_unsigned = neg_one > const_zero;
9370     if (sizeof(signed int) < sizeof(long)) {
9371         long val = __Pyx_PyInt_AsLong(x);
9372         if (unlikely(val != (long)(signed int)val)) {
9373             if (!unlikely(val == -1 && PyErr_Occurred())) {
9374                 PyErr_SetString(PyExc_OverflowError,
9375                     (is_unsigned && unlikely(val < 0)) ?
9376                     "can't convert negative value to signed int" :
9377                     "value too large to convert to signed int");
9378             }
9379             return (signed int)-1;
9380         }
9381         return (signed int)val;
9382     }
9383     return (signed int)__Pyx_PyInt_AsSignedLong(x);
9384 }
9385
9386 static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
9387     const int neg_one = (int)-1, const_zero = 0;
9388     const int is_unsigned = neg_one > const_zero;
9389     if (sizeof(int) < sizeof(long)) {
9390         long val = __Pyx_PyInt_AsLong(x);
9391         if (unlikely(val != (long)(int)val)) {
9392             if (!unlikely(val == -1 && PyErr_Occurred())) {
9393                 PyErr_SetString(PyExc_OverflowError,
9394                     (is_unsigned && unlikely(val < 0)) ?
9395                     "can't convert negative value to int" :
9396                     "value too large to convert to int");
9397             }
9398             return (int)-1;
9399         }
9400         return (int)val;
9401     }
9402     return (int)__Pyx_PyInt_AsLong(x);
9403 }
9404
9405 static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
9406     const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
9407     const int is_unsigned = neg_one > const_zero;
9408 #if PY_VERSION_HEX < 0x03000000
9409     if (likely(PyInt_Check(x))) {
9410         long val = PyInt_AS_LONG(x);
9411         if (is_unsigned && unlikely(val < 0)) {
9412             PyErr_SetString(PyExc_OverflowError,
9413                             "can't convert negative value to unsigned long");
9414             return (unsigned long)-1;
9415         }
9416         return (unsigned long)val;
9417     } else
9418 #endif
9419     if (likely(PyLong_Check(x))) {
9420         if (is_unsigned) {
9421             if (unlikely(Py_SIZE(x) < 0)) {
9422                 PyErr_SetString(PyExc_OverflowError,
9423                                 "can't convert negative value to unsigned long");
9424                 return (unsigned long)-1;
9425             }
9426             return PyLong_AsUnsignedLong(x);
9427         } else {
9428             return PyLong_AsLong(x);
9429         }
9430     } else {
9431         unsigned long val;
9432         PyObject *tmp = __Pyx_PyNumber_Int(x);
9433         if (!tmp) return (unsigned long)-1;
9434         val = __Pyx_PyInt_AsUnsignedLong(tmp);
9435         Py_DECREF(tmp);
9436         return val;
9437     }
9438 }
9439
9440 static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
9441     const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
9442     const int is_unsigned = neg_one > const_zero;
9443 #if PY_VERSION_HEX < 0x03000000
9444     if (likely(PyInt_Check(x))) {
9445         long val = PyInt_AS_LONG(x);
9446         if (is_unsigned && unlikely(val < 0)) {
9447             PyErr_SetString(PyExc_OverflowError,
9448                             "can't convert negative value to unsigned PY_LONG_LONG");
9449             return (unsigned PY_LONG_LONG)-1;
9450         }
9451         return (unsigned PY_LONG_LONG)val;
9452     } else
9453 #endif
9454     if (likely(PyLong_Check(x))) {
9455         if (is_unsigned) {
9456             if (unlikely(Py_SIZE(x) < 0)) {
9457                 PyErr_SetString(PyExc_OverflowError,
9458                                 "can't convert negative value to unsigned PY_LONG_LONG");
9459                 return (unsigned PY_LONG_LONG)-1;
9460             }
9461             return PyLong_AsUnsignedLongLong(x);
9462         } else {
9463             return PyLong_AsLongLong(x);
9464         }
9465     } else {
9466         unsigned PY_LONG_LONG val;
9467         PyObject *tmp = __Pyx_PyNumber_Int(x);
9468         if (!tmp) return (unsigned PY_LONG_LONG)-1;
9469         val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
9470         Py_DECREF(tmp);
9471         return val;
9472     }
9473 }
9474
9475 static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
9476     const long neg_one = (long)-1, const_zero = 0;
9477     const int is_unsigned = neg_one > const_zero;
9478 #if PY_VERSION_HEX < 0x03000000
9479     if (likely(PyInt_Check(x))) {
9480         long val = PyInt_AS_LONG(x);
9481         if (is_unsigned && unlikely(val < 0)) {
9482             PyErr_SetString(PyExc_OverflowError,
9483                             "can't convert negative value to long");
9484             return (long)-1;
9485         }
9486         return (long)val;
9487     } else
9488 #endif
9489     if (likely(PyLong_Check(x))) {
9490         if (is_unsigned) {
9491             if (unlikely(Py_SIZE(x) < 0)) {
9492                 PyErr_SetString(PyExc_OverflowError,
9493                                 "can't convert negative value to long");
9494                 return (long)-1;
9495             }
9496             return PyLong_AsUnsignedLong(x);
9497         } else {
9498             return PyLong_AsLong(x);
9499         }
9500     } else {
9501         long val;
9502         PyObject *tmp = __Pyx_PyNumber_Int(x);
9503         if (!tmp) return (long)-1;
9504         val = __Pyx_PyInt_AsLong(tmp);
9505         Py_DECREF(tmp);
9506         return val;
9507     }
9508 }
9509
9510 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
9511     const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
9512     const int is_unsigned = neg_one > const_zero;
9513 #if PY_VERSION_HEX < 0x03000000
9514     if (likely(PyInt_Check(x))) {
9515         long val = PyInt_AS_LONG(x);
9516         if (is_unsigned && unlikely(val < 0)) {
9517             PyErr_SetString(PyExc_OverflowError,
9518                             "can't convert negative value to PY_LONG_LONG");
9519             return (PY_LONG_LONG)-1;
9520         }
9521         return (PY_LONG_LONG)val;
9522     } else
9523 #endif
9524     if (likely(PyLong_Check(x))) {
9525         if (is_unsigned) {
9526             if (unlikely(Py_SIZE(x) < 0)) {
9527                 PyErr_SetString(PyExc_OverflowError,
9528                                 "can't convert negative value to PY_LONG_LONG");
9529                 return (PY_LONG_LONG)-1;
9530             }
9531             return PyLong_AsUnsignedLongLong(x);
9532         } else {
9533             return PyLong_AsLongLong(x);
9534         }
9535     } else {
9536         PY_LONG_LONG val;
9537         PyObject *tmp = __Pyx_PyNumber_Int(x);
9538         if (!tmp) return (PY_LONG_LONG)-1;
9539         val = __Pyx_PyInt_AsLongLong(tmp);
9540         Py_DECREF(tmp);
9541         return val;
9542     }
9543 }
9544
9545 static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
9546     const signed long neg_one = (signed long)-1, const_zero = 0;
9547     const int is_unsigned = neg_one > const_zero;
9548 #if PY_VERSION_HEX < 0x03000000
9549     if (likely(PyInt_Check(x))) {
9550         long val = PyInt_AS_LONG(x);
9551         if (is_unsigned && unlikely(val < 0)) {
9552             PyErr_SetString(PyExc_OverflowError,
9553                             "can't convert negative value to signed long");
9554             return (signed long)-1;
9555         }
9556         return (signed long)val;
9557     } else
9558 #endif
9559     if (likely(PyLong_Check(x))) {
9560         if (is_unsigned) {
9561             if (unlikely(Py_SIZE(x) < 0)) {
9562                 PyErr_SetString(PyExc_OverflowError,
9563                                 "can't convert negative value to signed long");
9564                 return (signed long)-1;
9565             }
9566             return PyLong_AsUnsignedLong(x);
9567         } else {
9568             return PyLong_AsLong(x);
9569         }
9570     } else {
9571         signed long val;
9572         PyObject *tmp = __Pyx_PyNumber_Int(x);
9573         if (!tmp) return (signed long)-1;
9574         val = __Pyx_PyInt_AsSignedLong(tmp);
9575         Py_DECREF(tmp);
9576         return val;
9577     }
9578 }
9579
9580 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
9581     const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
9582     const int is_unsigned = neg_one > const_zero;
9583 #if PY_VERSION_HEX < 0x03000000
9584     if (likely(PyInt_Check(x))) {
9585         long val = PyInt_AS_LONG(x);
9586         if (is_unsigned && unlikely(val < 0)) {
9587             PyErr_SetString(PyExc_OverflowError,
9588                             "can't convert negative value to signed PY_LONG_LONG");
9589             return (signed PY_LONG_LONG)-1;
9590         }
9591         return (signed PY_LONG_LONG)val;
9592     } else
9593 #endif
9594     if (likely(PyLong_Check(x))) {
9595         if (is_unsigned) {
9596             if (unlikely(Py_SIZE(x) < 0)) {
9597                 PyErr_SetString(PyExc_OverflowError,
9598                                 "can't convert negative value to signed PY_LONG_LONG");
9599                 return (signed PY_LONG_LONG)-1;
9600             }
9601             return PyLong_AsUnsignedLongLong(x);
9602         } else {
9603             return PyLong_AsLongLong(x);
9604         }
9605     } else {
9606         signed PY_LONG_LONG val;
9607         PyObject *tmp = __Pyx_PyNumber_Int(x);
9608         if (!tmp) return (signed PY_LONG_LONG)-1;
9609         val = __Pyx_PyInt_AsSignedLongLong(tmp);
9610         Py_DECREF(tmp);
9611         return val;
9612     }
9613 }
9614
9615 static void __Pyx_WriteUnraisable(const char *name) {
9616     PyObject *old_exc, *old_val, *old_tb;
9617     PyObject *ctx;
9618     __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
9619     #if PY_MAJOR_VERSION < 3
9620     ctx = PyString_FromString(name);
9621     #else
9622     ctx = PyUnicode_FromString(name);
9623     #endif
9624     __Pyx_ErrRestore(old_exc, old_val, old_tb);
9625     if (!ctx) {
9626         PyErr_WriteUnraisable(Py_None);
9627     } else {
9628         PyErr_WriteUnraisable(ctx);
9629         Py_DECREF(ctx);
9630     }
9631 }
9632
9633 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
9634 #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
9635     PyObject *ob = PyCapsule_New(vtable, 0, 0);
9636 #else
9637     PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
9638 #endif
9639     if (!ob)
9640         goto bad;
9641     if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
9642         goto bad;
9643     Py_DECREF(ob);
9644     return 0;
9645 bad:
9646     Py_XDECREF(ob);
9647     return -1;
9648 }
9649
9650 #ifndef __PYX_HAVE_RT_ImportType
9651 #define __PYX_HAVE_RT_ImportType
9652 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
9653     long size, int strict)
9654 {
9655     PyObject *py_module = 0;
9656     PyObject *result = 0;
9657     PyObject *py_name = 0;
9658     char warning[200];
9659
9660     py_module = __Pyx_ImportModule(module_name);
9661     if (!py_module)
9662         goto bad;
9663     #if PY_MAJOR_VERSION < 3
9664     py_name = PyString_FromString(class_name);
9665     #else
9666     py_name = PyUnicode_FromString(class_name);
9667     #endif
9668     if (!py_name)
9669         goto bad;
9670     result = PyObject_GetAttr(py_module, py_name);
9671     Py_DECREF(py_name);
9672     py_name = 0;
9673     Py_DECREF(py_module);
9674     py_module = 0;
9675     if (!result)
9676         goto bad;
9677     if (!PyType_Check(result)) {
9678         PyErr_Format(PyExc_TypeError, 
9679             "%s.%s is not a type object",
9680             module_name, class_name);
9681         goto bad;
9682     }
9683     if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
9684         PyOS_snprintf(warning, sizeof(warning), 
9685             "%s.%s size changed, may indicate binary incompatibility",
9686             module_name, class_name);
9687         #if PY_VERSION_HEX < 0x02050000
9688         PyErr_Warn(NULL, warning);
9689         #else
9690         PyErr_WarnEx(NULL, warning, 0);
9691         #endif
9692     }
9693     else if (((PyTypeObject *)result)->tp_basicsize != size) {
9694         PyErr_Format(PyExc_ValueError, 
9695             "%s.%s has the wrong size, try recompiling",
9696             module_name, class_name);
9697         goto bad;
9698     }
9699     return (PyTypeObject *)result;
9700 bad:
9701     Py_XDECREF(py_module);
9702     Py_XDECREF(result);
9703     return 0;
9704 }
9705 #endif
9706
9707 #ifndef __PYX_HAVE_RT_ImportModule
9708 #define __PYX_HAVE_RT_ImportModule
9709 static PyObject *__Pyx_ImportModule(const char *name) {
9710     PyObject *py_name = 0;
9711     PyObject *py_module = 0;
9712
9713     #if PY_MAJOR_VERSION < 3
9714     py_name = PyString_FromString(name);
9715     #else
9716     py_name = PyUnicode_FromString(name);
9717     #endif
9718     if (!py_name)
9719         goto bad;
9720     py_module = PyImport_Import(py_name);
9721     Py_DECREF(py_name);
9722     return py_module;
9723 bad:
9724     Py_XDECREF(py_name);
9725     return 0;
9726 }
9727 #endif
9728
9729 #include "compile.h"
9730 #include "frameobject.h"
9731 #include "traceback.h"
9732
9733 static void __Pyx_AddTraceback(const char *funcname) {
9734     PyObject *py_srcfile = 0;
9735     PyObject *py_funcname = 0;
9736     PyObject *py_globals = 0;
9737     PyCodeObject *py_code = 0;
9738     PyFrameObject *py_frame = 0;
9739
9740     #if PY_MAJOR_VERSION < 3
9741     py_srcfile = PyString_FromString(__pyx_filename);
9742     #else
9743     py_srcfile = PyUnicode_FromString(__pyx_filename);
9744     #endif
9745     if (!py_srcfile) goto bad;
9746     if (__pyx_clineno) {
9747         #if PY_MAJOR_VERSION < 3
9748         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
9749         #else
9750         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
9751         #endif
9752     }
9753     else {
9754         #if PY_MAJOR_VERSION < 3
9755         py_funcname = PyString_FromString(funcname);
9756         #else
9757         py_funcname = PyUnicode_FromString(funcname);
9758         #endif
9759     }
9760     if (!py_funcname) goto bad;
9761     py_globals = PyModule_GetDict(__pyx_m);
9762     if (!py_globals) goto bad;
9763     py_code = PyCode_New(
9764         0,            /*int argcount,*/
9765         #if PY_MAJOR_VERSION >= 3
9766         0,            /*int kwonlyargcount,*/
9767         #endif
9768         0,            /*int nlocals,*/
9769         0,            /*int stacksize,*/
9770         0,            /*int flags,*/
9771         __pyx_empty_bytes, /*PyObject *code,*/
9772         __pyx_empty_tuple,  /*PyObject *consts,*/
9773         __pyx_empty_tuple,  /*PyObject *names,*/
9774         __pyx_empty_tuple,  /*PyObject *varnames,*/
9775         __pyx_empty_tuple,  /*PyObject *freevars,*/
9776         __pyx_empty_tuple,  /*PyObject *cellvars,*/
9777         py_srcfile,   /*PyObject *filename,*/
9778         py_funcname,  /*PyObject *name,*/
9779         __pyx_lineno,   /*int firstlineno,*/
9780         __pyx_empty_bytes  /*PyObject *lnotab*/
9781     );
9782     if (!py_code) goto bad;
9783     py_frame = PyFrame_New(
9784         PyThreadState_GET(), /*PyThreadState *tstate,*/
9785         py_code,             /*PyCodeObject *code,*/
9786         py_globals,          /*PyObject *globals,*/
9787         0                    /*PyObject *locals*/
9788     );
9789     if (!py_frame) goto bad;
9790     py_frame->f_lineno = __pyx_lineno;
9791     PyTraceBack_Here(py_frame);
9792 bad:
9793     Py_XDECREF(py_srcfile);
9794     Py_XDECREF(py_funcname);
9795     Py_XDECREF(py_code);
9796     Py_XDECREF(py_frame);
9797 }
9798
9799 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
9800     while (t->p) {
9801         #if PY_MAJOR_VERSION < 3
9802         if (t->is_unicode) {
9803             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
9804         } else if (t->intern) {
9805             *t->p = PyString_InternFromString(t->s);
9806         } else {
9807             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
9808         }
9809         #else  /* Python 3+ has unicode identifiers */
9810         if (t->is_unicode | t->is_str) {
9811             if (t->intern) {
9812                 *t->p = PyUnicode_InternFromString(t->s);
9813             } else if (t->encoding) {
9814                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
9815             } else {
9816                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
9817             }
9818         } else {
9819             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
9820         }
9821         #endif
9822         if (!*t->p)
9823             return -1;
9824         ++t;
9825     }
9826     return 0;
9827 }
9828
9829 /* Type Conversion Functions */
9830
9831 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
9832    int is_true = x == Py_True;
9833    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
9834    else return PyObject_IsTrue(x);
9835 }
9836
9837 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
9838   PyNumberMethods *m;
9839   const char *name = NULL;
9840   PyObject *res = NULL;
9841 #if PY_VERSION_HEX < 0x03000000
9842   if (PyInt_Check(x) || PyLong_Check(x))
9843 #else
9844   if (PyLong_Check(x))
9845 #endif
9846     return Py_INCREF(x), x;
9847   m = Py_TYPE(x)->tp_as_number;
9848 #if PY_VERSION_HEX < 0x03000000
9849   if (m && m->nb_int) {
9850     name = "int";
9851     res = PyNumber_Int(x);
9852   }
9853   else if (m && m->nb_long) {
9854     name = "long";
9855     res = PyNumber_Long(x);
9856   }
9857 #else
9858   if (m && m->nb_int) {
9859     name = "int";
9860     res = PyNumber_Long(x);
9861   }
9862 #endif
9863   if (res) {
9864 #if PY_VERSION_HEX < 0x03000000
9865     if (!PyInt_Check(res) && !PyLong_Check(res)) {
9866 #else
9867     if (!PyLong_Check(res)) {
9868 #endif
9869       PyErr_Format(PyExc_TypeError,
9870                    "__%s__ returned non-%s (type %.200s)",
9871                    name, name, Py_TYPE(res)->tp_name);
9872       Py_DECREF(res);
9873       return NULL;
9874     }
9875   }
9876   else if (!PyErr_Occurred()) {
9877     PyErr_SetString(PyExc_TypeError,
9878                     "an integer is required");
9879   }
9880   return res;
9881 }
9882
9883 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
9884   Py_ssize_t ival;
9885   PyObject* x = PyNumber_Index(b);
9886   if (!x) return -1;
9887   ival = PyInt_AsSsize_t(x);
9888   Py_DECREF(x);
9889   return ival;
9890 }
9891
9892 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
9893 #if PY_VERSION_HEX < 0x02050000
9894    if (ival <= LONG_MAX)
9895        return PyInt_FromLong((long)ival);
9896    else {
9897        unsigned char *bytes = (unsigned char *) &ival;
9898        int one = 1; int little = (int)*(unsigned char*)&one;
9899        return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
9900    }
9901 #else
9902    return PyInt_FromSize_t(ival);
9903 #endif
9904 }
9905
9906 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
9907    unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
9908    if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
9909        return (size_t)-1;
9910    } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
9911        PyErr_SetString(PyExc_OverflowError,
9912                        "value too large to convert to size_t");
9913        return (size_t)-1;
9914    }
9915    return (size_t)val;
9916 }
9917
9918
9919 #endif /* Py_PYTHON_H */