Imported Upstream version 0.7
[pysam.git] / pysam / cvcf.c
1 /* Generated by Cython 0.16 on Mon Nov 19 08:44:41 2012 */
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 #elif PY_VERSION_HEX < 0x02040000
8     #error Cython requires Python 2.4+.
9 #else
10 #include <stddef.h> /* For offsetof */
11 #ifndef offsetof
12 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
13 #endif
14
15 #if !defined(WIN32) && !defined(MS_WINDOWS)
16   #ifndef __stdcall
17     #define __stdcall
18   #endif
19   #ifndef __cdecl
20     #define __cdecl
21   #endif
22   #ifndef __fastcall
23     #define __fastcall
24   #endif
25 #endif
26
27 #ifndef DL_IMPORT
28   #define DL_IMPORT(t) t
29 #endif
30 #ifndef DL_EXPORT
31   #define DL_EXPORT(t) t
32 #endif
33
34 #ifndef PY_LONG_LONG
35   #define PY_LONG_LONG LONG_LONG
36 #endif
37
38 #ifndef Py_HUGE_VAL
39   #define Py_HUGE_VAL HUGE_VAL
40 #endif
41
42 #ifdef PYPY_VERSION
43 #define CYTHON_COMPILING_IN_PYPY 1
44 #define CYTHON_COMPILING_IN_CPYTHON 0
45 #else
46 #define CYTHON_COMPILING_IN_PYPY 0
47 #define CYTHON_COMPILING_IN_CPYTHON 1
48 #endif
49
50 #if CYTHON_COMPILING_IN_PYPY
51   #define __Pyx_PyCFunction_Call PyObject_Call
52 #else
53   #define __Pyx_PyCFunction_Call PyCFunction_Call
54 #endif
55
56 #if PY_VERSION_HEX < 0x02050000
57   typedef int Py_ssize_t;
58   #define PY_SSIZE_T_MAX INT_MAX
59   #define PY_SSIZE_T_MIN INT_MIN
60   #define PY_FORMAT_SIZE_T ""
61   #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
62   #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
63   #define PyNumber_Index(o)    PyNumber_Int(o)
64   #define PyIndex_Check(o)     PyNumber_Check(o)
65   #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
66   #define __PYX_BUILD_PY_SSIZE_T "i"
67 #else
68   #define __PYX_BUILD_PY_SSIZE_T "n"
69 #endif
70
71 #if PY_VERSION_HEX < 0x02060000
72   #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
73   #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
74   #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
75   #define PyVarObject_HEAD_INIT(type, size) \
76           PyObject_HEAD_INIT(type) size,
77   #define PyType_Modified(t)
78
79   typedef struct {
80      void *buf;
81      PyObject *obj;
82      Py_ssize_t len;
83      Py_ssize_t itemsize;
84      int readonly;
85      int ndim;
86      char *format;
87      Py_ssize_t *shape;
88      Py_ssize_t *strides;
89      Py_ssize_t *suboffsets;
90      void *internal;
91   } Py_buffer;
92
93   #define PyBUF_SIMPLE 0
94   #define PyBUF_WRITABLE 0x0001
95   #define PyBUF_FORMAT 0x0004
96   #define PyBUF_ND 0x0008
97   #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
98   #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
99   #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
100   #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
101   #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
102   #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
103   #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
104
105   typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
106   typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
107 #endif
108
109 #if PY_MAJOR_VERSION < 3
110   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
111   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
112           PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
113 #else
114   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
115   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
116           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
117 #endif
118
119 #if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
120   #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
121 #endif
122
123 #if PY_MAJOR_VERSION >= 3
124   #define Py_TPFLAGS_CHECKTYPES 0
125   #define Py_TPFLAGS_HAVE_INDEX 0
126 #endif
127
128 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
129   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
130 #endif
131
132
133 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_GET_LENGTH)
134   #define CYTHON_PEP393_ENABLED 1
135   #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
136   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
137 #else
138   #define CYTHON_PEP393_ENABLED 0
139   #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
140   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
141 #endif
142
143 #if PY_MAJOR_VERSION >= 3
144   #define PyBaseString_Type            PyUnicode_Type
145   #define PyStringObject               PyUnicodeObject
146   #define PyString_Type                PyUnicode_Type
147   #define PyString_Check               PyUnicode_Check
148   #define PyString_CheckExact          PyUnicode_CheckExact
149 #endif
150
151 #if PY_VERSION_HEX < 0x02060000
152   #define PyBytesObject                PyStringObject
153   #define PyBytes_Type                 PyString_Type
154   #define PyBytes_Check                PyString_Check
155   #define PyBytes_CheckExact           PyString_CheckExact
156   #define PyBytes_FromString           PyString_FromString
157   #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
158   #define PyBytes_FromFormat           PyString_FromFormat
159   #define PyBytes_DecodeEscape         PyString_DecodeEscape
160   #define PyBytes_AsString             PyString_AsString
161   #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
162   #define PyBytes_Size                 PyString_Size
163   #define PyBytes_AS_STRING            PyString_AS_STRING
164   #define PyBytes_GET_SIZE             PyString_GET_SIZE
165   #define PyBytes_Repr                 PyString_Repr
166   #define PyBytes_Concat               PyString_Concat
167   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
168 #endif
169
170 #if PY_VERSION_HEX < 0x02060000
171   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
172   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
173 #endif
174 #ifndef PySet_CheckExact
175   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
176 #endif
177
178 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
179
180 #if PY_MAJOR_VERSION >= 3
181   #define PyIntObject                  PyLongObject
182   #define PyInt_Type                   PyLong_Type
183   #define PyInt_Check(op)              PyLong_Check(op)
184   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
185   #define PyInt_FromString             PyLong_FromString
186   #define PyInt_FromUnicode            PyLong_FromUnicode
187   #define PyInt_FromLong               PyLong_FromLong
188   #define PyInt_FromSize_t             PyLong_FromSize_t
189   #define PyInt_FromSsize_t            PyLong_FromSsize_t
190   #define PyInt_AsLong                 PyLong_AsLong
191   #define PyInt_AS_LONG                PyLong_AS_LONG
192   #define PyInt_AsSsize_t              PyLong_AsSsize_t
193   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
194   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
195 #endif
196
197 #if PY_MAJOR_VERSION >= 3
198   #define PyBoolObject                 PyLongObject
199 #endif
200
201 #if PY_VERSION_HEX < 0x03020000
202   typedef long Py_hash_t;
203   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
204   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
205 #else
206   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
207   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
208 #endif
209
210 #if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
211   #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
212   #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
213   #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
214 #else
215   #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
216         (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
217         (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
218             (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
219   #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
220         (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
221         (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
222             (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
223   #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
224         (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
225         (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
226             (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
227 #endif
228
229 #if PY_MAJOR_VERSION >= 3
230   #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
231 #endif
232
233 #if PY_VERSION_HEX < 0x02050000
234   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
235   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
236   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
237 #else
238   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
239   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
240   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
241 #endif
242
243 #if PY_VERSION_HEX < 0x02050000
244   #define __Pyx_NAMESTR(n) ((char *)(n))
245   #define __Pyx_DOCSTR(n)  ((char *)(n))
246 #else
247   #define __Pyx_NAMESTR(n) (n)
248   #define __Pyx_DOCSTR(n)  (n)
249 #endif
250
251 #if PY_MAJOR_VERSION >= 3
252   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
253   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
254 #else
255   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
256   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
257 #endif
258
259 #ifndef __PYX_EXTERN_C
260   #ifdef __cplusplus
261     #define __PYX_EXTERN_C extern "C"
262   #else
263     #define __PYX_EXTERN_C extern
264   #endif
265 #endif
266
267 #if defined(WIN32) || defined(MS_WINDOWS)
268 #define _USE_MATH_DEFINES
269 #endif
270 #include <math.h>
271 #define __PYX_HAVE__cvcf
272 #define __PYX_HAVE_API__cvcf
273 #include "stdlib.h"
274 #include "string.h"
275 #include "stdint.h"
276 #include "stdio.h"
277 #include "ctype.h"
278 #include "sys/types.h"
279 #include "sys/stat.h"
280 #include "fcntl.h"
281 #include "unistd.h"
282 #include "bgzf.h"
283 #include "tabix.h"
284 #ifdef _OPENMP
285 #include <omp.h>
286 #endif /* _OPENMP */
287
288 #ifdef PYREX_WITHOUT_ASSERTIONS
289 #define CYTHON_WITHOUT_ASSERTIONS
290 #endif
291
292
293 /* inline attribute */
294 #ifndef CYTHON_INLINE
295   #if defined(__GNUC__)
296     #define CYTHON_INLINE __inline__
297   #elif defined(_MSC_VER)
298     #define CYTHON_INLINE __inline
299   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
300     #define CYTHON_INLINE inline
301   #else
302     #define CYTHON_INLINE
303   #endif
304 #endif
305
306 /* unused attribute */
307 #ifndef CYTHON_UNUSED
308 # if defined(__GNUC__)
309 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
310 #     define CYTHON_UNUSED __attribute__ ((__unused__))
311 #   else
312 #     define CYTHON_UNUSED
313 #   endif
314 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
315 #   define CYTHON_UNUSED __attribute__ ((__unused__))
316 # else
317 #   define CYTHON_UNUSED
318 # endif
319 #endif
320
321 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*/
322
323
324 /* Type Conversion Predeclarations */
325
326 #define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
327 #define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
328
329 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
330 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
331 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
332 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
333
334 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
335 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
336 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
337
338 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
339 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
340
341 #ifdef __GNUC__
342   /* Test for GCC > 2.95 */
343   #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
344     #define likely(x)   __builtin_expect(!!(x), 1)
345     #define unlikely(x) __builtin_expect(!!(x), 0)
346   #else /* __GNUC__ > 2 ... */
347     #define likely(x)   (x)
348     #define unlikely(x) (x)
349   #endif /* __GNUC__ > 2 ... */
350 #else /* __GNUC__ */
351   #define likely(x)   (x)
352   #define unlikely(x) (x)
353 #endif /* __GNUC__ */
354     
355 static PyObject *__pyx_m;
356 static PyObject *__pyx_b;
357 static PyObject *__pyx_empty_tuple;
358 static PyObject *__pyx_empty_bytes;
359 static int __pyx_lineno;
360 static int __pyx_clineno = 0;
361 static const char * __pyx_cfilenm= __FILE__;
362 static const char *__pyx_filename;
363
364
365 static const char *__pyx_f[] = {
366   "cvcf.pyx",
367   "ctabix.pxd",
368   "TabProxies.pxd",
369 };
370
371 /*--- Type declarations ---*/
372 struct __pyx_obj_6ctabix_Parser;
373 struct __pyx_obj_6ctabix_asVCF;
374 struct __pyx_obj_10TabProxies_TupleProxy;
375 struct __pyx_obj_10TabProxies_NamedTupleProxy;
376 struct __pyx_obj_10TabProxies_BedProxy;
377 struct __pyx_obj_6ctabix_tabix_copy_iterator;
378 struct __pyx_obj_4cvcf_VCFRecord;
379 struct __pyx_obj_10TabProxies_VCFProxy;
380 struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse;
381 struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data;
382 struct __pyx_obj_6ctabix_TabixIterator;
383 struct __pyx_obj_4cvcf_asVCFRecord;
384 struct __pyx_obj_10TabProxies_GTFProxy;
385 struct __pyx_obj_6ctabix_TabixIteratorParsed;
386 struct __pyx_obj_6ctabix_TabixHeaderIterator;
387 struct __pyx_obj_6ctabix_Tabixfile;
388 struct __pyx_obj_6ctabix_asGTF;
389 struct __pyx_obj_6ctabix_asBed;
390 struct __pyx_obj_6ctabix_tabix_inplace_iterator;
391 struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr;
392 struct __pyx_obj_6ctabix_asTuple;
393 struct __pyx_defaults;
394 typedef struct __pyx_defaults __pyx_defaults;
395 struct __pyx_defaults1;
396 typedef struct __pyx_defaults1 __pyx_defaults1;
397 struct __pyx_defaults2;
398 typedef struct __pyx_defaults2 __pyx_defaults2;
399 struct __pyx_defaults3;
400 typedef struct __pyx_defaults3 __pyx_defaults3;
401 struct __pyx_defaults4;
402 typedef struct __pyx_defaults4 __pyx_defaults4;
403 struct __pyx_defaults {
404   PyObject *__pyx_arg_leftalign;
405 };
406 struct __pyx_defaults1 {
407   PyObject *__pyx_arg_filter;
408 };
409 struct __pyx_defaults2 {
410   PyObject *__pyx_arg_filter;
411 };
412 struct __pyx_defaults3 {
413   PyObject *__pyx_arg_key;
414   PyObject *__pyx_arg_value;
415 };
416 struct __pyx_defaults4 {
417   PyObject *__pyx_arg_lineparse;
418 };
419
420 /* "ctabix.pxd":190
421  *     cdef tabix_t * tabixfile
422  * 
423  * cdef class Parser:             # <<<<<<<<<<<<<<
424  *      pass
425  * 
426  */
427 struct __pyx_obj_6ctabix_Parser {
428   PyObject_HEAD
429 };
430
431
432 /* "ctabix.pxd":202
433  *      pass
434  * 
435  * cdef class asVCF(Parser):             # <<<<<<<<<<<<<<
436  *      pass
437  * 
438  */
439 struct __pyx_obj_6ctabix_asVCF {
440   struct __pyx_obj_6ctabix_Parser __pyx_base;
441 };
442
443
444 /* "TabProxies.pxd":41
445  *   ctypedef int uint64_t
446  * 
447  * cdef class TupleProxy:             # <<<<<<<<<<<<<<
448  * 
449  *     cdef:
450  */
451 struct __pyx_obj_10TabProxies_TupleProxy {
452   PyObject_HEAD
453   struct __pyx_vtabstruct_10TabProxies_TupleProxy *__pyx_vtab;
454   char *data;
455   char **fields;
456   int nfields;
457   int index;
458   int nbytes;
459   int offset;
460   int is_modified;
461 };
462
463
464 /* "TabProxies.pxd":69
465  *     cdef char * getAttributes( self )
466  * 
467  * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
468  *     pass
469  * 
470  */
471 struct __pyx_obj_10TabProxies_NamedTupleProxy {
472   struct __pyx_obj_10TabProxies_TupleProxy __pyx_base;
473 };
474
475
476 /* "TabProxies.pxd":72
477  *     pass
478  * 
479  * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
480  * 
481  *     cdef:
482  */
483 struct __pyx_obj_10TabProxies_BedProxy {
484   struct __pyx_obj_10TabProxies_NamedTupleProxy __pyx_base;
485   char *contig;
486   uint32_t start;
487   uint32_t end;
488   int bedfields;
489 };
490
491
492 /* "ctabix.pxd":218
493  *     cdef __cnext__(self)
494  * 
495  * ctypedef class tabix_copy_iterator:             # <<<<<<<<<<<<<<
496  *     cdef FILE * infile
497  *     cdef Parser parser
498  */
499 struct __pyx_obj_6ctabix_tabix_copy_iterator {
500   PyObject_HEAD
501   struct __pyx_vtabstruct_6ctabix_tabix_copy_iterator *__pyx_vtab;
502   FILE *infile;
503   struct __pyx_obj_6ctabix_Parser *parser;
504 };
505
506
507 /* "cvcf.pyx":94
508  * ###########################################################################################################
509  * 
510  * cdef class VCFRecord( TabProxies.TupleProxy):             # <<<<<<<<<<<<<<
511  *     '''vcf record.
512  * 
513  */
514 struct __pyx_obj_4cvcf_VCFRecord {
515   struct __pyx_obj_10TabProxies_TupleProxy __pyx_base;
516   PyObject *vcf;
517   char *contig;
518   uint32_t pos;
519 };
520
521
522 /* "TabProxies.pxd":83
523  *     cdef update( self, char * buffer, size_t nbytes )
524  * 
525  * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
526  * 
527  *     cdef:
528  */
529 struct __pyx_obj_10TabProxies_VCFProxy {
530   struct __pyx_obj_10TabProxies_NamedTupleProxy __pyx_base;
531   char *contig;
532   uint32_t pos;
533 };
534
535
536 /* "cvcf.pyx":899
537  *         return line
538  * 
539  *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
540  *         # deal with files with header only
541  *         if line.startswith("##"): return
542  */
543 struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse {
544   PyObject_HEAD
545   PyObject *__pyx_v_d;
546   PyObject *__pyx_v_line;
547   PyObject *__pyx_v_self;
548   PyObject *__pyx_v_stream;
549   Py_ssize_t __pyx_t_0;
550   PyObject *__pyx_t_1;
551   PyObject *(*__pyx_t_2)(PyObject *);
552 };
553
554
555 /* "cvcf.pyx":647
556  *         return False
557  * 
558  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
559  *         cols = line.split('\t')
560  *         if len(cols) != len(self._samples)+9:
561  */
562 struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data {
563   PyObject_HEAD
564   PyObject *__pyx_v_alt;
565 };
566
567
568 /* "ctabix.pxd":182
569  *     cdef char * _filename
570  * 
571  * cdef class TabixIterator:             # <<<<<<<<<<<<<<
572  *     cdef ti_iter_t iterator
573  *     cdef tabix_t * tabixfile
574  */
575 struct __pyx_obj_6ctabix_TabixIterator {
576   PyObject_HEAD
577   ti_iter_t iterator;
578   tabix_t *tabixfile;
579 };
580
581
582 /* "cvcf.pyx":226
583  * 
584  * 
585  * cdef class asVCFRecord( ctabix.Parser ):             # <<<<<<<<<<<<<<
586  *     '''converts a :term:`tabix row` into a VCF record.'''
587  *     cdef vcffile
588  */
589 struct __pyx_obj_4cvcf_asVCFRecord {
590   struct __pyx_obj_6ctabix_Parser __pyx_base;
591   PyObject *vcffile;
592 };
593
594
595 /* "TabProxies.pxd":60
596  *     cdef update( self, char * buffer, size_t nbytes )
597  * 
598  * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
599  * 
600  *     cdef:
601  */
602 struct __pyx_obj_10TabProxies_GTFProxy {
603   struct __pyx_obj_10TabProxies_TupleProxy __pyx_base;
604   char *_attributes;
605   int hasOwnAttributes;
606 };
607
608
609 /* "ctabix.pxd":205
610  *      pass
611  * 
612  * cdef class TabixIteratorParsed:             # <<<<<<<<<<<<<<
613  *     cdef ti_iter_t iterator
614  *     cdef tabix_t * tabixfile
615  */
616 struct __pyx_obj_6ctabix_TabixIteratorParsed {
617   PyObject_HEAD
618   ti_iter_t iterator;
619   tabix_t *tabixfile;
620   struct __pyx_obj_6ctabix_Parser *parser;
621 };
622
623
624 /* "ctabix.pxd":186
625  *     cdef tabix_t * tabixfile
626  * 
627  * cdef class TabixHeaderIterator:             # <<<<<<<<<<<<<<
628  *     cdef ti_iter_t iterator
629  *     cdef tabix_t * tabixfile
630  */
631 struct __pyx_obj_6ctabix_TabixHeaderIterator {
632   PyObject_HEAD
633   ti_iter_t iterator;
634   tabix_t *tabixfile;
635 };
636
637
638 /* "ctabix.pxd":172
639  *   # char *ti_iter_read(BGZF *fp, ti_iter_t iter, int *len)
640  * 
641  * cdef class Tabixfile:             # <<<<<<<<<<<<<<
642  * 
643  *     # pointer to tabixfile
644  */
645 struct __pyx_obj_6ctabix_Tabixfile {
646   PyObject_HEAD
647   tabix_t *tabixfile;
648   int isremote;
649   char *_filename;
650 };
651
652
653 /* "ctabix.pxd":196
654  *      pass
655  * 
656  * cdef class asGTF(Parser):             # <<<<<<<<<<<<<<
657  *      pass
658  * 
659  */
660 struct __pyx_obj_6ctabix_asGTF {
661   struct __pyx_obj_6ctabix_Parser __pyx_base;
662 };
663
664
665 /* "ctabix.pxd":199
666  *      pass
667  * 
668  * cdef class asBed(Parser):             # <<<<<<<<<<<<<<
669  *      pass
670  * 
671  */
672 struct __pyx_obj_6ctabix_asBed {
673   struct __pyx_obj_6ctabix_Parser __pyx_base;
674 };
675
676
677 /* "ctabix.pxd":210
678  *     cdef Parser parser
679  * 
680  * ctypedef class tabix_inplace_iterator:             # <<<<<<<<<<<<<<
681  *     cdef FILE * infile
682  *     cdef char * buffer
683  */
684 struct __pyx_obj_6ctabix_tabix_inplace_iterator {
685   PyObject_HEAD
686   struct __pyx_vtabstruct_6ctabix_tabix_inplace_iterator *__pyx_vtab;
687   FILE *infile;
688   char *buffer;
689   size_t size;
690   struct __pyx_obj_6ctabix_Parser *parser;
691 };
692
693
694 /* "cvcf.pyx":790
695  *         if alt:
696  *             for i in range(1,min(len(ref),min(map(len,alt)))):
697  *                 if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():             # <<<<<<<<<<<<<<
698  *                     break
699  *                 ref, alt = ref[:-1], [allele[:-1] for allele in alt]
700  */
701 struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr {
702   PyObject_HEAD
703   struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *__pyx_outer_scope;
704   PyObject *__pyx_v_allele;
705   PyObject *__pyx_t_0;
706   Py_ssize_t __pyx_t_1;
707   PyObject *(*__pyx_t_2)(PyObject *);
708 };
709
710
711 /* "ctabix.pxd":193
712  *      pass
713  * 
714  * cdef class asTuple(Parser):             # <<<<<<<<<<<<<<
715  *      pass
716  * 
717  */
718 struct __pyx_obj_6ctabix_asTuple {
719   struct __pyx_obj_6ctabix_Parser __pyx_base;
720 };
721
722
723
724 /* "ctabix.pxd":218
725  *     cdef __cnext__(self)
726  * 
727  * ctypedef class tabix_copy_iterator:             # <<<<<<<<<<<<<<
728  *     cdef FILE * infile
729  *     cdef Parser parser
730  */
731
732 struct __pyx_vtabstruct_6ctabix_tabix_copy_iterator {
733   PyObject *(*__pyx___cnext__)(struct __pyx_obj_6ctabix_tabix_copy_iterator *);
734 };
735 static struct __pyx_vtabstruct_6ctabix_tabix_copy_iterator *__pyx_vtabptr_6ctabix_tabix_copy_iterator;
736
737
738 /* "TabProxies.pxd":41
739  *   ctypedef int uint64_t
740  * 
741  * cdef class TupleProxy:             # <<<<<<<<<<<<<<
742  * 
743  *     cdef:
744  */
745
746 struct __pyx_vtabstruct_10TabProxies_TupleProxy {
747   int (*getMaxFields)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t);
748   PyObject *(*take)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
749   PyObject *(*present)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
750   PyObject *(*copy)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
751   PyObject *(*update)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
752 };
753 static struct __pyx_vtabstruct_10TabProxies_TupleProxy *__pyx_vtabptr_10TabProxies_TupleProxy;
754
755
756 /* "TabProxies.pxd":69
757  *     cdef char * getAttributes( self )
758  * 
759  * cdef class NamedTupleProxy( TupleProxy) :             # <<<<<<<<<<<<<<
760  *     pass
761  * 
762  */
763
764 struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy {
765   struct __pyx_vtabstruct_10TabProxies_TupleProxy __pyx_base;
766 };
767 static struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
768
769
770 /* "TabProxies.pxd":83
771  *     cdef update( self, char * buffer, size_t nbytes )
772  * 
773  * cdef class VCFProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
774  * 
775  *     cdef:
776  */
777
778 struct __pyx_vtabstruct_10TabProxies_VCFProxy {
779   struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy __pyx_base;
780 };
781 static struct __pyx_vtabstruct_10TabProxies_VCFProxy *__pyx_vtabptr_10TabProxies_VCFProxy;
782
783
784 /* "ctabix.pxd":210
785  *     cdef Parser parser
786  * 
787  * ctypedef class tabix_inplace_iterator:             # <<<<<<<<<<<<<<
788  *     cdef FILE * infile
789  *     cdef char * buffer
790  */
791
792 struct __pyx_vtabstruct_6ctabix_tabix_inplace_iterator {
793   PyObject *(*__pyx___cnext__)(struct __pyx_obj_6ctabix_tabix_inplace_iterator *);
794 };
795 static struct __pyx_vtabstruct_6ctabix_tabix_inplace_iterator *__pyx_vtabptr_6ctabix_tabix_inplace_iterator;
796
797
798 /* "TabProxies.pxd":60
799  *     cdef update( self, char * buffer, size_t nbytes )
800  * 
801  * cdef class GTFProxy( TupleProxy) :             # <<<<<<<<<<<<<<
802  * 
803  *     cdef:
804  */
805
806 struct __pyx_vtabstruct_10TabProxies_GTFProxy {
807   struct __pyx_vtabstruct_10TabProxies_TupleProxy __pyx_base;
808   char *(*getAttributes)(struct __pyx_obj_10TabProxies_GTFProxy *);
809 };
810 static struct __pyx_vtabstruct_10TabProxies_GTFProxy *__pyx_vtabptr_10TabProxies_GTFProxy;
811
812
813 /* "cvcf.pyx":94
814  * ###########################################################################################################
815  * 
816  * cdef class VCFRecord( TabProxies.TupleProxy):             # <<<<<<<<<<<<<<
817  *     '''vcf record.
818  * 
819  */
820
821 struct __pyx_vtabstruct_4cvcf_VCFRecord {
822   struct __pyx_vtabstruct_10TabProxies_TupleProxy __pyx_base;
823 };
824 static struct __pyx_vtabstruct_4cvcf_VCFRecord *__pyx_vtabptr_4cvcf_VCFRecord;
825
826
827 /* "TabProxies.pxd":72
828  *     pass
829  * 
830  * cdef class BedProxy( NamedTupleProxy) :             # <<<<<<<<<<<<<<
831  * 
832  *     cdef:
833  */
834
835 struct __pyx_vtabstruct_10TabProxies_BedProxy {
836   struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy __pyx_base;
837 };
838 static struct __pyx_vtabstruct_10TabProxies_BedProxy *__pyx_vtabptr_10TabProxies_BedProxy;
839 #ifndef CYTHON_REFNANNY
840   #define CYTHON_REFNANNY 0
841 #endif
842 #if CYTHON_REFNANNY
843   typedef struct {
844     void (*INCREF)(void*, PyObject*, int);
845     void (*DECREF)(void*, PyObject*, int);
846     void (*GOTREF)(void*, PyObject*, int);
847     void (*GIVEREF)(void*, PyObject*, int);
848     void* (*SetupContext)(const char*, int, const char*);
849     void (*FinishContext)(void**);
850   } __Pyx_RefNannyAPIStruct;
851   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
852   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
853   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
854 #ifdef WITH_THREAD
855   #define __Pyx_RefNannySetupContext(name, acquire_gil) \
856           if (acquire_gil) { \
857               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
858               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
859               PyGILState_Release(__pyx_gilstate_save); \
860           } else { \
861               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
862           }
863 #else
864   #define __Pyx_RefNannySetupContext(name, acquire_gil) \
865           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
866 #endif
867   #define __Pyx_RefNannyFinishContext() \
868           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
869   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
870   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
871   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
872   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
873   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
874   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
875   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
876   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
877 #else
878   #define __Pyx_RefNannyDeclarations
879   #define __Pyx_RefNannySetupContext(name, acquire_gil)
880   #define __Pyx_RefNannyFinishContext()
881   #define __Pyx_INCREF(r) Py_INCREF(r)
882   #define __Pyx_DECREF(r) Py_DECREF(r)
883   #define __Pyx_GOTREF(r)
884   #define __Pyx_GIVEREF(r)
885   #define __Pyx_XINCREF(r) Py_XINCREF(r)
886   #define __Pyx_XDECREF(r) Py_XDECREF(r)
887   #define __Pyx_XGOTREF(r)
888   #define __Pyx_XGIVEREF(r)
889 #endif /* CYTHON_REFNANNY */
890 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
891 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
892
893 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
894
895 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
896     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
897
898 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
899
900 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
901     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
902     const char* function_name); /*proto*/
903
904 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
905     PyObject *r;
906     if (!j) return NULL;
907     r = PyObject_GetItem(o, j);
908     Py_DECREF(j);
909     return r;
910 }
911 #define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
912                                                     __Pyx_GetItemInt_List_Fast(o, i) : \
913                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
914 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
915     if (likely(o != Py_None)) {
916         if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
917             PyObject *r = PyList_GET_ITEM(o, i);
918             Py_INCREF(r);
919             return r;
920         }
921         else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
922             PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
923             Py_INCREF(r);
924             return r;
925         }
926     }
927     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
928 }
929 #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
930                                                     __Pyx_GetItemInt_Tuple_Fast(o, i) : \
931                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
932 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
933     if (likely(o != Py_None)) {
934         if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
935             PyObject *r = PyTuple_GET_ITEM(o, i);
936             Py_INCREF(r);
937             return r;
938         }
939         else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
940             PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
941             Py_INCREF(r);
942             return r;
943         }
944     }
945     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
946 }
947 #define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
948                                                     __Pyx_GetItemInt_Fast(o, i) : \
949                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
950 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
951     if (PyList_CheckExact(o)) {
952         Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
953         if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
954             PyObject *r = PyList_GET_ITEM(o, n);
955             Py_INCREF(r);
956             return r;
957         }
958     }
959     else if (PyTuple_CheckExact(o)) {
960         Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
961         if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
962             PyObject *r = PyTuple_GET_ITEM(o, n);
963             Py_INCREF(r);
964             return r;
965         }
966     }
967     else if (likely(i >= 0)) {
968         PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
969         if (likely(m && m->sq_item)) {
970             return m->sq_item(o, i);
971         }
972     }
973     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
974 }
975
976 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
977
978 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
979 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
980
981 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
982
983 static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
984 #define __Pyx_PyObject_AsDouble(obj) \
985 ((likely(PyFloat_CheckExact(obj))) ? \
986  PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
987
988 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
989
990 static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void);
991
992 #if PY_MAJOR_VERSION >= 3
993 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
994     PyObject *value;
995     if (unlikely(d == Py_None)) {
996         __Pyx_RaiseNoneIndexingError();
997         return NULL;
998     }
999     value = PyDict_GetItemWithError(d, key);
1000     if (unlikely(!value)) {
1001         if (!PyErr_Occurred())
1002             PyErr_SetObject(PyExc_KeyError, key);
1003         return NULL;
1004     }
1005     Py_INCREF(value);
1006     return value;
1007 }
1008 #else
1009     #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1010 #endif
1011
1012 static CYTHON_INLINE int __Pyx_NegateNonNeg(int b) {
1013     return unlikely(b < 0) ? b : !b;
1014 }
1015 static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
1016     return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
1017 }
1018
1019 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1020
1021 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1022
1023 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
1024
1025 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */
1026
1027 static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
1028     if (likely(PyList_CheckExact(L))) {
1029         if (PyList_Append(L, x) < 0) return NULL;
1030         Py_INCREF(Py_None);
1031         return Py_None; /* this is just to have an accurate signature */
1032     }
1033     else {
1034         PyObject *r, *m;
1035         m = __Pyx_GetAttrString(L, "append");
1036         if (!m) return NULL;
1037         r = PyObject_CallFunctionObjArgs(m, x, NULL);
1038         Py_DECREF(m);
1039         return r;
1040     }
1041 }
1042
1043 #define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
1044                                                     __Pyx_SetItemInt_Fast(o, i, v) : \
1045                                                     __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
1046 static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
1047     int r;
1048     if (!j) return -1;
1049     r = PyObject_SetItem(o, j, v);
1050     Py_DECREF(j);
1051     return r;
1052 }
1053 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
1054     if (PyList_CheckExact(o)) {
1055         Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
1056         if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
1057             PyObject* old = PyList_GET_ITEM(o, n);
1058             Py_INCREF(v);
1059             PyList_SET_ITEM(o, n, v);
1060             Py_DECREF(old);
1061             return 1;
1062         }
1063     }
1064     else if (likely(i >= 0)) {
1065         PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
1066         if (likely(m && m->sq_ass_item)) {
1067             return m->sq_ass_item(o, i, v);
1068         }
1069     }
1070     return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
1071 }
1072
1073 static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
1074
1075 #if PY_VERSION_HEX < 0x02050000
1076 #ifndef PyAnySet_CheckExact
1077 #define PyAnySet_CheckExact(ob) \
1078     ((ob)->ob_type == &PySet_Type || \
1079      (ob)->ob_type == &PyFrozenSet_Type)
1080 #define PySet_New(iterable) \
1081     PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
1082 #define Pyx_PyFrozenSet_New(iterable) \
1083     PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
1084 #define PySet_Size(anyset) \
1085     PyObject_Size((anyset))
1086 #define PySet_Contains(anyset, key) \
1087     PySequence_Contains((anyset), (key))
1088 #define PySet_Pop(set) \
1089     PyObject_CallMethod(set, (char *)"pop", NULL)
1090 static CYTHON_INLINE int PySet_Clear(PyObject *set) {
1091     PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL);
1092     if (!ret) return -1;
1093     Py_DECREF(ret); return 0;
1094 }
1095 static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
1096     PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key);
1097     if (!ret) return -1;
1098     Py_DECREF(ret); return 0;
1099 }
1100 static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
1101     PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key);
1102     if (!ret) return -1;
1103     Py_DECREF(ret); return 0;
1104 }
1105 #endif /* PyAnySet_CheckExact (<= Py2.4) */
1106 #endif /* < Py2.5  */
1107
1108 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
1109 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
1110
1111 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/
1112
1113 static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name);
1114
1115 static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/
1116
1117 static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
1118                                    PyObject *modname); /*proto*/
1119
1120 #define __Pyx_CyFunction_USED 1
1121 #include <structmember.h>
1122 #define __Pyx_CYFUNCTION_STATICMETHOD  0x01
1123 #define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
1124 #define __Pyx_CYFUNCTION_CCLASS        0x04
1125 #define __Pyx_CyFunction_GetClosure(f) \
1126     (((__pyx_CyFunctionObject *) (f))->func_closure)
1127 #define __Pyx_CyFunction_GetClassObj(f) \
1128     (((__pyx_CyFunctionObject *) (f))->func_classobj)
1129 #define __Pyx_CyFunction_Defaults(type, f) \
1130     ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
1131 #define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
1132     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
1133 typedef struct {
1134     PyCFunctionObject func;
1135     int flags;
1136     PyObject *func_dict;
1137     PyObject *func_weakreflist;
1138     PyObject *func_name;
1139     PyObject *func_doc;
1140     PyObject *func_code;
1141     PyObject *func_closure;
1142     PyObject *func_classobj; /* No-args super() class cell */
1143     void *defaults;
1144     int defaults_pyobjects;
1145     PyObject *defaults_tuple; /* Const defaults tuple */
1146     PyObject *(*defaults_getter)(PyObject *);
1147 } __pyx_CyFunctionObject;
1148 static PyTypeObject *__pyx_CyFunctionType = 0;
1149 #define __Pyx_CyFunction_NewEx(ml, flags, self, module, code) \
1150     __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, self, module, code)
1151 static PyObject *__Pyx_CyFunction_New(PyTypeObject *,
1152                                       PyMethodDef *ml, int flags,
1153                                       PyObject *self, PyObject *module,
1154                                       PyObject* code);
1155 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
1156                                                          size_t size,
1157                                                          int pyobjects);
1158 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
1159                                                             PyObject *tuple);
1160 static int __Pyx_CyFunction_init(void);
1161
1162 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t);
1163
1164 #include <string.h>
1165
1166 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
1167
1168 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
1169
1170 #if PY_MAJOR_VERSION >= 3
1171 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1172 #else
1173 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1174 #endif
1175
1176 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
1177
1178 static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
1179
1180 static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
1181
1182 static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
1183
1184 static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
1185
1186 static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
1187
1188 static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
1189
1190 static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
1191
1192 static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
1193
1194 static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
1195
1196 static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
1197
1198 static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
1199
1200 static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
1201
1202 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
1203
1204 static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
1205
1206 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
1207
1208 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
1209
1210 #define __Pyx_Generator_USED
1211 #include <structmember.h>
1212 typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
1213 typedef struct {
1214     PyObject_HEAD
1215     __pyx_generator_body_t body;
1216     PyObject *closure;
1217     int is_running;
1218     int resume_label;
1219     PyObject *exc_type;
1220     PyObject *exc_value;
1221     PyObject *exc_traceback;
1222     PyObject *gi_weakreflist;
1223     PyObject *classobj;
1224 } __pyx_GeneratorObject;
1225 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
1226                                                   PyObject *closure);
1227 static int __pyx_Generator_init(void);
1228
1229 static int __Pyx_check_binary_version(void);
1230
1231 #if !defined(__Pyx_PyIdentifier_FromString)
1232 #if PY_MAJOR_VERSION < 3
1233   #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
1234 #else
1235   #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
1236 #endif
1237 #endif
1238
1239 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
1240
1241 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
1242
1243 static void* __Pyx_GetVtable(PyObject *dict); /*proto*/
1244
1245 static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
1246
1247 typedef struct {
1248     int code_line;
1249     PyCodeObject* code_object;
1250 } __Pyx_CodeObjectCacheEntry;
1251 struct __Pyx_CodeObjectCache {
1252     int count;
1253     int max_count;
1254     __Pyx_CodeObjectCacheEntry* entries;
1255 };
1256 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1257 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1258 static PyCodeObject *__pyx_find_code_object(int code_line);
1259 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1260
1261 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1262                                int py_line, const char *filename); /*proto*/
1263
1264 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
1265
1266
1267 /* Module declarations from 'ctabix' */
1268 static PyTypeObject *__pyx_ptype_6ctabix_Tabixfile = 0;
1269 static PyTypeObject *__pyx_ptype_6ctabix_TabixIterator = 0;
1270 static PyTypeObject *__pyx_ptype_6ctabix_TabixHeaderIterator = 0;
1271 static PyTypeObject *__pyx_ptype_6ctabix_Parser = 0;
1272 static PyTypeObject *__pyx_ptype_6ctabix_asTuple = 0;
1273 static PyTypeObject *__pyx_ptype_6ctabix_asGTF = 0;
1274 static PyTypeObject *__pyx_ptype_6ctabix_asBed = 0;
1275 static PyTypeObject *__pyx_ptype_6ctabix_asVCF = 0;
1276 static PyTypeObject *__pyx_ptype_6ctabix_TabixIteratorParsed = 0;
1277 static PyTypeObject *__pyx_ptype_6ctabix_tabix_inplace_iterator = 0;
1278 static PyTypeObject *__pyx_ptype_6ctabix_tabix_copy_iterator = 0;
1279
1280 /* Module declarations from 'TabProxies' */
1281 static PyTypeObject *__pyx_ptype_10TabProxies_TupleProxy = 0;
1282 static PyTypeObject *__pyx_ptype_10TabProxies_GTFProxy = 0;
1283 static PyTypeObject *__pyx_ptype_10TabProxies_NamedTupleProxy = 0;
1284 static PyTypeObject *__pyx_ptype_10TabProxies_BedProxy = 0;
1285 static PyTypeObject *__pyx_ptype_10TabProxies_VCFProxy = 0;
1286
1287 /* Module declarations from 'cvcf' */
1288 static PyTypeObject *__pyx_ptype_4cvcf_VCFRecord = 0;
1289 static PyTypeObject *__pyx_ptype_4cvcf_asVCFRecord = 0;
1290 static PyTypeObject *__pyx_ptype_4cvcf___pyx_scope_struct__parse_data = 0;
1291 static PyTypeObject *__pyx_ptype_4cvcf___pyx_scope_struct_1_genexpr = 0;
1292 static PyTypeObject *__pyx_ptype_4cvcf___pyx_scope_struct_2__parse = 0;
1293 #define __Pyx_MODULE_NAME "cvcf"
1294 int __pyx_module_is_main_cvcf = 0;
1295
1296 /* Implementation of 'cvcf' */
1297 static PyObject *__pyx_builtin_object;
1298 static PyObject *__pyx_builtin_ValueError;
1299 static PyObject *__pyx_builtin_range;
1300 static PyObject *__pyx_builtin_enumerate;
1301 static PyObject *__pyx_builtin_map;
1302 static PyObject *__pyx_builtin_min;
1303 static PyObject *__pyx_builtin_zip;
1304 static PyObject *__pyx_builtin_StopIteration;
1305 static PyObject *__pyx_builtin_KeyError;
1306 static PyObject *__pyx_builtin_NotImplementedError;
1307 static PyObject *__pyx_pf_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_fa); /* proto */
1308 static PyObject *__pyx_pf_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string); /* proto */
1309 static int __pyx_pf_4cvcf_9VCFRecord___init__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf); /* proto */
1310 static int __pyx_pf_4cvcf_9VCFRecord_2__cinit__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf); /* proto */
1311 static PyObject *__pyx_pf_4cvcf_9VCFRecord_4error(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_error, PyObject *__pyx_v_opt); /* proto */
1312 static Py_ssize_t __pyx_pf_4cvcf_9VCFRecord_6__len__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1313 static PyObject *__pyx_pf_4cvcf_9VCFRecord_6contig___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1314 static PyObject *__pyx_pf_4cvcf_9VCFRecord_3pos___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1315 static PyObject *__pyx_pf_4cvcf_9VCFRecord_2id___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1316 static PyObject *__pyx_pf_4cvcf_9VCFRecord_3ref___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1317 static PyObject *__pyx_pf_4cvcf_9VCFRecord_3alt___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1318 static PyObject *__pyx_pf_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1319 static PyObject *__pyx_pf_4cvcf_9VCFRecord_6filter___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1320 static PyObject *__pyx_pf_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1321 static PyObject *__pyx_pf_4cvcf_9VCFRecord_6format___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1322 static PyObject *__pyx_pf_4cvcf_9VCFRecord_7samples___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self); /* proto */
1323 static PyObject *__pyx_pf_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
1324 static int __pyx_pf_4cvcf_11asVCFRecord___init__(struct __pyx_obj_4cvcf_asVCFRecord *__pyx_v_self, PyObject *__pyx_v_vcffile); /* proto */
1325 static PyObject *__pyx_pf_4cvcf_11asVCFRecord_2__call__(struct __pyx_obj_4cvcf_asVCFRecord *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len); /* proto */
1326 static PyObject *__pyx_pf_4cvcf_3VCF_85__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1327 static PyObject *__pyx_pf_4cvcf_3VCF___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v__copy, PyObject *__pyx_v_reference, PyObject *__pyx_v_regions, PyObject *__pyx_v_lines, PyObject *__pyx_v_leftalign); /* proto */
1328 static PyObject *__pyx_pf_4cvcf_3VCF_2error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_error, PyObject *__pyx_v_opt); /* proto */
1329 static PyObject *__pyx_pf_4cvcf_3VCF_87__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1330 static PyObject *__pyx_pf_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_format, PyObject *__pyx_v_filter); /* proto */
1331 static PyObject *__pyx_pf_4cvcf_3VCF_89__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1332 static PyObject *__pyx_pf_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fmt, PyObject *__pyx_v_filter); /* proto */
1333 static PyObject *__pyx_pf_4cvcf_3VCF_8get_expected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_alt); /* proto */
1334 static PyObject *__pyx_pf_4cvcf_3VCF_10_add_definition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_key, PyObject *__pyx_v_data, PyObject *__pyx_v_line); /* proto */
1335 static PyObject *__pyx_pf_4cvcf_3VCF_91__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1336 static PyObject *__pyx_pf_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_format, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_separator); /* proto */
1337 static PyObject *__pyx_pf_4cvcf_3VCF_14enter_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1338 static PyObject *__pyx_pf_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line); /* proto */
1339 static PyObject *__pyx_pf_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
1340 static PyObject *__pyx_pf_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line); /* proto */
1341 static PyObject *__pyx_pf_4cvcf_3VCF_22write_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
1342 static PyObject *__pyx_pf_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_GTstring); /* proto */
1343 static PyObject *__pyx_pf_4cvcf_3VCF_26convertGTback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_GTdata); /* proto */
1344 static PyObject *__pyx_pf_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_line); /* proto */
1345 static PyObject *__pyx_pf_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_pos); /* proto */
1346 static PyObject *__pyx_pf_4cvcf_3VCF_93__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1347 static PyObject *__pyx_pf_4cvcf_3VCF_10parse_data_genexpr(PyObject *__pyx_self); /* proto */
1348 static PyObject *__pyx_pf_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_lineparse); /* proto */
1349 static PyObject *__pyx_pf_4cvcf_3VCF_34write_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_data); /* proto */
1350 static PyObject *__pyx_pf_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
1351 static PyObject *__pyx_pf_4cvcf_3VCF_38_parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_stream); /* proto */
1352 static PyObject *__pyx_pf_4cvcf_3VCF_41getsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1353 static PyObject *__pyx_pf_4cvcf_3VCF_43setsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_samples); /* proto */
1354 static PyObject *__pyx_pf_4cvcf_3VCF_45getheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1355 static PyObject *__pyx_pf_4cvcf_3VCF_47setheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_header); /* proto */
1356 static PyObject *__pyx_pf_4cvcf_3VCF_49getinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1357 static PyObject *__pyx_pf_4cvcf_3VCF_51setinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_info); /* proto */
1358 static PyObject *__pyx_pf_4cvcf_3VCF_53getformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1359 static PyObject *__pyx_pf_4cvcf_3VCF_55setformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
1360 static PyObject *__pyx_pf_4cvcf_3VCF_57getfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
1361 static PyObject *__pyx_pf_4cvcf_3VCF_59setfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filter); /* proto */
1362 static PyObject *__pyx_pf_4cvcf_3VCF_61setversion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_version); /* proto */
1363 static PyObject *__pyx_pf_4cvcf_3VCF_63setregions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_regions); /* proto */
1364 static PyObject *__pyx_pf_4cvcf_3VCF_65setreference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ref); /* proto */
1365 static PyObject *__pyx_pf_4cvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring); /* proto */
1366 static PyObject *__pyx_pf_4cvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring); /* proto */
1367 static PyObject *__pyx_pf_4cvcf_3VCF_71parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
1368 static PyObject *__pyx_pf_4cvcf_3VCF_73write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_datagenerator); /* proto */
1369 static PyObject *__pyx_pf_4cvcf_3VCF_75writeheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream); /* proto */
1370 static PyObject *__pyx_pf_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_pos1, PyObject *__pyx_v_ref1, PyObject *__pyx_v_alt1, PyObject *__pyx_v_pos2, PyObject *__pyx_v_ref2, PyObject *__pyx_v_alt2); /* proto */
1371 static PyObject *__pyx_pf_4cvcf_3VCF_79connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
1372 static PyObject *__pyx_pf_4cvcf_3VCF_81fetch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region); /* proto */
1373 static PyObject *__pyx_pf_4cvcf_3VCF_83validate(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_record); /* proto */
1374 static char __pyx_k_1[] = "";
1375 static char __pyx_k_2[] = ",";
1376 static char __pyx_k_4[] = ":";
1377 static char __pyx_k_6[] = "-";
1378 static char __pyx_k_8[] = "Don't understand region string '%s'";
1379 static char __pyx_k_9[] = ".";
1380 static char __pyx_k_11[] = ";";
1381 static char __pyx_k_14[] = "=";
1382 static char __pyx_k_18[] = "BAD_NUMBER_OF_VALUES";
1383 static char __pyx_k_19[] = "(found %s values in element %s; expected %s)";
1384 static char __pyx_k_20[] = "BAD_NUMBER_OF_PARAMETERS";
1385 static char __pyx_k_21[] = "id=%s, expected %s parameters, got %s";
1386 static char __pyx_k_24[] = " in line %s: '%s'\n%s %s: %s\n";
1387 static char __pyx_k_25[] = "<";
1388 static char __pyx_k_27[] = "V40_MISSING_ANGLE_BRACKETS";
1389 static char __pyx_k_28[] = ">";
1390 static char __pyx_k_32[] = "\"";
1391 static char __pyx_k_36[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS";
1392 static char __pyx_k_37[] = "BADLY_FORMATTED_FORMAT_STRING";
1393 static char __pyx_k_38[] = "ID=";
1394 static char __pyx_k_39[] = "Number=";
1395 static char __pyx_k_40[] = "Type=";
1396 static char __pyx_k_41[] = "Description=";
1397 static char __pyx_k_50[] = "FORMAT_MISSING_QUOTES";
1398 static char __pyx_k_53[] = "#alleles";
1399 static char __pyx_k_54[] = "#nonref_alleles";
1400 static char __pyx_k_55[] = "#genotypes";
1401 static char __pyx_k_56[] = "#phased_genotypes";
1402 static char __pyx_k_57[] = "ZERO_FOR_NON_FLAG_FIELD";
1403 static char __pyx_k_58[] = "Unknown number type encountered: %s";
1404 static char __pyx_k_59[] = "%s=%s";
1405 static char __pyx_k_60[] = "(Undefined tag)";
1406 static char __pyx_k_61[] = "(output)";
1407 static char __pyx_k_64[] = "Read depth at this position for this sample";
1408 static char __pyx_k_65[] = "Sample Genotype Filter";
1409 static char __pyx_k_66[] = "Genotype likelihoods";
1410 static char __pyx_k_67[] = "Genotype Quality";
1411 static char __pyx_k_68[] = "Phred-scaled genotype likelihoods";
1412 static char __pyx_k_69[] = "Genotype posterior probabilities";
1413 static char __pyx_k_70[] = "Conditional genotype quality";
1414 static char __pyx_k_71[] = "Haplotype Quality";
1415 static char __pyx_k_72[] = "Phase set";
1416 static char __pyx_k_73[] = "Phasing quality";
1417 static char __pyx_k_74[] = "Expected alternate allel counts";
1418 static char __pyx_k_75[] = "RMS mapping quality";
1419 static char __pyx_k_76[] = "##";
1420 static char __pyx_k_79[] = "VCFv3.3";
1421 static char __pyx_k_80[] = "VCFv4.0";
1422 static char __pyx_k_81[] = "VCFv4.1";
1423 static char __pyx_k_82[] = "UNKNOWN_FORMAT_STRING";
1424 static char __pyx_k_83[] = "##fileformat=VCFv%s.%s\n";
1425 static char __pyx_k_84[] = "##%s=%s\n";
1426 static char __pyx_k_85[] = "#";
1427 static char __pyx_k_88[] = "\t";
1428 static char __pyx_k_90[] = "HEADING_NOT_SEPARATED_BY_TABS";
1429 static char __pyx_k_91[] = "(%sth entry not found)";
1430 static char __pyx_k_92[] = "(found %s, expected %s)";
1431 static char __pyx_k_93[] = "BADLY_FORMATTED_HEADING";
1432 static char __pyx_k_94[] = "\n";
1433 static char __pyx_k_95[] = "|";
1434 static char __pyx_k_96[] = "ERROR_FLAG_HAS_VALUE";
1435 static char __pyx_k__0[] = "0";
1436 static char __pyx_k__A[] = "A";
1437 static char __pyx_k__D[] = "D";
1438 static char __pyx_k__G[] = "G";
1439 static char __pyx_k__I[] = "I";
1440 static char __pyx_k__N[] = "N";
1441 static char __pyx_k__a[] = "a";
1442 static char __pyx_k__c[] = "c";
1443 static char __pyx_k__d[] = "d";
1444 static char __pyx_k__f[] = "f";
1445 static char __pyx_k__i[] = "i";
1446 static char __pyx_k__k[] = "k";
1447 static char __pyx_k__l[] = "l";
1448 static char __pyx_k__n[] = "n";
1449 static char __pyx_k__r[] = "r";
1450 static char __pyx_k__s[] = "s";
1451 static char __pyx_k__t[] = "t";
1452 static char __pyx_k__v[] = "v";
1453 static char __pyx_k__x[] = "x";
1454 static char __pyx_k__y[] = "y";
1455 static char __pyx_k_100[] = "ERROR_FORMAT_NOT_INTEGER";
1456 static char __pyx_k_101[] = "ERROR_FORMAT_NOT_CHAR";
1457 static char __pyx_k_102[] = "ERROR_FORMAT_NOT_NUMERICAL";
1458 static char __pyx_k_104[] = "BAD_NUMBER_OF_COLUMNS";
1459 static char __pyx_k_105[] = "expected %s for %s samples (%s), got %s";
1460 static char __pyx_k_106[] = "(reference is %s, VCF says %s)";
1461 static char __pyx_k_114[] = "V33_UNMATCHED_DELETION";
1462 static char __pyx_k_115[] = "(deletion is %s, reference is %s)";
1463 static char __pyx_k_116[] = "MISSING_INDEL_ALLELE_REF_BASE";
1464 static char __pyx_k_118[] = "Required key %s not found in data";
1465 static char __pyx_k_121[] = "enter_default_format";
1466 static char __pyx_k_123[] = "Can only handle v3.3 and v4.0 VCF files";
1467 static char __pyx_k_125[] = "Invalid error string: %s";
1468 static char __pyx_k_126[] = "needs to be checked";
1469 static char __pyx_k_128[] = "[|/\\\\]";
1470 static char __pyx_k_130[] = "^[ACGTN]+$";
1471 static char __pyx_k_134[] = "/ifs/devel/pysam/pysam/cvcf.pyx";
1472 static char __pyx_k_137[] = "id numbertype number type description missingvalue";
1473 static char __pyx_k_139[] = "UNKNOWN_FORMAT_STRING:Unknown file format identifier";
1474 static char __pyx_k_140[] = "BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string";
1475 static char __pyx_k_141[] = "BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s";
1476 static char __pyx_k_142[] = "BAD_NUMBER_OF_COLUMNS:Wrong number of columns found (%s)";
1477 static char __pyx_k_143[] = "POS_NOT_NUMERICAL:Position column is not numerical";
1478 static char __pyx_k_144[] = "UNKNOWN_CHAR_IN_REF:Unknown character in reference field";
1479 static char __pyx_k_145[] = "V33_BAD_REF:Reference should be single-character in v3.3 VCF";
1480 static char __pyx_k_146[] = "V33_BAD_ALLELE:Cannot interpret allele for v3.3 VCF";
1481 static char __pyx_k_147[] = "POS_NOT_POSITIVE:Position field must be >0";
1482 static char __pyx_k_148[] = "QUAL_NOT_NUMERICAL:Quality field must be numerical, or '.'";
1483 static char __pyx_k_149[] = "ERROR_INFO_STRING:Error while parsing info field";
1484 static char __pyx_k_150[] = "ERROR_UNKNOWN_KEY:Unknown key (%s) found in formatted field (info; format; or filter)";
1485 static char __pyx_k_151[] = "ERROR_FORMAT_NOT_NUMERICAL:Expected integer or float in formatted field; got %s";
1486 static char __pyx_k_152[] = "ERROR_FORMAT_NOT_CHAR:Eexpected character in formatted field; got string";
1487 static char __pyx_k_153[] = "FILTER_NOT_DEFINED:Identifier (%s) in filter found which was not defined in header";
1488 static char __pyx_k_154[] = "FORMAT_NOT_DEFINED:Identifier (%s) in format found which was not defined in header";
1489 static char __pyx_k_155[] = "BAD_NUMBER_OF_VALUES:Found too many of values in sample column (%s)";
1490 static char __pyx_k_156[] = "BAD_NUMBER_OF_PARAMETERS:Found unexpected number of parameters (%s)";
1491 static char __pyx_k_157[] = "BAD_GENOTYPE:Cannot parse genotype (%s)";
1492 static char __pyx_k_158[] = "V40_BAD_ALLELE:Bad allele found for v4.0 VCF (%s)";
1493 static char __pyx_k_159[] = "MISSING_REF:Reference allele missing";
1494 static char __pyx_k_160[] = "V33_UNMATCHED_DELETION:Deleted sequence does not match reference (%s)";
1495 static char __pyx_k_161[] = "V40_MISSING_ANGLE_BRACKETS:Format definition is not deliminted by angular brackets";
1496 static char __pyx_k_162[] = "FORMAT_MISSING_QUOTES:Description field in format definition is not surrounded by quotes";
1497 static char __pyx_k_163[] = "V40_FORMAT_MUST_HAVE_NAMED_FIELDS:Fields in v4.0 VCF format definition must have named fields";
1498 static char __pyx_k_164[] = "HEADING_NOT_SEPARATED_BY_TABS:Heading line appears separated by spaces, not tabs";
1499 static char __pyx_k_165[] = "WRONG_REF:Wrong reference %s";
1500 static char __pyx_k_166[] = "ERROR_TRAILING_DATA:Numerical field ('%s') has semicolon-separated trailing data";
1501 static char __pyx_k_167[] = "BAD_CHR_TAG:Error calculating chr tag for %s";
1502 static char __pyx_k_168[] = "ZERO_LENGTH_ALLELE:Found zero-length allele";
1503 static char __pyx_k_169[] = "MISSING_INDEL_ALLELE_REF_BASE:Indel alleles must begin with single reference base";
1504 static char __pyx_k_170[] = "ZERO_FOR_NON_FLAG_FIELD: number set to 0, but type is not 'FLAG'";
1505 static char __pyx_k_171[] = "ERROR_FORMAT_NOT_INTEGER:Expected integer in formatted field; got %s";
1506 static char __pyx_k_172[] = "ERROR_FLAG_HAS_VALUE:Flag fields should not have a value";
1507 static char __pyx_k__DP[] = "DP";
1508 static char __pyx_k__EC[] = "EC";
1509 static char __pyx_k__FT[] = "FT";
1510 static char __pyx_k__GL[] = "GL";
1511 static char __pyx_k__GP[] = "GP";
1512 static char __pyx_k__GQ[] = "GQ";
1513 static char __pyx_k__GT[] = "GT";
1514 static char __pyx_k__HQ[] = "HQ";
1515 static char __pyx_k__ID[] = "ID";
1516 static char __pyx_k__MQ[] = "MQ";
1517 static char __pyx_k__PL[] = "PL";
1518 static char __pyx_k__PQ[] = "PQ";
1519 static char __pyx_k__PS[] = "PS";
1520 static char __pyx_k__fa[] = "fa";
1521 static char __pyx_k__id[] = "id";
1522 static char __pyx_k__na[] = "na";
1523 static char __pyx_k__re[] = "re";
1524 static char __pyx_k__ALT[] = "ALT";
1525 static char __pyx_k__GLE[] = "GLE";
1526 static char __pyx_k__POS[] = "POS";
1527 static char __pyx_k__REF[] = "REF";
1528 static char __pyx_k__VCF[] = "VCF";
1529 static char __pyx_k__add[] = "add";
1530 static char __pyx_k__alt[] = "alt";
1531 static char __pyx_k__end[] = "end";
1532 static char __pyx_k__err[] = "err";
1533 static char __pyx_k__fmt[] = "fmt";
1534 static char __pyx_k__get[] = "get";
1535 static char __pyx_k__gts[] = "gts";
1536 static char __pyx_k__idx[] = "idx";
1537 static char __pyx_k__key[] = "key";
1538 static char __pyx_k__len[] = "len";
1539 static char __pyx_k__map[] = "map";
1540 static char __pyx_k__min[] = "min";
1541 static char __pyx_k__nmb[] = "nmb";
1542 static char __pyx_k__opt[] = "opt";
1543 static char __pyx_k__pos[] = "pos";
1544 static char __pyx_k__ref[] = "ref";
1545 static char __pyx_k__sys[] = "sys";
1546 static char __pyx_k__var[] = "var";
1547 static char __pyx_k__vcf[] = "vcf";
1548 static char __pyx_k__zip[] = "zip";
1549 static char __pyx_k__Flag[] = "Flag";
1550 static char __pyx_k__INFO[] = "INFO";
1551 static char __pyx_k__PASS[] = "PASS";
1552 static char __pyx_k__QUAL[] = "QUAL";
1553 static char __pyx_k__Type[] = "Type";
1554 static char __pyx_k__addn[] = "addn";
1555 static char __pyx_k__alt1[] = "alt1";
1556 static char __pyx_k__alt2[] = "alt2";
1557 static char __pyx_k__cols[] = "cols";
1558 static char __pyx_k__copy[] = "copy";
1559 static char __pyx_k__cvcf[] = "cvcf";
1560 static char __pyx_k__data[] = "data";
1561 static char __pyx_k__dict[] = "dict";
1562 static char __pyx_k__elts[] = "elts";
1563 static char __pyx_k__find[] = "find";
1564 static char __pyx_k__info[] = "info";
1565 static char __pyx_k__join[] = "join";
1566 static char __pyx_k__keys[] = "keys";
1567 static char __pyx_k__last[] = "last";
1568 static char __pyx_k__left[] = "left";
1569 static char __pyx_k__line[] = "line";
1570 static char __pyx_k__pos1[] = "pos1";
1571 static char __pyx_k__pos2[] = "pos2";
1572 static char __pyx_k__qual[] = "qual";
1573 static char __pyx_k__ref1[] = "ref1";
1574 static char __pyx_k__ref2[] = "ref2";
1575 static char __pyx_k__rest[] = "rest";
1576 static char __pyx_k__self[] = "self";
1577 static char __pyx_k__type[] = "type";
1578 static char __pyx_k__ACGTN[] = "ACGTN";
1579 static char __pyx_k__CHROM[] = "CHROM";
1580 static char __pyx_k__Error[] = "Error";
1581 static char __pyx_k__Float[] = "Float";
1582 static char __pyx_k___copy[] = "_copy";
1583 static char __pyx_k___info[] = "_info";
1584 static char __pyx_k___line[] = "_line";
1585 static char __pyx_k__addns[] = "addns";
1586 static char __pyx_k__blurp[] = "blurp";
1587 static char __pyx_k__chrom[] = "chrom";
1588 static char __pyx_k__descr[] = "descr";
1589 static char __pyx_k__error[] = "error";
1590 static char __pyx_k__faref[] = "faref";
1591 static char __pyx_k__fetch[] = "fetch";
1592 static char __pyx_k__first[] = "first";
1593 static char __pyx_k__ielts[] = "ielts";
1594 static char __pyx_k__label[] = "label";
1595 static char __pyx_k__lines[] = "lines";
1596 static char __pyx_k__match[] = "match";
1597 static char __pyx_k__parse[] = "parse";
1598 static char __pyx_k__pysam[] = "pysam";
1599 static char __pyx_k__range[] = "range";
1600 static char __pyx_k__sdata[] = "sdata";
1601 static char __pyx_k__split[] = "split";
1602 static char __pyx_k__start[] = "start";
1603 static char __pyx_k__strip[] = "strip";
1604 static char __pyx_k__upper[] = "upper";
1605 static char __pyx_k__value[] = "value";
1606 static char __pyx_k__write[] = "write";
1607 static char __pyx_k__FILTER[] = "FILTER";
1608 static char __pyx_k__FORMAT[] = "FORMAT";
1609 static char __pyx_k__GTdata[] = "GTdata";
1610 static char __pyx_k__Number[] = "Number";
1611 static char __pyx_k__String[] = "String";
1612 static char __pyx_k___lines[] = "_lines";
1613 static char __pyx_k___parse[] = "_parse";
1614 static char __pyx_k__allele[] = "allele";
1615 static char __pyx_k__bisect[] = "bisect";
1616 static char __pyx_k__buffer[] = "buffer";
1617 static char __pyx_k__filter[] = "filter";
1618 static char __pyx_k__format[] = "format";
1619 static char __pyx_k__header[] = "header";
1620 static char __pyx_k__number[] = "number";
1621 static char __pyx_k__object[] = "object";
1622 static char __pyx_k__output[] = "output";
1623 static char __pyx_k__parser[] = "parser";
1624 static char __pyx_k__record[] = "record";
1625 static char __pyx_k__region[] = "region";
1626 static char __pyx_k__result[] = "result";
1627 static char __pyx_k__sample[] = "sample";
1628 static char __pyx_k__stream[] = "stream";
1629 static char __pyx_k__string[] = "string";
1630 static char __pyx_k__values[] = "values";
1631 static char __pyx_k__Integer[] = "Integer";
1632 static char __pyx_k__Warning[] = "Warning";
1633 static char __pyx_k____all__[] = "__all__";
1634 static char __pyx_k___errors[] = "_errors";
1635 static char __pyx_k___filter[] = "_filter";
1636 static char __pyx_k___format[] = "_format";
1637 static char __pyx_k___header[] = "_header";
1638 static char __pyx_k___lineno[] = "_lineno";
1639 static char __pyx_k__compile[] = "compile";
1640 static char __pyx_k__connect[] = "connect";
1641 static char __pyx_k__errwarn[] = "errwarn";
1642 static char __pyx_k__genexpr[] = "genexpr";
1643 static char __pyx_k__getinfo[] = "getinfo";
1644 static char __pyx_k__longest[] = "longest";
1645 static char __pyx_k__missing[] = "missing";
1646 static char __pyx_k__movable[] = "movable";
1647 static char __pyx_k__newalts[] = "newalts";
1648 static char __pyx_k__regions[] = "regions";
1649 static char __pyx_k__replace[] = "replace";
1650 static char __pyx_k__samples[] = "samples";
1651 static char __pyx_k__setinfo[] = "setinfo";
1652 static char __pyx_k__vcffile[] = "vcffile";
1653 static char __pyx_k__version[] = "version";
1654 static char __pyx_k__GTstring[] = "GTstring";
1655 static char __pyx_k__Genotype[] = "Genotype";
1656 static char __pyx_k__KeyError[] = "KeyError";
1657 static char __pyx_k____dict__[] = "__dict__";
1658 static char __pyx_k____init__[] = "__init__";
1659 static char __pyx_k____main__[] = "__main__";
1660 static char __pyx_k____test__[] = "__test__";
1661 static char __pyx_k___regions[] = "_regions";
1662 static char __pyx_k___samples[] = "_samples";
1663 static char __pyx_k___version[] = "_version";
1664 static char __pyx_k__deepcopy[] = "deepcopy";
1665 static char __pyx_k__endswith[] = "endswith";
1666 static char __pyx_k__expected[] = "expected";
1667 static char __pyx_k__filename[] = "filename";
1668 static char __pyx_k__gtsRegEx[] = "gtsRegEx";
1669 static char __pyx_k__headings[] = "headings";
1670 static char __pyx_k__inregion[] = "inregion";
1671 static char __pyx_k__operator[] = "operator";
1672 static char __pyx_k__required[] = "required";
1673 static char __pyx_k__sequence[] = "sequence";
1674 static char __pyx_k__shortest[] = "shortest";
1675 static char __pyx_k__validate[] = "validate";
1676 static char __pyx_k__Character[] = "Character";
1677 static char __pyx_k__NT_NUMBER[] = "NT_NUMBER";
1678 static char __pyx_k__Tabixfile[] = "Tabixfile";
1679 static char __pyx_k__VCFRecord[] = "VCFRecord";
1680 static char __pyx_k__WRONG_REF[] = "WRONG_REF";
1681 static char __pyx_k___required[] = "_required";
1682 static char __pyx_k__convertGT[] = "convertGT";
1683 static char __pyx_k__enumerate[] = "enumerate";
1684 static char __pyx_k__getfilter[] = "getfilter";
1685 static char __pyx_k__getformat[] = "getformat";
1686 static char __pyx_k__getheader[] = "getheader";
1687 static char __pyx_k__last_line[] = "last_line";
1688 static char __pyx_k__leftalign[] = "leftalign";
1689 static char __pyx_k__lineparse[] = "lineparse";
1690 static char __pyx_k__reference[] = "reference";
1691 static char __pyx_k__separator[] = "separator";
1692 static char __pyx_k__setfilter[] = "setfilter";
1693 static char __pyx_k__setformat[] = "setformat";
1694 static char __pyx_k__setheader[] = "setheader";
1695 static char __pyx_k__tabixfile[] = "tabixfile";
1696 static char __pyx_k__warnerror[] = "warnerror";
1697 static char __pyx_k__NT_ALLELES[] = "NT_ALLELES";
1698 static char __pyx_k__NT_UNKNOWN[] = "NT_UNKNOWN";
1699 static char __pyx_k__ValueError[] = "ValueError";
1700 static char __pyx_k___leftalign[] = "_leftalign";
1701 static char __pyx_k___reference[] = "_reference";
1702 static char __pyx_k__errorlabel[] = "errorlabel";
1703 static char __pyx_k__fileformat[] = "fileformat";
1704 static char __pyx_k__formatdict[] = "formatdict";
1705 static char __pyx_k__getsamples[] = "getsamples";
1706 static char __pyx_k__itemgetter[] = "itemgetter";
1707 static char __pyx_k__itervalues[] = "itervalues";
1708 static char __pyx_k__namedtuple[] = "namedtuple";
1709 static char __pyx_k__numbertype[] = "numbertype";
1710 static char __pyx_k__parse_data[] = "parse_data";
1711 static char __pyx_k__setregions[] = "setregions";
1712 static char __pyx_k__setsamples[] = "setsamples";
1713 static char __pyx_k__setversion[] = "setversion";
1714 static char __pyx_k__startswith[] = "startswith";
1715 static char __pyx_k__write_data[] = "write_data";
1716 static char __pyx_k__Description[] = "Description";
1717 static char __pyx_k__MISSING_REF[] = "MISSING_REF";
1718 static char __pyx_k__V33_BAD_REF[] = "V33_BAD_REF";
1719 static char __pyx_k__alleleRegEx[] = "alleleRegEx";
1720 static char __pyx_k__collections[] = "collections";
1721 static char __pyx_k__defaultdict[] = "defaultdict";
1722 static char __pyx_k__description[] = "description";
1723 static char __pyx_k__errorstring[] = "errorstring";
1724 static char __pyx_k__ignoreerror[] = "ignoreerror";
1725 static char __pyx_k__writeheader[] = "writeheader";
1726 static char __pyx_k__BAD_GENOTYPE[] = "BAD_GENOTYPE";
1727 static char __pyx_k__NT_GENOTYPES[] = "NT_GENOTYPES";
1728 static char __pyx_k___warn_errors[] = "_warn_errors";
1729 static char __pyx_k__get_expected[] = "get_expected";
1730 static char __pyx_k__get_sequence[] = "get_sequence";
1731 static char __pyx_k__missingvalue[] = "missingvalue";
1732 static char __pyx_k__parse_format[] = "parse_format";
1733 static char __pyx_k__parse_header[] = "parse_header";
1734 static char __pyx_k__setreference[] = "setreference";
1735 static char __pyx_k__write_header[] = "write_header";
1736 static char __pyx_k__NT_NR_ALLELES[] = "NT_NR_ALLELES";
1737 static char __pyx_k__StopIteration[] = "StopIteration";
1738 static char __pyx_k___parse_header[] = "_parse_header";
1739 static char __pyx_k__compare_calls[] = "compare_calls";
1740 static char __pyx_k__convertGTback[] = "convertGTback";
1741 static char __pyx_k__datagenerator[] = "datagenerator";
1742 static char __pyx_k__format_format[] = "format_format";
1743 static char __pyx_k__parse_heading[] = "parse_heading";
1744 static char __pyx_k__parse_regions[] = "parse_regions";
1745 static char __pyx_k__write_heading[] = "write_heading";
1746 static char __pyx_k__V33_BAD_ALLELE[] = "V33_BAD_ALLELE";
1747 static char __pyx_k__V40_BAD_ALLELE[] = "V40_BAD_ALLELE";
1748 static char __pyx_k___sample2column[] = "_sample2column";
1749 static char __pyx_k__have_deletions[] = "have_deletions";
1750 static char __pyx_k___add_definition[] = "_add_definition";
1751 static char __pyx_k___ignored_errors[] = "_ignored_errors";
1752 static char __pyx_k__faref_leftflank[] = "faref_leftflank";
1753 static char __pyx_k__POS_NOT_POSITIVE[] = "POS_NOT_POSITIVE";
1754 static char __pyx_k__parse_formatdata[] = "parse_formatdata";
1755 static char __pyx_k__ERROR_INFO_STRING[] = "ERROR_INFO_STRING";
1756 static char __pyx_k__ERROR_UNKNOWN_KEY[] = "ERROR_UNKNOWN_KEY";
1757 static char __pyx_k__POS_NOT_NUMERICAL[] = "POS_NOT_NUMERICAL";
1758 static char __pyx_k__format_formatdata[] = "format_formatdata";
1759 static char __pyx_k__FILTER_NOT_DEFINED[] = "FILTER_NOT_DEFINED";
1760 static char __pyx_k__FORMAT_NOT_DEFINED[] = "FORMAT_NOT_DEFINED";
1761 static char __pyx_k__QUAL_NOT_NUMERICAL[] = "QUAL_NOT_NUMERICAL";
1762 static char __pyx_k__ZERO_LENGTH_ALLELE[] = "ZERO_LENGTH_ALLELE";
1763 static char __pyx_k__ERROR_TRAILING_DATA[] = "ERROR_TRAILING_DATA";
1764 static char __pyx_k__NT_PHASED_GENOTYPES[] = "NT_PHASED_GENOTYPES";
1765 static char __pyx_k__NotImplementedError[] = "NotImplementedError";
1766 static char __pyx_k__UNKNOWN_CHAR_IN_REF[] = "UNKNOWN_CHAR_IN_REF";
1767 static PyObject *__pyx_kp_s_1;
1768 static PyObject *__pyx_n_s_100;
1769 static PyObject *__pyx_n_s_101;
1770 static PyObject *__pyx_n_s_102;
1771 static PyObject *__pyx_n_s_104;
1772 static PyObject *__pyx_kp_s_105;
1773 static PyObject *__pyx_kp_s_106;
1774 static PyObject *__pyx_kp_s_11;
1775 static PyObject *__pyx_n_s_114;
1776 static PyObject *__pyx_kp_s_115;
1777 static PyObject *__pyx_n_s_116;
1778 static PyObject *__pyx_kp_s_118;
1779 static PyObject *__pyx_n_s_121;
1780 static PyObject *__pyx_kp_s_123;
1781 static PyObject *__pyx_kp_s_125;
1782 static PyObject *__pyx_kp_s_126;
1783 static PyObject *__pyx_kp_s_128;
1784 static PyObject *__pyx_kp_s_130;
1785 static PyObject *__pyx_kp_s_134;
1786 static PyObject *__pyx_kp_s_137;
1787 static PyObject *__pyx_kp_s_139;
1788 static PyObject *__pyx_kp_s_14;
1789 static PyObject *__pyx_kp_s_140;
1790 static PyObject *__pyx_kp_s_141;
1791 static PyObject *__pyx_kp_s_142;
1792 static PyObject *__pyx_kp_s_143;
1793 static PyObject *__pyx_kp_s_144;
1794 static PyObject *__pyx_kp_s_145;
1795 static PyObject *__pyx_kp_s_146;
1796 static PyObject *__pyx_kp_s_147;
1797 static PyObject *__pyx_kp_s_148;
1798 static PyObject *__pyx_kp_s_149;
1799 static PyObject *__pyx_kp_s_150;
1800 static PyObject *__pyx_kp_s_151;
1801 static PyObject *__pyx_kp_s_152;
1802 static PyObject *__pyx_kp_s_153;
1803 static PyObject *__pyx_kp_s_154;
1804 static PyObject *__pyx_kp_s_155;
1805 static PyObject *__pyx_kp_s_156;
1806 static PyObject *__pyx_kp_s_157;
1807 static PyObject *__pyx_kp_s_158;
1808 static PyObject *__pyx_kp_s_159;
1809 static PyObject *__pyx_kp_s_160;
1810 static PyObject *__pyx_kp_s_161;
1811 static PyObject *__pyx_kp_s_162;
1812 static PyObject *__pyx_kp_s_163;
1813 static PyObject *__pyx_kp_s_164;
1814 static PyObject *__pyx_kp_s_165;
1815 static PyObject *__pyx_kp_s_166;
1816 static PyObject *__pyx_kp_s_167;
1817 static PyObject *__pyx_kp_s_168;
1818 static PyObject *__pyx_kp_s_169;
1819 static PyObject *__pyx_kp_s_170;
1820 static PyObject *__pyx_kp_s_171;
1821 static PyObject *__pyx_kp_s_172;
1822 static PyObject *__pyx_n_s_18;
1823 static PyObject *__pyx_kp_s_19;
1824 static PyObject *__pyx_kp_s_2;
1825 static PyObject *__pyx_n_s_20;
1826 static PyObject *__pyx_kp_s_21;
1827 static PyObject *__pyx_kp_s_24;
1828 static PyObject *__pyx_kp_s_25;
1829 static PyObject *__pyx_n_s_27;
1830 static PyObject *__pyx_kp_s_28;
1831 static PyObject *__pyx_kp_s_32;
1832 static PyObject *__pyx_n_s_36;
1833 static PyObject *__pyx_n_s_37;
1834 static PyObject *__pyx_kp_s_38;
1835 static PyObject *__pyx_kp_s_39;
1836 static PyObject *__pyx_kp_s_4;
1837 static PyObject *__pyx_kp_s_40;
1838 static PyObject *__pyx_kp_s_41;
1839 static PyObject *__pyx_n_s_50;
1840 static PyObject *__pyx_kp_s_53;
1841 static PyObject *__pyx_kp_s_54;
1842 static PyObject *__pyx_kp_s_55;
1843 static PyObject *__pyx_kp_s_56;
1844 static PyObject *__pyx_n_s_57;
1845 static PyObject *__pyx_kp_s_58;
1846 static PyObject *__pyx_kp_s_59;
1847 static PyObject *__pyx_kp_s_6;
1848 static PyObject *__pyx_kp_s_60;
1849 static PyObject *__pyx_kp_s_61;
1850 static PyObject *__pyx_kp_s_64;
1851 static PyObject *__pyx_kp_s_65;
1852 static PyObject *__pyx_kp_s_66;
1853 static PyObject *__pyx_kp_s_67;
1854 static PyObject *__pyx_kp_s_68;
1855 static PyObject *__pyx_kp_s_69;
1856 static PyObject *__pyx_kp_s_70;
1857 static PyObject *__pyx_kp_s_71;
1858 static PyObject *__pyx_kp_s_72;
1859 static PyObject *__pyx_kp_s_73;
1860 static PyObject *__pyx_kp_s_74;
1861 static PyObject *__pyx_kp_s_75;
1862 static PyObject *__pyx_kp_s_76;
1863 static PyObject *__pyx_kp_s_79;
1864 static PyObject *__pyx_kp_s_8;
1865 static PyObject *__pyx_kp_s_80;
1866 static PyObject *__pyx_kp_s_81;
1867 static PyObject *__pyx_n_s_82;
1868 static PyObject *__pyx_kp_s_83;
1869 static PyObject *__pyx_kp_s_84;
1870 static PyObject *__pyx_kp_s_85;
1871 static PyObject *__pyx_kp_s_88;
1872 static PyObject *__pyx_kp_b_9;
1873 static PyObject *__pyx_kp_s_9;
1874 static PyObject *__pyx_n_s_90;
1875 static PyObject *__pyx_kp_s_91;
1876 static PyObject *__pyx_kp_s_92;
1877 static PyObject *__pyx_n_s_93;
1878 static PyObject *__pyx_kp_s_94;
1879 static PyObject *__pyx_kp_s_95;
1880 static PyObject *__pyx_n_s_96;
1881 static PyObject *__pyx_kp_b__0;
1882 static PyObject *__pyx_kp_s__0;
1883 static PyObject *__pyx_n_s__A;
1884 static PyObject *__pyx_n_s__ACGTN;
1885 static PyObject *__pyx_n_s__ALT;
1886 static PyObject *__pyx_n_s__BAD_GENOTYPE;
1887 static PyObject *__pyx_n_s__CHROM;
1888 static PyObject *__pyx_n_s__Character;
1889 static PyObject *__pyx_n_s__D;
1890 static PyObject *__pyx_n_s__DP;
1891 static PyObject *__pyx_n_s__Description;
1892 static PyObject *__pyx_n_s__EC;
1893 static PyObject *__pyx_n_s__ERROR_INFO_STRING;
1894 static PyObject *__pyx_n_s__ERROR_TRAILING_DATA;
1895 static PyObject *__pyx_n_s__ERROR_UNKNOWN_KEY;
1896 static PyObject *__pyx_n_s__Error;
1897 static PyObject *__pyx_n_s__FILTER;
1898 static PyObject *__pyx_n_s__FILTER_NOT_DEFINED;
1899 static PyObject *__pyx_n_s__FORMAT;
1900 static PyObject *__pyx_n_s__FORMAT_NOT_DEFINED;
1901 static PyObject *__pyx_n_s__FT;
1902 static PyObject *__pyx_n_s__Flag;
1903 static PyObject *__pyx_n_s__Float;
1904 static PyObject *__pyx_n_s__G;
1905 static PyObject *__pyx_n_s__GL;
1906 static PyObject *__pyx_n_s__GLE;
1907 static PyObject *__pyx_n_s__GP;
1908 static PyObject *__pyx_n_s__GQ;
1909 static PyObject *__pyx_n_s__GT;
1910 static PyObject *__pyx_n_s__GTdata;
1911 static PyObject *__pyx_n_s__GTstring;
1912 static PyObject *__pyx_n_s__Genotype;
1913 static PyObject *__pyx_n_s__HQ;
1914 static PyObject *__pyx_n_s__I;
1915 static PyObject *__pyx_n_s__ID;
1916 static PyObject *__pyx_n_s__INFO;
1917 static PyObject *__pyx_n_s__Integer;
1918 static PyObject *__pyx_n_s__KeyError;
1919 static PyObject *__pyx_n_s__MISSING_REF;
1920 static PyObject *__pyx_n_s__MQ;
1921 static PyObject *__pyx_n_s__N;
1922 static PyObject *__pyx_n_s__NT_ALLELES;
1923 static PyObject *__pyx_n_s__NT_GENOTYPES;
1924 static PyObject *__pyx_n_s__NT_NR_ALLELES;
1925 static PyObject *__pyx_n_s__NT_NUMBER;
1926 static PyObject *__pyx_n_s__NT_PHASED_GENOTYPES;
1927 static PyObject *__pyx_n_s__NT_UNKNOWN;
1928 static PyObject *__pyx_n_s__NotImplementedError;
1929 static PyObject *__pyx_n_s__Number;
1930 static PyObject *__pyx_n_b__PASS;
1931 static PyObject *__pyx_n_s__PASS;
1932 static PyObject *__pyx_n_s__PL;
1933 static PyObject *__pyx_n_s__POS;
1934 static PyObject *__pyx_n_s__POS_NOT_NUMERICAL;
1935 static PyObject *__pyx_n_s__POS_NOT_POSITIVE;
1936 static PyObject *__pyx_n_s__PQ;
1937 static PyObject *__pyx_n_s__PS;
1938 static PyObject *__pyx_n_s__QUAL;
1939 static PyObject *__pyx_n_s__QUAL_NOT_NUMERICAL;
1940 static PyObject *__pyx_n_s__REF;
1941 static PyObject *__pyx_n_s__StopIteration;
1942 static PyObject *__pyx_n_s__String;
1943 static PyObject *__pyx_n_s__Tabixfile;
1944 static PyObject *__pyx_n_s__Type;
1945 static PyObject *__pyx_n_s__UNKNOWN_CHAR_IN_REF;
1946 static PyObject *__pyx_n_s__V33_BAD_ALLELE;
1947 static PyObject *__pyx_n_s__V33_BAD_REF;
1948 static PyObject *__pyx_n_s__V40_BAD_ALLELE;
1949 static PyObject *__pyx_n_s__VCF;
1950 static PyObject *__pyx_n_s__VCFRecord;
1951 static PyObject *__pyx_n_s__ValueError;
1952 static PyObject *__pyx_n_s__WRONG_REF;
1953 static PyObject *__pyx_n_s__Warning;
1954 static PyObject *__pyx_n_s__ZERO_LENGTH_ALLELE;
1955 static PyObject *__pyx_n_s____all__;
1956 static PyObject *__pyx_n_s____dict__;
1957 static PyObject *__pyx_n_s____init__;
1958 static PyObject *__pyx_n_s____main__;
1959 static PyObject *__pyx_n_s____test__;
1960 static PyObject *__pyx_n_s___add_definition;
1961 static PyObject *__pyx_n_s___copy;
1962 static PyObject *__pyx_n_s___errors;
1963 static PyObject *__pyx_n_s___filter;
1964 static PyObject *__pyx_n_s___format;
1965 static PyObject *__pyx_n_s___header;
1966 static PyObject *__pyx_n_s___ignored_errors;
1967 static PyObject *__pyx_n_s___info;
1968 static PyObject *__pyx_n_s___leftalign;
1969 static PyObject *__pyx_n_s___line;
1970 static PyObject *__pyx_n_s___lineno;
1971 static PyObject *__pyx_n_s___lines;
1972 static PyObject *__pyx_n_s___parse;
1973 static PyObject *__pyx_n_s___parse_header;
1974 static PyObject *__pyx_n_s___reference;
1975 static PyObject *__pyx_n_s___regions;
1976 static PyObject *__pyx_n_s___required;
1977 static PyObject *__pyx_n_s___sample2column;
1978 static PyObject *__pyx_n_s___samples;
1979 static PyObject *__pyx_n_s___version;
1980 static PyObject *__pyx_n_s___warn_errors;
1981 static PyObject *__pyx_n_s__a;
1982 static PyObject *__pyx_n_s__add;
1983 static PyObject *__pyx_n_s__addn;
1984 static PyObject *__pyx_n_s__addns;
1985 static PyObject *__pyx_n_s__allele;
1986 static PyObject *__pyx_n_s__alleleRegEx;
1987 static PyObject *__pyx_n_s__alt;
1988 static PyObject *__pyx_n_s__alt1;
1989 static PyObject *__pyx_n_s__alt2;
1990 static PyObject *__pyx_n_s__bisect;
1991 static PyObject *__pyx_n_s__blurp;
1992 static PyObject *__pyx_n_s__buffer;
1993 static PyObject *__pyx_n_s__c;
1994 static PyObject *__pyx_n_s__chrom;
1995 static PyObject *__pyx_n_s__collections;
1996 static PyObject *__pyx_n_s__cols;
1997 static PyObject *__pyx_n_s__compare_calls;
1998 static PyObject *__pyx_n_s__compile;
1999 static PyObject *__pyx_n_s__connect;
2000 static PyObject *__pyx_n_s__convertGT;
2001 static PyObject *__pyx_n_s__convertGTback;
2002 static PyObject *__pyx_n_s__copy;
2003 static PyObject *__pyx_n_s__cvcf;
2004 static PyObject *__pyx_n_s__d;
2005 static PyObject *__pyx_n_s__data;
2006 static PyObject *__pyx_n_s__datagenerator;
2007 static PyObject *__pyx_n_s__deepcopy;
2008 static PyObject *__pyx_n_s__defaultdict;
2009 static PyObject *__pyx_n_s__descr;
2010 static PyObject *__pyx_n_s__description;
2011 static PyObject *__pyx_n_s__dict;
2012 static PyObject *__pyx_n_s__elts;
2013 static PyObject *__pyx_n_s__end;
2014 static PyObject *__pyx_n_s__endswith;
2015 static PyObject *__pyx_n_s__enumerate;
2016 static PyObject *__pyx_n_s__err;
2017 static PyObject *__pyx_n_s__error;
2018 static PyObject *__pyx_n_s__errorlabel;
2019 static PyObject *__pyx_n_s__errorstring;
2020 static PyObject *__pyx_n_s__errwarn;
2021 static PyObject *__pyx_n_s__expected;
2022 static PyObject *__pyx_n_s__f;
2023 static PyObject *__pyx_n_s__fa;
2024 static PyObject *__pyx_n_s__faref;
2025 static PyObject *__pyx_n_s__faref_leftflank;
2026 static PyObject *__pyx_n_s__fetch;
2027 static PyObject *__pyx_n_s__fileformat;
2028 static PyObject *__pyx_n_s__filename;
2029 static PyObject *__pyx_n_s__filter;
2030 static PyObject *__pyx_n_s__find;
2031 static PyObject *__pyx_n_s__first;
2032 static PyObject *__pyx_n_s__fmt;
2033 static PyObject *__pyx_n_s__format;
2034 static PyObject *__pyx_n_s__format_format;
2035 static PyObject *__pyx_n_s__format_formatdata;
2036 static PyObject *__pyx_n_s__formatdict;
2037 static PyObject *__pyx_n_s__genexpr;
2038 static PyObject *__pyx_n_s__get;
2039 static PyObject *__pyx_n_s__get_expected;
2040 static PyObject *__pyx_n_s__get_sequence;
2041 static PyObject *__pyx_n_s__getfilter;
2042 static PyObject *__pyx_n_s__getformat;
2043 static PyObject *__pyx_n_s__getheader;
2044 static PyObject *__pyx_n_s__getinfo;
2045 static PyObject *__pyx_n_s__getsamples;
2046 static PyObject *__pyx_n_s__gts;
2047 static PyObject *__pyx_n_s__gtsRegEx;
2048 static PyObject *__pyx_n_s__have_deletions;
2049 static PyObject *__pyx_n_s__header;
2050 static PyObject *__pyx_n_s__headings;
2051 static PyObject *__pyx_n_s__i;
2052 static PyObject *__pyx_n_s__id;
2053 static PyObject *__pyx_n_s__idx;
2054 static PyObject *__pyx_n_s__ielts;
2055 static PyObject *__pyx_n_s__ignoreerror;
2056 static PyObject *__pyx_n_s__info;
2057 static PyObject *__pyx_n_s__inregion;
2058 static PyObject *__pyx_n_s__itemgetter;
2059 static PyObject *__pyx_n_s__itervalues;
2060 static PyObject *__pyx_n_s__join;
2061 static PyObject *__pyx_n_s__k;
2062 static PyObject *__pyx_n_s__key;
2063 static PyObject *__pyx_n_s__keys;
2064 static PyObject *__pyx_n_s__l;
2065 static PyObject *__pyx_n_s__label;
2066 static PyObject *__pyx_n_s__last;
2067 static PyObject *__pyx_n_s__last_line;
2068 static PyObject *__pyx_n_s__left;
2069 static PyObject *__pyx_n_s__leftalign;
2070 static PyObject *__pyx_n_s__len;
2071 static PyObject *__pyx_n_s__line;
2072 static PyObject *__pyx_n_s__lineparse;
2073 static PyObject *__pyx_n_s__lines;
2074 static PyObject *__pyx_n_s__longest;
2075 static PyObject *__pyx_n_s__map;
2076 static PyObject *__pyx_n_s__match;
2077 static PyObject *__pyx_n_s__min;
2078 static PyObject *__pyx_n_s__missing;
2079 static PyObject *__pyx_n_s__missingvalue;
2080 static PyObject *__pyx_n_s__movable;
2081 static PyObject *__pyx_n_s__n;
2082 static PyObject *__pyx_n_s__na;
2083 static PyObject *__pyx_n_s__namedtuple;
2084 static PyObject *__pyx_n_s__newalts;
2085 static PyObject *__pyx_n_s__nmb;
2086 static PyObject *__pyx_n_s__number;
2087 static PyObject *__pyx_n_s__numbertype;
2088 static PyObject *__pyx_n_s__object;
2089 static PyObject *__pyx_n_s__operator;
2090 static PyObject *__pyx_n_s__opt;
2091 static PyObject *__pyx_n_s__output;
2092 static PyObject *__pyx_n_s__parse;
2093 static PyObject *__pyx_n_s__parse_data;
2094 static PyObject *__pyx_n_s__parse_format;
2095 static PyObject *__pyx_n_s__parse_formatdata;
2096 static PyObject *__pyx_n_s__parse_header;
2097 static PyObject *__pyx_n_s__parse_heading;
2098 static PyObject *__pyx_n_s__parse_regions;
2099 static PyObject *__pyx_n_s__parser;
2100 static PyObject *__pyx_n_s__pos;
2101 static PyObject *__pyx_n_s__pos1;
2102 static PyObject *__pyx_n_s__pos2;
2103 static PyObject *__pyx_n_s__pysam;
2104 static PyObject *__pyx_n_s__qual;
2105 static PyObject *__pyx_n_s__r;
2106 static PyObject *__pyx_n_s__range;
2107 static PyObject *__pyx_n_s__re;
2108 static PyObject *__pyx_n_s__record;
2109 static PyObject *__pyx_n_s__ref;
2110 static PyObject *__pyx_n_s__ref1;
2111 static PyObject *__pyx_n_s__ref2;
2112 static PyObject *__pyx_n_s__reference;
2113 static PyObject *__pyx_n_s__region;
2114 static PyObject *__pyx_n_s__regions;
2115 static PyObject *__pyx_n_s__replace;
2116 static PyObject *__pyx_n_s__required;
2117 static PyObject *__pyx_n_s__rest;
2118 static PyObject *__pyx_n_s__result;
2119 static PyObject *__pyx_n_s__s;
2120 static PyObject *__pyx_n_s__sample;
2121 static PyObject *__pyx_n_s__samples;
2122 static PyObject *__pyx_n_s__sdata;
2123 static PyObject *__pyx_n_s__self;
2124 static PyObject *__pyx_n_s__separator;
2125 static PyObject *__pyx_n_s__sequence;
2126 static PyObject *__pyx_n_s__setfilter;
2127 static PyObject *__pyx_n_s__setformat;
2128 static PyObject *__pyx_n_s__setheader;
2129 static PyObject *__pyx_n_s__setinfo;
2130 static PyObject *__pyx_n_s__setreference;
2131 static PyObject *__pyx_n_s__setregions;
2132 static PyObject *__pyx_n_s__setsamples;
2133 static PyObject *__pyx_n_s__setversion;
2134 static PyObject *__pyx_n_s__shortest;
2135 static PyObject *__pyx_n_s__split;
2136 static PyObject *__pyx_n_s__start;
2137 static PyObject *__pyx_n_s__startswith;
2138 static PyObject *__pyx_n_s__stream;
2139 static PyObject *__pyx_n_s__string;
2140 static PyObject *__pyx_n_s__strip;
2141 static PyObject *__pyx_n_s__sys;
2142 static PyObject *__pyx_n_s__t;
2143 static PyObject *__pyx_n_s__tabixfile;
2144 static PyObject *__pyx_n_s__type;
2145 static PyObject *__pyx_n_s__upper;
2146 static PyObject *__pyx_n_s__v;
2147 static PyObject *__pyx_n_s__validate;
2148 static PyObject *__pyx_n_s__value;
2149 static PyObject *__pyx_n_s__values;
2150 static PyObject *__pyx_n_s__var;
2151 static PyObject *__pyx_n_s__vcf;
2152 static PyObject *__pyx_n_s__vcffile;
2153 static PyObject *__pyx_n_s__version;
2154 static PyObject *__pyx_n_s__warnerror;
2155 static PyObject *__pyx_n_s__write;
2156 static PyObject *__pyx_n_s__write_data;
2157 static PyObject *__pyx_n_s__write_header;
2158 static PyObject *__pyx_n_s__write_heading;
2159 static PyObject *__pyx_n_s__writeheader;
2160 static PyObject *__pyx_n_s__x;
2161 static PyObject *__pyx_n_s__y;
2162 static PyObject *__pyx_n_s__zip;
2163 static PyObject *__pyx_int_0;
2164 static PyObject *__pyx_int_1;
2165 static PyObject *__pyx_int_2;
2166 static PyObject *__pyx_int_3;
2167 static PyObject *__pyx_int_4;
2168 static PyObject *__pyx_int_5;
2169 static PyObject *__pyx_int_6;
2170 static PyObject *__pyx_int_7;
2171 static PyObject *__pyx_int_8;
2172 static PyObject *__pyx_int_9;
2173 static PyObject *__pyx_int_neg_1;
2174 static PyObject *__pyx_int_10;
2175 static PyObject *__pyx_int_11;
2176 static PyObject *__pyx_int_12;
2177 static PyObject *__pyx_int_13;
2178 static PyObject *__pyx_int_14;
2179 static PyObject *__pyx_int_15;
2180 static PyObject *__pyx_int_16;
2181 static PyObject *__pyx_int_17;
2182 static PyObject *__pyx_int_18;
2183 static PyObject *__pyx_int_19;
2184 static PyObject *__pyx_int_20;
2185 static PyObject *__pyx_int_21;
2186 static PyObject *__pyx_int_22;
2187 static PyObject *__pyx_int_23;
2188 static PyObject *__pyx_int_24;
2189 static PyObject *__pyx_int_25;
2190 static PyObject *__pyx_int_26;
2191 static PyObject *__pyx_int_27;
2192 static PyObject *__pyx_int_28;
2193 static PyObject *__pyx_int_29;
2194 static PyObject *__pyx_int_30;
2195 static PyObject *__pyx_int_31;
2196 static PyObject *__pyx_int_32;
2197 static PyObject *__pyx_int_33;
2198 static PyObject *__pyx_int_40;
2199 static PyObject *__pyx_int_100;
2200 static PyObject *__pyx_int_3000000000;
2201 static PyObject *__pyx_k_tuple_3;
2202 static PyObject *__pyx_k_tuple_5;
2203 static PyObject *__pyx_k_tuple_7;
2204 static PyObject *__pyx_k_tuple_10;
2205 static PyObject *__pyx_k_tuple_12;
2206 static PyObject *__pyx_k_tuple_13;
2207 static PyObject *__pyx_k_tuple_15;
2208 static PyObject *__pyx_k_tuple_16;
2209 static PyObject *__pyx_k_tuple_17;
2210 static PyObject *__pyx_k_tuple_22;
2211 static PyObject *__pyx_k_tuple_23;
2212 static PyObject *__pyx_k_tuple_26;
2213 static PyObject *__pyx_k_tuple_29;
2214 static PyObject *__pyx_k_tuple_30;
2215 static PyObject *__pyx_k_tuple_31;
2216 static PyObject *__pyx_k_tuple_33;
2217 static PyObject *__pyx_k_tuple_34;
2218 static PyObject *__pyx_k_tuple_35;
2219 static PyObject *__pyx_k_tuple_42;
2220 static PyObject *__pyx_k_tuple_43;
2221 static PyObject *__pyx_k_tuple_44;
2222 static PyObject *__pyx_k_tuple_45;
2223 static PyObject *__pyx_k_tuple_46;
2224 static PyObject *__pyx_k_tuple_47;
2225 static PyObject *__pyx_k_tuple_48;
2226 static PyObject *__pyx_k_tuple_49;
2227 static PyObject *__pyx_k_tuple_51;
2228 static PyObject *__pyx_k_tuple_52;
2229 static PyObject *__pyx_k_tuple_62;
2230 static PyObject *__pyx_k_tuple_63;
2231 static PyObject *__pyx_k_tuple_77;
2232 static PyObject *__pyx_k_tuple_78;
2233 static PyObject *__pyx_k_tuple_86;
2234 static PyObject *__pyx_k_tuple_87;
2235 static PyObject *__pyx_k_tuple_89;
2236 static PyObject *__pyx_k_tuple_97;
2237 static PyObject *__pyx_k_tuple_98;
2238 static PyObject *__pyx_k_tuple_99;
2239 static PyObject *__pyx_k_tuple_103;
2240 static PyObject *__pyx_k_tuple_107;
2241 static PyObject *__pyx_k_tuple_108;
2242 static PyObject *__pyx_k_tuple_109;
2243 static PyObject *__pyx_k_tuple_110;
2244 static PyObject *__pyx_k_tuple_111;
2245 static PyObject *__pyx_k_tuple_112;
2246 static PyObject *__pyx_k_tuple_113;
2247 static PyObject *__pyx_k_tuple_117;
2248 static PyObject *__pyx_k_tuple_119;
2249 static PyObject *__pyx_k_tuple_120;
2250 static PyObject *__pyx_k_tuple_122;
2251 static PyObject *__pyx_k_tuple_124;
2252 static PyObject *__pyx_k_tuple_127;
2253 static PyObject *__pyx_k_tuple_129;
2254 static PyObject *__pyx_k_tuple_131;
2255 static PyObject *__pyx_k_tuple_132;
2256 static PyObject *__pyx_k_tuple_135;
2257 static PyObject *__pyx_k_tuple_138;
2258 static PyObject *__pyx_k_tuple_173;
2259 static PyObject *__pyx_k_tuple_175;
2260 static PyObject *__pyx_k_tuple_177;
2261 static PyObject *__pyx_k_tuple_178;
2262 static PyObject *__pyx_k_tuple_180;
2263 static PyObject *__pyx_k_tuple_182;
2264 static PyObject *__pyx_k_tuple_184;
2265 static PyObject *__pyx_k_tuple_186;
2266 static PyObject *__pyx_k_tuple_188;
2267 static PyObject *__pyx_k_tuple_190;
2268 static PyObject *__pyx_k_tuple_192;
2269 static PyObject *__pyx_k_tuple_194;
2270 static PyObject *__pyx_k_tuple_196;
2271 static PyObject *__pyx_k_tuple_198;
2272 static PyObject *__pyx_k_tuple_200;
2273 static PyObject *__pyx_k_tuple_202;
2274 static PyObject *__pyx_k_tuple_204;
2275 static PyObject *__pyx_k_tuple_206;
2276 static PyObject *__pyx_k_tuple_208;
2277 static PyObject *__pyx_k_tuple_210;
2278 static PyObject *__pyx_k_tuple_212;
2279 static PyObject *__pyx_k_tuple_214;
2280 static PyObject *__pyx_k_tuple_216;
2281 static PyObject *__pyx_k_tuple_218;
2282 static PyObject *__pyx_k_tuple_220;
2283 static PyObject *__pyx_k_tuple_222;
2284 static PyObject *__pyx_k_tuple_224;
2285 static PyObject *__pyx_k_tuple_226;
2286 static PyObject *__pyx_k_tuple_228;
2287 static PyObject *__pyx_k_tuple_230;
2288 static PyObject *__pyx_k_tuple_232;
2289 static PyObject *__pyx_k_tuple_234;
2290 static PyObject *__pyx_k_tuple_236;
2291 static PyObject *__pyx_k_tuple_238;
2292 static PyObject *__pyx_k_tuple_240;
2293 static PyObject *__pyx_k_tuple_242;
2294 static PyObject *__pyx_k_tuple_244;
2295 static PyObject *__pyx_k_tuple_246;
2296 static PyObject *__pyx_k_tuple_248;
2297 static PyObject *__pyx_k_tuple_250;
2298 static PyObject *__pyx_k_tuple_252;
2299 static PyObject *__pyx_k_tuple_254;
2300 static PyObject *__pyx_k_tuple_256;
2301 static PyObject *__pyx_k_tuple_257;
2302 static PyObject *__pyx_k_codeobj_133;
2303 static PyObject *__pyx_k_codeobj_136;
2304 static PyObject *__pyx_k_codeobj_174;
2305 static PyObject *__pyx_k_codeobj_176;
2306 static PyObject *__pyx_k_codeobj_179;
2307 static PyObject *__pyx_k_codeobj_181;
2308 static PyObject *__pyx_k_codeobj_183;
2309 static PyObject *__pyx_k_codeobj_185;
2310 static PyObject *__pyx_k_codeobj_187;
2311 static PyObject *__pyx_k_codeobj_189;
2312 static PyObject *__pyx_k_codeobj_191;
2313 static PyObject *__pyx_k_codeobj_193;
2314 static PyObject *__pyx_k_codeobj_195;
2315 static PyObject *__pyx_k_codeobj_197;
2316 static PyObject *__pyx_k_codeobj_199;
2317 static PyObject *__pyx_k_codeobj_201;
2318 static PyObject *__pyx_k_codeobj_203;
2319 static PyObject *__pyx_k_codeobj_205;
2320 static PyObject *__pyx_k_codeobj_207;
2321 static PyObject *__pyx_k_codeobj_209;
2322 static PyObject *__pyx_k_codeobj_211;
2323 static PyObject *__pyx_k_codeobj_213;
2324 static PyObject *__pyx_k_codeobj_215;
2325 static PyObject *__pyx_k_codeobj_217;
2326 static PyObject *__pyx_k_codeobj_219;
2327 static PyObject *__pyx_k_codeobj_221;
2328 static PyObject *__pyx_k_codeobj_223;
2329 static PyObject *__pyx_k_codeobj_225;
2330 static PyObject *__pyx_k_codeobj_227;
2331 static PyObject *__pyx_k_codeobj_229;
2332 static PyObject *__pyx_k_codeobj_231;
2333 static PyObject *__pyx_k_codeobj_233;
2334 static PyObject *__pyx_k_codeobj_235;
2335 static PyObject *__pyx_k_codeobj_237;
2336 static PyObject *__pyx_k_codeobj_239;
2337 static PyObject *__pyx_k_codeobj_241;
2338 static PyObject *__pyx_k_codeobj_243;
2339 static PyObject *__pyx_k_codeobj_245;
2340 static PyObject *__pyx_k_codeobj_247;
2341 static PyObject *__pyx_k_codeobj_249;
2342 static PyObject *__pyx_k_codeobj_251;
2343 static PyObject *__pyx_k_codeobj_253;
2344 static PyObject *__pyx_k_codeobj_255;
2345 static PyObject *__pyx_k_codeobj_258;
2346
2347 /* Python wrapper */
2348 static PyObject *__pyx_pw_4cvcf_1get_sequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2349 static PyMethodDef __pyx_mdef_4cvcf_1get_sequence = {__Pyx_NAMESTR("get_sequence"), (PyCFunction)__pyx_pw_4cvcf_1get_sequence, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
2350 static PyObject *__pyx_pw_4cvcf_1get_sequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2351   PyObject *__pyx_v_chrom = 0;
2352   PyObject *__pyx_v_start = 0;
2353   PyObject *__pyx_v_end = 0;
2354   PyObject *__pyx_v_fa = 0;
2355   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__chrom,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__fa,0};
2356   PyObject *__pyx_r = 0;
2357   __Pyx_RefNannyDeclarations
2358   __Pyx_RefNannySetupContext("get_sequence (wrapper)", 0);
2359   __pyx_self = __pyx_self;
2360   {
2361     PyObject* values[4] = {0,0,0,0};
2362     if (unlikely(__pyx_kwds)) {
2363       Py_ssize_t kw_args;
2364       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2365       switch (pos_args) {
2366         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2367         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2368         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2369         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2370         case  0: break;
2371         default: goto __pyx_L5_argtuple_error;
2372       }
2373       kw_args = PyDict_Size(__pyx_kwds);
2374       switch (pos_args) {
2375         case  0:
2376         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__chrom);
2377         if (likely(values[0])) kw_args--;
2378         else goto __pyx_L5_argtuple_error;
2379         case  1:
2380         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
2381         if (likely(values[1])) kw_args--;
2382         else {
2383           __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2384         }
2385         case  2:
2386         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
2387         if (likely(values[2])) kw_args--;
2388         else {
2389           __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2390         }
2391         case  3:
2392         values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fa);
2393         if (likely(values[3])) kw_args--;
2394         else {
2395           __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2396         }
2397       }
2398       if (unlikely(kw_args > 0)) {
2399         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_sequence") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2400       }
2401     } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
2402       goto __pyx_L5_argtuple_error;
2403     } else {
2404       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2405       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2406       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2407       values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2408     }
2409     __pyx_v_chrom = values[0];
2410     __pyx_v_start = values[1];
2411     __pyx_v_end = values[2];
2412     __pyx_v_fa = values[3];
2413   }
2414   goto __pyx_L4_argument_unpacking_done;
2415   __pyx_L5_argtuple_error:;
2416   __Pyx_RaiseArgtupleInvalid("get_sequence", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2417   __pyx_L3_error:;
2418   __Pyx_AddTraceback("cvcf.get_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
2419   __Pyx_RefNannyFinishContext();
2420   return NULL;
2421   __pyx_L4_argument_unpacking_done:;
2422   __pyx_r = __pyx_pf_4cvcf_get_sequence(__pyx_self, __pyx_v_chrom, __pyx_v_start, __pyx_v_end, __pyx_v_fa);
2423   __Pyx_RefNannyFinishContext();
2424   return __pyx_r;
2425 }
2426
2427 /* "cvcf.pyx":58
2428  * 
2429  * # Utility function.  Uses 0-based coordinates
2430  * def get_sequence(chrom, start, end, fa):             # <<<<<<<<<<<<<<
2431  *     # obtain sequence from .fa file, without truncation
2432  *     if end<=start: return ""
2433  */
2434
2435 static PyObject *__pyx_pf_4cvcf_get_sequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_fa) {
2436   PyObject *__pyx_v_sequence = NULL;
2437   PyObject *__pyx_r = NULL;
2438   __Pyx_RefNannyDeclarations
2439   PyObject *__pyx_t_1 = NULL;
2440   int __pyx_t_2;
2441   int __pyx_t_3;
2442   PyObject *__pyx_t_4 = NULL;
2443   PyObject *__pyx_t_5 = NULL;
2444   PyObject *__pyx_t_6 = NULL;
2445   Py_ssize_t __pyx_t_7;
2446   int __pyx_lineno = 0;
2447   const char *__pyx_filename = NULL;
2448   int __pyx_clineno = 0;
2449   __Pyx_RefNannySetupContext("get_sequence", 0);
2450
2451   /* "cvcf.pyx":60
2452  * def get_sequence(chrom, start, end, fa):
2453  *     # obtain sequence from .fa file, without truncation
2454  *     if end<=start: return ""             # <<<<<<<<<<<<<<
2455  *     if not fa: return "N"*(end-start)
2456  *     if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper()
2457  */
2458   __pyx_t_1 = PyObject_RichCompare(__pyx_v_end, __pyx_v_start, Py_LE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2459   __Pyx_GOTREF(__pyx_t_1);
2460   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2461   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2462   if (__pyx_t_2) {
2463     __Pyx_XDECREF(__pyx_r);
2464     __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
2465     __pyx_r = ((PyObject *)__pyx_kp_s_1);
2466     goto __pyx_L0;
2467     goto __pyx_L3;
2468   }
2469   __pyx_L3:;
2470
2471   /* "cvcf.pyx":61
2472  *     # obtain sequence from .fa file, without truncation
2473  *     if end<=start: return ""
2474  *     if not fa: return "N"*(end-start)             # <<<<<<<<<<<<<<
2475  *     if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper()
2476  *     sequence = fa.fetch(chrom, start, end).upper()
2477  */
2478   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fa); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2479   __pyx_t_3 = (!__pyx_t_2);
2480   if (__pyx_t_3) {
2481     __Pyx_XDECREF(__pyx_r);
2482     __pyx_t_1 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2483     __Pyx_GOTREF(__pyx_t_1);
2484     __pyx_t_4 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2485     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
2486     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2487     __pyx_r = ((PyObject *)__pyx_t_4);
2488     __pyx_t_4 = 0;
2489     goto __pyx_L0;
2490     goto __pyx_L4;
2491   }
2492   __pyx_L4:;
2493
2494   /* "cvcf.pyx":62
2495  *     if end<=start: return ""
2496  *     if not fa: return "N"*(end-start)
2497  *     if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper()             # <<<<<<<<<<<<<<
2498  *     sequence = fa.fetch(chrom, start, end).upper()
2499  *     if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence))
2500  */
2501   __pyx_t_4 = PyObject_RichCompare(__pyx_v_start, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2502   __Pyx_GOTREF(__pyx_t_4);
2503   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2504   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2505   if (__pyx_t_3) {
2506     __Pyx_XDECREF(__pyx_r);
2507     __pyx_t_4 = PyNumber_Negative(__pyx_v_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2508     __Pyx_GOTREF(__pyx_t_4);
2509     __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2510     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2511     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2512     __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2513     __Pyx_GOTREF(__pyx_t_4);
2514     __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2515     __Pyx_GOTREF(__pyx_t_5);
2516     __Pyx_INCREF(__pyx_v_chrom);
2517     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom);
2518     __Pyx_GIVEREF(__pyx_v_chrom);
2519     __Pyx_INCREF(__pyx_int_0);
2520     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_0);
2521     __Pyx_GIVEREF(__pyx_int_0);
2522     __Pyx_INCREF(__pyx_v_end);
2523     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_end);
2524     __Pyx_GIVEREF(__pyx_v_end);
2525     __Pyx_INCREF(__pyx_v_fa);
2526     PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_fa);
2527     __Pyx_GIVEREF(__pyx_v_fa);
2528     __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2529     __Pyx_GOTREF(__pyx_t_6);
2530     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2531     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2532     __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__upper); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2533     __Pyx_GOTREF(__pyx_t_5);
2534     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2535     __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2536     __Pyx_GOTREF(__pyx_t_6);
2537     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2538     __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_1), __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2539     __Pyx_GOTREF(__pyx_t_5);
2540     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2541     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2542     __pyx_r = __pyx_t_5;
2543     __pyx_t_5 = 0;
2544     goto __pyx_L0;
2545     goto __pyx_L5;
2546   }
2547   __pyx_L5:;
2548
2549   /* "cvcf.pyx":63
2550  *     if not fa: return "N"*(end-start)
2551  *     if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper()
2552  *     sequence = fa.fetch(chrom, start, end).upper()             # <<<<<<<<<<<<<<
2553  *     if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence))
2554  *     return sequence
2555  */
2556   __pyx_t_5 = PyObject_GetAttr(__pyx_v_fa, __pyx_n_s__fetch); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2557   __Pyx_GOTREF(__pyx_t_5);
2558   __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2559   __Pyx_GOTREF(__pyx_t_6);
2560   __Pyx_INCREF(__pyx_v_chrom);
2561   PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_chrom);
2562   __Pyx_GIVEREF(__pyx_v_chrom);
2563   __Pyx_INCREF(__pyx_v_start);
2564   PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_start);
2565   __Pyx_GIVEREF(__pyx_v_start);
2566   __Pyx_INCREF(__pyx_v_end);
2567   PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_end);
2568   __Pyx_GIVEREF(__pyx_v_end);
2569   __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2570   __Pyx_GOTREF(__pyx_t_1);
2571   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2572   __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
2573   __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__upper); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2574   __Pyx_GOTREF(__pyx_t_6);
2575   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2576   __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2577   __Pyx_GOTREF(__pyx_t_1);
2578   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2579   __pyx_v_sequence = __pyx_t_1;
2580   __pyx_t_1 = 0;
2581
2582   /* "cvcf.pyx":64
2583  *     if start<0: return "N"*(-start) + get_sequence(chrom, 0, end, fa).upper()
2584  *     sequence = fa.fetch(chrom, start, end).upper()
2585  *     if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence))             # <<<<<<<<<<<<<<
2586  *     return sequence
2587  * 
2588  */
2589   __pyx_t_7 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2590   __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2591   __Pyx_GOTREF(__pyx_t_1);
2592   __pyx_t_6 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2593   __Pyx_GOTREF(__pyx_t_6);
2594   __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2595   __Pyx_GOTREF(__pyx_t_5);
2596   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2597   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2598   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2599   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2600   if (__pyx_t_3) {
2601     __pyx_t_5 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2602     __Pyx_GOTREF(__pyx_t_5);
2603     __pyx_t_7 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2604     __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2605     __Pyx_GOTREF(__pyx_t_6);
2606     __pyx_t_1 = PyNumber_Subtract(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2607     __Pyx_GOTREF(__pyx_t_1);
2608     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2609     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2610     __pyx_t_6 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2611     __Pyx_GOTREF(((PyObject *)__pyx_t_6));
2612     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2613     __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sequence, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2614     __Pyx_GOTREF(__pyx_t_1);
2615     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
2616     __Pyx_DECREF(__pyx_v_sequence);
2617     __pyx_v_sequence = __pyx_t_1;
2618     __pyx_t_1 = 0;
2619     goto __pyx_L6;
2620   }
2621   __pyx_L6:;
2622
2623   /* "cvcf.pyx":65
2624  *     sequence = fa.fetch(chrom, start, end).upper()
2625  *     if len(sequence) < end-start: sequence += "N"*(end-start-len(sequence))
2626  *     return sequence             # <<<<<<<<<<<<<<
2627  * 
2628  * # Utility function.  Parses a region string
2629  */
2630   __Pyx_XDECREF(__pyx_r);
2631   __Pyx_INCREF(__pyx_v_sequence);
2632   __pyx_r = __pyx_v_sequence;
2633   goto __pyx_L0;
2634
2635   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2636   goto __pyx_L0;
2637   __pyx_L1_error:;
2638   __Pyx_XDECREF(__pyx_t_1);
2639   __Pyx_XDECREF(__pyx_t_4);
2640   __Pyx_XDECREF(__pyx_t_5);
2641   __Pyx_XDECREF(__pyx_t_6);
2642   __Pyx_AddTraceback("cvcf.get_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
2643   __pyx_r = NULL;
2644   __pyx_L0:;
2645   __Pyx_XDECREF(__pyx_v_sequence);
2646   __Pyx_XGIVEREF(__pyx_r);
2647   __Pyx_RefNannyFinishContext();
2648   return __pyx_r;
2649 }
2650
2651 /* Python wrapper */
2652 static PyObject *__pyx_pw_4cvcf_3parse_regions(PyObject *__pyx_self, PyObject *__pyx_v_string); /*proto*/
2653 static PyMethodDef __pyx_mdef_4cvcf_3parse_regions = {__Pyx_NAMESTR("parse_regions"), (PyCFunction)__pyx_pw_4cvcf_3parse_regions, METH_O, __Pyx_DOCSTR(0)};
2654 static PyObject *__pyx_pw_4cvcf_3parse_regions(PyObject *__pyx_self, PyObject *__pyx_v_string) {
2655   PyObject *__pyx_r = 0;
2656   __Pyx_RefNannyDeclarations
2657   __Pyx_RefNannySetupContext("parse_regions (wrapper)", 0);
2658   __pyx_self = __pyx_self;
2659   __pyx_r = __pyx_pf_4cvcf_2parse_regions(__pyx_self, ((PyObject *)__pyx_v_string));
2660   __Pyx_RefNannyFinishContext();
2661   return __pyx_r;
2662 }
2663
2664 /* "cvcf.pyx":68
2665  * 
2666  * # Utility function.  Parses a region string
2667  * def parse_regions( string ):             # <<<<<<<<<<<<<<
2668  *     result = []
2669  *     for r in string.split(','):
2670  */
2671
2672 static PyObject *__pyx_pf_4cvcf_2parse_regions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string) {
2673   PyObject *__pyx_v_result = NULL;
2674   PyObject *__pyx_v_r = NULL;
2675   PyObject *__pyx_v_elts = NULL;
2676   PyObject *__pyx_v_chrom = NULL;
2677   PyObject *__pyx_v_start = NULL;
2678   PyObject *__pyx_v_end = NULL;
2679   PyObject *__pyx_v_ielts = NULL;
2680   PyObject *__pyx_r = NULL;
2681   __Pyx_RefNannyDeclarations
2682   PyObject *__pyx_t_1 = NULL;
2683   PyObject *__pyx_t_2 = NULL;
2684   Py_ssize_t __pyx_t_3;
2685   PyObject *(*__pyx_t_4)(PyObject *);
2686   PyObject *__pyx_t_5 = NULL;
2687   PyObject *__pyx_t_6 = NULL;
2688   Py_ssize_t __pyx_t_7;
2689   int __pyx_t_8;
2690   PyObject *__pyx_t_9 = NULL;
2691   PyObject *__pyx_t_10 = NULL;
2692   PyObject *__pyx_t_11 = NULL;
2693   PyObject *__pyx_t_12 = NULL;
2694   PyObject *__pyx_t_13 = NULL;
2695   int __pyx_t_14;
2696   int __pyx_lineno = 0;
2697   const char *__pyx_filename = NULL;
2698   int __pyx_clineno = 0;
2699   __Pyx_RefNannySetupContext("parse_regions", 0);
2700
2701   /* "cvcf.pyx":69
2702  * # Utility function.  Parses a region string
2703  * def parse_regions( string ):
2704  *     result = []             # <<<<<<<<<<<<<<
2705  *     for r in string.split(','):
2706  *         elts = r.split(':')
2707  */
2708   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2709   __Pyx_GOTREF(__pyx_t_1);
2710   __pyx_v_result = __pyx_t_1;
2711   __pyx_t_1 = 0;
2712
2713   /* "cvcf.pyx":70
2714  * def parse_regions( string ):
2715  *     result = []
2716  *     for r in string.split(','):             # <<<<<<<<<<<<<<
2717  *         elts = r.split(':')
2718  *         chrom, start, end = elts[0], 0, 3000000000
2719  */
2720   __pyx_t_1 = PyObject_GetAttr(__pyx_v_string, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2721   __Pyx_GOTREF(__pyx_t_1);
2722   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2723   __Pyx_GOTREF(__pyx_t_2);
2724   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2725   if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
2726     __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
2727     __pyx_t_4 = NULL;
2728   } else {
2729     __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2730     __Pyx_GOTREF(__pyx_t_1);
2731     __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
2732   }
2733   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2734   for (;;) {
2735     if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
2736       if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
2737       __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
2738     } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
2739       if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
2740       __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
2741     } else {
2742       __pyx_t_2 = __pyx_t_4(__pyx_t_1);
2743       if (unlikely(!__pyx_t_2)) {
2744         if (PyErr_Occurred()) {
2745           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
2746           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2747         }
2748         break;
2749       }
2750       __Pyx_GOTREF(__pyx_t_2);
2751     }
2752     __Pyx_XDECREF(__pyx_v_r);
2753     __pyx_v_r = __pyx_t_2;
2754     __pyx_t_2 = 0;
2755
2756     /* "cvcf.pyx":71
2757  *     result = []
2758  *     for r in string.split(','):
2759  *         elts = r.split(':')             # <<<<<<<<<<<<<<
2760  *         chrom, start, end = elts[0], 0, 3000000000
2761  *         if len(elts)==1: pass
2762  */
2763     __pyx_t_2 = PyObject_GetAttr(__pyx_v_r, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2764     __Pyx_GOTREF(__pyx_t_2);
2765     __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2766     __Pyx_GOTREF(__pyx_t_5);
2767     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2768     __Pyx_XDECREF(__pyx_v_elts);
2769     __pyx_v_elts = __pyx_t_5;
2770     __pyx_t_5 = 0;
2771
2772     /* "cvcf.pyx":72
2773  *     for r in string.split(','):
2774  *         elts = r.split(':')
2775  *         chrom, start, end = elts[0], 0, 3000000000             # <<<<<<<<<<<<<<
2776  *         if len(elts)==1: pass
2777  *         elif len(elts)==2:
2778  */
2779     __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2780     __Pyx_GOTREF(__pyx_t_5);
2781     __pyx_t_2 = __pyx_int_0;
2782     __Pyx_INCREF(__pyx_t_2);
2783     __pyx_t_6 = __pyx_int_3000000000;
2784     __Pyx_INCREF(__pyx_t_6);
2785     __Pyx_XDECREF(__pyx_v_chrom);
2786     __pyx_v_chrom = __pyx_t_5;
2787     __pyx_t_5 = 0;
2788     __Pyx_XDECREF(__pyx_v_start);
2789     __pyx_v_start = __pyx_t_2;
2790     __pyx_t_2 = 0;
2791     __Pyx_XDECREF(__pyx_v_end);
2792     __pyx_v_end = __pyx_t_6;
2793     __pyx_t_6 = 0;
2794
2795     /* "cvcf.pyx":73
2796  *         elts = r.split(':')
2797  *         chrom, start, end = elts[0], 0, 3000000000
2798  *         if len(elts)==1: pass             # <<<<<<<<<<<<<<
2799  *         elif len(elts)==2:
2800  *             if len(elts[1])>0:
2801  */
2802     __pyx_t_7 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2803     __pyx_t_8 = (__pyx_t_7 == 1);
2804     if (__pyx_t_8) {
2805       goto __pyx_L5;
2806     }
2807
2808     /* "cvcf.pyx":74
2809  *         chrom, start, end = elts[0], 0, 3000000000
2810  *         if len(elts)==1: pass
2811  *         elif len(elts)==2:             # <<<<<<<<<<<<<<
2812  *             if len(elts[1])>0:
2813  *                 ielts = elts[1].split('-')
2814  */
2815     __pyx_t_7 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2816     __pyx_t_8 = (__pyx_t_7 == 2);
2817     if (__pyx_t_8) {
2818
2819       /* "cvcf.pyx":75
2820  *         if len(elts)==1: pass
2821  *         elif len(elts)==2:
2822  *             if len(elts[1])>0:             # <<<<<<<<<<<<<<
2823  *                 ielts = elts[1].split('-')
2824  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
2825  */
2826       __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2827       __Pyx_GOTREF(__pyx_t_6);
2828       __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2829       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2830       __pyx_t_8 = (__pyx_t_7 > 0);
2831       if (__pyx_t_8) {
2832
2833         /* "cvcf.pyx":76
2834  *         elif len(elts)==2:
2835  *             if len(elts[1])>0:
2836  *                 ielts = elts[1].split('-')             # <<<<<<<<<<<<<<
2837  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
2838  *                 try:    start, end = int(ielts[0])-1, int(ielts[1])
2839  */
2840         __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2841         __Pyx_GOTREF(__pyx_t_6);
2842         __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2843         __Pyx_GOTREF(__pyx_t_2);
2844         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2845         __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2846         __Pyx_GOTREF(__pyx_t_6);
2847         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2848         __Pyx_XDECREF(__pyx_v_ielts);
2849         __pyx_v_ielts = __pyx_t_6;
2850         __pyx_t_6 = 0;
2851
2852         /* "cvcf.pyx":77
2853  *             if len(elts[1])>0:
2854  *                 ielts = elts[1].split('-')
2855  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)             # <<<<<<<<<<<<<<
2856  *                 try:    start, end = int(ielts[0])-1, int(ielts[1])
2857  *                 except: raise ValueError("Don't understand region string '%s'" % r)
2858  */
2859         __pyx_t_7 = PyObject_Length(__pyx_v_ielts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2860         __pyx_t_8 = (__pyx_t_7 != 2);
2861         if (__pyx_t_8) {
2862           __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_v_r); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2863           __Pyx_GOTREF(((PyObject *)__pyx_t_6));
2864           __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;}
2865           __Pyx_GOTREF(__pyx_t_2);
2866           PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6));
2867           __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
2868           __pyx_t_6 = 0;
2869           __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2870           __Pyx_GOTREF(__pyx_t_6);
2871           __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
2872           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2873           goto __pyx_L7;
2874         }
2875         __pyx_L7:;
2876
2877         /* "cvcf.pyx":78
2878  *                 ielts = elts[1].split('-')
2879  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
2880  *                 try:    start, end = int(ielts[0])-1, int(ielts[1])             # <<<<<<<<<<<<<<
2881  *                 except: raise ValueError("Don't understand region string '%s'" % r)
2882  *         else:
2883  */
2884         {
2885           __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
2886           __Pyx_XGOTREF(__pyx_t_9);
2887           __Pyx_XGOTREF(__pyx_t_10);
2888           __Pyx_XGOTREF(__pyx_t_11);
2889           /*try:*/ {
2890             __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ielts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
2891             __Pyx_GOTREF(__pyx_t_6);
2892             __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
2893             __Pyx_GOTREF(__pyx_t_2);
2894             PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
2895             __Pyx_GIVEREF(__pyx_t_6);
2896             __pyx_t_6 = 0;
2897             __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
2898             __Pyx_GOTREF(__pyx_t_6);
2899             __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
2900             __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
2901             __Pyx_GOTREF(__pyx_t_2);
2902             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2903             __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ielts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
2904             __Pyx_GOTREF(__pyx_t_6);
2905             __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
2906             __Pyx_GOTREF(__pyx_t_5);
2907             PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
2908             __Pyx_GIVEREF(__pyx_t_6);
2909             __pyx_t_6 = 0;
2910             __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
2911             __Pyx_GOTREF(__pyx_t_6);
2912             __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2913             __Pyx_DECREF(__pyx_v_start);
2914             __pyx_v_start = __pyx_t_2;
2915             __pyx_t_2 = 0;
2916             __Pyx_DECREF(__pyx_v_end);
2917             __pyx_v_end = __pyx_t_6;
2918             __pyx_t_6 = 0;
2919           }
2920           __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2921           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2922           __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
2923           goto __pyx_L15_try_end;
2924           __pyx_L8_error:;
2925           __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2926           __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
2927           __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
2928
2929           /* "cvcf.pyx":79
2930  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
2931  *                 try:    start, end = int(ielts[0])-1, int(ielts[1])
2932  *                 except: raise ValueError("Don't understand region string '%s'" % r)             # <<<<<<<<<<<<<<
2933  *         else:
2934  *             raise ValueError("Don't understand region string '%s'" % r)
2935  */
2936           /*except:*/ {
2937             __Pyx_AddTraceback("cvcf.parse_regions", __pyx_clineno, __pyx_lineno, __pyx_filename);
2938             if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
2939             __Pyx_GOTREF(__pyx_t_6);
2940             __Pyx_GOTREF(__pyx_t_2);
2941             __Pyx_GOTREF(__pyx_t_5);
2942             __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_v_r); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
2943             __Pyx_GOTREF(((PyObject *)__pyx_t_12));
2944             __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
2945             __Pyx_GOTREF(__pyx_t_13);
2946             PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_t_12));
2947             __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
2948             __pyx_t_12 = 0;
2949             __pyx_t_12 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
2950             __Pyx_GOTREF(__pyx_t_12);
2951             __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
2952             __Pyx_Raise(__pyx_t_12, 0, 0, 0);
2953             __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
2954             {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
2955             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2956             __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2957             __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2958             goto __pyx_L9_exception_handled;
2959           }
2960           __pyx_L10_except_error:;
2961           __Pyx_XGIVEREF(__pyx_t_9);
2962           __Pyx_XGIVEREF(__pyx_t_10);
2963           __Pyx_XGIVEREF(__pyx_t_11);
2964           __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
2965           goto __pyx_L1_error;
2966           __pyx_L9_exception_handled:;
2967           __Pyx_XGIVEREF(__pyx_t_9);
2968           __Pyx_XGIVEREF(__pyx_t_10);
2969           __Pyx_XGIVEREF(__pyx_t_11);
2970           __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
2971           __pyx_L15_try_end:;
2972         }
2973         goto __pyx_L6;
2974       }
2975       __pyx_L6:;
2976       goto __pyx_L5;
2977     }
2978     /*else*/ {
2979
2980       /* "cvcf.pyx":81
2981  *                 except: raise ValueError("Don't understand region string '%s'" % r)
2982  *         else:
2983  *             raise ValueError("Don't understand region string '%s'" % r)             # <<<<<<<<<<<<<<
2984  *         result.append( (chrom,start,end) )
2985  *     return result
2986  */
2987       __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_v_r); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2988       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
2989       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2990       __Pyx_GOTREF(__pyx_t_2);
2991       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_5));
2992       __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
2993       __pyx_t_5 = 0;
2994       __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2995       __Pyx_GOTREF(__pyx_t_5);
2996       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
2997       __Pyx_Raise(__pyx_t_5, 0, 0, 0);
2998       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2999       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3000     }
3001     __pyx_L5:;
3002
3003     /* "cvcf.pyx":82
3004  *         else:
3005  *             raise ValueError("Don't understand region string '%s'" % r)
3006  *         result.append( (chrom,start,end) )             # <<<<<<<<<<<<<<
3007  *     return result
3008  * 
3009  */
3010     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3011     __Pyx_GOTREF(__pyx_t_5);
3012     __Pyx_INCREF(__pyx_v_chrom);
3013     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom);
3014     __Pyx_GIVEREF(__pyx_v_chrom);
3015     __Pyx_INCREF(__pyx_v_start);
3016     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_start);
3017     __Pyx_GIVEREF(__pyx_v_start);
3018     __Pyx_INCREF(__pyx_v_end);
3019     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_end);
3020     __Pyx_GIVEREF(__pyx_v_end);
3021     __pyx_t_14 = PyList_Append(__pyx_v_result, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3022     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
3023   }
3024   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3025
3026   /* "cvcf.pyx":83
3027  *             raise ValueError("Don't understand region string '%s'" % r)
3028  *         result.append( (chrom,start,end) )
3029  *     return result             # <<<<<<<<<<<<<<
3030  * 
3031  * 
3032  */
3033   __Pyx_XDECREF(__pyx_r);
3034   __Pyx_INCREF(((PyObject *)__pyx_v_result));
3035   __pyx_r = ((PyObject *)__pyx_v_result);
3036   goto __pyx_L0;
3037
3038   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3039   goto __pyx_L0;
3040   __pyx_L1_error:;
3041   __Pyx_XDECREF(__pyx_t_1);
3042   __Pyx_XDECREF(__pyx_t_2);
3043   __Pyx_XDECREF(__pyx_t_5);
3044   __Pyx_XDECREF(__pyx_t_6);
3045   __Pyx_XDECREF(__pyx_t_12);
3046   __Pyx_XDECREF(__pyx_t_13);
3047   __Pyx_AddTraceback("cvcf.parse_regions", __pyx_clineno, __pyx_lineno, __pyx_filename);
3048   __pyx_r = NULL;
3049   __pyx_L0:;
3050   __Pyx_XDECREF(__pyx_v_result);
3051   __Pyx_XDECREF(__pyx_v_r);
3052   __Pyx_XDECREF(__pyx_v_elts);
3053   __Pyx_XDECREF(__pyx_v_chrom);
3054   __Pyx_XDECREF(__pyx_v_start);
3055   __Pyx_XDECREF(__pyx_v_end);
3056   __Pyx_XDECREF(__pyx_v_ielts);
3057   __Pyx_XGIVEREF(__pyx_r);
3058   __Pyx_RefNannyFinishContext();
3059   return __pyx_r;
3060 }
3061
3062 /* Python wrapper */
3063 static int __pyx_pw_4cvcf_9VCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3064 static int __pyx_pw_4cvcf_9VCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3065   PyObject *__pyx_v_vcf = 0;
3066   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vcf,0};
3067   int __pyx_r;
3068   __Pyx_RefNannyDeclarations
3069   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
3070   {
3071     PyObject* values[1] = {0};
3072     if (unlikely(__pyx_kwds)) {
3073       Py_ssize_t kw_args;
3074       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3075       switch (pos_args) {
3076         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3077         case  0: break;
3078         default: goto __pyx_L5_argtuple_error;
3079       }
3080       kw_args = PyDict_Size(__pyx_kwds);
3081       switch (pos_args) {
3082         case  0:
3083         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vcf);
3084         if (likely(values[0])) kw_args--;
3085         else goto __pyx_L5_argtuple_error;
3086       }
3087       if (unlikely(kw_args > 0)) {
3088         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3089       }
3090     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
3091       goto __pyx_L5_argtuple_error;
3092     } else {
3093       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3094     }
3095     __pyx_v_vcf = values[0];
3096   }
3097   goto __pyx_L4_argument_unpacking_done;
3098   __pyx_L5_argtuple_error:;
3099   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3100   __pyx_L3_error:;
3101   __Pyx_AddTraceback("cvcf.VCFRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3102   __Pyx_RefNannyFinishContext();
3103   return -1;
3104   __pyx_L4_argument_unpacking_done:;
3105   __pyx_r = __pyx_pf_4cvcf_9VCFRecord___init__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self), __pyx_v_vcf);
3106   __Pyx_RefNannyFinishContext();
3107   return __pyx_r;
3108 }
3109
3110 /* "cvcf.pyx":104
3111  *     cdef uint32_t pos
3112  * 
3113  *     def __init__(self, vcf):             # <<<<<<<<<<<<<<
3114  *         self.vcf = vcf
3115  *         # if len(data) != len(self.vcf._samples):
3116  */
3117
3118 static int __pyx_pf_4cvcf_9VCFRecord___init__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf) {
3119   int __pyx_r;
3120   __Pyx_RefNannyDeclarations
3121   __Pyx_RefNannySetupContext("__init__", 0);
3122
3123   /* "cvcf.pyx":105
3124  * 
3125  *     def __init__(self, vcf):
3126  *         self.vcf = vcf             # <<<<<<<<<<<<<<
3127  *         # if len(data) != len(self.vcf._samples):
3128  *         #     self.error(str(data),
3129  */
3130   __Pyx_INCREF(__pyx_v_vcf);
3131   __Pyx_GIVEREF(__pyx_v_vcf);
3132   __Pyx_GOTREF(__pyx_v_self->vcf);
3133   __Pyx_DECREF(__pyx_v_self->vcf);
3134   __pyx_v_self->vcf = __pyx_v_vcf;
3135
3136   __pyx_r = 0;
3137   __Pyx_RefNannyFinishContext();
3138   return __pyx_r;
3139 }
3140
3141 /* Python wrapper */
3142 static int __pyx_pw_4cvcf_9VCFRecord_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3143 static int __pyx_pw_4cvcf_9VCFRecord_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3144   PyObject *__pyx_v_vcf = 0;
3145   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vcf,0};
3146   int __pyx_r;
3147   __Pyx_RefNannyDeclarations
3148   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
3149   {
3150     PyObject* values[1] = {0};
3151     if (unlikely(__pyx_kwds)) {
3152       Py_ssize_t kw_args;
3153       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3154       switch (pos_args) {
3155         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3156         case  0: break;
3157         default: goto __pyx_L5_argtuple_error;
3158       }
3159       kw_args = PyDict_Size(__pyx_kwds);
3160       switch (pos_args) {
3161         case  0:
3162         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vcf);
3163         if (likely(values[0])) kw_args--;
3164         else goto __pyx_L5_argtuple_error;
3165       }
3166       if (unlikely(kw_args > 0)) {
3167         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3168       }
3169     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
3170       goto __pyx_L5_argtuple_error;
3171     } else {
3172       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3173     }
3174     __pyx_v_vcf = values[0];
3175   }
3176   goto __pyx_L4_argument_unpacking_done;
3177   __pyx_L5_argtuple_error:;
3178   __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3179   __pyx_L3_error:;
3180   __Pyx_AddTraceback("cvcf.VCFRecord.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3181   __Pyx_RefNannyFinishContext();
3182   return -1;
3183   __pyx_L4_argument_unpacking_done:;
3184   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_2__cinit__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self), __pyx_v_vcf);
3185   __Pyx_RefNannyFinishContext();
3186   return __pyx_r;
3187 }
3188
3189 /* "cvcf.pyx":115
3190  *         #                     len(data)))
3191  * 
3192  *     def __cinit__(self, vcf ):             # <<<<<<<<<<<<<<
3193  *         # start indexed access at genotypes
3194  *         self.offset = 9
3195  */
3196
3197 static int __pyx_pf_4cvcf_9VCFRecord_2__cinit__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_vcf) {
3198   int __pyx_r;
3199   __Pyx_RefNannyDeclarations
3200   __Pyx_RefNannySetupContext("__cinit__", 0);
3201
3202   /* "cvcf.pyx":117
3203  *     def __cinit__(self, vcf ):
3204  *         # start indexed access at genotypes
3205  *         self.offset = 9             # <<<<<<<<<<<<<<
3206  * 
3207  *         self.vcf = vcf
3208  */
3209   __pyx_v_self->__pyx_base.offset = 9;
3210
3211   /* "cvcf.pyx":119
3212  *         self.offset = 9
3213  * 
3214  *         self.vcf = vcf             # <<<<<<<<<<<<<<
3215  * 
3216  *     def error(self,line,error,opt=None):
3217  */
3218   __Pyx_INCREF(__pyx_v_vcf);
3219   __Pyx_GIVEREF(__pyx_v_vcf);
3220   __Pyx_GOTREF(__pyx_v_self->vcf);
3221   __Pyx_DECREF(__pyx_v_self->vcf);
3222   __pyx_v_self->vcf = __pyx_v_vcf;
3223
3224   __pyx_r = 0;
3225   __Pyx_RefNannyFinishContext();
3226   return __pyx_r;
3227 }
3228
3229 /* Python wrapper */
3230 static PyObject *__pyx_pw_4cvcf_9VCFRecord_5error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3231 static char __pyx_doc_4cvcf_9VCFRecord_4error[] = "raise error.";
3232 static PyObject *__pyx_pw_4cvcf_9VCFRecord_5error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3233   PyObject *__pyx_v_line = 0;
3234   PyObject *__pyx_v_error = 0;
3235   PyObject *__pyx_v_opt = 0;
3236   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__line,&__pyx_n_s__error,&__pyx_n_s__opt,0};
3237   PyObject *__pyx_r = 0;
3238   __Pyx_RefNannyDeclarations
3239   __Pyx_RefNannySetupContext("error (wrapper)", 0);
3240   {
3241     PyObject* values[3] = {0,0,0};
3242
3243     /* "cvcf.pyx":121
3244  *         self.vcf = vcf
3245  * 
3246  *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
3247  *         '''raise error.'''
3248  *         # pass to vcf file for error handling
3249  */
3250     values[2] = ((PyObject *)Py_None);
3251     if (unlikely(__pyx_kwds)) {
3252       Py_ssize_t kw_args;
3253       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3254       switch (pos_args) {
3255         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3256         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3257         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3258         case  0: break;
3259         default: goto __pyx_L5_argtuple_error;
3260       }
3261       kw_args = PyDict_Size(__pyx_kwds);
3262       switch (pos_args) {
3263         case  0:
3264         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line);
3265         if (likely(values[0])) kw_args--;
3266         else goto __pyx_L5_argtuple_error;
3267         case  1:
3268         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__error);
3269         if (likely(values[1])) kw_args--;
3270         else {
3271           __Pyx_RaiseArgtupleInvalid("error", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3272         }
3273         case  2:
3274         if (kw_args > 0) {
3275           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__opt);
3276           if (value) { values[2] = value; kw_args--; }
3277         }
3278       }
3279       if (unlikely(kw_args > 0)) {
3280         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "error") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3281       }
3282     } else {
3283       switch (PyTuple_GET_SIZE(__pyx_args)) {
3284         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3285         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3286         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3287         break;
3288         default: goto __pyx_L5_argtuple_error;
3289       }
3290     }
3291     __pyx_v_line = values[0];
3292     __pyx_v_error = values[1];
3293     __pyx_v_opt = values[2];
3294   }
3295   goto __pyx_L4_argument_unpacking_done;
3296   __pyx_L5_argtuple_error:;
3297   __Pyx_RaiseArgtupleInvalid("error", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3298   __pyx_L3_error:;
3299   __Pyx_AddTraceback("cvcf.VCFRecord.error", __pyx_clineno, __pyx_lineno, __pyx_filename);
3300   __Pyx_RefNannyFinishContext();
3301   return NULL;
3302   __pyx_L4_argument_unpacking_done:;
3303   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_4error(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self), __pyx_v_line, __pyx_v_error, __pyx_v_opt);
3304   __Pyx_RefNannyFinishContext();
3305   return __pyx_r;
3306 }
3307
3308 static PyObject *__pyx_pf_4cvcf_9VCFRecord_4error(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_error, PyObject *__pyx_v_opt) {
3309   PyObject *__pyx_r = NULL;
3310   __Pyx_RefNannyDeclarations
3311   PyObject *__pyx_t_1 = NULL;
3312   PyObject *__pyx_t_2 = NULL;
3313   PyObject *__pyx_t_3 = NULL;
3314   int __pyx_lineno = 0;
3315   const char *__pyx_filename = NULL;
3316   int __pyx_clineno = 0;
3317   __Pyx_RefNannySetupContext("error", 0);
3318
3319   /* "cvcf.pyx":124
3320  *         '''raise error.'''
3321  *         # pass to vcf file for error handling
3322  *         return self.vcf.error( line, error, opt )             # <<<<<<<<<<<<<<
3323  * 
3324  *     cdef update( self, char * buffer, size_t nbytes ):
3325  */
3326   __Pyx_XDECREF(__pyx_r);
3327   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3328   __Pyx_GOTREF(__pyx_t_1);
3329   __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3330   __Pyx_GOTREF(__pyx_t_2);
3331   __Pyx_INCREF(__pyx_v_line);
3332   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
3333   __Pyx_GIVEREF(__pyx_v_line);
3334   __Pyx_INCREF(__pyx_v_error);
3335   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_error);
3336   __Pyx_GIVEREF(__pyx_v_error);
3337   __Pyx_INCREF(__pyx_v_opt);
3338   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_opt);
3339   __Pyx_GIVEREF(__pyx_v_opt);
3340   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3341   __Pyx_GOTREF(__pyx_t_3);
3342   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3343   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3344   __pyx_r = __pyx_t_3;
3345   __pyx_t_3 = 0;
3346   goto __pyx_L0;
3347
3348   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3349   goto __pyx_L0;
3350   __pyx_L1_error:;
3351   __Pyx_XDECREF(__pyx_t_1);
3352   __Pyx_XDECREF(__pyx_t_2);
3353   __Pyx_XDECREF(__pyx_t_3);
3354   __Pyx_AddTraceback("cvcf.VCFRecord.error", __pyx_clineno, __pyx_lineno, __pyx_filename);
3355   __pyx_r = NULL;
3356   __pyx_L0:;
3357   __Pyx_XGIVEREF(__pyx_r);
3358   __Pyx_RefNannyFinishContext();
3359   return __pyx_r;
3360 }
3361
3362 /* "cvcf.pyx":126
3363  *         return self.vcf.error( line, error, opt )
3364  * 
3365  *     cdef update( self, char * buffer, size_t nbytes ):             # <<<<<<<<<<<<<<
3366  *         '''update internal data.
3367  * 
3368  */
3369
3370 static PyObject *__pyx_f_4cvcf_9VCFRecord_update(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
3371   PyObject *__pyx_r = NULL;
3372   __Pyx_RefNannyDeclarations
3373   PyObject *__pyx_t_1 = NULL;
3374   int __pyx_lineno = 0;
3375   const char *__pyx_filename = NULL;
3376   int __pyx_clineno = 0;
3377   __Pyx_RefNannySetupContext("update", 0);
3378
3379   /* "cvcf.pyx":131
3380  *         nbytes does not include the terminal '\0'.
3381  *         '''
3382  *         TabProxies.TupleProxy.update( self, buffer, nbytes )             # <<<<<<<<<<<<<<
3383  * 
3384  *         self.contig = self.fields[0]
3385  */
3386   __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 = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3387   __Pyx_GOTREF(__pyx_t_1);
3388   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3389
3390   /* "cvcf.pyx":133
3391  *         TabProxies.TupleProxy.update( self, buffer, nbytes )
3392  * 
3393  *         self.contig = self.fields[0]             # <<<<<<<<<<<<<<
3394  *         # vcf counts from 1 - correct here
3395  *         self.pos = atoi( self.fields[1] ) - 1
3396  */
3397   __pyx_v_self->contig = (__pyx_v_self->__pyx_base.fields[0]);
3398
3399   /* "cvcf.pyx":135
3400  *         self.contig = self.fields[0]
3401  *         # vcf counts from 1 - correct here
3402  *         self.pos = atoi( self.fields[1] ) - 1             # <<<<<<<<<<<<<<
3403  * 
3404  *     def __len__(self):
3405  */
3406   __pyx_v_self->pos = (atoi((__pyx_v_self->__pyx_base.fields[1])) - 1);
3407
3408   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3409   goto __pyx_L0;
3410   __pyx_L1_error:;
3411   __Pyx_XDECREF(__pyx_t_1);
3412   __Pyx_AddTraceback("cvcf.VCFRecord.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
3413   __pyx_r = 0;
3414   __pyx_L0:;
3415   __Pyx_XGIVEREF(__pyx_r);
3416   __Pyx_RefNannyFinishContext();
3417   return __pyx_r;
3418 }
3419
3420 /* Python wrapper */
3421 static Py_ssize_t __pyx_pw_4cvcf_9VCFRecord_7__len__(PyObject *__pyx_v_self); /*proto*/
3422 static Py_ssize_t __pyx_pw_4cvcf_9VCFRecord_7__len__(PyObject *__pyx_v_self) {
3423   Py_ssize_t __pyx_r;
3424   __Pyx_RefNannyDeclarations
3425   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
3426   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_6__len__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
3427   __Pyx_RefNannyFinishContext();
3428   return __pyx_r;
3429 }
3430
3431 /* "cvcf.pyx":137
3432  *         self.pos = atoi( self.fields[1] ) - 1
3433  * 
3434  *     def __len__(self):             # <<<<<<<<<<<<<<
3435  *         return max(0, self.nfields - 9)
3436  * 
3437  */
3438
3439 static Py_ssize_t __pyx_pf_4cvcf_9VCFRecord_6__len__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
3440   Py_ssize_t __pyx_r;
3441   __Pyx_RefNannyDeclarations
3442   long __pyx_t_1;
3443   long __pyx_t_2;
3444   long __pyx_t_3;
3445   __Pyx_RefNannySetupContext("__len__", 0);
3446
3447   /* "cvcf.pyx":138
3448  * 
3449  *     def __len__(self):
3450  *         return max(0, self.nfields - 9)             # <<<<<<<<<<<<<<
3451  * 
3452  *     property contig:
3453  */
3454   __pyx_t_1 = (__pyx_v_self->__pyx_base.nfields - 9);
3455   __pyx_t_2 = 0;
3456   if ((__pyx_t_1 > __pyx_t_2)) {
3457     __pyx_t_3 = __pyx_t_1;
3458   } else {
3459     __pyx_t_3 = __pyx_t_2;
3460   }
3461   __pyx_r = __pyx_t_3;
3462   goto __pyx_L0;
3463
3464   __pyx_r = 0;
3465   __pyx_L0:;
3466   __Pyx_RefNannyFinishContext();
3467   return __pyx_r;
3468 }
3469
3470 /* Python wrapper */
3471 static PyObject *__pyx_pw_4cvcf_9VCFRecord_6contig_1__get__(PyObject *__pyx_v_self); /*proto*/
3472 static PyObject *__pyx_pw_4cvcf_9VCFRecord_6contig_1__get__(PyObject *__pyx_v_self) {
3473   PyObject *__pyx_r = 0;
3474   __Pyx_RefNannyDeclarations
3475   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3476   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_6contig___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
3477   __Pyx_RefNannyFinishContext();
3478   return __pyx_r;
3479 }
3480
3481 /* "cvcf.pyx":141
3482  * 
3483  *     property contig:
3484  *         def __get__(self): return self.contig             # <<<<<<<<<<<<<<
3485  * 
3486  *     property pos:
3487  */
3488
3489 static PyObject *__pyx_pf_4cvcf_9VCFRecord_6contig___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
3490   PyObject *__pyx_r = NULL;
3491   __Pyx_RefNannyDeclarations
3492   PyObject *__pyx_t_1 = NULL;
3493   int __pyx_lineno = 0;
3494   const char *__pyx_filename = NULL;
3495   int __pyx_clineno = 0;
3496   __Pyx_RefNannySetupContext("__get__", 0);
3497   __Pyx_XDECREF(__pyx_r);
3498   __pyx_t_1 = PyBytes_FromString(__pyx_v_self->contig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3499   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3500   __pyx_r = ((PyObject *)__pyx_t_1);
3501   __pyx_t_1 = 0;
3502   goto __pyx_L0;
3503
3504   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3505   goto __pyx_L0;
3506   __pyx_L1_error:;
3507   __Pyx_XDECREF(__pyx_t_1);
3508   __Pyx_AddTraceback("cvcf.VCFRecord.contig.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3509   __pyx_r = NULL;
3510   __pyx_L0:;
3511   __Pyx_XGIVEREF(__pyx_r);
3512   __Pyx_RefNannyFinishContext();
3513   return __pyx_r;
3514 }
3515
3516 /* Python wrapper */
3517 static PyObject *__pyx_pw_4cvcf_9VCFRecord_3pos_1__get__(PyObject *__pyx_v_self); /*proto*/
3518 static PyObject *__pyx_pw_4cvcf_9VCFRecord_3pos_1__get__(PyObject *__pyx_v_self) {
3519   PyObject *__pyx_r = 0;
3520   __Pyx_RefNannyDeclarations
3521   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3522   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_3pos___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
3523   __Pyx_RefNannyFinishContext();
3524   return __pyx_r;
3525 }
3526
3527 /* "cvcf.pyx":144
3528  * 
3529  *     property pos:
3530  *         def __get__(self): return self.pos             # <<<<<<<<<<<<<<
3531  * 
3532  *     property id:
3533  */
3534
3535 static PyObject *__pyx_pf_4cvcf_9VCFRecord_3pos___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
3536   PyObject *__pyx_r = NULL;
3537   __Pyx_RefNannyDeclarations
3538   PyObject *__pyx_t_1 = NULL;
3539   int __pyx_lineno = 0;
3540   const char *__pyx_filename = NULL;
3541   int __pyx_clineno = 0;
3542   __Pyx_RefNannySetupContext("__get__", 0);
3543   __Pyx_XDECREF(__pyx_r);
3544   __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_self->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3545   __Pyx_GOTREF(__pyx_t_1);
3546   __pyx_r = __pyx_t_1;
3547   __pyx_t_1 = 0;
3548   goto __pyx_L0;
3549
3550   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3551   goto __pyx_L0;
3552   __pyx_L1_error:;
3553   __Pyx_XDECREF(__pyx_t_1);
3554   __Pyx_AddTraceback("cvcf.VCFRecord.pos.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3555   __pyx_r = NULL;
3556   __pyx_L0:;
3557   __Pyx_XGIVEREF(__pyx_r);
3558   __Pyx_RefNannyFinishContext();
3559   return __pyx_r;
3560 }
3561
3562 /* Python wrapper */
3563 static PyObject *__pyx_pw_4cvcf_9VCFRecord_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
3564 static PyObject *__pyx_pw_4cvcf_9VCFRecord_2id_1__get__(PyObject *__pyx_v_self) {
3565   PyObject *__pyx_r = 0;
3566   __Pyx_RefNannyDeclarations
3567   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3568   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_2id___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
3569   __Pyx_RefNannyFinishContext();
3570   return __pyx_r;
3571 }
3572
3573 /* "cvcf.pyx":147
3574  * 
3575  *     property id:
3576  *         def __get__(self): return self.fields[2]             # <<<<<<<<<<<<<<
3577  * 
3578  *     property ref:
3579  */
3580
3581 static PyObject *__pyx_pf_4cvcf_9VCFRecord_2id___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
3582   PyObject *__pyx_r = NULL;
3583   __Pyx_RefNannyDeclarations
3584   PyObject *__pyx_t_1 = NULL;
3585   int __pyx_lineno = 0;
3586   const char *__pyx_filename = NULL;
3587   int __pyx_clineno = 0;
3588   __Pyx_RefNannySetupContext("__get__", 0);
3589   __Pyx_XDECREF(__pyx_r);
3590   __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[2])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3591   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3592   __pyx_r = ((PyObject *)__pyx_t_1);
3593   __pyx_t_1 = 0;
3594   goto __pyx_L0;
3595
3596   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3597   goto __pyx_L0;
3598   __pyx_L1_error:;
3599   __Pyx_XDECREF(__pyx_t_1);
3600   __Pyx_AddTraceback("cvcf.VCFRecord.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3601   __pyx_r = NULL;
3602   __pyx_L0:;
3603   __Pyx_XGIVEREF(__pyx_r);
3604   __Pyx_RefNannyFinishContext();
3605   return __pyx_r;
3606 }
3607
3608 /* Python wrapper */
3609 static PyObject *__pyx_pw_4cvcf_9VCFRecord_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
3610 static PyObject *__pyx_pw_4cvcf_9VCFRecord_3ref_1__get__(PyObject *__pyx_v_self) {
3611   PyObject *__pyx_r = 0;
3612   __Pyx_RefNannyDeclarations
3613   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3614   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_3ref___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
3615   __Pyx_RefNannyFinishContext();
3616   return __pyx_r;
3617 }
3618
3619 /* "cvcf.pyx":150
3620  * 
3621  *     property ref:
3622  *         def __get__(self): return self.fields[3]             # <<<<<<<<<<<<<<
3623  * 
3624  *     property alt:
3625  */
3626
3627 static PyObject *__pyx_pf_4cvcf_9VCFRecord_3ref___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
3628   PyObject *__pyx_r = NULL;
3629   __Pyx_RefNannyDeclarations
3630   PyObject *__pyx_t_1 = NULL;
3631   int __pyx_lineno = 0;
3632   const char *__pyx_filename = NULL;
3633   int __pyx_clineno = 0;
3634   __Pyx_RefNannySetupContext("__get__", 0);
3635   __Pyx_XDECREF(__pyx_r);
3636   __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[3])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3637   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3638   __pyx_r = ((PyObject *)__pyx_t_1);
3639   __pyx_t_1 = 0;
3640   goto __pyx_L0;
3641
3642   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3643   goto __pyx_L0;
3644   __pyx_L1_error:;
3645   __Pyx_XDECREF(__pyx_t_1);
3646   __Pyx_AddTraceback("cvcf.VCFRecord.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3647   __pyx_r = NULL;
3648   __pyx_L0:;
3649   __Pyx_XGIVEREF(__pyx_r);
3650   __Pyx_RefNannyFinishContext();
3651   return __pyx_r;
3652 }
3653
3654 /* Python wrapper */
3655 static PyObject *__pyx_pw_4cvcf_9VCFRecord_3alt_1__get__(PyObject *__pyx_v_self); /*proto*/
3656 static PyObject *__pyx_pw_4cvcf_9VCFRecord_3alt_1__get__(PyObject *__pyx_v_self) {
3657   PyObject *__pyx_r = 0;
3658   __Pyx_RefNannyDeclarations
3659   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3660   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_3alt___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
3661   __Pyx_RefNannyFinishContext();
3662   return __pyx_r;
3663 }
3664
3665 /* "cvcf.pyx":153
3666  * 
3667  *     property alt:
3668  *         def __get__(self):             # <<<<<<<<<<<<<<
3669  *             # convert v3.3 to v4.0 alleles below
3670  *             alt = self.fields[4]
3671  */
3672
3673 static PyObject *__pyx_pf_4cvcf_9VCFRecord_3alt___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
3674   PyObject *__pyx_v_alt = NULL;
3675   PyObject *__pyx_r = NULL;
3676   __Pyx_RefNannyDeclarations
3677   PyObject *__pyx_t_1 = NULL;
3678   int __pyx_t_2;
3679   PyObject *__pyx_t_3 = NULL;
3680   int __pyx_lineno = 0;
3681   const char *__pyx_filename = NULL;
3682   int __pyx_clineno = 0;
3683   __Pyx_RefNannySetupContext("__get__", 0);
3684
3685   /* "cvcf.pyx":155
3686  *         def __get__(self):
3687  *             # convert v3.3 to v4.0 alleles below
3688  *             alt = self.fields[4]             # <<<<<<<<<<<<<<
3689  *             if alt == ".": alt = []
3690  *             else: alt = alt.upper().split(',')
3691  */
3692   __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[4])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3693   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3694   __pyx_v_alt = ((PyObject *)__pyx_t_1);
3695   __pyx_t_1 = 0;
3696
3697   /* "cvcf.pyx":156
3698  *             # convert v3.3 to v4.0 alleles below
3699  *             alt = self.fields[4]
3700  *             if alt == ".": alt = []             # <<<<<<<<<<<<<<
3701  *             else: alt = alt.upper().split(',')
3702  *             return alt
3703  */
3704   __pyx_t_2 = __Pyx_PyString_Equals(__pyx_v_alt, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3705   if (__pyx_t_2) {
3706     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3707     __Pyx_GOTREF(__pyx_t_1);
3708     __Pyx_DECREF(__pyx_v_alt);
3709     __pyx_v_alt = ((PyObject *)__pyx_t_1);
3710     __pyx_t_1 = 0;
3711     goto __pyx_L3;
3712   }
3713   /*else*/ {
3714
3715     /* "cvcf.pyx":157
3716  *             alt = self.fields[4]
3717  *             if alt == ".": alt = []
3718  *             else: alt = alt.upper().split(',')             # <<<<<<<<<<<<<<
3719  *             return alt
3720  * 
3721  */
3722     __pyx_t_1 = PyObject_GetAttr(__pyx_v_alt, __pyx_n_s__upper); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3723     __Pyx_GOTREF(__pyx_t_1);
3724     __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 = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3725     __Pyx_GOTREF(__pyx_t_3);
3726     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3727     __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3728     __Pyx_GOTREF(__pyx_t_1);
3729     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3730     __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3731     __Pyx_GOTREF(__pyx_t_3);
3732     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3733     __Pyx_DECREF(__pyx_v_alt);
3734     __pyx_v_alt = __pyx_t_3;
3735     __pyx_t_3 = 0;
3736   }
3737   __pyx_L3:;
3738
3739   /* "cvcf.pyx":158
3740  *             if alt == ".": alt = []
3741  *             else: alt = alt.upper().split(',')
3742  *             return alt             # <<<<<<<<<<<<<<
3743  * 
3744  *     property qual:
3745  */
3746   __Pyx_XDECREF(__pyx_r);
3747   __Pyx_INCREF(__pyx_v_alt);
3748   __pyx_r = __pyx_v_alt;
3749   goto __pyx_L0;
3750
3751   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3752   goto __pyx_L0;
3753   __pyx_L1_error:;
3754   __Pyx_XDECREF(__pyx_t_1);
3755   __Pyx_XDECREF(__pyx_t_3);
3756   __Pyx_AddTraceback("cvcf.VCFRecord.alt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3757   __pyx_r = NULL;
3758   __pyx_L0:;
3759   __Pyx_XDECREF(__pyx_v_alt);
3760   __Pyx_XGIVEREF(__pyx_r);
3761   __Pyx_RefNannyFinishContext();
3762   return __pyx_r;
3763 }
3764
3765 /* Python wrapper */
3766 static PyObject *__pyx_pw_4cvcf_9VCFRecord_4qual_1__get__(PyObject *__pyx_v_self); /*proto*/
3767 static PyObject *__pyx_pw_4cvcf_9VCFRecord_4qual_1__get__(PyObject *__pyx_v_self) {
3768   PyObject *__pyx_r = 0;
3769   __Pyx_RefNannyDeclarations
3770   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3771   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_4qual___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
3772   __Pyx_RefNannyFinishContext();
3773   return __pyx_r;
3774 }
3775
3776 /* "cvcf.pyx":161
3777  * 
3778  *     property qual:
3779  *         def __get__(self):             # <<<<<<<<<<<<<<
3780  *             qual = self.fields[5]
3781  *             if qual == b".": qual = -1
3782  */
3783
3784 static PyObject *__pyx_pf_4cvcf_9VCFRecord_4qual___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
3785   PyObject *__pyx_v_qual = NULL;
3786   PyObject *__pyx_r = NULL;
3787   __Pyx_RefNannyDeclarations
3788   PyObject *__pyx_t_1 = NULL;
3789   int __pyx_t_2;
3790   PyObject *__pyx_t_3 = NULL;
3791   PyObject *__pyx_t_4 = NULL;
3792   PyObject *__pyx_t_5 = NULL;
3793   double __pyx_t_6;
3794   PyObject *__pyx_t_7 = NULL;
3795   PyObject *__pyx_t_8 = NULL;
3796   PyObject *__pyx_t_9 = NULL;
3797   PyObject *__pyx_t_10 = NULL;
3798   PyObject *__pyx_t_11 = NULL;
3799   PyObject *__pyx_t_12 = NULL;
3800   int __pyx_lineno = 0;
3801   const char *__pyx_filename = NULL;
3802   int __pyx_clineno = 0;
3803   __Pyx_RefNannySetupContext("__get__", 0);
3804
3805   /* "cvcf.pyx":162
3806  *     property qual:
3807  *         def __get__(self):
3808  *             qual = self.fields[5]             # <<<<<<<<<<<<<<
3809  *             if qual == b".": qual = -1
3810  *             else:
3811  */
3812   __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[5])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3813   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3814   __pyx_v_qual = ((PyObject *)__pyx_t_1);
3815   __pyx_t_1 = 0;
3816
3817   /* "cvcf.pyx":163
3818  *         def __get__(self):
3819  *             qual = self.fields[5]
3820  *             if qual == b".": qual = -1             # <<<<<<<<<<<<<<
3821  *             else:
3822  *                 try:    qual = float(qual)
3823  */
3824   __pyx_t_2 = __Pyx_PyBytes_Equals(__pyx_v_qual, ((PyObject *)__pyx_kp_b_9), Py_EQ); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3825   if (__pyx_t_2) {
3826     __Pyx_INCREF(__pyx_int_neg_1);
3827     __Pyx_DECREF(__pyx_v_qual);
3828     __pyx_v_qual = __pyx_int_neg_1;
3829     goto __pyx_L3;
3830   }
3831   /*else*/ {
3832
3833     /* "cvcf.pyx":165
3834  *             if qual == b".": qual = -1
3835  *             else:
3836  *                 try:    qual = float(qual)             # <<<<<<<<<<<<<<
3837  *                 except: self.vcf.error(str(self),self.QUAL_NOT_NUMERICAL)
3838  * 
3839  */
3840     {
3841       __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
3842       __Pyx_XGOTREF(__pyx_t_3);
3843       __Pyx_XGOTREF(__pyx_t_4);
3844       __Pyx_XGOTREF(__pyx_t_5);
3845       /*try:*/ {
3846         __pyx_t_6 = __Pyx_PyObject_AsDouble(__pyx_v_qual); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
3847         __pyx_t_1 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
3848         __Pyx_GOTREF(__pyx_t_1);
3849         __Pyx_DECREF(__pyx_v_qual);
3850         __pyx_v_qual = __pyx_t_1;
3851         __pyx_t_1 = 0;
3852       }
3853       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3854       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3855       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3856       goto __pyx_L11_try_end;
3857       __pyx_L4_error:;
3858       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3859
3860       /* "cvcf.pyx":166
3861  *             else:
3862  *                 try:    qual = float(qual)
3863  *                 except: self.vcf.error(str(self),self.QUAL_NOT_NUMERICAL)             # <<<<<<<<<<<<<<
3864  * 
3865  *     property filter:
3866  */
3867       /*except:*/ {
3868         __Pyx_AddTraceback("cvcf.VCFRecord.qual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3869         if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
3870         __Pyx_GOTREF(__pyx_t_1);
3871         __Pyx_GOTREF(__pyx_t_7);
3872         __Pyx_GOTREF(__pyx_t_8);
3873         __pyx_t_9 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
3874         __Pyx_GOTREF(__pyx_t_9);
3875         __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
3876         __Pyx_GOTREF(__pyx_t_10);
3877         __Pyx_INCREF(((PyObject *)__pyx_v_self));
3878         PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_self));
3879         __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
3880         __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
3881         __Pyx_GOTREF(__pyx_t_11);
3882         __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
3883         __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__QUAL_NOT_NUMERICAL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
3884         __Pyx_GOTREF(__pyx_t_10);
3885         __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
3886         __Pyx_GOTREF(__pyx_t_12);
3887         PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
3888         __Pyx_GIVEREF(__pyx_t_11);
3889         PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
3890         __Pyx_GIVEREF(__pyx_t_10);
3891         __pyx_t_11 = 0;
3892         __pyx_t_10 = 0;
3893         __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
3894         __Pyx_GOTREF(__pyx_t_10);
3895         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
3896         __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
3897         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
3898         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3899         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3900         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3901         goto __pyx_L5_exception_handled;
3902       }
3903       __pyx_L6_except_error:;
3904       __Pyx_XGIVEREF(__pyx_t_3);
3905       __Pyx_XGIVEREF(__pyx_t_4);
3906       __Pyx_XGIVEREF(__pyx_t_5);
3907       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
3908       goto __pyx_L1_error;
3909       __pyx_L5_exception_handled:;
3910       __Pyx_XGIVEREF(__pyx_t_3);
3911       __Pyx_XGIVEREF(__pyx_t_4);
3912       __Pyx_XGIVEREF(__pyx_t_5);
3913       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
3914       __pyx_L11_try_end:;
3915     }
3916   }
3917   __pyx_L3:;
3918
3919   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3920   goto __pyx_L0;
3921   __pyx_L1_error:;
3922   __Pyx_XDECREF(__pyx_t_1);
3923   __Pyx_XDECREF(__pyx_t_7);
3924   __Pyx_XDECREF(__pyx_t_8);
3925   __Pyx_XDECREF(__pyx_t_9);
3926   __Pyx_XDECREF(__pyx_t_10);
3927   __Pyx_XDECREF(__pyx_t_11);
3928   __Pyx_XDECREF(__pyx_t_12);
3929   __Pyx_AddTraceback("cvcf.VCFRecord.qual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3930   __pyx_r = NULL;
3931   __pyx_L0:;
3932   __Pyx_XDECREF(__pyx_v_qual);
3933   __Pyx_XGIVEREF(__pyx_r);
3934   __Pyx_RefNannyFinishContext();
3935   return __pyx_r;
3936 }
3937
3938 /* Python wrapper */
3939 static PyObject *__pyx_pw_4cvcf_9VCFRecord_6filter_1__get__(PyObject *__pyx_v_self); /*proto*/
3940 static PyObject *__pyx_pw_4cvcf_9VCFRecord_6filter_1__get__(PyObject *__pyx_v_self) {
3941   PyObject *__pyx_r = 0;
3942   __Pyx_RefNannyDeclarations
3943   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3944   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_6filter___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
3945   __Pyx_RefNannyFinishContext();
3946   return __pyx_r;
3947 }
3948
3949 /* "cvcf.pyx":169
3950  * 
3951  *     property filter:
3952  *         def __get__(self):             # <<<<<<<<<<<<<<
3953  *             f = self.fields[6]
3954  *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
3955  */
3956
3957 static PyObject *__pyx_pf_4cvcf_9VCFRecord_6filter___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
3958   char *__pyx_v_f;
3959   PyObject *__pyx_r = NULL;
3960   __Pyx_RefNannyDeclarations
3961   PyObject *__pyx_t_1 = NULL;
3962   PyObject *__pyx_t_2 = NULL;
3963   int __pyx_t_3;
3964   int __pyx_t_4;
3965   int __pyx_t_5;
3966   int __pyx_t_6;
3967   int __pyx_lineno = 0;
3968   const char *__pyx_filename = NULL;
3969   int __pyx_clineno = 0;
3970   __Pyx_RefNannySetupContext("__get__", 0);
3971
3972   /* "cvcf.pyx":170
3973  *     property filter:
3974  *         def __get__(self):
3975  *             f = self.fields[6]             # <<<<<<<<<<<<<<
3976  *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
3977  *             if f == b"." or f == b"PASS" or f == b"0": return []
3978  */
3979   __pyx_v_f = (__pyx_v_self->__pyx_base.fields[6]);
3980
3981   /* "cvcf.pyx":172
3982  *             f = self.fields[6]
3983  *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
3984  *             if f == b"." or f == b"PASS" or f == b"0": return []             # <<<<<<<<<<<<<<
3985  *             else: return f.split(';')
3986  * 
3987  */
3988   __pyx_t_1 = PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3989   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3990   __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_kp_b_9), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3991   __Pyx_GOTREF(__pyx_t_2);
3992   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
3993   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3994   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3995   if (!__pyx_t_3) {
3996     __pyx_t_2 = PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3997     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3998     __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_n_b__PASS), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3999     __Pyx_GOTREF(__pyx_t_1);
4000     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4001     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4002     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4003     if (!__pyx_t_4) {
4004       __pyx_t_1 = PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4005       __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4006       __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_kp_b__0), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4007       __Pyx_GOTREF(__pyx_t_2);
4008       __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
4009       __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4010       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4011       __pyx_t_6 = __pyx_t_5;
4012     } else {
4013       __pyx_t_6 = __pyx_t_4;
4014     }
4015     __pyx_t_4 = __pyx_t_6;
4016   } else {
4017     __pyx_t_4 = __pyx_t_3;
4018   }
4019   if (__pyx_t_4) {
4020     __Pyx_XDECREF(__pyx_r);
4021     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4022     __Pyx_GOTREF(__pyx_t_2);
4023     __pyx_r = ((PyObject *)__pyx_t_2);
4024     __pyx_t_2 = 0;
4025     goto __pyx_L0;
4026     goto __pyx_L3;
4027   }
4028   /*else*/ {
4029
4030     /* "cvcf.pyx":173
4031  *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
4032  *             if f == b"." or f == b"PASS" or f == b"0": return []
4033  *             else: return f.split(';')             # <<<<<<<<<<<<<<
4034  * 
4035  *     property info:
4036  */
4037     __Pyx_XDECREF(__pyx_r);
4038     __pyx_t_2 = PyBytes_FromString(__pyx_v_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4039     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4040     __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_t_2), __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4041     __Pyx_GOTREF(__pyx_t_1);
4042     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4043     __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4044     __Pyx_GOTREF(__pyx_t_2);
4045     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4046     __pyx_r = __pyx_t_2;
4047     __pyx_t_2 = 0;
4048     goto __pyx_L0;
4049   }
4050   __pyx_L3:;
4051
4052   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4053   goto __pyx_L0;
4054   __pyx_L1_error:;
4055   __Pyx_XDECREF(__pyx_t_1);
4056   __Pyx_XDECREF(__pyx_t_2);
4057   __Pyx_AddTraceback("cvcf.VCFRecord.filter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4058   __pyx_r = NULL;
4059   __pyx_L0:;
4060   __Pyx_XGIVEREF(__pyx_r);
4061   __Pyx_RefNannyFinishContext();
4062   return __pyx_r;
4063 }
4064
4065 /* Python wrapper */
4066 static PyObject *__pyx_pw_4cvcf_9VCFRecord_4info_1__get__(PyObject *__pyx_v_self); /*proto*/
4067 static PyObject *__pyx_pw_4cvcf_9VCFRecord_4info_1__get__(PyObject *__pyx_v_self) {
4068   PyObject *__pyx_r = 0;
4069   __Pyx_RefNannyDeclarations
4070   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4071   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_4info___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
4072   __Pyx_RefNannyFinishContext();
4073   return __pyx_r;
4074 }
4075
4076 /* "cvcf.pyx":176
4077  * 
4078  *     property info:
4079  *         def __get__(self):             # <<<<<<<<<<<<<<
4080  *             col = self.fields[7]
4081  *             # dictionary of keys, and list of values
4082  */
4083
4084 static PyObject *__pyx_pf_4cvcf_9VCFRecord_4info___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
4085   char *__pyx_v_col;
4086   PyObject *__pyx_v_info = NULL;
4087   PyObject *__pyx_v_blurp = NULL;
4088   PyObject *__pyx_v_elts = NULL;
4089   PyObject *__pyx_v_v = NULL;
4090   PyObject *__pyx_r = NULL;
4091   __Pyx_RefNannyDeclarations
4092   PyObject *__pyx_t_1 = NULL;
4093   PyObject *__pyx_t_2 = NULL;
4094   int __pyx_t_3;
4095   Py_ssize_t __pyx_t_4;
4096   PyObject *(*__pyx_t_5)(PyObject *);
4097   PyObject *__pyx_t_6 = NULL;
4098   Py_ssize_t __pyx_t_7;
4099   PyObject *__pyx_t_8 = NULL;
4100   PyObject *__pyx_t_9 = NULL;
4101   PyObject *__pyx_t_10 = NULL;
4102   int __pyx_lineno = 0;
4103   const char *__pyx_filename = NULL;
4104   int __pyx_clineno = 0;
4105   __Pyx_RefNannySetupContext("__get__", 0);
4106
4107   /* "cvcf.pyx":177
4108  *     property info:
4109  *         def __get__(self):
4110  *             col = self.fields[7]             # <<<<<<<<<<<<<<
4111  *             # dictionary of keys, and list of values
4112  *             info = {}
4113  */
4114   __pyx_v_col = (__pyx_v_self->__pyx_base.fields[7]);
4115
4116   /* "cvcf.pyx":179
4117  *             col = self.fields[7]
4118  *             # dictionary of keys, and list of values
4119  *             info = {}             # <<<<<<<<<<<<<<
4120  *             if col != b".":
4121  *                 for blurp in col.split(';'):
4122  */
4123   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4124   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4125   __pyx_v_info = __pyx_t_1;
4126   __pyx_t_1 = 0;
4127
4128   /* "cvcf.pyx":180
4129  *             # dictionary of keys, and list of values
4130  *             info = {}
4131  *             if col != b".":             # <<<<<<<<<<<<<<
4132  *                 for blurp in col.split(';'):
4133  *                     elts = blurp.split('=')
4134  */
4135   __pyx_t_1 = PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4136   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4137   __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_kp_b_9), Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4138   __Pyx_GOTREF(__pyx_t_2);
4139   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
4140   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4141   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4142   if (__pyx_t_3) {
4143
4144     /* "cvcf.pyx":181
4145  *             info = {}
4146  *             if col != b".":
4147  *                 for blurp in col.split(';'):             # <<<<<<<<<<<<<<
4148  *                     elts = blurp.split('=')
4149  *                     if len(elts) == 1: v = None
4150  */
4151     __pyx_t_2 = PyBytes_FromString(__pyx_v_col); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4152     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4153     __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_t_2), __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4154     __Pyx_GOTREF(__pyx_t_1);
4155     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4156     __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4157     __Pyx_GOTREF(__pyx_t_2);
4158     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4159     if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
4160       __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
4161       __pyx_t_5 = NULL;
4162     } else {
4163       __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4164       __Pyx_GOTREF(__pyx_t_1);
4165       __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
4166     }
4167     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4168     for (;;) {
4169       if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
4170         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
4171         __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
4172       } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
4173         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
4174         __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
4175       } else {
4176         __pyx_t_2 = __pyx_t_5(__pyx_t_1);
4177         if (unlikely(!__pyx_t_2)) {
4178           if (PyErr_Occurred()) {
4179             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
4180             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4181           }
4182           break;
4183         }
4184         __Pyx_GOTREF(__pyx_t_2);
4185       }
4186       __Pyx_XDECREF(__pyx_v_blurp);
4187       __pyx_v_blurp = __pyx_t_2;
4188       __pyx_t_2 = 0;
4189
4190       /* "cvcf.pyx":182
4191  *             if col != b".":
4192  *                 for blurp in col.split(';'):
4193  *                     elts = blurp.split('=')             # <<<<<<<<<<<<<<
4194  *                     if len(elts) == 1: v = None
4195  *                     elif len(elts) == 2: v = elts[1]
4196  */
4197       __pyx_t_2 = PyObject_GetAttr(__pyx_v_blurp, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4198       __Pyx_GOTREF(__pyx_t_2);
4199       __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4200       __Pyx_GOTREF(__pyx_t_6);
4201       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4202       __Pyx_XDECREF(__pyx_v_elts);
4203       __pyx_v_elts = __pyx_t_6;
4204       __pyx_t_6 = 0;
4205
4206       /* "cvcf.pyx":183
4207  *                 for blurp in col.split(';'):
4208  *                     elts = blurp.split('=')
4209  *                     if len(elts) == 1: v = None             # <<<<<<<<<<<<<<
4210  *                     elif len(elts) == 2: v = elts[1]
4211  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)
4212  */
4213       __pyx_t_7 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4214       __pyx_t_3 = (__pyx_t_7 == 1);
4215       if (__pyx_t_3) {
4216         __Pyx_INCREF(Py_None);
4217         __Pyx_XDECREF(__pyx_v_v);
4218         __pyx_v_v = Py_None;
4219         goto __pyx_L6;
4220       }
4221
4222       /* "cvcf.pyx":184
4223  *                     elts = blurp.split('=')
4224  *                     if len(elts) == 1: v = None
4225  *                     elif len(elts) == 2: v = elts[1]             # <<<<<<<<<<<<<<
4226  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)
4227  *                     info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self))
4228  */
4229       __pyx_t_7 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4230       __pyx_t_3 = (__pyx_t_7 == 2);
4231       if (__pyx_t_3) {
4232         __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4233         __Pyx_GOTREF(__pyx_t_6);
4234         __Pyx_XDECREF(__pyx_v_v);
4235         __pyx_v_v = __pyx_t_6;
4236         __pyx_t_6 = 0;
4237         goto __pyx_L6;
4238       }
4239       /*else*/ {
4240
4241         /* "cvcf.pyx":185
4242  *                     if len(elts) == 1: v = None
4243  *                     elif len(elts) == 2: v = elts[1]
4244  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)             # <<<<<<<<<<<<<<
4245  *                     info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self))
4246  *             return info
4247  */
4248         __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4249         __Pyx_GOTREF(__pyx_t_6);
4250         __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4251         __Pyx_GOTREF(__pyx_t_2);
4252         __Pyx_INCREF(((PyObject *)__pyx_v_self));
4253         PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
4254         __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4255         __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4256         __Pyx_GOTREF(__pyx_t_8);
4257         __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4258         __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4259         __Pyx_GOTREF(__pyx_t_2);
4260         __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4261         __Pyx_GOTREF(__pyx_t_9);
4262         PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
4263         __Pyx_GIVEREF(__pyx_t_8);
4264         PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
4265         __Pyx_GIVEREF(__pyx_t_2);
4266         __pyx_t_8 = 0;
4267         __pyx_t_2 = 0;
4268         __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4269         __Pyx_GOTREF(__pyx_t_2);
4270         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4271         __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
4272         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4273       }
4274       __pyx_L6:;
4275
4276       /* "cvcf.pyx":186
4277  *                     elif len(elts) == 2: v = elts[1]
4278  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)
4279  *                     info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self))             # <<<<<<<<<<<<<<
4280  *             return info
4281  * 
4282  */
4283       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4284       __Pyx_GOTREF(__pyx_t_2);
4285       __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4286       __Pyx_GOTREF(__pyx_t_9);
4287       if (unlikely(!__pyx_v_v)) { __Pyx_RaiseUnboundLocalError("v"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
4288       __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4289       __Pyx_GOTREF(__pyx_t_6);
4290       __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4291       __Pyx_GOTREF(__pyx_t_8);
4292       __Pyx_INCREF(((PyObject *)__pyx_v_self));
4293       PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_self));
4294       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4295       __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4296       __Pyx_GOTREF(__pyx_t_10);
4297       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
4298       __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4299       __Pyx_GOTREF(__pyx_t_8);
4300       PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
4301       __Pyx_GIVEREF(__pyx_t_9);
4302       __Pyx_INCREF(__pyx_v_v);
4303       PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_v);
4304       __Pyx_GIVEREF(__pyx_v_v);
4305       PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_6);
4306       __Pyx_GIVEREF(__pyx_t_6);
4307       PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_10);
4308       __Pyx_GIVEREF(__pyx_t_10);
4309       __pyx_t_9 = 0;
4310       __pyx_t_6 = 0;
4311       __pyx_t_10 = 0;
4312       __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4313       __Pyx_GOTREF(__pyx_t_10);
4314       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4315       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
4316       __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4317       __Pyx_GOTREF(__pyx_t_8);
4318       if (PyDict_SetItem(((PyObject *)__pyx_v_info), __pyx_t_8, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4319       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4320       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4321     }
4322     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4323     goto __pyx_L3;
4324   }
4325   __pyx_L3:;
4326
4327   /* "cvcf.pyx":187
4328  *                     else: self.vcf.error(str(self),self.ERROR_INFO_STRING)
4329  *                     info[elts[0]] = self.vcf.parse_formatdata(elts[0], v, self.vcf._info, str(self))
4330  *             return info             # <<<<<<<<<<<<<<
4331  * 
4332  *     property format:
4333  */
4334   __Pyx_XDECREF(__pyx_r);
4335   __Pyx_INCREF(((PyObject *)__pyx_v_info));
4336   __pyx_r = ((PyObject *)__pyx_v_info);
4337   goto __pyx_L0;
4338
4339   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4340   goto __pyx_L0;
4341   __pyx_L1_error:;
4342   __Pyx_XDECREF(__pyx_t_1);
4343   __Pyx_XDECREF(__pyx_t_2);
4344   __Pyx_XDECREF(__pyx_t_6);
4345   __Pyx_XDECREF(__pyx_t_8);
4346   __Pyx_XDECREF(__pyx_t_9);
4347   __Pyx_XDECREF(__pyx_t_10);
4348   __Pyx_AddTraceback("cvcf.VCFRecord.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4349   __pyx_r = NULL;
4350   __pyx_L0:;
4351   __Pyx_XDECREF(__pyx_v_info);
4352   __Pyx_XDECREF(__pyx_v_blurp);
4353   __Pyx_XDECREF(__pyx_v_elts);
4354   __Pyx_XDECREF(__pyx_v_v);
4355   __Pyx_XGIVEREF(__pyx_r);
4356   __Pyx_RefNannyFinishContext();
4357   return __pyx_r;
4358 }
4359
4360 /* Python wrapper */
4361 static PyObject *__pyx_pw_4cvcf_9VCFRecord_6format_1__get__(PyObject *__pyx_v_self); /*proto*/
4362 static PyObject *__pyx_pw_4cvcf_9VCFRecord_6format_1__get__(PyObject *__pyx_v_self) {
4363   PyObject *__pyx_r = 0;
4364   __Pyx_RefNannyDeclarations
4365   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4366   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_6format___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
4367   __Pyx_RefNannyFinishContext();
4368   return __pyx_r;
4369 }
4370
4371 /* "cvcf.pyx":190
4372  * 
4373  *     property format:
4374  *          def __get__(self):             # <<<<<<<<<<<<<<
4375  *              return self.fields[8].split(':')
4376  * 
4377  */
4378
4379 static PyObject *__pyx_pf_4cvcf_9VCFRecord_6format___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
4380   PyObject *__pyx_r = NULL;
4381   __Pyx_RefNannyDeclarations
4382   PyObject *__pyx_t_1 = NULL;
4383   PyObject *__pyx_t_2 = NULL;
4384   int __pyx_lineno = 0;
4385   const char *__pyx_filename = NULL;
4386   int __pyx_clineno = 0;
4387   __Pyx_RefNannySetupContext("__get__", 0);
4388
4389   /* "cvcf.pyx":191
4390  *     property format:
4391  *          def __get__(self):
4392  *              return self.fields[8].split(':')             # <<<<<<<<<<<<<<
4393  * 
4394  *     property samples:
4395  */
4396   __Pyx_XDECREF(__pyx_r);
4397   __pyx_t_1 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[8])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4398   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4399   __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_t_1), __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4400   __Pyx_GOTREF(__pyx_t_2);
4401   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
4402   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4403   __Pyx_GOTREF(__pyx_t_1);
4404   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4405   __pyx_r = __pyx_t_1;
4406   __pyx_t_1 = 0;
4407   goto __pyx_L0;
4408
4409   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4410   goto __pyx_L0;
4411   __pyx_L1_error:;
4412   __Pyx_XDECREF(__pyx_t_1);
4413   __Pyx_XDECREF(__pyx_t_2);
4414   __Pyx_AddTraceback("cvcf.VCFRecord.format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4415   __pyx_r = NULL;
4416   __pyx_L0:;
4417   __Pyx_XGIVEREF(__pyx_r);
4418   __Pyx_RefNannyFinishContext();
4419   return __pyx_r;
4420 }
4421
4422 /* Python wrapper */
4423 static PyObject *__pyx_pw_4cvcf_9VCFRecord_7samples_1__get__(PyObject *__pyx_v_self); /*proto*/
4424 static PyObject *__pyx_pw_4cvcf_9VCFRecord_7samples_1__get__(PyObject *__pyx_v_self) {
4425   PyObject *__pyx_r = 0;
4426   __Pyx_RefNannyDeclarations
4427   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4428   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_7samples___get__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self));
4429   __Pyx_RefNannyFinishContext();
4430   return __pyx_r;
4431 }
4432
4433 /* "cvcf.pyx":194
4434  * 
4435  *     property samples:
4436  *         def __get__(self):             # <<<<<<<<<<<<<<
4437  *             return self.vcf._samples
4438  * 
4439  */
4440
4441 static PyObject *__pyx_pf_4cvcf_9VCFRecord_7samples___get__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self) {
4442   PyObject *__pyx_r = NULL;
4443   __Pyx_RefNannyDeclarations
4444   PyObject *__pyx_t_1 = NULL;
4445   int __pyx_lineno = 0;
4446   const char *__pyx_filename = NULL;
4447   int __pyx_clineno = 0;
4448   __Pyx_RefNannySetupContext("__get__", 0);
4449
4450   /* "cvcf.pyx":195
4451  *     property samples:
4452  *         def __get__(self):
4453  *             return self.vcf._samples             # <<<<<<<<<<<<<<
4454  * 
4455  *     def __getitem__(self, key):
4456  */
4457   __Pyx_XDECREF(__pyx_r);
4458   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4459   __Pyx_GOTREF(__pyx_t_1);
4460   __pyx_r = __pyx_t_1;
4461   __pyx_t_1 = 0;
4462   goto __pyx_L0;
4463
4464   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4465   goto __pyx_L0;
4466   __pyx_L1_error:;
4467   __Pyx_XDECREF(__pyx_t_1);
4468   __Pyx_AddTraceback("cvcf.VCFRecord.samples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4469   __pyx_r = NULL;
4470   __pyx_L0:;
4471   __Pyx_XGIVEREF(__pyx_r);
4472   __Pyx_RefNannyFinishContext();
4473   return __pyx_r;
4474 }
4475
4476 /* Python wrapper */
4477 static PyObject *__pyx_pw_4cvcf_9VCFRecord_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
4478 static PyObject *__pyx_pw_4cvcf_9VCFRecord_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
4479   PyObject *__pyx_r = 0;
4480   __Pyx_RefNannyDeclarations
4481   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4482   __pyx_r = __pyx_pf_4cvcf_9VCFRecord_8__getitem__(((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_v_self), ((PyObject *)__pyx_v_key));
4483   __Pyx_RefNannyFinishContext();
4484   return __pyx_r;
4485 }
4486
4487 /* "cvcf.pyx":197
4488  *             return self.vcf._samples
4489  * 
4490  *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
4491  * 
4492  *         # parse sample columns
4493  */
4494
4495 static PyObject *__pyx_pf_4cvcf_9VCFRecord_8__getitem__(struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_self, PyObject *__pyx_v_key) {
4496   PyObject *__pyx_v_values = NULL;
4497   PyObject *__pyx_v_alt = NULL;
4498   PyObject *__pyx_v_format = NULL;
4499   PyObject *__pyx_v_result = NULL;
4500   PyObject *__pyx_v_idx = NULL;
4501   PyObject *__pyx_v_expected = NULL;
4502   PyObject *__pyx_v_value = NULL;
4503   PyObject *__pyx_r = NULL;
4504   __Pyx_RefNannyDeclarations
4505   PyObject *__pyx_t_1 = NULL;
4506   PyObject *__pyx_t_2 = NULL;
4507   Py_ssize_t __pyx_t_3;
4508   Py_ssize_t __pyx_t_4;
4509   int __pyx_t_5;
4510   PyObject *__pyx_t_6 = NULL;
4511   PyObject *__pyx_t_7 = NULL;
4512   PyObject *__pyx_t_8 = NULL;
4513   PyObject *__pyx_t_9 = NULL;
4514   PyObject *(*__pyx_t_10)(PyObject *);
4515   int __pyx_t_11;
4516   int __pyx_t_12;
4517   PyObject *__pyx_t_13 = NULL;
4518   int __pyx_lineno = 0;
4519   const char *__pyx_filename = NULL;
4520   int __pyx_clineno = 0;
4521   __Pyx_RefNannySetupContext("__getitem__", 0);
4522
4523   /* "cvcf.pyx":200
4524  * 
4525  *         # parse sample columns
4526  *         values = self.fields[self.vcf._sample2column[key]].split(':')             # <<<<<<<<<<<<<<
4527  *         alt = self.alt
4528  *         format = self.format
4529  */
4530   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___sample2column); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4531   __Pyx_GOTREF(__pyx_t_1);
4532   __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4533   __Pyx_GOTREF(__pyx_t_2);
4534   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4535   __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4536   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4537   __pyx_t_2 = PyBytes_FromString((__pyx_v_self->__pyx_base.fields[__pyx_t_3])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4538   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4539   __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_t_2), __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4540   __Pyx_GOTREF(__pyx_t_1);
4541   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4542   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4543   __Pyx_GOTREF(__pyx_t_2);
4544   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4545   __pyx_v_values = __pyx_t_2;
4546   __pyx_t_2 = 0;
4547
4548   /* "cvcf.pyx":201
4549  *         # parse sample columns
4550  *         values = self.fields[self.vcf._sample2column[key]].split(':')
4551  *         alt = self.alt             # <<<<<<<<<<<<<<
4552  *         format = self.format
4553  * 
4554  */
4555   __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4556   __Pyx_GOTREF(__pyx_t_2);
4557   __pyx_v_alt = __pyx_t_2;
4558   __pyx_t_2 = 0;
4559
4560   /* "cvcf.pyx":202
4561  *         values = self.fields[self.vcf._sample2column[key]].split(':')
4562  *         alt = self.alt
4563  *         format = self.format             # <<<<<<<<<<<<<<
4564  * 
4565  *         if len(values) > len(format):
4566  */
4567   __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4568   __Pyx_GOTREF(__pyx_t_2);
4569   __pyx_v_format = __pyx_t_2;
4570   __pyx_t_2 = 0;
4571
4572   /* "cvcf.pyx":204
4573  *         format = self.format
4574  * 
4575  *         if len(values) > len(format):             # <<<<<<<<<<<<<<
4576  *             self.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\
4577  *                            (len(values),key,len(format)))
4578  */
4579   __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4580   __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4581   __pyx_t_5 = (__pyx_t_3 > __pyx_t_4);
4582   if (__pyx_t_5) {
4583
4584     /* "cvcf.pyx":205
4585  * 
4586  *         if len(values) > len(format):
4587  *             self.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\             # <<<<<<<<<<<<<<
4588  *                            (len(values),key,len(format)))
4589  * 
4590  */
4591     __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4592     __Pyx_GOTREF(__pyx_t_2);
4593     __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4594     __Pyx_GOTREF(__pyx_t_1);
4595     __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4596     __Pyx_GOTREF(__pyx_t_6);
4597     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
4598     __Pyx_GIVEREF(__pyx_t_1);
4599     __pyx_t_1 = 0;
4600     __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4601     __Pyx_GOTREF(__pyx_t_1);
4602     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4603     __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_18); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4604     __Pyx_GOTREF(__pyx_t_6);
4605
4606     /* "cvcf.pyx":206
4607  *         if len(values) > len(format):
4608  *             self.error(str(self.line),self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" %\
4609  *                            (len(values),key,len(format)))             # <<<<<<<<<<<<<<
4610  * 
4611  *         result = {}
4612  */
4613     __pyx_t_4 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4614     __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4615     __Pyx_GOTREF(__pyx_t_7);
4616     __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4617     __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4618     __Pyx_GOTREF(__pyx_t_8);
4619     __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4620     __Pyx_GOTREF(__pyx_t_9);
4621     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
4622     __Pyx_GIVEREF(__pyx_t_7);
4623     __Pyx_INCREF(__pyx_v_key);
4624     PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_key);
4625     __Pyx_GIVEREF(__pyx_v_key);
4626     PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8);
4627     __Pyx_GIVEREF(__pyx_t_8);
4628     __pyx_t_7 = 0;
4629     __pyx_t_8 = 0;
4630     __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4631     __Pyx_GOTREF(((PyObject *)__pyx_t_8));
4632     __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
4633     __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4634     __Pyx_GOTREF(__pyx_t_9);
4635     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
4636     __Pyx_GIVEREF(__pyx_t_1);
4637     PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6);
4638     __Pyx_GIVEREF(__pyx_t_6);
4639     PyTuple_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_t_8));
4640     __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
4641     __pyx_t_1 = 0;
4642     __pyx_t_6 = 0;
4643     __pyx_t_8 = 0;
4644     __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4645     __Pyx_GOTREF(__pyx_t_8);
4646     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4647     __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
4648     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4649     goto __pyx_L3;
4650   }
4651   __pyx_L3:;
4652
4653   /* "cvcf.pyx":208
4654  *                            (len(values),key,len(format)))
4655  * 
4656  *         result = {}             # <<<<<<<<<<<<<<
4657  *         for idx in range(len(format)):
4658  *             expected = self.vcf.get_expected(format[idx], self.vcf._format, alt)
4659  */
4660   __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4661   __Pyx_GOTREF(((PyObject *)__pyx_t_8));
4662   __pyx_v_result = __pyx_t_8;
4663   __pyx_t_8 = 0;
4664
4665   /* "cvcf.pyx":209
4666  * 
4667  *         result = {}
4668  *         for idx in range(len(format)):             # <<<<<<<<<<<<<<
4669  *             expected = self.vcf.get_expected(format[idx], self.vcf._format, alt)
4670  *             if idx < len(values): value = values[idx]
4671  */
4672   __pyx_t_4 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4673   __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4674   __Pyx_GOTREF(__pyx_t_8);
4675   __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4676   __Pyx_GOTREF(__pyx_t_9);
4677   PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
4678   __Pyx_GIVEREF(__pyx_t_8);
4679   __pyx_t_8 = 0;
4680   __pyx_t_8 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4681   __Pyx_GOTREF(__pyx_t_8);
4682   __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
4683   if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
4684     __pyx_t_9 = __pyx_t_8; __Pyx_INCREF(__pyx_t_9); __pyx_t_4 = 0;
4685     __pyx_t_10 = NULL;
4686   } else {
4687     __pyx_t_4 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4688     __Pyx_GOTREF(__pyx_t_9);
4689     __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
4690   }
4691   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4692   for (;;) {
4693     if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_9)) {
4694       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_9)) break;
4695       __pyx_t_8 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
4696     } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_9)) {
4697       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
4698       __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
4699     } else {
4700       __pyx_t_8 = __pyx_t_10(__pyx_t_9);
4701       if (unlikely(!__pyx_t_8)) {
4702         if (PyErr_Occurred()) {
4703           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
4704           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4705         }
4706         break;
4707       }
4708       __Pyx_GOTREF(__pyx_t_8);
4709     }
4710     __Pyx_XDECREF(__pyx_v_idx);
4711     __pyx_v_idx = __pyx_t_8;
4712     __pyx_t_8 = 0;
4713
4714     /* "cvcf.pyx":210
4715  *         result = {}
4716  *         for idx in range(len(format)):
4717  *             expected = self.vcf.get_expected(format[idx], self.vcf._format, alt)             # <<<<<<<<<<<<<<
4718  *             if idx < len(values): value = values[idx]
4719  *             else:
4720  */
4721     __pyx_t_8 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__get_expected); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4722     __Pyx_GOTREF(__pyx_t_8);
4723     __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4724     __Pyx_GOTREF(__pyx_t_2);
4725     __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4726     __Pyx_GOTREF(__pyx_t_6);
4727     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4728     __Pyx_GOTREF(__pyx_t_1);
4729     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
4730     __Pyx_GIVEREF(__pyx_t_2);
4731     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
4732     __Pyx_GIVEREF(__pyx_t_6);
4733     __Pyx_INCREF(__pyx_v_alt);
4734     PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_alt);
4735     __Pyx_GIVEREF(__pyx_v_alt);
4736     __pyx_t_2 = 0;
4737     __pyx_t_6 = 0;
4738     __pyx_t_6 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4739     __Pyx_GOTREF(__pyx_t_6);
4740     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4741     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
4742     __Pyx_XDECREF(__pyx_v_expected);
4743     __pyx_v_expected = __pyx_t_6;
4744     __pyx_t_6 = 0;
4745
4746     /* "cvcf.pyx":211
4747  *         for idx in range(len(format)):
4748  *             expected = self.vcf.get_expected(format[idx], self.vcf._format, alt)
4749  *             if idx < len(values): value = values[idx]             # <<<<<<<<<<<<<<
4750  *             else:
4751  *                 if expected == -1: value = "."
4752  */
4753     __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4754     __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4755     __Pyx_GOTREF(__pyx_t_6);
4756     __pyx_t_1 = PyObject_RichCompare(__pyx_v_idx, __pyx_t_6, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4757     __Pyx_GOTREF(__pyx_t_1);
4758     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4759     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4760     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4761     if (__pyx_t_5) {
4762       __pyx_t_1 = PyObject_GetItem(__pyx_v_values, __pyx_v_idx); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4763       __Pyx_GOTREF(__pyx_t_1);
4764       __Pyx_XDECREF(__pyx_v_value);
4765       __pyx_v_value = __pyx_t_1;
4766       __pyx_t_1 = 0;
4767       goto __pyx_L6;
4768     }
4769     /*else*/ {
4770
4771       /* "cvcf.pyx":213
4772  *             if idx < len(values): value = values[idx]
4773  *             else:
4774  *                 if expected == -1: value = "."             # <<<<<<<<<<<<<<
4775  *                 else: value = ",".join(["."]*expected)
4776  * 
4777  */
4778       __pyx_t_1 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4779       __Pyx_GOTREF(__pyx_t_1);
4780       __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4781       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4782       if (__pyx_t_5) {
4783         __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
4784         __Pyx_XDECREF(__pyx_v_value);
4785         __pyx_v_value = ((PyObject *)__pyx_kp_s_9);
4786         goto __pyx_L7;
4787       }
4788       /*else*/ {
4789
4790         /* "cvcf.pyx":214
4791  *             else:
4792  *                 if expected == -1: value = "."
4793  *                 else: value = ",".join(["."]*expected)             # <<<<<<<<<<<<<<
4794  * 
4795  *             result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data))
4796  */
4797         __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4798         __Pyx_GOTREF(__pyx_t_1);
4799         __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4800         __Pyx_GOTREF(__pyx_t_6);
4801         __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
4802         PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_9));
4803         __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
4804         { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_6, __pyx_v_expected); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4805           __Pyx_GOTREF(__pyx_temp);
4806           __Pyx_DECREF(__pyx_t_6);
4807           __pyx_t_6 = __pyx_temp;
4808         }
4809         __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4810         __Pyx_GOTREF(__pyx_t_8);
4811         PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_t_6));
4812         __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
4813         __pyx_t_6 = 0;
4814         __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4815         __Pyx_GOTREF(__pyx_t_6);
4816         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4817         __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
4818         __Pyx_XDECREF(__pyx_v_value);
4819         __pyx_v_value = __pyx_t_6;
4820         __pyx_t_6 = 0;
4821       }
4822       __pyx_L7:;
4823     }
4824     __pyx_L6:;
4825
4826     /* "cvcf.pyx":216
4827  *                 else: value = ",".join(["."]*expected)
4828  * 
4829  *             result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data))             # <<<<<<<<<<<<<<
4830  *             if expected != -1 and len(result[format[idx]]) != expected:
4831  *                 self.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
4832  */
4833     __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4834     __Pyx_GOTREF(__pyx_t_6);
4835     __pyx_t_8 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4836     __Pyx_GOTREF(__pyx_t_8);
4837     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->vcf, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4838     __Pyx_GOTREF(__pyx_t_1);
4839     __pyx_t_2 = PyBytes_FromString(__pyx_v_self->__pyx_base.data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4840     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4841     __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4842     __Pyx_GOTREF(__pyx_t_7);
4843     PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_2));
4844     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
4845     __pyx_t_2 = 0;
4846     __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4847     __Pyx_GOTREF(__pyx_t_2);
4848     __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
4849     __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4850     __Pyx_GOTREF(__pyx_t_7);
4851     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
4852     __Pyx_GIVEREF(__pyx_t_8);
4853     __Pyx_INCREF(__pyx_v_value);
4854     PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_value);
4855     __Pyx_GIVEREF(__pyx_v_value);
4856     PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_1);
4857     __Pyx_GIVEREF(__pyx_t_1);
4858     PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_2);
4859     __Pyx_GIVEREF(__pyx_t_2);
4860     __pyx_t_8 = 0;
4861     __pyx_t_1 = 0;
4862     __pyx_t_2 = 0;
4863     __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4864     __Pyx_GOTREF(__pyx_t_2);
4865     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4866     __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
4867     __pyx_t_7 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4868     __Pyx_GOTREF(__pyx_t_7);
4869     if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_7, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4870     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4871     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4872
4873     /* "cvcf.pyx":217
4874  * 
4875  *             result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data))
4876  *             if expected != -1 and len(result[format[idx]]) != expected:             # <<<<<<<<<<<<<<
4877  *                 self.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
4878  *                            "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))
4879  */
4880     __pyx_t_2 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4881     __Pyx_GOTREF(__pyx_t_2);
4882     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4883     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4884     if (__pyx_t_5) {
4885       __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4886       __Pyx_GOTREF(__pyx_t_2);
4887       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_2); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4888       __Pyx_GOTREF(__pyx_t_7);
4889       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4890       __pyx_t_3 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4891       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4892       __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4893       __Pyx_GOTREF(__pyx_t_7);
4894       __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, __pyx_v_expected, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4895       __Pyx_GOTREF(__pyx_t_2);
4896       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4897       __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4898       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4899       __pyx_t_12 = __pyx_t_11;
4900     } else {
4901       __pyx_t_12 = __pyx_t_5;
4902     }
4903     if (__pyx_t_12) {
4904
4905       /* "cvcf.pyx":218
4906  *             result[format[idx]] = self.vcf.parse_formatdata(format[idx], value, self.vcf._format, str(self.data))
4907  *             if expected != -1 and len(result[format[idx]]) != expected:
4908  *                 self.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,             # <<<<<<<<<<<<<<
4909  *                            "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))
4910  *                 if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]]))
4911  */
4912       __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4913       __Pyx_GOTREF(__pyx_t_2);
4914       __pyx_t_7 = PyBytes_FromString(__pyx_v_self->__pyx_base.data); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4915       __Pyx_GOTREF(((PyObject *)__pyx_t_7));
4916       __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4917       __Pyx_GOTREF(__pyx_t_6);
4918       PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7));
4919       __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
4920       __pyx_t_7 = 0;
4921       __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4922       __Pyx_GOTREF(__pyx_t_7);
4923       __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4924       __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_20); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4925       __Pyx_GOTREF(__pyx_t_6);
4926
4927       /* "cvcf.pyx":219
4928  *             if expected != -1 and len(result[format[idx]]) != expected:
4929  *                 self.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
4930  *                            "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))             # <<<<<<<<<<<<<<
4931  *                 if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]]))
4932  *                 result[format[idx]] = result[format[idx]][:expected]
4933  */
4934       __pyx_t_1 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4935       __Pyx_GOTREF(__pyx_t_1);
4936       __pyx_t_8 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4937       __Pyx_GOTREF(__pyx_t_8);
4938       __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_8); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4939       __Pyx_GOTREF(__pyx_t_13);
4940       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4941       __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4942       __Pyx_GOTREF(__pyx_t_8);
4943       PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
4944       __Pyx_GIVEREF(__pyx_t_1);
4945       __Pyx_INCREF(__pyx_v_expected);
4946       PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_expected);
4947       __Pyx_GIVEREF(__pyx_v_expected);
4948       PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_13);
4949       __Pyx_GIVEREF(__pyx_t_13);
4950       __pyx_t_1 = 0;
4951       __pyx_t_13 = 0;
4952       __pyx_t_13 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4953       __Pyx_GOTREF(((PyObject *)__pyx_t_13));
4954       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
4955       __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4956       __Pyx_GOTREF(__pyx_t_8);
4957       PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
4958       __Pyx_GIVEREF(__pyx_t_7);
4959       PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
4960       __Pyx_GIVEREF(__pyx_t_6);
4961       PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_13));
4962       __Pyx_GIVEREF(((PyObject *)__pyx_t_13));
4963       __pyx_t_7 = 0;
4964       __pyx_t_6 = 0;
4965       __pyx_t_13 = 0;
4966       __pyx_t_13 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4967       __Pyx_GOTREF(__pyx_t_13);
4968       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4969       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
4970       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
4971
4972       /* "cvcf.pyx":220
4973  *                 self.error(str(self.data),self.BAD_NUMBER_OF_PARAMETERS,
4974  *                            "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))
4975  *                 if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]]))             # <<<<<<<<<<<<<<
4976  *                 result[format[idx]] = result[format[idx]][:expected]
4977  * 
4978  */
4979       __pyx_t_13 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4980       __Pyx_GOTREF(__pyx_t_13);
4981       __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_13); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4982       __Pyx_GOTREF(__pyx_t_8);
4983       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
4984       __pyx_t_3 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4985       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4986       __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4987       __Pyx_GOTREF(__pyx_t_8);
4988       __pyx_t_13 = PyObject_RichCompare(__pyx_t_8, __pyx_v_expected, Py_LT); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4989       __Pyx_GOTREF(__pyx_t_13);
4990       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4991       __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4992       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
4993       if (__pyx_t_12) {
4994         __pyx_t_13 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4995         __Pyx_GOTREF(__pyx_t_13);
4996         __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_13); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4997         __Pyx_GOTREF(__pyx_t_8);
4998         __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4999         __Pyx_GOTREF(__pyx_t_2);
5000         __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_2); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5001         __Pyx_GOTREF(__pyx_t_6);
5002         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5003         __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5004         __Pyx_GOTREF(__pyx_t_2);
5005         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5006         __pyx_t_6 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5007         __Pyx_GOTREF(__pyx_t_6);
5008         __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_6); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5009         __Pyx_GOTREF(__pyx_t_7);
5010         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5011         __pyx_t_3 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5012         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5013         __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5014         __Pyx_GOTREF(__pyx_t_7);
5015         __pyx_t_6 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5016         __Pyx_GOTREF(__pyx_t_6);
5017         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5018         __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5019         __Pyx_GOTREF(__pyx_t_7);
5020         PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
5021         __Pyx_GIVEREF(__pyx_t_2);
5022         { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5023           __Pyx_GOTREF(__pyx_temp);
5024           __Pyx_DECREF(__pyx_t_7);
5025           __pyx_t_7 = __pyx_temp;
5026         }
5027         __pyx_t_2 = 0;
5028         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5029         __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_8, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5030         __Pyx_GOTREF(__pyx_t_6);
5031         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5032         __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
5033         if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_13, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5034         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5035         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5036         goto __pyx_L9;
5037       }
5038       __pyx_L9:;
5039
5040       /* "cvcf.pyx":221
5041  *                            "id=%s, expected %s parameters, got %s" % (format[idx],expected,result[format[idx]]))
5042  *                 if len(result[format[idx]] ) < expected: result[format[idx]] += [result[format[idx]][-1]]*(expected-len(result[format[idx]]))
5043  *                 result[format[idx]] = result[format[idx]][:expected]             # <<<<<<<<<<<<<<
5044  * 
5045  *         return result
5046  */
5047       __pyx_t_13 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5048       __Pyx_GOTREF(__pyx_t_13);
5049       __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_t_13); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5050       __Pyx_GOTREF(__pyx_t_6);
5051       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5052       __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_expected); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5053       __pyx_t_13 = __Pyx_PySequence_GetSlice(__pyx_t_6, 0, __pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5054       __Pyx_GOTREF(__pyx_t_13);
5055       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5056       __pyx_t_6 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5057       __Pyx_GOTREF(__pyx_t_6);
5058       if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_6, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5059       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5060       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5061       goto __pyx_L8;
5062     }
5063     __pyx_L8:;
5064   }
5065   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5066
5067   /* "cvcf.pyx":223
5068  *                 result[format[idx]] = result[format[idx]][:expected]
5069  * 
5070  *         return result             # <<<<<<<<<<<<<<
5071  * 
5072  * 
5073  */
5074   __Pyx_XDECREF(__pyx_r);
5075   __Pyx_INCREF(((PyObject *)__pyx_v_result));
5076   __pyx_r = ((PyObject *)__pyx_v_result);
5077   goto __pyx_L0;
5078
5079   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5080   goto __pyx_L0;
5081   __pyx_L1_error:;
5082   __Pyx_XDECREF(__pyx_t_1);
5083   __Pyx_XDECREF(__pyx_t_2);
5084   __Pyx_XDECREF(__pyx_t_6);
5085   __Pyx_XDECREF(__pyx_t_7);
5086   __Pyx_XDECREF(__pyx_t_8);
5087   __Pyx_XDECREF(__pyx_t_9);
5088   __Pyx_XDECREF(__pyx_t_13);
5089   __Pyx_AddTraceback("cvcf.VCFRecord.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5090   __pyx_r = NULL;
5091   __pyx_L0:;
5092   __Pyx_XDECREF(__pyx_v_values);
5093   __Pyx_XDECREF(__pyx_v_alt);
5094   __Pyx_XDECREF(__pyx_v_format);
5095   __Pyx_XDECREF(__pyx_v_result);
5096   __Pyx_XDECREF(__pyx_v_idx);
5097   __Pyx_XDECREF(__pyx_v_expected);
5098   __Pyx_XDECREF(__pyx_v_value);
5099   __Pyx_XGIVEREF(__pyx_r);
5100   __Pyx_RefNannyFinishContext();
5101   return __pyx_r;
5102 }
5103
5104 /* Python wrapper */
5105 static int __pyx_pw_4cvcf_11asVCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5106 static int __pyx_pw_4cvcf_11asVCFRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5107   PyObject *__pyx_v_vcffile = 0;
5108   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vcffile,0};
5109   int __pyx_r;
5110   __Pyx_RefNannyDeclarations
5111   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5112   {
5113     PyObject* values[1] = {0};
5114     if (unlikely(__pyx_kwds)) {
5115       Py_ssize_t kw_args;
5116       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5117       switch (pos_args) {
5118         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5119         case  0: break;
5120         default: goto __pyx_L5_argtuple_error;
5121       }
5122       kw_args = PyDict_Size(__pyx_kwds);
5123       switch (pos_args) {
5124         case  0:
5125         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vcffile);
5126         if (likely(values[0])) kw_args--;
5127         else goto __pyx_L5_argtuple_error;
5128       }
5129       if (unlikely(kw_args > 0)) {
5130         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5131       }
5132     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
5133       goto __pyx_L5_argtuple_error;
5134     } else {
5135       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5136     }
5137     __pyx_v_vcffile = values[0];
5138   }
5139   goto __pyx_L4_argument_unpacking_done;
5140   __pyx_L5_argtuple_error:;
5141   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5142   __pyx_L3_error:;
5143   __Pyx_AddTraceback("cvcf.asVCFRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5144   __Pyx_RefNannyFinishContext();
5145   return -1;
5146   __pyx_L4_argument_unpacking_done:;
5147   __pyx_r = __pyx_pf_4cvcf_11asVCFRecord___init__(((struct __pyx_obj_4cvcf_asVCFRecord *)__pyx_v_self), __pyx_v_vcffile);
5148   __Pyx_RefNannyFinishContext();
5149   return __pyx_r;
5150 }
5151
5152 /* "cvcf.pyx":229
5153  *     '''converts a :term:`tabix row` into a VCF record.'''
5154  *     cdef vcffile
5155  *     def __init__(self, vcffile ):             # <<<<<<<<<<<<<<
5156  *         self.vcffile = vcffile
5157  *     def __call__(self, char * buffer, int len ):
5158  */
5159
5160 static int __pyx_pf_4cvcf_11asVCFRecord___init__(struct __pyx_obj_4cvcf_asVCFRecord *__pyx_v_self, PyObject *__pyx_v_vcffile) {
5161   int __pyx_r;
5162   __Pyx_RefNannyDeclarations
5163   __Pyx_RefNannySetupContext("__init__", 0);
5164
5165   /* "cvcf.pyx":230
5166  *     cdef vcffile
5167  *     def __init__(self, vcffile ):
5168  *         self.vcffile = vcffile             # <<<<<<<<<<<<<<
5169  *     def __call__(self, char * buffer, int len ):
5170  *         cdef VCFRecord r
5171  */
5172   __Pyx_INCREF(__pyx_v_vcffile);
5173   __Pyx_GIVEREF(__pyx_v_vcffile);
5174   __Pyx_GOTREF(__pyx_v_self->vcffile);
5175   __Pyx_DECREF(__pyx_v_self->vcffile);
5176   __pyx_v_self->vcffile = __pyx_v_vcffile;
5177
5178   __pyx_r = 0;
5179   __Pyx_RefNannyFinishContext();
5180   return __pyx_r;
5181 }
5182
5183 /* Python wrapper */
5184 static PyObject *__pyx_pw_4cvcf_11asVCFRecord_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5185 static PyObject *__pyx_pw_4cvcf_11asVCFRecord_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5186   char *__pyx_v_buffer;
5187   int __pyx_v_len;
5188   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__buffer,&__pyx_n_s__len,0};
5189   PyObject *__pyx_r = 0;
5190   __Pyx_RefNannyDeclarations
5191   __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
5192   {
5193     PyObject* values[2] = {0,0};
5194     if (unlikely(__pyx_kwds)) {
5195       Py_ssize_t kw_args;
5196       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5197       switch (pos_args) {
5198         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5199         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5200         case  0: break;
5201         default: goto __pyx_L5_argtuple_error;
5202       }
5203       kw_args = PyDict_Size(__pyx_kwds);
5204       switch (pos_args) {
5205         case  0:
5206         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buffer);
5207         if (likely(values[0])) kw_args--;
5208         else goto __pyx_L5_argtuple_error;
5209         case  1:
5210         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__len);
5211         if (likely(values[1])) kw_args--;
5212         else {
5213           __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5214         }
5215       }
5216       if (unlikely(kw_args > 0)) {
5217         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5218       }
5219     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5220       goto __pyx_L5_argtuple_error;
5221     } else {
5222       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5223       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5224     }
5225     __pyx_v_buffer = PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5226     __pyx_v_len = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_len == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5227   }
5228   goto __pyx_L4_argument_unpacking_done;
5229   __pyx_L5_argtuple_error:;
5230   __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5231   __pyx_L3_error:;
5232   __Pyx_AddTraceback("cvcf.asVCFRecord.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5233   __Pyx_RefNannyFinishContext();
5234   return NULL;
5235   __pyx_L4_argument_unpacking_done:;
5236   __pyx_r = __pyx_pf_4cvcf_11asVCFRecord_2__call__(((struct __pyx_obj_4cvcf_asVCFRecord *)__pyx_v_self), __pyx_v_buffer, __pyx_v_len);
5237   __Pyx_RefNannyFinishContext();
5238   return __pyx_r;
5239 }
5240
5241 /* "cvcf.pyx":231
5242  *     def __init__(self, vcffile ):
5243  *         self.vcffile = vcffile
5244  *     def __call__(self, char * buffer, int len ):             # <<<<<<<<<<<<<<
5245  *         cdef VCFRecord r
5246  *         r = VCFRecord( self.vcffile )
5247  */
5248
5249 static PyObject *__pyx_pf_4cvcf_11asVCFRecord_2__call__(struct __pyx_obj_4cvcf_asVCFRecord *__pyx_v_self, char *__pyx_v_buffer, int __pyx_v_len) {
5250   struct __pyx_obj_4cvcf_VCFRecord *__pyx_v_r = 0;
5251   PyObject *__pyx_r = NULL;
5252   __Pyx_RefNannyDeclarations
5253   PyObject *__pyx_t_1 = NULL;
5254   PyObject *__pyx_t_2 = NULL;
5255   int __pyx_lineno = 0;
5256   const char *__pyx_filename = NULL;
5257   int __pyx_clineno = 0;
5258   __Pyx_RefNannySetupContext("__call__", 0);
5259
5260   /* "cvcf.pyx":233
5261  *     def __call__(self, char * buffer, int len ):
5262  *         cdef VCFRecord r
5263  *         r = VCFRecord( self.vcffile )             # <<<<<<<<<<<<<<
5264  *         r.copy( buffer, len )
5265  *         return r
5266  */
5267   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5268   __Pyx_GOTREF(__pyx_t_1);
5269   __Pyx_INCREF(__pyx_v_self->vcffile);
5270   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->vcffile);
5271   __Pyx_GIVEREF(__pyx_v_self->vcffile);
5272   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cvcf_VCFRecord)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5273   __Pyx_GOTREF(__pyx_t_2);
5274   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5275   __pyx_v_r = ((struct __pyx_obj_4cvcf_VCFRecord *)__pyx_t_2);
5276   __pyx_t_2 = 0;
5277
5278   /* "cvcf.pyx":234
5279  *         cdef VCFRecord r
5280  *         r = VCFRecord( self.vcffile )
5281  *         r.copy( buffer, len )             # <<<<<<<<<<<<<<
5282  *         return r
5283  * 
5284  */
5285   __pyx_t_2 = ((struct __pyx_vtabstruct_4cvcf_VCFRecord *)__pyx_v_r->__pyx_base.__pyx_vtab)->__pyx_base.copy(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_r), __pyx_v_buffer, __pyx_v_len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5286   __Pyx_GOTREF(__pyx_t_2);
5287   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5288
5289   /* "cvcf.pyx":235
5290  *         r = VCFRecord( self.vcffile )
5291  *         r.copy( buffer, len )
5292  *         return r             # <<<<<<<<<<<<<<
5293  * 
5294  * class VCF(object):
5295  */
5296   __Pyx_XDECREF(__pyx_r);
5297   __Pyx_INCREF(((PyObject *)__pyx_v_r));
5298   __pyx_r = ((PyObject *)__pyx_v_r);
5299   goto __pyx_L0;
5300
5301   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5302   goto __pyx_L0;
5303   __pyx_L1_error:;
5304   __Pyx_XDECREF(__pyx_t_1);
5305   __Pyx_XDECREF(__pyx_t_2);
5306   __Pyx_AddTraceback("cvcf.asVCFRecord.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5307   __pyx_r = NULL;
5308   __pyx_L0:;
5309   __Pyx_XDECREF((PyObject *)__pyx_v_r);
5310   __Pyx_XGIVEREF(__pyx_r);
5311   __Pyx_RefNannyFinishContext();
5312   return __pyx_r;
5313 }
5314
5315 /* "cvcf.pyx":314
5316  *     _lines = None
5317  * 
5318  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):             # <<<<<<<<<<<<<<
5319  *         # make error identifiers accessible by name
5320  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
5321  */
5322
5323 static PyObject *__pyx_pf_4cvcf_3VCF_85__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
5324   PyObject *__pyx_r = NULL;
5325   __Pyx_RefNannyDeclarations
5326   PyObject *__pyx_t_1 = NULL;
5327   int __pyx_lineno = 0;
5328   const char *__pyx_filename = NULL;
5329   int __pyx_clineno = 0;
5330   __Pyx_RefNannySetupContext("__defaults__", 0);
5331   __Pyx_XDECREF(__pyx_r);
5332   __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5333   __Pyx_GOTREF(__pyx_t_1);
5334   __Pyx_INCREF(((PyObject *)Py_None));
5335   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_None));
5336   __Pyx_GIVEREF(((PyObject *)Py_None));
5337   __Pyx_INCREF(((PyObject *)Py_None));
5338   PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
5339   __Pyx_GIVEREF(((PyObject *)Py_None));
5340   __Pyx_INCREF(((PyObject *)Py_None));
5341   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None));
5342   __Pyx_GIVEREF(((PyObject *)Py_None));
5343   __Pyx_INCREF(((PyObject *)Py_None));
5344   PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None));
5345   __Pyx_GIVEREF(((PyObject *)Py_None));
5346   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_leftalign);
5347   PyTuple_SET_ITEM(__pyx_t_1, 4, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_leftalign);
5348   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_leftalign);
5349   __pyx_r = ((PyObject *)__pyx_t_1);
5350   __pyx_t_1 = 0;
5351   goto __pyx_L0;
5352
5353   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5354   goto __pyx_L0;
5355   __pyx_L1_error:;
5356   __Pyx_XDECREF(__pyx_t_1);
5357   __Pyx_AddTraceback("cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5358   __pyx_r = NULL;
5359   __pyx_L0:;
5360   __Pyx_XGIVEREF(__pyx_r);
5361   __Pyx_RefNannyFinishContext();
5362   return __pyx_r;
5363 }
5364
5365 /* Python wrapper */
5366 static PyObject *__pyx_pw_4cvcf_3VCF_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5367 static PyMethodDef __pyx_mdef_4cvcf_3VCF_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_4cvcf_3VCF_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
5368 static PyObject *__pyx_pw_4cvcf_3VCF_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5369   PyObject *__pyx_v_self = 0;
5370   PyObject *__pyx_v__copy = 0;
5371   PyObject *__pyx_v_reference = 0;
5372   PyObject *__pyx_v_regions = 0;
5373   PyObject *__pyx_v_lines = 0;
5374   PyObject *__pyx_v_leftalign = 0;
5375   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s___copy,&__pyx_n_s__reference,&__pyx_n_s__regions,&__pyx_n_s__lines,&__pyx_n_s__leftalign,0};
5376   PyObject *__pyx_r = 0;
5377   __Pyx_RefNannyDeclarations
5378   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5379   __pyx_self = __pyx_self;
5380   {
5381     PyObject* values[6] = {0,0,0,0,0,0};
5382     __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
5383     values[1] = ((PyObject *)((PyObject *)Py_None));
5384     values[2] = ((PyObject *)((PyObject *)Py_None));
5385     values[3] = ((PyObject *)((PyObject *)Py_None));
5386     values[4] = ((PyObject *)((PyObject *)Py_None));
5387     values[5] = __pyx_dynamic_args->__pyx_arg_leftalign;
5388     if (unlikely(__pyx_kwds)) {
5389       Py_ssize_t kw_args;
5390       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5391       switch (pos_args) {
5392         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5393         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5394         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5395         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5396         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5397         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5398         case  0: break;
5399         default: goto __pyx_L5_argtuple_error;
5400       }
5401       kw_args = PyDict_Size(__pyx_kwds);
5402       switch (pos_args) {
5403         case  0:
5404         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
5405         if (likely(values[0])) kw_args--;
5406         else goto __pyx_L5_argtuple_error;
5407         case  1:
5408         if (kw_args > 0) {
5409           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s___copy);
5410           if (value) { values[1] = value; kw_args--; }
5411         }
5412         case  2:
5413         if (kw_args > 0) {
5414           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
5415           if (value) { values[2] = value; kw_args--; }
5416         }
5417         case  3:
5418         if (kw_args > 0) {
5419           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__regions);
5420           if (value) { values[3] = value; kw_args--; }
5421         }
5422         case  4:
5423         if (kw_args > 0) {
5424           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lines);
5425           if (value) { values[4] = value; kw_args--; }
5426         }
5427         case  5:
5428         if (kw_args > 0) {
5429           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__leftalign);
5430           if (value) { values[5] = value; kw_args--; }
5431         }
5432       }
5433       if (unlikely(kw_args > 0)) {
5434         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5435       }
5436     } else {
5437       switch (PyTuple_GET_SIZE(__pyx_args)) {
5438         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5439         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5440         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5441         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5442         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5443         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5444         break;
5445         default: goto __pyx_L5_argtuple_error;
5446       }
5447     }
5448     __pyx_v_self = values[0];
5449     __pyx_v__copy = values[1];
5450     __pyx_v_reference = values[2];
5451     __pyx_v_regions = values[3];
5452     __pyx_v_lines = values[4];
5453     __pyx_v_leftalign = values[5];
5454   }
5455   goto __pyx_L4_argument_unpacking_done;
5456   __pyx_L5_argtuple_error:;
5457   __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5458   __pyx_L3_error:;
5459   __Pyx_AddTraceback("cvcf.VCF.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5460   __Pyx_RefNannyFinishContext();
5461   return NULL;
5462   __pyx_L4_argument_unpacking_done:;
5463   __pyx_r = __pyx_pf_4cvcf_3VCF___init__(__pyx_self, __pyx_v_self, __pyx_v__copy, __pyx_v_reference, __pyx_v_regions, __pyx_v_lines, __pyx_v_leftalign);
5464   __Pyx_RefNannyFinishContext();
5465   return __pyx_r;
5466 }
5467
5468 static PyObject *__pyx_pf_4cvcf_3VCF___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v__copy, PyObject *__pyx_v_reference, PyObject *__pyx_v_regions, PyObject *__pyx_v_lines, PyObject *__pyx_v_leftalign) {
5469   PyObject *__pyx_v_id = NULL;
5470   PyObject *__pyx_r = NULL;
5471   __Pyx_RefNannyDeclarations
5472   PyObject *__pyx_t_1 = NULL;
5473   PyObject *__pyx_t_2 = NULL;
5474   Py_ssize_t __pyx_t_3;
5475   PyObject *(*__pyx_t_4)(PyObject *);
5476   PyObject *__pyx_t_5 = NULL;
5477   PyObject *__pyx_t_6 = NULL;
5478   int __pyx_t_7;
5479   int __pyx_lineno = 0;
5480   const char *__pyx_filename = NULL;
5481   int __pyx_clineno = 0;
5482   __Pyx_RefNannySetupContext("__init__", 0);
5483
5484   /* "cvcf.pyx":316
5485  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):
5486  *         # make error identifiers accessible by name
5487  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id             # <<<<<<<<<<<<<<
5488  *         if _copy != None:
5489  *             self._leftalign = _copy._leftalign
5490  */
5491   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5492   __Pyx_GOTREF(__pyx_t_1);
5493   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5494   __Pyx_GOTREF(__pyx_t_2);
5495   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5496   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5497   __Pyx_GOTREF(__pyx_t_1);
5498   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5499   if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
5500     __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
5501     __pyx_t_4 = NULL;
5502   } else {
5503     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5504     __Pyx_GOTREF(__pyx_t_2);
5505     __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
5506   }
5507   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5508   for (;;) {
5509     if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
5510       if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
5511       __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++;
5512     } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
5513       if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
5514       __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++;
5515     } else {
5516       __pyx_t_1 = __pyx_t_4(__pyx_t_2);
5517       if (unlikely(!__pyx_t_1)) {
5518         if (PyErr_Occurred()) {
5519           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
5520           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5521         }
5522         break;
5523       }
5524       __Pyx_GOTREF(__pyx_t_1);
5525     }
5526     __Pyx_XDECREF(__pyx_v_id);
5527     __pyx_v_id = __pyx_t_1;
5528     __pyx_t_1 = 0;
5529     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____dict__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5530     __Pyx_GOTREF(__pyx_t_1);
5531     __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___errors); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5532     __Pyx_GOTREF(__pyx_t_5);
5533     __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_id); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5534     __Pyx_GOTREF(__pyx_t_6);
5535     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5536     __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5537     __Pyx_GOTREF(__pyx_t_5);
5538     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5539     __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5540     __Pyx_GOTREF(__pyx_t_6);
5541     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5542     __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5543     __Pyx_GOTREF(__pyx_t_5);
5544     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5545     if (PyObject_SetItem(__pyx_t_1, __pyx_t_5, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5546     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5547     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5548   }
5549   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5550
5551   /* "cvcf.pyx":317
5552  *         # make error identifiers accessible by name
5553  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
5554  *         if _copy != None:             # <<<<<<<<<<<<<<
5555  *             self._leftalign = _copy._leftalign
5556  *             self._header = _copy._header[:]
5557  */
5558   __pyx_t_2 = PyObject_RichCompare(__pyx_v__copy, Py_None, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5559   __Pyx_GOTREF(__pyx_t_2);
5560   __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5561   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5562   if (__pyx_t_7) {
5563
5564     /* "cvcf.pyx":318
5565  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
5566  *         if _copy != None:
5567  *             self._leftalign = _copy._leftalign             # <<<<<<<<<<<<<<
5568  *             self._header = _copy._header[:]
5569  *             self._version = _copy._version
5570  */
5571     __pyx_t_2 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___leftalign); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5572     __Pyx_GOTREF(__pyx_t_2);
5573     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___leftalign, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5574     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5575
5576     /* "cvcf.pyx":319
5577  *         if _copy != None:
5578  *             self._leftalign = _copy._leftalign
5579  *             self._header = _copy._header[:]             # <<<<<<<<<<<<<<
5580  *             self._version = _copy._version
5581  *             self._info = copy.deepcopy(_copy._info)
5582  */
5583     __pyx_t_2 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___header); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5584     __Pyx_GOTREF(__pyx_t_2);
5585     __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_t_2, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5586     __Pyx_GOTREF(__pyx_t_5);
5587     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5588     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___header, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5589     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5590
5591     /* "cvcf.pyx":320
5592  *             self._leftalign = _copy._leftalign
5593  *             self._header = _copy._header[:]
5594  *             self._version = _copy._version             # <<<<<<<<<<<<<<
5595  *             self._info = copy.deepcopy(_copy._info)
5596  *             self._filter = copy.deepcopy(_copy._filter)
5597  */
5598     __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___version); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5599     __Pyx_GOTREF(__pyx_t_5);
5600     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5601     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5602
5603     /* "cvcf.pyx":321
5604  *             self._header = _copy._header[:]
5605  *             self._version = _copy._version
5606  *             self._info = copy.deepcopy(_copy._info)             # <<<<<<<<<<<<<<
5607  *             self._filter = copy.deepcopy(_copy._filter)
5608  *             self._format = copy.deepcopy(_copy._format)
5609  */
5610     __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5611     __Pyx_GOTREF(__pyx_t_5);
5612     __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5613     __Pyx_GOTREF(__pyx_t_2);
5614     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5615     __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5616     __Pyx_GOTREF(__pyx_t_5);
5617     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5618     __Pyx_GOTREF(__pyx_t_1);
5619     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
5620     __Pyx_GIVEREF(__pyx_t_5);
5621     __pyx_t_5 = 0;
5622     __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5623     __Pyx_GOTREF(__pyx_t_5);
5624     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5625     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5626     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___info, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5627     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5628
5629     /* "cvcf.pyx":322
5630  *             self._version = _copy._version
5631  *             self._info = copy.deepcopy(_copy._info)
5632  *             self._filter = copy.deepcopy(_copy._filter)             # <<<<<<<<<<<<<<
5633  *             self._format = copy.deepcopy(_copy._format)
5634  *             self._samples = _copy._samples[:]
5635  */
5636     __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5637     __Pyx_GOTREF(__pyx_t_5);
5638     __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5639     __Pyx_GOTREF(__pyx_t_1);
5640     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5641     __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___filter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5642     __Pyx_GOTREF(__pyx_t_5);
5643     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5644     __Pyx_GOTREF(__pyx_t_2);
5645     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
5646     __Pyx_GIVEREF(__pyx_t_5);
5647     __pyx_t_5 = 0;
5648     __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5649     __Pyx_GOTREF(__pyx_t_5);
5650     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5651     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
5652     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___filter, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5653     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5654
5655     /* "cvcf.pyx":323
5656  *             self._info = copy.deepcopy(_copy._info)
5657  *             self._filter = copy.deepcopy(_copy._filter)
5658  *             self._format = copy.deepcopy(_copy._format)             # <<<<<<<<<<<<<<
5659  *             self._samples = _copy._samples[:]
5660  *             self._sample2column = copy.deepcopy(_copy._sample2column)
5661  */
5662     __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5663     __Pyx_GOTREF(__pyx_t_5);
5664     __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5665     __Pyx_GOTREF(__pyx_t_2);
5666     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5667     __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5668     __Pyx_GOTREF(__pyx_t_5);
5669     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5670     __Pyx_GOTREF(__pyx_t_1);
5671     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
5672     __Pyx_GIVEREF(__pyx_t_5);
5673     __pyx_t_5 = 0;
5674     __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5675     __Pyx_GOTREF(__pyx_t_5);
5676     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5677     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5678     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___format, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5679     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5680
5681     /* "cvcf.pyx":324
5682  *             self._filter = copy.deepcopy(_copy._filter)
5683  *             self._format = copy.deepcopy(_copy._format)
5684  *             self._samples = _copy._samples[:]             # <<<<<<<<<<<<<<
5685  *             self._sample2column = copy.deepcopy(_copy._sample2column)
5686  *             self._ignored_errors = copy.deepcopy(_copy._ignored_errors)
5687  */
5688     __pyx_t_5 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___samples); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5689     __Pyx_GOTREF(__pyx_t_5);
5690     __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_t_5, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5691     __Pyx_GOTREF(__pyx_t_1);
5692     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5693     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___samples, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5694     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5695
5696     /* "cvcf.pyx":325
5697  *             self._format = copy.deepcopy(_copy._format)
5698  *             self._samples = _copy._samples[:]
5699  *             self._sample2column = copy.deepcopy(_copy._sample2column)             # <<<<<<<<<<<<<<
5700  *             self._ignored_errors = copy.deepcopy(_copy._ignored_errors)
5701  *             self._warn_errors = copy.deepcopy(_copy._warn_errors)
5702  */
5703     __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5704     __Pyx_GOTREF(__pyx_t_1);
5705     __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5706     __Pyx_GOTREF(__pyx_t_5);
5707     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5708     __pyx_t_1 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___sample2column); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5709     __Pyx_GOTREF(__pyx_t_1);
5710     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5711     __Pyx_GOTREF(__pyx_t_2);
5712     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5713     __Pyx_GIVEREF(__pyx_t_1);
5714     __pyx_t_1 = 0;
5715     __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5716     __Pyx_GOTREF(__pyx_t_1);
5717     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5718     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
5719     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___sample2column, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5720     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5721
5722     /* "cvcf.pyx":326
5723  *             self._samples = _copy._samples[:]
5724  *             self._sample2column = copy.deepcopy(_copy._sample2column)
5725  *             self._ignored_errors = copy.deepcopy(_copy._ignored_errors)             # <<<<<<<<<<<<<<
5726  *             self._warn_errors = copy.deepcopy(_copy._warn_errors)
5727  *             self._reference = _copy._reference
5728  */
5729     __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5730     __Pyx_GOTREF(__pyx_t_1);
5731     __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5732     __Pyx_GOTREF(__pyx_t_2);
5733     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5734     __pyx_t_1 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___ignored_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5735     __Pyx_GOTREF(__pyx_t_1);
5736     __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5737     __Pyx_GOTREF(__pyx_t_5);
5738     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
5739     __Pyx_GIVEREF(__pyx_t_1);
5740     __pyx_t_1 = 0;
5741     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5742     __Pyx_GOTREF(__pyx_t_1);
5743     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5744     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
5745     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___ignored_errors, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5746     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5747
5748     /* "cvcf.pyx":327
5749  *             self._sample2column = copy.deepcopy(_copy._sample2column)
5750  *             self._ignored_errors = copy.deepcopy(_copy._ignored_errors)
5751  *             self._warn_errors = copy.deepcopy(_copy._warn_errors)             # <<<<<<<<<<<<<<
5752  *             self._reference = _copy._reference
5753  *             self._regions = _copy._regions
5754  */
5755     __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5756     __Pyx_GOTREF(__pyx_t_1);
5757     __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__deepcopy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5758     __Pyx_GOTREF(__pyx_t_5);
5759     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5760     __pyx_t_1 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5761     __Pyx_GOTREF(__pyx_t_1);
5762     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5763     __Pyx_GOTREF(__pyx_t_2);
5764     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5765     __Pyx_GIVEREF(__pyx_t_1);
5766     __pyx_t_1 = 0;
5767     __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5768     __Pyx_GOTREF(__pyx_t_1);
5769     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5770     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
5771     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___warn_errors, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5772     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5773
5774     /* "cvcf.pyx":328
5775  *             self._ignored_errors = copy.deepcopy(_copy._ignored_errors)
5776  *             self._warn_errors = copy.deepcopy(_copy._warn_errors)
5777  *             self._reference = _copy._reference             # <<<<<<<<<<<<<<
5778  *             self._regions = _copy._regions
5779  *         if reference: self._reference = reference
5780  */
5781     __pyx_t_1 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___reference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5782     __Pyx_GOTREF(__pyx_t_1);
5783     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___reference, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5784     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5785
5786     /* "cvcf.pyx":329
5787  *             self._warn_errors = copy.deepcopy(_copy._warn_errors)
5788  *             self._reference = _copy._reference
5789  *             self._regions = _copy._regions             # <<<<<<<<<<<<<<
5790  *         if reference: self._reference = reference
5791  *         if regions: self._regions = regions
5792  */
5793     __pyx_t_1 = PyObject_GetAttr(__pyx_v__copy, __pyx_n_s___regions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5794     __Pyx_GOTREF(__pyx_t_1);
5795     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___regions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5796     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5797     goto __pyx_L5;
5798   }
5799   __pyx_L5:;
5800
5801   /* "cvcf.pyx":330
5802  *             self._reference = _copy._reference
5803  *             self._regions = _copy._regions
5804  *         if reference: self._reference = reference             # <<<<<<<<<<<<<<
5805  *         if regions: self._regions = regions
5806  *         if leftalign: self._leftalign = leftalign
5807  */
5808   __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5809   if (__pyx_t_7) {
5810     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___reference, __pyx_v_reference) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5811     goto __pyx_L6;
5812   }
5813   __pyx_L6:;
5814
5815   /* "cvcf.pyx":331
5816  *             self._regions = _copy._regions
5817  *         if reference: self._reference = reference
5818  *         if regions: self._regions = regions             # <<<<<<<<<<<<<<
5819  *         if leftalign: self._leftalign = leftalign
5820  *         self._lines = lines
5821  */
5822   __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_regions); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5823   if (__pyx_t_7) {
5824     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___regions, __pyx_v_regions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5825     goto __pyx_L7;
5826   }
5827   __pyx_L7:;
5828
5829   /* "cvcf.pyx":332
5830  *         if reference: self._reference = reference
5831  *         if regions: self._regions = regions
5832  *         if leftalign: self._leftalign = leftalign             # <<<<<<<<<<<<<<
5833  *         self._lines = lines
5834  * 
5835  */
5836   __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_leftalign); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5837   if (__pyx_t_7) {
5838     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___leftalign, __pyx_v_leftalign) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5839     goto __pyx_L8;
5840   }
5841   __pyx_L8:;
5842
5843   /* "cvcf.pyx":333
5844  *         if regions: self._regions = regions
5845  *         if leftalign: self._leftalign = leftalign
5846  *         self._lines = lines             # <<<<<<<<<<<<<<
5847  * 
5848  *     def error(self,line,error,opt=None):
5849  */
5850   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___lines, __pyx_v_lines) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5851
5852   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5853   goto __pyx_L0;
5854   __pyx_L1_error:;
5855   __Pyx_XDECREF(__pyx_t_1);
5856   __Pyx_XDECREF(__pyx_t_2);
5857   __Pyx_XDECREF(__pyx_t_5);
5858   __Pyx_XDECREF(__pyx_t_6);
5859   __Pyx_AddTraceback("cvcf.VCF.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5860   __pyx_r = NULL;
5861   __pyx_L0:;
5862   __Pyx_XDECREF(__pyx_v_id);
5863   __Pyx_XGIVEREF(__pyx_r);
5864   __Pyx_RefNannyFinishContext();
5865   return __pyx_r;
5866 }
5867
5868 /* Python wrapper */
5869 static PyObject *__pyx_pw_4cvcf_3VCF_3error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5870 static PyMethodDef __pyx_mdef_4cvcf_3VCF_3error = {__Pyx_NAMESTR("error"), (PyCFunction)__pyx_pw_4cvcf_3VCF_3error, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
5871 static PyObject *__pyx_pw_4cvcf_3VCF_3error(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5872   PyObject *__pyx_v_self = 0;
5873   PyObject *__pyx_v_line = 0;
5874   PyObject *__pyx_v_error = 0;
5875   PyObject *__pyx_v_opt = 0;
5876   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,&__pyx_n_s__error,&__pyx_n_s__opt,0};
5877   PyObject *__pyx_r = 0;
5878   __Pyx_RefNannyDeclarations
5879   __Pyx_RefNannySetupContext("error (wrapper)", 0);
5880   __pyx_self = __pyx_self;
5881   {
5882     PyObject* values[4] = {0,0,0,0};
5883
5884     /* "cvcf.pyx":335
5885  *         self._lines = lines
5886  * 
5887  *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
5888  *         if error in self._ignored_errors: return
5889  *         errorlabel, errorstring = self._errors[error].split(':')
5890  */
5891     values[3] = ((PyObject *)((PyObject *)Py_None));
5892     if (unlikely(__pyx_kwds)) {
5893       Py_ssize_t kw_args;
5894       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5895       switch (pos_args) {
5896         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5897         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5898         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5899         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5900         case  0: break;
5901         default: goto __pyx_L5_argtuple_error;
5902       }
5903       kw_args = PyDict_Size(__pyx_kwds);
5904       switch (pos_args) {
5905         case  0:
5906         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
5907         if (likely(values[0])) kw_args--;
5908         else goto __pyx_L5_argtuple_error;
5909         case  1:
5910         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line);
5911         if (likely(values[1])) kw_args--;
5912         else {
5913           __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5914         }
5915         case  2:
5916         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__error);
5917         if (likely(values[2])) kw_args--;
5918         else {
5919           __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5920         }
5921         case  3:
5922         if (kw_args > 0) {
5923           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__opt);
5924           if (value) { values[3] = value; kw_args--; }
5925         }
5926       }
5927       if (unlikely(kw_args > 0)) {
5928         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "error") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5929       }
5930     } else {
5931       switch (PyTuple_GET_SIZE(__pyx_args)) {
5932         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5933         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5934         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5935         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5936         break;
5937         default: goto __pyx_L5_argtuple_error;
5938       }
5939     }
5940     __pyx_v_self = values[0];
5941     __pyx_v_line = values[1];
5942     __pyx_v_error = values[2];
5943     __pyx_v_opt = values[3];
5944   }
5945   goto __pyx_L4_argument_unpacking_done;
5946   __pyx_L5_argtuple_error:;
5947   __Pyx_RaiseArgtupleInvalid("error", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5948   __pyx_L3_error:;
5949   __Pyx_AddTraceback("cvcf.VCF.error", __pyx_clineno, __pyx_lineno, __pyx_filename);
5950   __Pyx_RefNannyFinishContext();
5951   return NULL;
5952   __pyx_L4_argument_unpacking_done:;
5953   __pyx_r = __pyx_pf_4cvcf_3VCF_2error(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_error, __pyx_v_opt);
5954   __Pyx_RefNannyFinishContext();
5955   return __pyx_r;
5956 }
5957
5958 static PyObject *__pyx_pf_4cvcf_3VCF_2error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_error, PyObject *__pyx_v_opt) {
5959   PyObject *__pyx_v_errorlabel = NULL;
5960   PyObject *__pyx_v_errorstring = NULL;
5961   PyObject *__pyx_v_errwarn = NULL;
5962   PyObject *__pyx_r = NULL;
5963   __Pyx_RefNannyDeclarations
5964   PyObject *__pyx_t_1 = NULL;
5965   int __pyx_t_2;
5966   PyObject *__pyx_t_3 = NULL;
5967   PyObject *__pyx_t_4 = NULL;
5968   PyObject *__pyx_t_5 = NULL;
5969   PyObject *(*__pyx_t_6)(PyObject *);
5970   int __pyx_lineno = 0;
5971   const char *__pyx_filename = NULL;
5972   int __pyx_clineno = 0;
5973   __Pyx_RefNannySetupContext("error", 0);
5974
5975   /* "cvcf.pyx":336
5976  * 
5977  *     def error(self,line,error,opt=None):
5978  *         if error in self._ignored_errors: return             # <<<<<<<<<<<<<<
5979  *         errorlabel, errorstring = self._errors[error].split(':')
5980  *         if opt: errorstring = errorstring % opt
5981  */
5982   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___ignored_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5983   __Pyx_GOTREF(__pyx_t_1);
5984   __pyx_t_2 = ((PySequence_Contains(__pyx_t_1, __pyx_v_error))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5985   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5986   if (__pyx_t_2) {
5987     __Pyx_XDECREF(__pyx_r);
5988     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5989     goto __pyx_L0;
5990     goto __pyx_L3;
5991   }
5992   __pyx_L3:;
5993
5994   /* "cvcf.pyx":337
5995  *     def error(self,line,error,opt=None):
5996  *         if error in self._ignored_errors: return
5997  *         errorlabel, errorstring = self._errors[error].split(':')             # <<<<<<<<<<<<<<
5998  *         if opt: errorstring = errorstring % opt
5999  *         errwarn = ["Error","Warning"][error in self._warn_errors]
6000  */
6001   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6002   __Pyx_GOTREF(__pyx_t_1);
6003   __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_error); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6004   __Pyx_GOTREF(__pyx_t_3);
6005   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6006   __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6007   __Pyx_GOTREF(__pyx_t_1);
6008   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6009   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6010   __Pyx_GOTREF(__pyx_t_3);
6011   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6012   if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
6013     PyObject* sequence = __pyx_t_3;
6014     if (likely(PyTuple_CheckExact(sequence))) {
6015       if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
6016         if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
6017         else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
6018         {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6019       }
6020       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
6021       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
6022     } else {
6023       if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
6024         if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
6025         else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
6026         {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6027       }
6028       __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
6029       __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
6030     }
6031     __Pyx_INCREF(__pyx_t_1);
6032     __Pyx_INCREF(__pyx_t_4);
6033     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6034   } else {
6035     Py_ssize_t index = -1;
6036     __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6037     __Pyx_GOTREF(__pyx_t_5);
6038     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6039     __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
6040     index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
6041     __Pyx_GOTREF(__pyx_t_1);
6042     index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
6043     __Pyx_GOTREF(__pyx_t_4);
6044     if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6045     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6046     goto __pyx_L5_unpacking_done;
6047     __pyx_L4_unpacking_failed:;
6048     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6049     if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
6050     if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
6051     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6052     __pyx_L5_unpacking_done:;
6053   }
6054   __pyx_v_errorlabel = __pyx_t_1;
6055   __pyx_t_1 = 0;
6056   __pyx_v_errorstring = __pyx_t_4;
6057   __pyx_t_4 = 0;
6058
6059   /* "cvcf.pyx":338
6060  *         if error in self._ignored_errors: return
6061  *         errorlabel, errorstring = self._errors[error].split(':')
6062  *         if opt: errorstring = errorstring % opt             # <<<<<<<<<<<<<<
6063  *         errwarn = ["Error","Warning"][error in self._warn_errors]
6064  *         errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring)
6065  */
6066   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opt); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6067   if (__pyx_t_2) {
6068     __pyx_t_3 = PyNumber_Remainder(__pyx_v_errorstring, __pyx_v_opt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6069     __Pyx_GOTREF(__pyx_t_3);
6070     __Pyx_DECREF(__pyx_v_errorstring);
6071     __pyx_v_errorstring = __pyx_t_3;
6072     __pyx_t_3 = 0;
6073     goto __pyx_L6;
6074   }
6075   __pyx_L6:;
6076
6077   /* "cvcf.pyx":339
6078  *         errorlabel, errorstring = self._errors[error].split(':')
6079  *         if opt: errorstring = errorstring % opt
6080  *         errwarn = ["Error","Warning"][error in self._warn_errors]             # <<<<<<<<<<<<<<
6081  *         errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring)
6082  *         if error in self._warn_errors: return
6083  */
6084   __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6085   __Pyx_GOTREF(__pyx_t_3);
6086   __Pyx_INCREF(((PyObject *)__pyx_n_s__Error));
6087   PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__Error));
6088   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Error));
6089   __Pyx_INCREF(((PyObject *)__pyx_n_s__Warning));
6090   PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__Warning));
6091   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Warning));
6092   __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6093   __Pyx_GOTREF(__pyx_t_4);
6094   __pyx_t_2 = ((PySequence_Contains(__pyx_t_4, __pyx_v_error))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6095   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6096   __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_3), __pyx_t_2, sizeof(int), __Pyx_PyBool_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6097   __Pyx_GOTREF(__pyx_t_4);
6098   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6099   __pyx_v_errwarn = __pyx_t_4;
6100   __pyx_t_4 = 0;
6101
6102   /* "cvcf.pyx":340
6103  *         if opt: errorstring = errorstring % opt
6104  *         errwarn = ["Error","Warning"][error in self._warn_errors]
6105  *         errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring)             # <<<<<<<<<<<<<<
6106  *         if error in self._warn_errors: return
6107  *         raise ValueError(errorstring)
6108  */
6109   __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___lineno); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6110   __Pyx_GOTREF(__pyx_t_4);
6111   __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6112   __Pyx_GOTREF(__pyx_t_3);
6113   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
6114   __Pyx_GIVEREF(__pyx_t_4);
6115   __Pyx_INCREF(__pyx_v_line);
6116   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_line);
6117   __Pyx_GIVEREF(__pyx_v_line);
6118   __Pyx_INCREF(__pyx_v_errwarn);
6119   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_errwarn);
6120   __Pyx_GIVEREF(__pyx_v_errwarn);
6121   __Pyx_INCREF(__pyx_v_errorlabel);
6122   PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_errorlabel);
6123   __Pyx_GIVEREF(__pyx_v_errorlabel);
6124   __Pyx_INCREF(__pyx_v_errorstring);
6125   PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_errorstring);
6126   __Pyx_GIVEREF(__pyx_v_errorstring);
6127   __pyx_t_4 = 0;
6128   __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_24), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6129   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
6130   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6131   __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_errorstring, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6132   __Pyx_GOTREF(__pyx_t_3);
6133   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
6134   __Pyx_DECREF(__pyx_v_errorstring);
6135   __pyx_v_errorstring = __pyx_t_3;
6136   __pyx_t_3 = 0;
6137
6138   /* "cvcf.pyx":341
6139  *         errwarn = ["Error","Warning"][error in self._warn_errors]
6140  *         errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring)
6141  *         if error in self._warn_errors: return             # <<<<<<<<<<<<<<
6142  *         raise ValueError(errorstring)
6143  * 
6144  */
6145   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6146   __Pyx_GOTREF(__pyx_t_3);
6147   __pyx_t_2 = ((PySequence_Contains(__pyx_t_3, __pyx_v_error))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6148   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6149   if (__pyx_t_2) {
6150     __Pyx_XDECREF(__pyx_r);
6151     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6152     goto __pyx_L0;
6153     goto __pyx_L7;
6154   }
6155   __pyx_L7:;
6156
6157   /* "cvcf.pyx":342
6158  *         errorstring += " in line %s: '%s'\n%s %s: %s\n" % (self._lineno,line,errwarn,errorlabel,errorstring)
6159  *         if error in self._warn_errors: return
6160  *         raise ValueError(errorstring)             # <<<<<<<<<<<<<<
6161  * 
6162  *     def parse_format(self,line,format,filter=False):
6163  */
6164   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6165   __Pyx_GOTREF(__pyx_t_3);
6166   __Pyx_INCREF(__pyx_v_errorstring);
6167   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_errorstring);
6168   __Pyx_GIVEREF(__pyx_v_errorstring);
6169   __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6170   __Pyx_GOTREF(__pyx_t_4);
6171   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6172   __Pyx_Raise(__pyx_t_4, 0, 0, 0);
6173   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6174   {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6175
6176   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6177   goto __pyx_L0;
6178   __pyx_L1_error:;
6179   __Pyx_XDECREF(__pyx_t_1);
6180   __Pyx_XDECREF(__pyx_t_3);
6181   __Pyx_XDECREF(__pyx_t_4);
6182   __Pyx_XDECREF(__pyx_t_5);
6183   __Pyx_AddTraceback("cvcf.VCF.error", __pyx_clineno, __pyx_lineno, __pyx_filename);
6184   __pyx_r = NULL;
6185   __pyx_L0:;
6186   __Pyx_XDECREF(__pyx_v_errorlabel);
6187   __Pyx_XDECREF(__pyx_v_errorstring);
6188   __Pyx_XDECREF(__pyx_v_errwarn);
6189   __Pyx_XGIVEREF(__pyx_r);
6190   __Pyx_RefNannyFinishContext();
6191   return __pyx_r;
6192 }
6193
6194 /* "cvcf.pyx":344
6195  *         raise ValueError(errorstring)
6196  * 
6197  *     def parse_format(self,line,format,filter=False):             # <<<<<<<<<<<<<<
6198  *         if self._version == 40:
6199  *             if not format.startswith('<'):
6200  */
6201
6202 static PyObject *__pyx_pf_4cvcf_3VCF_87__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
6203   PyObject *__pyx_r = NULL;
6204   __Pyx_RefNannyDeclarations
6205   PyObject *__pyx_t_1 = NULL;
6206   int __pyx_lineno = 0;
6207   const char *__pyx_filename = NULL;
6208   int __pyx_clineno = 0;
6209   __Pyx_RefNannySetupContext("__defaults__", 0);
6210   __Pyx_XDECREF(__pyx_r);
6211   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6212   __Pyx_GOTREF(__pyx_t_1);
6213   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_filter);
6214   PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_filter);
6215   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_filter);
6216   __pyx_r = ((PyObject *)__pyx_t_1);
6217   __pyx_t_1 = 0;
6218   goto __pyx_L0;
6219
6220   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6221   goto __pyx_L0;
6222   __pyx_L1_error:;
6223   __Pyx_XDECREF(__pyx_t_1);
6224   __Pyx_AddTraceback("cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6225   __pyx_r = NULL;
6226   __pyx_L0:;
6227   __Pyx_XGIVEREF(__pyx_r);
6228   __Pyx_RefNannyFinishContext();
6229   return __pyx_r;
6230 }
6231
6232 /* Python wrapper */
6233 static PyObject *__pyx_pw_4cvcf_3VCF_5parse_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6234 static PyMethodDef __pyx_mdef_4cvcf_3VCF_5parse_format = {__Pyx_NAMESTR("parse_format"), (PyCFunction)__pyx_pw_4cvcf_3VCF_5parse_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
6235 static PyObject *__pyx_pw_4cvcf_3VCF_5parse_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6236   PyObject *__pyx_v_self = 0;
6237   PyObject *__pyx_v_line = 0;
6238   PyObject *__pyx_v_format = 0;
6239   PyObject *__pyx_v_filter = 0;
6240   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,&__pyx_n_s__format,&__pyx_n_s__filter,0};
6241   PyObject *__pyx_r = 0;
6242   __Pyx_RefNannyDeclarations
6243   __Pyx_RefNannySetupContext("parse_format (wrapper)", 0);
6244   __pyx_self = __pyx_self;
6245   {
6246     PyObject* values[4] = {0,0,0,0};
6247     __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
6248     values[3] = __pyx_dynamic_args->__pyx_arg_filter;
6249     if (unlikely(__pyx_kwds)) {
6250       Py_ssize_t kw_args;
6251       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6252       switch (pos_args) {
6253         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6254         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6255         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6256         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6257         case  0: break;
6258         default: goto __pyx_L5_argtuple_error;
6259       }
6260       kw_args = PyDict_Size(__pyx_kwds);
6261       switch (pos_args) {
6262         case  0:
6263         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
6264         if (likely(values[0])) kw_args--;
6265         else goto __pyx_L5_argtuple_error;
6266         case  1:
6267         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line);
6268         if (likely(values[1])) kw_args--;
6269         else {
6270           __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6271         }
6272         case  2:
6273         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format);
6274         if (likely(values[2])) kw_args--;
6275         else {
6276           __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6277         }
6278         case  3:
6279         if (kw_args > 0) {
6280           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filter);
6281           if (value) { values[3] = value; kw_args--; }
6282         }
6283       }
6284       if (unlikely(kw_args > 0)) {
6285         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6286       }
6287     } else {
6288       switch (PyTuple_GET_SIZE(__pyx_args)) {
6289         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6290         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6291         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6292         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6293         break;
6294         default: goto __pyx_L5_argtuple_error;
6295       }
6296     }
6297     __pyx_v_self = values[0];
6298     __pyx_v_line = values[1];
6299     __pyx_v_format = values[2];
6300     __pyx_v_filter = values[3];
6301   }
6302   goto __pyx_L4_argument_unpacking_done;
6303   __pyx_L5_argtuple_error:;
6304   __Pyx_RaiseArgtupleInvalid("parse_format", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6305   __pyx_L3_error:;
6306   __Pyx_AddTraceback("cvcf.VCF.parse_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
6307   __Pyx_RefNannyFinishContext();
6308   return NULL;
6309   __pyx_L4_argument_unpacking_done:;
6310   __pyx_r = __pyx_pf_4cvcf_3VCF_4parse_format(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_format, __pyx_v_filter);
6311   __Pyx_RefNannyFinishContext();
6312   return __pyx_r;
6313 }
6314
6315 static PyObject *__pyx_pf_4cvcf_3VCF_4parse_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_format, PyObject *__pyx_v_filter) {
6316   PyObject *__pyx_v_data = NULL;
6317   PyObject *__pyx_v_idx = NULL;
6318   PyObject *__pyx_v_elts = NULL;
6319   PyObject *__pyx_v_first = NULL;
6320   PyObject *__pyx_v_rest = NULL;
6321   PyObject *__pyx_v_n = NULL;
6322   PyObject *__pyx_v_t = NULL;
6323   PyObject *__pyx_r = NULL;
6324   __Pyx_RefNannyDeclarations
6325   PyObject *__pyx_t_1 = NULL;
6326   PyObject *__pyx_t_2 = NULL;
6327   int __pyx_t_3;
6328   int __pyx_t_4;
6329   PyObject *__pyx_t_5 = NULL;
6330   Py_ssize_t __pyx_t_6;
6331   PyObject *__pyx_t_7 = NULL;
6332   int __pyx_t_8;
6333   int __pyx_t_9;
6334   PyObject *__pyx_t_10 = NULL;
6335   PyObject *__pyx_t_11 = NULL;
6336   PyObject *__pyx_t_12 = NULL;
6337   PyObject *__pyx_t_13 = NULL;
6338   int __pyx_t_14;
6339   PyObject *__pyx_t_15 = NULL;
6340   int __pyx_lineno = 0;
6341   const char *__pyx_filename = NULL;
6342   int __pyx_clineno = 0;
6343   __Pyx_RefNannySetupContext("parse_format", 0);
6344   __Pyx_INCREF(__pyx_v_format);
6345
6346   /* "cvcf.pyx":345
6347  * 
6348  *     def parse_format(self,line,format,filter=False):
6349  *         if self._version == 40:             # <<<<<<<<<<<<<<
6350  *             if not format.startswith('<'):
6351  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
6352  */
6353   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6354   __Pyx_GOTREF(__pyx_t_1);
6355   __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_40, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6356   __Pyx_GOTREF(__pyx_t_2);
6357   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6358   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6359   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6360   if (__pyx_t_3) {
6361
6362     /* "cvcf.pyx":346
6363  *     def parse_format(self,line,format,filter=False):
6364  *         if self._version == 40:
6365  *             if not format.startswith('<'):             # <<<<<<<<<<<<<<
6366  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
6367  *                 format = "<"+format
6368  */
6369     __pyx_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6370     __Pyx_GOTREF(__pyx_t_2);
6371     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6372     __Pyx_GOTREF(__pyx_t_1);
6373     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6374     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6375     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6376     __pyx_t_4 = (!__pyx_t_3);
6377     if (__pyx_t_4) {
6378
6379       /* "cvcf.pyx":347
6380  *         if self._version == 40:
6381  *             if not format.startswith('<'):
6382  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)             # <<<<<<<<<<<<<<
6383  *                 format = "<"+format
6384  *             if not format.endswith('>'):
6385  */
6386       __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6387       __Pyx_GOTREF(__pyx_t_1);
6388       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_27); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6389       __Pyx_GOTREF(__pyx_t_2);
6390       __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6391       __Pyx_GOTREF(__pyx_t_5);
6392       __Pyx_INCREF(__pyx_v_line);
6393       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
6394       __Pyx_GIVEREF(__pyx_v_line);
6395       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
6396       __Pyx_GIVEREF(__pyx_t_2);
6397       __pyx_t_2 = 0;
6398       __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6399       __Pyx_GOTREF(__pyx_t_2);
6400       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6401       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
6402       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6403
6404       /* "cvcf.pyx":348
6405  *             if not format.startswith('<'):
6406  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
6407  *                 format = "<"+format             # <<<<<<<<<<<<<<
6408  *             if not format.endswith('>'):
6409  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
6410  */
6411       __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_25), __pyx_v_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6412       __Pyx_GOTREF(__pyx_t_2);
6413       __Pyx_DECREF(__pyx_v_format);
6414       __pyx_v_format = __pyx_t_2;
6415       __pyx_t_2 = 0;
6416       goto __pyx_L4;
6417     }
6418     __pyx_L4:;
6419
6420     /* "cvcf.pyx":349
6421  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
6422  *                 format = "<"+format
6423  *             if not format.endswith('>'):             # <<<<<<<<<<<<<<
6424  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
6425  *                 format += ">"
6426  */
6427     __pyx_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__endswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6428     __Pyx_GOTREF(__pyx_t_2);
6429     __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6430     __Pyx_GOTREF(__pyx_t_5);
6431     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6432     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6433     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6434     __pyx_t_3 = (!__pyx_t_4);
6435     if (__pyx_t_3) {
6436
6437       /* "cvcf.pyx":350
6438  *                 format = "<"+format
6439  *             if not format.endswith('>'):
6440  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)             # <<<<<<<<<<<<<<
6441  *                 format += ">"
6442  *             format = format[1:-1]
6443  */
6444       __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6445       __Pyx_GOTREF(__pyx_t_5);
6446       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_27); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6447       __Pyx_GOTREF(__pyx_t_2);
6448       __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6449       __Pyx_GOTREF(__pyx_t_1);
6450       __Pyx_INCREF(__pyx_v_line);
6451       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
6452       __Pyx_GIVEREF(__pyx_v_line);
6453       PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
6454       __Pyx_GIVEREF(__pyx_t_2);
6455       __pyx_t_2 = 0;
6456       __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6457       __Pyx_GOTREF(__pyx_t_2);
6458       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6459       __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
6460       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6461
6462       /* "cvcf.pyx":351
6463  *             if not format.endswith('>'):
6464  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
6465  *                 format += ">"             # <<<<<<<<<<<<<<
6466  *             format = format[1:-1]
6467  *         data = {'id':None,'number':None,'type':None,'descr':None}
6468  */
6469       __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_format, ((PyObject *)__pyx_kp_s_28)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6470       __Pyx_GOTREF(__pyx_t_2);
6471       __Pyx_DECREF(__pyx_v_format);
6472       __pyx_v_format = __pyx_t_2;
6473       __pyx_t_2 = 0;
6474       goto __pyx_L5;
6475     }
6476     __pyx_L5:;
6477
6478     /* "cvcf.pyx":352
6479  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
6480  *                 format += ">"
6481  *             format = format[1:-1]             # <<<<<<<<<<<<<<
6482  *         data = {'id':None,'number':None,'type':None,'descr':None}
6483  *         idx = 0
6484  */
6485     __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_format, 1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6486     __Pyx_GOTREF(__pyx_t_2);
6487     __Pyx_DECREF(__pyx_v_format);
6488     __pyx_v_format = __pyx_t_2;
6489     __pyx_t_2 = 0;
6490     goto __pyx_L3;
6491   }
6492   __pyx_L3:;
6493
6494   /* "cvcf.pyx":353
6495  *                 format += ">"
6496  *             format = format[1:-1]
6497  *         data = {'id':None,'number':None,'type':None,'descr':None}             # <<<<<<<<<<<<<<
6498  *         idx = 0
6499  *         while len(format.strip())>0:
6500  */
6501   __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6502   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
6503   if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__id), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6504   if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__number), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6505   if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__type), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6506   if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__descr), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6507   __pyx_v_data = __pyx_t_2;
6508   __pyx_t_2 = 0;
6509
6510   /* "cvcf.pyx":354
6511  *             format = format[1:-1]
6512  *         data = {'id':None,'number':None,'type':None,'descr':None}
6513  *         idx = 0             # <<<<<<<<<<<<<<
6514  *         while len(format.strip())>0:
6515  *             elts = format.strip().split(',')
6516  */
6517   __Pyx_INCREF(__pyx_int_0);
6518   __pyx_v_idx = __pyx_int_0;
6519
6520   /* "cvcf.pyx":355
6521  *         data = {'id':None,'number':None,'type':None,'descr':None}
6522  *         idx = 0
6523  *         while len(format.strip())>0:             # <<<<<<<<<<<<<<
6524  *             elts = format.strip().split(',')
6525  *             first, rest = elts[0], ','.join(elts[1:])
6526  */
6527   while (1) {
6528     __pyx_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6529     __Pyx_GOTREF(__pyx_t_2);
6530     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6531     __Pyx_GOTREF(__pyx_t_1);
6532     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6533     __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6534     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6535     __pyx_t_3 = (__pyx_t_6 > 0);
6536     if (!__pyx_t_3) break;
6537
6538     /* "cvcf.pyx":356
6539  *         idx = 0
6540  *         while len(format.strip())>0:
6541  *             elts = format.strip().split(',')             # <<<<<<<<<<<<<<
6542  *             first, rest = elts[0], ','.join(elts[1:])
6543  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
6544  */
6545     __pyx_t_1 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6546     __Pyx_GOTREF(__pyx_t_1);
6547     __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 = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6548     __Pyx_GOTREF(__pyx_t_2);
6549     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6550     __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6551     __Pyx_GOTREF(__pyx_t_1);
6552     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6553     __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6554     __Pyx_GOTREF(__pyx_t_2);
6555     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6556     __Pyx_XDECREF(__pyx_v_elts);
6557     __pyx_v_elts = __pyx_t_2;
6558     __pyx_t_2 = 0;
6559
6560     /* "cvcf.pyx":357
6561  *         while len(format.strip())>0:
6562  *             elts = format.strip().split(',')
6563  *             first, rest = elts[0], ','.join(elts[1:])             # <<<<<<<<<<<<<<
6564  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
6565  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
6566  */
6567     __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6568     __Pyx_GOTREF(__pyx_t_2);
6569     __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6570     __Pyx_GOTREF(__pyx_t_1);
6571     __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_elts, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6572     __Pyx_GOTREF(__pyx_t_5);
6573     __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6574     __Pyx_GOTREF(__pyx_t_7);
6575     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
6576     __Pyx_GIVEREF(__pyx_t_5);
6577     __pyx_t_5 = 0;
6578     __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6579     __Pyx_GOTREF(__pyx_t_5);
6580     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6581     __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
6582     __Pyx_XDECREF(__pyx_v_first);
6583     __pyx_v_first = __pyx_t_2;
6584     __pyx_t_2 = 0;
6585     __Pyx_XDECREF(__pyx_v_rest);
6586     __pyx_v_rest = __pyx_t_5;
6587     __pyx_t_5 = 0;
6588
6589     /* "cvcf.pyx":358
6590  *             elts = format.strip().split(',')
6591  *             first, rest = elts[0], ','.join(elts[1:])
6592  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):             # <<<<<<<<<<<<<<
6593  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
6594  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
6595  */
6596     __pyx_t_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6597     __Pyx_GOTREF(__pyx_t_5);
6598     __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6599     __Pyx_GOTREF(__pyx_t_2);
6600     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6601     __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6602     __Pyx_GOTREF(__pyx_t_5);
6603     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6604     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6605     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6606     if (!__pyx_t_3) {
6607       __pyx_t_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6608       __Pyx_GOTREF(__pyx_t_5);
6609       __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6610       __Pyx_GOTREF(__pyx_t_2);
6611       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6612       __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_GE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6613       __Pyx_GOTREF(__pyx_t_5);
6614       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6615       __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6616       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6617       if (__pyx_t_4) {
6618         __pyx_t_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6619         __Pyx_GOTREF(__pyx_t_5);
6620         __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6621         __Pyx_GOTREF(__pyx_t_2);
6622         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6623         __pyx_t_5 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6624         __Pyx_GOTREF(__pyx_t_5);
6625         __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6626         __Pyx_GOTREF(__pyx_t_7);
6627         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6628         __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6629         __Pyx_GOTREF(__pyx_t_5);
6630         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6631         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6632         __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6633         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6634         __pyx_t_9 = __pyx_t_8;
6635       } else {
6636         __pyx_t_9 = __pyx_t_4;
6637       }
6638       __pyx_t_4 = __pyx_t_9;
6639     } else {
6640       __pyx_t_4 = __pyx_t_3;
6641     }
6642     if (__pyx_t_4) {
6643
6644       /* "cvcf.pyx":359
6645  *             first, rest = elts[0], ','.join(elts[1:])
6646  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
6647  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)             # <<<<<<<<<<<<<<
6648  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
6649  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
6650  */
6651       __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6652       __Pyx_GOTREF(__pyx_t_5);
6653       __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_int_40, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6654       __Pyx_GOTREF(__pyx_t_7);
6655       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6656       __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6657       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6658       if (__pyx_t_4) {
6659         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6660         __Pyx_GOTREF(__pyx_t_7);
6661         __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_36); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6662         __Pyx_GOTREF(__pyx_t_5);
6663         __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6664         __Pyx_GOTREF(__pyx_t_2);
6665         __Pyx_INCREF(__pyx_v_line);
6666         PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
6667         __Pyx_GIVEREF(__pyx_v_line);
6668         PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
6669         __Pyx_GIVEREF(__pyx_t_5);
6670         __pyx_t_5 = 0;
6671         __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6672         __Pyx_GOTREF(__pyx_t_5);
6673         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6674         __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
6675         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6676         goto __pyx_L9;
6677       }
6678       __pyx_L9:;
6679
6680       /* "cvcf.pyx":360
6681  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
6682  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
6683  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
6684  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
6685  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
6686  */
6687       __pyx_t_5 = PyObject_RichCompare(__pyx_v_idx, __pyx_int_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6688       __Pyx_GOTREF(__pyx_t_5);
6689       __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6690       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6691       if (__pyx_t_4) {
6692         __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6693         __Pyx_GOTREF(__pyx_t_5);
6694         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6695         __Pyx_GOTREF(__pyx_t_2);
6696         __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6697         __Pyx_GOTREF(__pyx_t_7);
6698         __Pyx_INCREF(__pyx_v_line);
6699         PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
6700         __Pyx_GIVEREF(__pyx_v_line);
6701         PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
6702         __Pyx_GIVEREF(__pyx_t_2);
6703         __pyx_t_2 = 0;
6704         __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6705         __Pyx_GOTREF(__pyx_t_2);
6706         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6707         __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
6708         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6709         goto __pyx_L10;
6710       }
6711       __pyx_L10:;
6712
6713       /* "cvcf.pyx":361
6714  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
6715  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
6716  *                 first = ["ID=","Number=","Type=","Description="][idx] + first             # <<<<<<<<<<<<<<
6717  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
6718  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
6719  */
6720       __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6721       __Pyx_GOTREF(__pyx_t_2);
6722       __Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
6723       PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_38));
6724       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38));
6725       __Pyx_INCREF(((PyObject *)__pyx_kp_s_39));
6726       PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_s_39));
6727       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39));
6728       __Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
6729       PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_kp_s_40));
6730       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
6731       __Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
6732       PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_kp_s_41));
6733       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
6734       __pyx_t_7 = PyObject_GetItem(((PyObject *)__pyx_t_2), __pyx_v_idx); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6735       __Pyx_GOTREF(__pyx_t_7);
6736       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
6737       __pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_v_first); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6738       __Pyx_GOTREF(__pyx_t_2);
6739       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6740       __Pyx_DECREF(__pyx_v_first);
6741       __pyx_v_first = __pyx_t_2;
6742       __pyx_t_2 = 0;
6743       goto __pyx_L8;
6744     }
6745     __pyx_L8:;
6746
6747     /* "cvcf.pyx":362
6748  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
6749  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
6750  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]             # <<<<<<<<<<<<<<
6751  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
6752  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
6753  */
6754     __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6755     __Pyx_GOTREF(__pyx_t_2);
6756     __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6757     __Pyx_GOTREF(__pyx_t_7);
6758     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6759     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6760     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6761     if (__pyx_t_4) {
6762       __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6763       __Pyx_GOTREF(__pyx_t_7);
6764       __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6765       __Pyx_GOTREF(__pyx_t_2);
6766       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6767       __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6768       __Pyx_GOTREF(__pyx_t_7);
6769       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6770       if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__id), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6771       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6772       goto __pyx_L11;
6773     }
6774
6775     /* "cvcf.pyx":363
6776  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
6777  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
6778  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]             # <<<<<<<<<<<<<<
6779  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
6780  *             elif first.startswith('Description='):
6781  */
6782     __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6783     __Pyx_GOTREF(__pyx_t_7);
6784     __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6785     __Pyx_GOTREF(__pyx_t_2);
6786     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6787     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6788     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6789     if (__pyx_t_4) {
6790       __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6791       __Pyx_GOTREF(__pyx_t_2);
6792       __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6793       __Pyx_GOTREF(__pyx_t_7);
6794       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6795       __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6796       __Pyx_GOTREF(__pyx_t_2);
6797       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6798       if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6799       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6800       goto __pyx_L11;
6801     }
6802
6803     /* "cvcf.pyx":364
6804  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
6805  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
6806  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]             # <<<<<<<<<<<<<<
6807  *             elif first.startswith('Description='):
6808  *                 elts = format.split('"')
6809  */
6810     __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6811     __Pyx_GOTREF(__pyx_t_2);
6812     __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6813     __Pyx_GOTREF(__pyx_t_7);
6814     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6815     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6816     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6817     if (__pyx_t_4) {
6818       __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6819       __Pyx_GOTREF(__pyx_t_7);
6820       __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6821       __Pyx_GOTREF(__pyx_t_2);
6822       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6823       __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6824       __Pyx_GOTREF(__pyx_t_7);
6825       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6826       if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6827       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6828       goto __pyx_L11;
6829     }
6830
6831     /* "cvcf.pyx":365
6832  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
6833  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
6834  *             elif first.startswith('Description='):             # <<<<<<<<<<<<<<
6835  *                 elts = format.split('"')
6836  *                 if len(elts)<3:
6837  */
6838     __pyx_t_7 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6839     __Pyx_GOTREF(__pyx_t_7);
6840     __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6841     __Pyx_GOTREF(__pyx_t_2);
6842     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6843     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6844     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6845     if (__pyx_t_4) {
6846
6847       /* "cvcf.pyx":366
6848  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
6849  *             elif first.startswith('Description='):
6850  *                 elts = format.split('"')             # <<<<<<<<<<<<<<
6851  *                 if len(elts)<3:
6852  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
6853  */
6854       __pyx_t_2 = PyObject_GetAttr(__pyx_v_format, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6855       __Pyx_GOTREF(__pyx_t_2);
6856       __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6857       __Pyx_GOTREF(__pyx_t_7);
6858       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6859       __Pyx_DECREF(__pyx_v_elts);
6860       __pyx_v_elts = __pyx_t_7;
6861       __pyx_t_7 = 0;
6862
6863       /* "cvcf.pyx":367
6864  *             elif first.startswith('Description='):
6865  *                 elts = format.split('"')
6866  *                 if len(elts)<3:             # <<<<<<<<<<<<<<
6867  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
6868  *                     elts = first.split('=') + [rest]
6869  */
6870       __pyx_t_6 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6871       __pyx_t_4 = (__pyx_t_6 < 3);
6872       if (__pyx_t_4) {
6873
6874         /* "cvcf.pyx":368
6875  *                 elts = format.split('"')
6876  *                 if len(elts)<3:
6877  *                     self.error(line,self.FORMAT_MISSING_QUOTES)             # <<<<<<<<<<<<<<
6878  *                     elts = first.split('=') + [rest]
6879  *                 data['descr'] = elts[1]
6880  */
6881         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6882         __Pyx_GOTREF(__pyx_t_7);
6883         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_50); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6884         __Pyx_GOTREF(__pyx_t_2);
6885         __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6886         __Pyx_GOTREF(__pyx_t_5);
6887         __Pyx_INCREF(__pyx_v_line);
6888         PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
6889         __Pyx_GIVEREF(__pyx_v_line);
6890         PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
6891         __Pyx_GIVEREF(__pyx_t_2);
6892         __pyx_t_2 = 0;
6893         __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6894         __Pyx_GOTREF(__pyx_t_2);
6895         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6896         __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
6897         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6898
6899         /* "cvcf.pyx":369
6900  *                 if len(elts)<3:
6901  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
6902  *                     elts = first.split('=') + [rest]             # <<<<<<<<<<<<<<
6903  *                 data['descr'] = elts[1]
6904  *                 rest = '"'.join(elts[2:])
6905  */
6906         __pyx_t_2 = PyObject_GetAttr(__pyx_v_first, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6907         __Pyx_GOTREF(__pyx_t_2);
6908         __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6909         __Pyx_GOTREF(__pyx_t_5);
6910         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6911         __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6912         __Pyx_GOTREF(__pyx_t_2);
6913         __Pyx_INCREF(__pyx_v_rest);
6914         PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_rest);
6915         __Pyx_GIVEREF(__pyx_v_rest);
6916         __pyx_t_7 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6917         __Pyx_GOTREF(__pyx_t_7);
6918         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6919         __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
6920         __Pyx_DECREF(__pyx_v_elts);
6921         __pyx_v_elts = __pyx_t_7;
6922         __pyx_t_7 = 0;
6923         goto __pyx_L12;
6924       }
6925       __pyx_L12:;
6926
6927       /* "cvcf.pyx":370
6928  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
6929  *                     elts = first.split('=') + [rest]
6930  *                 data['descr'] = elts[1]             # <<<<<<<<<<<<<<
6931  *                 rest = '"'.join(elts[2:])
6932  *                 if rest.startswith(','): rest = rest[1:]
6933  */
6934       __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6935       __Pyx_GOTREF(__pyx_t_7);
6936       if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6937       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6938
6939       /* "cvcf.pyx":371
6940  *                     elts = first.split('=') + [rest]
6941  *                 data['descr'] = elts[1]
6942  *                 rest = '"'.join(elts[2:])             # <<<<<<<<<<<<<<
6943  *                 if rest.startswith(','): rest = rest[1:]
6944  *             else:
6945  */
6946       __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_32), __pyx_n_s__join); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6947       __Pyx_GOTREF(__pyx_t_7);
6948       __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_elts, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6949       __Pyx_GOTREF(__pyx_t_2);
6950       __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6951       __Pyx_GOTREF(__pyx_t_5);
6952       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
6953       __Pyx_GIVEREF(__pyx_t_2);
6954       __pyx_t_2 = 0;
6955       __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6956       __Pyx_GOTREF(__pyx_t_2);
6957       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6958       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
6959       __Pyx_DECREF(__pyx_v_rest);
6960       __pyx_v_rest = __pyx_t_2;
6961       __pyx_t_2 = 0;
6962
6963       /* "cvcf.pyx":372
6964  *                 data['descr'] = elts[1]
6965  *                 rest = '"'.join(elts[2:])
6966  *                 if rest.startswith(','): rest = rest[1:]             # <<<<<<<<<<<<<<
6967  *             else:
6968  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
6969  */
6970       __pyx_t_2 = PyObject_GetAttr(__pyx_v_rest, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6971       __Pyx_GOTREF(__pyx_t_2);
6972       __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6973       __Pyx_GOTREF(__pyx_t_5);
6974       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6975       __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6976       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6977       if (__pyx_t_4) {
6978         __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_rest, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6979         __Pyx_GOTREF(__pyx_t_5);
6980         __Pyx_DECREF(__pyx_v_rest);
6981         __pyx_v_rest = __pyx_t_5;
6982         __pyx_t_5 = 0;
6983         goto __pyx_L13;
6984       }
6985       __pyx_L13:;
6986       goto __pyx_L11;
6987     }
6988     /*else*/ {
6989
6990       /* "cvcf.pyx":374
6991  *                 if rest.startswith(','): rest = rest[1:]
6992  *             else:
6993  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
6994  *             format = rest
6995  *             idx += 1
6996  */
6997       __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6998       __Pyx_GOTREF(__pyx_t_5);
6999       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7000       __Pyx_GOTREF(__pyx_t_2);
7001       __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7002       __Pyx_GOTREF(__pyx_t_7);
7003       __Pyx_INCREF(__pyx_v_line);
7004       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
7005       __Pyx_GIVEREF(__pyx_v_line);
7006       PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
7007       __Pyx_GIVEREF(__pyx_t_2);
7008       __pyx_t_2 = 0;
7009       __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7010       __Pyx_GOTREF(__pyx_t_2);
7011       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7012       __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
7013       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7014     }
7015     __pyx_L11:;
7016
7017     /* "cvcf.pyx":375
7018  *             else:
7019  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7020  *             format = rest             # <<<<<<<<<<<<<<
7021  *             idx += 1
7022  *             if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings
7023  */
7024     __Pyx_INCREF(__pyx_v_rest);
7025     __Pyx_DECREF(__pyx_v_format);
7026     __pyx_v_format = __pyx_v_rest;
7027
7028     /* "cvcf.pyx":376
7029  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7030  *             format = rest
7031  *             idx += 1             # <<<<<<<<<<<<<<
7032  *             if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings
7033  *         if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7034  */
7035     __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_idx, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7036     __Pyx_GOTREF(__pyx_t_2);
7037     __Pyx_DECREF(__pyx_v_idx);
7038     __pyx_v_idx = __pyx_t_2;
7039     __pyx_t_2 = 0;
7040
7041     /* "cvcf.pyx":377
7042  *             format = rest
7043  *             idx += 1
7044  *             if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings             # <<<<<<<<<<<<<<
7045  *         if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7046  *         if 'descr' not in data:
7047  */
7048     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7049     if (__pyx_t_4) {
7050       __pyx_t_2 = PyObject_RichCompare(__pyx_v_idx, __pyx_int_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7051       __Pyx_GOTREF(__pyx_t_2);
7052       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7053       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7054       __pyx_t_9 = __pyx_t_3;
7055     } else {
7056       __pyx_t_9 = __pyx_t_4;
7057     }
7058     if (__pyx_t_9) {
7059       __Pyx_INCREF(__pyx_int_3);
7060       __Pyx_DECREF(__pyx_v_idx);
7061       __pyx_v_idx = __pyx_int_3;
7062       goto __pyx_L14;
7063     }
7064     __pyx_L14:;
7065   }
7066
7067   /* "cvcf.pyx":378
7068  *             idx += 1
7069  *             if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings
7070  *         if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
7071  *         if 'descr' not in data:
7072  *             # missing description
7073  */
7074   __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__id)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7075   __Pyx_GOTREF(__pyx_t_2);
7076   __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7077   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7078   __pyx_t_4 = (!__pyx_t_9);
7079   if (__pyx_t_4) {
7080     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7081     __Pyx_GOTREF(__pyx_t_2);
7082     __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7083     __Pyx_GOTREF(__pyx_t_7);
7084     __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7085     __Pyx_GOTREF(__pyx_t_5);
7086     __Pyx_INCREF(__pyx_v_line);
7087     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
7088     __Pyx_GIVEREF(__pyx_v_line);
7089     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7);
7090     __Pyx_GIVEREF(__pyx_t_7);
7091     __pyx_t_7 = 0;
7092     __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7093     __Pyx_GOTREF(__pyx_t_7);
7094     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7095     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
7096     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7097     goto __pyx_L15;
7098   }
7099   __pyx_L15:;
7100
7101   /* "cvcf.pyx":379
7102  *             if filter and idx==1: idx=3  # skip number and type fields for FILTER format strings
7103  *         if not data['id']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7104  *         if 'descr' not in data:             # <<<<<<<<<<<<<<
7105  *             # missing description
7106  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7107  */
7108   __pyx_t_4 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr)))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7109   if (__pyx_t_4) {
7110
7111     /* "cvcf.pyx":381
7112  *         if 'descr' not in data:
7113  *             # missing description
7114  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
7115  *             data['descr'] = ""
7116  *         if not data['type'] and not data['number']:
7117  */
7118     __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7119     __Pyx_GOTREF(__pyx_t_7);
7120     __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7121     __Pyx_GOTREF(__pyx_t_5);
7122     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7123     __Pyx_GOTREF(__pyx_t_2);
7124     __Pyx_INCREF(__pyx_v_line);
7125     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
7126     __Pyx_GIVEREF(__pyx_v_line);
7127     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
7128     __Pyx_GIVEREF(__pyx_t_5);
7129     __pyx_t_5 = 0;
7130     __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7131     __Pyx_GOTREF(__pyx_t_5);
7132     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7133     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7134     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7135
7136     /* "cvcf.pyx":382
7137  *             # missing description
7138  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7139  *             data['descr'] = ""             # <<<<<<<<<<<<<<
7140  *         if not data['type'] and not data['number']:
7141  *             # fine, ##filter format
7142  */
7143     if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr), ((PyObject *)__pyx_kp_s_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7144     goto __pyx_L16;
7145   }
7146   __pyx_L16:;
7147
7148   /* "cvcf.pyx":383
7149  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7150  *             data['descr'] = ""
7151  *         if not data['type'] and not data['number']:             # <<<<<<<<<<<<<<
7152  *             # fine, ##filter format
7153  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')
7154  */
7155   __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7156   __Pyx_GOTREF(__pyx_t_5);
7157   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7158   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7159   __pyx_t_9 = (!__pyx_t_4);
7160   if (__pyx_t_9) {
7161     __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7162     __Pyx_GOTREF(__pyx_t_5);
7163     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7164     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7165     __pyx_t_3 = (!__pyx_t_4);
7166     __pyx_t_4 = __pyx_t_3;
7167   } else {
7168     __pyx_t_4 = __pyx_t_9;
7169   }
7170   if (__pyx_t_4) {
7171
7172     /* "cvcf.pyx":385
7173  *         if not data['type'] and not data['number']:
7174  *             # fine, ##filter format
7175  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')             # <<<<<<<<<<<<<<
7176  *         if not data['type'] in ["Integer","Float","Character","String","Flag"]:
7177  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7178  */
7179     __Pyx_XDECREF(__pyx_r);
7180     __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7181     __Pyx_GOTREF(__pyx_t_5);
7182     __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__id)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7183     __Pyx_GOTREF(__pyx_t_2);
7184     __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7185     __Pyx_GOTREF(__pyx_t_7);
7186     __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7187     __Pyx_GOTREF(__pyx_t_1);
7188     __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7189     __Pyx_GOTREF(__pyx_t_10);
7190     PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
7191     __Pyx_GIVEREF(__pyx_t_2);
7192     PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_7);
7193     __Pyx_GIVEREF(__pyx_t_7);
7194     __Pyx_INCREF(__pyx_int_0);
7195     PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_int_0);
7196     __Pyx_GIVEREF(__pyx_int_0);
7197     __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag));
7198     PyTuple_SET_ITEM(__pyx_t_10, 3, ((PyObject *)__pyx_n_s__Flag));
7199     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag));
7200     PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_1);
7201     __Pyx_GIVEREF(__pyx_t_1);
7202     __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
7203     PyTuple_SET_ITEM(__pyx_t_10, 5, ((PyObject *)__pyx_kp_s_9));
7204     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
7205     __pyx_t_2 = 0;
7206     __pyx_t_7 = 0;
7207     __pyx_t_1 = 0;
7208     __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7209     __Pyx_GOTREF(__pyx_t_1);
7210     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7211     __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
7212     __pyx_r = __pyx_t_1;
7213     __pyx_t_1 = 0;
7214     goto __pyx_L0;
7215     goto __pyx_L17;
7216   }
7217   __pyx_L17:;
7218
7219   /* "cvcf.pyx":386
7220  *             # fine, ##filter format
7221  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')
7222  *         if not data['type'] in ["Integer","Float","Character","String","Flag"]:             # <<<<<<<<<<<<<<
7223  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7224  *         # I would like a missing-value field, but it isn't there
7225  */
7226   __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7227   __Pyx_GOTREF(__pyx_t_1);
7228   __pyx_t_4 = __Pyx_PyString_Equals(__pyx_t_1, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7229   if (!((int)__pyx_t_4)) {
7230     __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_1, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7231     __pyx_t_3 = ((int)__pyx_t_9);
7232   } else {
7233     __pyx_t_3 = ((int)__pyx_t_4);
7234   }
7235   if (!__pyx_t_3) {
7236     __pyx_t_4 = __Pyx_PyString_Equals(__pyx_t_1, ((PyObject *)__pyx_n_s__Character), Py_EQ); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7237     __pyx_t_9 = ((int)__pyx_t_4);
7238   } else {
7239     __pyx_t_9 = __pyx_t_3;
7240   }
7241   if (!__pyx_t_9) {
7242     __pyx_t_3 = __Pyx_PyString_Equals(__pyx_t_1, ((PyObject *)__pyx_n_s__String), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7243     __pyx_t_4 = ((int)__pyx_t_3);
7244   } else {
7245     __pyx_t_4 = __pyx_t_9;
7246   }
7247   if (!__pyx_t_4) {
7248     __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_1, ((PyObject *)__pyx_n_s__Flag), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7249     __pyx_t_3 = ((int)__pyx_t_9);
7250   } else {
7251     __pyx_t_3 = __pyx_t_4;
7252   }
7253   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7254   __pyx_t_4 = (!__pyx_t_3);
7255   if (__pyx_t_4) {
7256
7257     /* "cvcf.pyx":387
7258  *             return FORMAT(data['id'],self.NT_NUMBER,0,"Flag",data['descr'],'.')
7259  *         if not data['type'] in ["Integer","Float","Character","String","Flag"]:
7260  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
7261  *         # I would like a missing-value field, but it isn't there
7262  *         if data['type'] in ['Integer','Float']: data['missing'] = None    # Do NOT use arbitrary int/float as missing value
7263  */
7264     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7265     __Pyx_GOTREF(__pyx_t_1);
7266     __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7267     __Pyx_GOTREF(__pyx_t_10);
7268     __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7269     __Pyx_GOTREF(__pyx_t_5);
7270     __Pyx_INCREF(__pyx_v_line);
7271     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
7272     __Pyx_GIVEREF(__pyx_v_line);
7273     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_10);
7274     __Pyx_GIVEREF(__pyx_t_10);
7275     __pyx_t_10 = 0;
7276     __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7277     __Pyx_GOTREF(__pyx_t_10);
7278     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7279     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
7280     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7281     goto __pyx_L18;
7282   }
7283   __pyx_L18:;
7284
7285   /* "cvcf.pyx":389
7286  *             self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7287  *         # I would like a missing-value field, but it isn't there
7288  *         if data['type'] in ['Integer','Float']: data['missing'] = None    # Do NOT use arbitrary int/float as missing value             # <<<<<<<<<<<<<<
7289  *         else:                                   data['missing'] = '.'
7290  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7291  */
7292   __pyx_t_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7293   __Pyx_GOTREF(__pyx_t_10);
7294   __pyx_t_4 = __Pyx_PyString_Equals(__pyx_t_10, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7295   if (!((int)__pyx_t_4)) {
7296     __pyx_t_3 = __Pyx_PyString_Equals(__pyx_t_10, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7297     __pyx_t_9 = ((int)__pyx_t_3);
7298   } else {
7299     __pyx_t_9 = ((int)__pyx_t_4);
7300   }
7301   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7302   __pyx_t_4 = __pyx_t_9;
7303   if (__pyx_t_4) {
7304     if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__missing), Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7305     goto __pyx_L19;
7306   }
7307   /*else*/ {
7308
7309     /* "cvcf.pyx":390
7310  *         # I would like a missing-value field, but it isn't there
7311  *         if data['type'] in ['Integer','Float']: data['missing'] = None    # Do NOT use arbitrary int/float as missing value
7312  *         else:                                   data['missing'] = '.'             # <<<<<<<<<<<<<<
7313  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7314  *         try:
7315  */
7316     if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__missing), ((PyObject *)__pyx_kp_s_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7317   }
7318   __pyx_L19:;
7319
7320   /* "cvcf.pyx":391
7321  *         if data['type'] in ['Integer','Float']: data['missing'] = None    # Do NOT use arbitrary int/float as missing value
7322  *         else:                                   data['missing'] = '.'
7323  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
7324  *         try:
7325  *             n = int(data['number'])
7326  */
7327   __pyx_t_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7328   __Pyx_GOTREF(__pyx_t_10);
7329   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7330   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7331   __pyx_t_9 = (!__pyx_t_4);
7332   if (__pyx_t_9) {
7333     __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7334     __Pyx_GOTREF(__pyx_t_10);
7335     __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7336     __Pyx_GOTREF(__pyx_t_5);
7337     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7338     __Pyx_GOTREF(__pyx_t_1);
7339     __Pyx_INCREF(__pyx_v_line);
7340     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
7341     __Pyx_GIVEREF(__pyx_v_line);
7342     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
7343     __Pyx_GIVEREF(__pyx_t_5);
7344     __pyx_t_5 = 0;
7345     __pyx_t_5 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7346     __Pyx_GOTREF(__pyx_t_5);
7347     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7348     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
7349     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7350     goto __pyx_L20;
7351   }
7352   __pyx_L20:;
7353
7354   /* "cvcf.pyx":392
7355  *         else:                                   data['missing'] = '.'
7356  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7357  *         try:             # <<<<<<<<<<<<<<
7358  *             n = int(data['number'])
7359  *             t = self.NT_NUMBER
7360  */
7361   {
7362     __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
7363     __Pyx_XGOTREF(__pyx_t_11);
7364     __Pyx_XGOTREF(__pyx_t_12);
7365     __Pyx_XGOTREF(__pyx_t_13);
7366     /*try:*/ {
7367
7368       /* "cvcf.pyx":393
7369  *         if not data['number']: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7370  *         try:
7371  *             n = int(data['number'])             # <<<<<<<<<<<<<<
7372  *             t = self.NT_NUMBER
7373  *         except ValueError:
7374  */
7375       __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
7376       __Pyx_GOTREF(__pyx_t_5);
7377       __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
7378       __Pyx_GOTREF(__pyx_t_1);
7379       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
7380       __Pyx_GIVEREF(__pyx_t_5);
7381       __pyx_t_5 = 0;
7382       __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
7383       __Pyx_GOTREF(__pyx_t_5);
7384       __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
7385       __pyx_v_n = __pyx_t_5;
7386       __pyx_t_5 = 0;
7387
7388       /* "cvcf.pyx":394
7389  *         try:
7390  *             n = int(data['number'])
7391  *             t = self.NT_NUMBER             # <<<<<<<<<<<<<<
7392  *         except ValueError:
7393  *             n = -1
7394  */
7395       __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
7396       __Pyx_GOTREF(__pyx_t_5);
7397       __pyx_v_t = __pyx_t_5;
7398       __pyx_t_5 = 0;
7399     }
7400     __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7401     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
7402     __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7403     goto __pyx_L28_try_end;
7404     __pyx_L21_error:;
7405     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
7406     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7407     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
7408     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
7409     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7410
7411     /* "cvcf.pyx":395
7412  *             n = int(data['number'])
7413  *             t = self.NT_NUMBER
7414  *         except ValueError:             # <<<<<<<<<<<<<<
7415  *             n = -1
7416  *             if data['number'] == '.':                   t = self.NT_UNKNOWN
7417  */
7418     __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
7419     if (__pyx_t_14) {
7420       __Pyx_AddTraceback("cvcf.VCF.parse_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
7421       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7422       __Pyx_GOTREF(__pyx_t_5);
7423       __Pyx_GOTREF(__pyx_t_1);
7424       __Pyx_GOTREF(__pyx_t_10);
7425
7426       /* "cvcf.pyx":396
7427  *             t = self.NT_NUMBER
7428  *         except ValueError:
7429  *             n = -1             # <<<<<<<<<<<<<<
7430  *             if data['number'] == '.':                   t = self.NT_UNKNOWN
7431  *             elif data['number'] == '#alleles':          t = self.NT_ALLELES
7432  */
7433       __Pyx_INCREF(__pyx_int_neg_1);
7434       __Pyx_XDECREF(__pyx_v_n);
7435       __pyx_v_n = __pyx_int_neg_1;
7436
7437       /* "cvcf.pyx":397
7438  *         except ValueError:
7439  *             n = -1
7440  *             if data['number'] == '.':                   t = self.NT_UNKNOWN             # <<<<<<<<<<<<<<
7441  *             elif data['number'] == '#alleles':          t = self.NT_ALLELES
7442  *             elif data['number'] == '#nonref_alleles':   t = self.NT_NR_ALLELES
7443  */
7444       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7445       __Pyx_GOTREF(__pyx_t_7);
7446       __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_7, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7447       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7448       if (__pyx_t_9) {
7449         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7450         __Pyx_GOTREF(__pyx_t_7);
7451         __Pyx_XDECREF(__pyx_v_t);
7452         __pyx_v_t = __pyx_t_7;
7453         __pyx_t_7 = 0;
7454         goto __pyx_L31;
7455       }
7456
7457       /* "cvcf.pyx":398
7458  *             n = -1
7459  *             if data['number'] == '.':                   t = self.NT_UNKNOWN
7460  *             elif data['number'] == '#alleles':          t = self.NT_ALLELES             # <<<<<<<<<<<<<<
7461  *             elif data['number'] == '#nonref_alleles':   t = self.NT_NR_ALLELES
7462  *             elif data['number'] == '#genotypes':        t = self.NT_GENOTYPES
7463  */
7464       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7465       __Pyx_GOTREF(__pyx_t_7);
7466       __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_7, ((PyObject *)__pyx_kp_s_53), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7467       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7468       if (__pyx_t_9) {
7469         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7470         __Pyx_GOTREF(__pyx_t_7);
7471         __Pyx_XDECREF(__pyx_v_t);
7472         __pyx_v_t = __pyx_t_7;
7473         __pyx_t_7 = 0;
7474         goto __pyx_L31;
7475       }
7476
7477       /* "cvcf.pyx":399
7478  *             if data['number'] == '.':                   t = self.NT_UNKNOWN
7479  *             elif data['number'] == '#alleles':          t = self.NT_ALLELES
7480  *             elif data['number'] == '#nonref_alleles':   t = self.NT_NR_ALLELES             # <<<<<<<<<<<<<<
7481  *             elif data['number'] == '#genotypes':        t = self.NT_GENOTYPES
7482  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
7483  */
7484       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7485       __Pyx_GOTREF(__pyx_t_7);
7486       __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_7, ((PyObject *)__pyx_kp_s_54), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7487       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7488       if (__pyx_t_9) {
7489         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NR_ALLELES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7490         __Pyx_GOTREF(__pyx_t_7);
7491         __Pyx_XDECREF(__pyx_v_t);
7492         __pyx_v_t = __pyx_t_7;
7493         __pyx_t_7 = 0;
7494         goto __pyx_L31;
7495       }
7496
7497       /* "cvcf.pyx":400
7498  *             elif data['number'] == '#alleles':          t = self.NT_ALLELES
7499  *             elif data['number'] == '#nonref_alleles':   t = self.NT_NR_ALLELES
7500  *             elif data['number'] == '#genotypes':        t = self.NT_GENOTYPES             # <<<<<<<<<<<<<<
7501  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
7502  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
7503  */
7504       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7505       __Pyx_GOTREF(__pyx_t_7);
7506       __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_7, ((PyObject *)__pyx_kp_s_55), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7507       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7508       if (__pyx_t_9) {
7509         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7510         __Pyx_GOTREF(__pyx_t_7);
7511         __Pyx_XDECREF(__pyx_v_t);
7512         __pyx_v_t = __pyx_t_7;
7513         __pyx_t_7 = 0;
7514         goto __pyx_L31;
7515       }
7516
7517       /* "cvcf.pyx":401
7518  *             elif data['number'] == '#nonref_alleles':   t = self.NT_NR_ALLELES
7519  *             elif data['number'] == '#genotypes':        t = self.NT_GENOTYPES
7520  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES             # <<<<<<<<<<<<<<
7521  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
7522  *             # abbreviations added in VCF version v4.1
7523  */
7524       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7525       __Pyx_GOTREF(__pyx_t_7);
7526       __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_7, ((PyObject *)__pyx_kp_s_56), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7527       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7528       if (__pyx_t_9) {
7529         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7530         __Pyx_GOTREF(__pyx_t_7);
7531         __Pyx_XDECREF(__pyx_v_t);
7532         __pyx_v_t = __pyx_t_7;
7533         __pyx_t_7 = 0;
7534         goto __pyx_L31;
7535       }
7536
7537       /* "cvcf.pyx":402
7538  *             elif data['number'] == '#genotypes':        t = self.NT_GENOTYPES
7539  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
7540  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES             # <<<<<<<<<<<<<<
7541  *             # abbreviations added in VCF version v4.1
7542  *             elif data['number'] == 'A': t = self.NT_ALLELES
7543  */
7544       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7545       __Pyx_GOTREF(__pyx_t_7);
7546       __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_7, ((PyObject *)__pyx_kp_s_56), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7547       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7548       if (__pyx_t_9) {
7549         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7550         __Pyx_GOTREF(__pyx_t_7);
7551         __Pyx_XDECREF(__pyx_v_t);
7552         __pyx_v_t = __pyx_t_7;
7553         __pyx_t_7 = 0;
7554         goto __pyx_L31;
7555       }
7556
7557       /* "cvcf.pyx":404
7558  *             elif data['number'] == '#phased_genotypes': t = self.NT_PHASED_GENOTYPES
7559  *             # abbreviations added in VCF version v4.1
7560  *             elif data['number'] == 'A': t = self.NT_ALLELES             # <<<<<<<<<<<<<<
7561  *             elif data['number'] == 'G': t = self.NT_GENOTYPES
7562  *             else:
7563  */
7564       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7565       __Pyx_GOTREF(__pyx_t_7);
7566       __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_7, ((PyObject *)__pyx_n_s__A), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7567       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7568       if (__pyx_t_9) {
7569         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7570         __Pyx_GOTREF(__pyx_t_7);
7571         __Pyx_XDECREF(__pyx_v_t);
7572         __pyx_v_t = __pyx_t_7;
7573         __pyx_t_7 = 0;
7574         goto __pyx_L31;
7575       }
7576
7577       /* "cvcf.pyx":405
7578  *             # abbreviations added in VCF version v4.1
7579  *             elif data['number'] == 'A': t = self.NT_ALLELES
7580  *             elif data['number'] == 'G': t = self.NT_GENOTYPES             # <<<<<<<<<<<<<<
7581  *             else:
7582  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7583  */
7584       __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__number)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7585       __Pyx_GOTREF(__pyx_t_7);
7586       __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_7, ((PyObject *)__pyx_n_s__G), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7587       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7588       if (__pyx_t_9) {
7589         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7590         __Pyx_GOTREF(__pyx_t_7);
7591         __Pyx_XDECREF(__pyx_v_t);
7592         __pyx_v_t = __pyx_t_7;
7593         __pyx_t_7 = 0;
7594         goto __pyx_L31;
7595       }
7596       /*else*/ {
7597
7598         /* "cvcf.pyx":407
7599  *             elif data['number'] == 'G': t = self.NT_GENOTYPES
7600  *             else:
7601  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)             # <<<<<<<<<<<<<<
7602  *         # if number is 0 - type must be Flag
7603  *         if n == 0 and data['type'] != 'Flag':
7604  */
7605         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7606         __Pyx_GOTREF(__pyx_t_7);
7607         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_37); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7608         __Pyx_GOTREF(__pyx_t_2);
7609         __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7610         __Pyx_GOTREF(__pyx_t_15);
7611         __Pyx_INCREF(__pyx_v_line);
7612         PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_line);
7613         __Pyx_GIVEREF(__pyx_v_line);
7614         PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_2);
7615         __Pyx_GIVEREF(__pyx_t_2);
7616         __pyx_t_2 = 0;
7617         __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
7618         __Pyx_GOTREF(__pyx_t_2);
7619         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7620         __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
7621         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7622       }
7623       __pyx_L31:;
7624       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7625       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7626       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7627       goto __pyx_L22_exception_handled;
7628     }
7629     __pyx_L23_except_error:;
7630     __Pyx_XGIVEREF(__pyx_t_11);
7631     __Pyx_XGIVEREF(__pyx_t_12);
7632     __Pyx_XGIVEREF(__pyx_t_13);
7633     __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
7634     goto __pyx_L1_error;
7635     __pyx_L22_exception_handled:;
7636     __Pyx_XGIVEREF(__pyx_t_11);
7637     __Pyx_XGIVEREF(__pyx_t_12);
7638     __Pyx_XGIVEREF(__pyx_t_13);
7639     __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
7640     __pyx_L28_try_end:;
7641   }
7642
7643   /* "cvcf.pyx":409
7644  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
7645  *         # if number is 0 - type must be Flag
7646  *         if n == 0 and data['type'] != 'Flag':             # <<<<<<<<<<<<<<
7647  *             self.error( line, self.ZERO_FOR_NON_FLAG_FIELD)
7648  *             # force type 'Flag' if no number
7649  */
7650   __pyx_t_10 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7651   __Pyx_GOTREF(__pyx_t_10);
7652   __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7653   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7654   if (__pyx_t_9) {
7655     __pyx_t_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7656     __Pyx_GOTREF(__pyx_t_10);
7657     __pyx_t_4 = __Pyx_PyString_Equals(__pyx_t_10, ((PyObject *)__pyx_n_s__Flag), Py_NE); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7658     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7659     __pyx_t_3 = __pyx_t_4;
7660   } else {
7661     __pyx_t_3 = __pyx_t_9;
7662   }
7663   if (__pyx_t_3) {
7664
7665     /* "cvcf.pyx":410
7666  *         # if number is 0 - type must be Flag
7667  *         if n == 0 and data['type'] != 'Flag':
7668  *             self.error( line, self.ZERO_FOR_NON_FLAG_FIELD)             # <<<<<<<<<<<<<<
7669  *             # force type 'Flag' if no number
7670  *             data['type'] = 'Flag'
7671  */
7672     __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7673     __Pyx_GOTREF(__pyx_t_10);
7674     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_57); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7675     __Pyx_GOTREF(__pyx_t_1);
7676     __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7677     __Pyx_GOTREF(__pyx_t_5);
7678     __Pyx_INCREF(__pyx_v_line);
7679     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
7680     __Pyx_GIVEREF(__pyx_v_line);
7681     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
7682     __Pyx_GIVEREF(__pyx_t_1);
7683     __pyx_t_1 = 0;
7684     __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7685     __Pyx_GOTREF(__pyx_t_1);
7686     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7687     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
7688     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7689
7690     /* "cvcf.pyx":412
7691  *             self.error( line, self.ZERO_FOR_NON_FLAG_FIELD)
7692  *             # force type 'Flag' if no number
7693  *             data['type'] = 'Flag'             # <<<<<<<<<<<<<<
7694  * 
7695  *         return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])
7696  */
7697     if (PyDict_SetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type), ((PyObject *)__pyx_n_s__Flag)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7698     goto __pyx_L32;
7699   }
7700   __pyx_L32:;
7701
7702   /* "cvcf.pyx":414
7703  *             data['type'] = 'Flag'
7704  * 
7705  *         return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])             # <<<<<<<<<<<<<<
7706  * 
7707  *     def format_format( self, fmt, filter=False ):
7708  */
7709   __Pyx_XDECREF(__pyx_r);
7710   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7711   __Pyx_GOTREF(__pyx_t_1);
7712   __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__id)); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7713   __Pyx_GOTREF(__pyx_t_5);
7714   if (unlikely(!__pyx_v_t)) { __Pyx_RaiseUnboundLocalError("t"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
7715   __pyx_t_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__type)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7716   __Pyx_GOTREF(__pyx_t_10);
7717   __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__descr)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7718   __Pyx_GOTREF(__pyx_t_2);
7719   __pyx_t_15 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_data), ((PyObject *)__pyx_n_s__missing)); if (!__pyx_t_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7720   __Pyx_GOTREF(__pyx_t_15);
7721   __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7722   __Pyx_GOTREF(__pyx_t_7);
7723   PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
7724   __Pyx_GIVEREF(__pyx_t_5);
7725   __Pyx_INCREF(__pyx_v_t);
7726   PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_t);
7727   __Pyx_GIVEREF(__pyx_v_t);
7728   __Pyx_INCREF(__pyx_v_n);
7729   PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_n);
7730   __Pyx_GIVEREF(__pyx_v_n);
7731   PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_10);
7732   __Pyx_GIVEREF(__pyx_t_10);
7733   PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_2);
7734   __Pyx_GIVEREF(__pyx_t_2);
7735   PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_15);
7736   __Pyx_GIVEREF(__pyx_t_15);
7737   __pyx_t_5 = 0;
7738   __pyx_t_10 = 0;
7739   __pyx_t_2 = 0;
7740   __pyx_t_15 = 0;
7741   __pyx_t_15 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7742   __Pyx_GOTREF(__pyx_t_15);
7743   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7744   __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
7745   __pyx_r = __pyx_t_15;
7746   __pyx_t_15 = 0;
7747   goto __pyx_L0;
7748
7749   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7750   goto __pyx_L0;
7751   __pyx_L1_error:;
7752   __Pyx_XDECREF(__pyx_t_1);
7753   __Pyx_XDECREF(__pyx_t_2);
7754   __Pyx_XDECREF(__pyx_t_5);
7755   __Pyx_XDECREF(__pyx_t_7);
7756   __Pyx_XDECREF(__pyx_t_10);
7757   __Pyx_XDECREF(__pyx_t_15);
7758   __Pyx_AddTraceback("cvcf.VCF.parse_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
7759   __pyx_r = NULL;
7760   __pyx_L0:;
7761   __Pyx_XDECREF(__pyx_v_data);
7762   __Pyx_XDECREF(__pyx_v_idx);
7763   __Pyx_XDECREF(__pyx_v_elts);
7764   __Pyx_XDECREF(__pyx_v_first);
7765   __Pyx_XDECREF(__pyx_v_rest);
7766   __Pyx_XDECREF(__pyx_v_n);
7767   __Pyx_XDECREF(__pyx_v_t);
7768   __Pyx_XDECREF(__pyx_v_format);
7769   __Pyx_XGIVEREF(__pyx_r);
7770   __Pyx_RefNannyFinishContext();
7771   return __pyx_r;
7772 }
7773
7774 /* "cvcf.pyx":416
7775  *         return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])
7776  * 
7777  *     def format_format( self, fmt, filter=False ):             # <<<<<<<<<<<<<<
7778  *         values = [('ID',fmt.id)]
7779  *         if fmt.number != None and not filter:
7780  */
7781
7782 static PyObject *__pyx_pf_4cvcf_3VCF_89__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
7783   PyObject *__pyx_r = NULL;
7784   __Pyx_RefNannyDeclarations
7785   PyObject *__pyx_t_1 = NULL;
7786   int __pyx_lineno = 0;
7787   const char *__pyx_filename = NULL;
7788   int __pyx_clineno = 0;
7789   __Pyx_RefNannySetupContext("__defaults__", 0);
7790   __Pyx_XDECREF(__pyx_r);
7791   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7792   __Pyx_GOTREF(__pyx_t_1);
7793   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_filter);
7794   PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_filter);
7795   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_filter);
7796   __pyx_r = ((PyObject *)__pyx_t_1);
7797   __pyx_t_1 = 0;
7798   goto __pyx_L0;
7799
7800   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7801   goto __pyx_L0;
7802   __pyx_L1_error:;
7803   __Pyx_XDECREF(__pyx_t_1);
7804   __Pyx_AddTraceback("cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7805   __pyx_r = NULL;
7806   __pyx_L0:;
7807   __Pyx_XGIVEREF(__pyx_r);
7808   __Pyx_RefNannyFinishContext();
7809   return __pyx_r;
7810 }
7811
7812 /* Python wrapper */
7813 static PyObject *__pyx_pw_4cvcf_3VCF_7format_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7814 static PyMethodDef __pyx_mdef_4cvcf_3VCF_7format_format = {__Pyx_NAMESTR("format_format"), (PyCFunction)__pyx_pw_4cvcf_3VCF_7format_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
7815 static PyObject *__pyx_pw_4cvcf_3VCF_7format_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7816   PyObject *__pyx_v_self = 0;
7817   PyObject *__pyx_v_fmt = 0;
7818   PyObject *__pyx_v_filter = 0;
7819   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__fmt,&__pyx_n_s__filter,0};
7820   PyObject *__pyx_r = 0;
7821   __Pyx_RefNannyDeclarations
7822   __Pyx_RefNannySetupContext("format_format (wrapper)", 0);
7823   __pyx_self = __pyx_self;
7824   {
7825     PyObject* values[3] = {0,0,0};
7826     __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
7827     values[2] = __pyx_dynamic_args->__pyx_arg_filter;
7828     if (unlikely(__pyx_kwds)) {
7829       Py_ssize_t kw_args;
7830       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7831       switch (pos_args) {
7832         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7833         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7834         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7835         case  0: break;
7836         default: goto __pyx_L5_argtuple_error;
7837       }
7838       kw_args = PyDict_Size(__pyx_kwds);
7839       switch (pos_args) {
7840         case  0:
7841         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
7842         if (likely(values[0])) kw_args--;
7843         else goto __pyx_L5_argtuple_error;
7844         case  1:
7845         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fmt);
7846         if (likely(values[1])) kw_args--;
7847         else {
7848           __Pyx_RaiseArgtupleInvalid("format_format", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7849         }
7850         case  2:
7851         if (kw_args > 0) {
7852           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filter);
7853           if (value) { values[2] = value; kw_args--; }
7854         }
7855       }
7856       if (unlikely(kw_args > 0)) {
7857         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "format_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7858       }
7859     } else {
7860       switch (PyTuple_GET_SIZE(__pyx_args)) {
7861         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7862         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7863         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7864         break;
7865         default: goto __pyx_L5_argtuple_error;
7866       }
7867     }
7868     __pyx_v_self = values[0];
7869     __pyx_v_fmt = values[1];
7870     __pyx_v_filter = values[2];
7871   }
7872   goto __pyx_L4_argument_unpacking_done;
7873   __pyx_L5_argtuple_error:;
7874   __Pyx_RaiseArgtupleInvalid("format_format", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7875   __pyx_L3_error:;
7876   __Pyx_AddTraceback("cvcf.VCF.format_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
7877   __Pyx_RefNannyFinishContext();
7878   return NULL;
7879   __pyx_L4_argument_unpacking_done:;
7880   __pyx_r = __pyx_pf_4cvcf_3VCF_6format_format(__pyx_self, __pyx_v_self, __pyx_v_fmt, __pyx_v_filter);
7881   __Pyx_RefNannyFinishContext();
7882   return __pyx_r;
7883 }
7884
7885 static PyObject *__pyx_pf_4cvcf_3VCF_6format_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fmt, PyObject *__pyx_v_filter) {
7886   PyObject *__pyx_v_values = NULL;
7887   PyObject *__pyx_v_nmb = NULL;
7888   PyObject *__pyx_v_format = NULL;
7889   PyObject *__pyx_v_k = NULL;
7890   PyObject *__pyx_v_v = NULL;
7891   PyObject *__pyx_r = NULL;
7892   __Pyx_RefNannyDeclarations
7893   PyObject *__pyx_t_1 = NULL;
7894   PyObject *__pyx_t_2 = NULL;
7895   int __pyx_t_3;
7896   int __pyx_t_4;
7897   int __pyx_t_5;
7898   PyObject *__pyx_t_6 = NULL;
7899   int __pyx_t_7;
7900   Py_ssize_t __pyx_t_8;
7901   PyObject *__pyx_t_9 = NULL;
7902   PyObject *__pyx_t_10 = NULL;
7903   PyObject *__pyx_t_11 = NULL;
7904   PyObject *__pyx_t_12 = NULL;
7905   PyObject *(*__pyx_t_13)(PyObject *);
7906   int __pyx_lineno = 0;
7907   const char *__pyx_filename = NULL;
7908   int __pyx_clineno = 0;
7909   __Pyx_RefNannySetupContext("format_format", 0);
7910
7911   /* "cvcf.pyx":417
7912  * 
7913  *     def format_format( self, fmt, filter=False ):
7914  *         values = [('ID',fmt.id)]             # <<<<<<<<<<<<<<
7915  *         if fmt.number != None and not filter:
7916  *             if fmt.numbertype == self.NT_UNKNOWN: nmb = "."
7917  */
7918   __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7919   __Pyx_GOTREF(__pyx_t_1);
7920   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7921   __Pyx_GOTREF(__pyx_t_2);
7922   __Pyx_INCREF(((PyObject *)__pyx_n_s__ID));
7923   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__ID));
7924   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ID));
7925   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
7926   __Pyx_GIVEREF(__pyx_t_1);
7927   __pyx_t_1 = 0;
7928   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7929   __Pyx_GOTREF(__pyx_t_1);
7930   PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
7931   __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
7932   __pyx_t_2 = 0;
7933   __pyx_v_values = __pyx_t_1;
7934   __pyx_t_1 = 0;
7935
7936   /* "cvcf.pyx":418
7937  *     def format_format( self, fmt, filter=False ):
7938  *         values = [('ID',fmt.id)]
7939  *         if fmt.number != None and not filter:             # <<<<<<<<<<<<<<
7940  *             if fmt.numbertype == self.NT_UNKNOWN: nmb = "."
7941  *             elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number)
7942  */
7943   __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__number); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7944   __Pyx_GOTREF(__pyx_t_1);
7945   __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7946   __Pyx_GOTREF(__pyx_t_2);
7947   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7948   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7949   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7950   if (__pyx_t_3) {
7951     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_filter); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7952     __pyx_t_5 = (!__pyx_t_4);
7953     __pyx_t_4 = __pyx_t_5;
7954   } else {
7955     __pyx_t_4 = __pyx_t_3;
7956   }
7957   if (__pyx_t_4) {
7958
7959     /* "cvcf.pyx":419
7960  *         values = [('ID',fmt.id)]
7961  *         if fmt.number != None and not filter:
7962  *             if fmt.numbertype == self.NT_UNKNOWN: nmb = "."             # <<<<<<<<<<<<<<
7963  *             elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number)
7964  *             elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles"
7965  */
7966     __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7967     __Pyx_GOTREF(__pyx_t_2);
7968     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7969     __Pyx_GOTREF(__pyx_t_1);
7970     __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7971     __Pyx_GOTREF(__pyx_t_6);
7972     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7973     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7974     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7975     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7976     if (__pyx_t_4) {
7977       __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
7978       __pyx_v_nmb = ((PyObject *)__pyx_kp_s_9);
7979       goto __pyx_L4;
7980     }
7981
7982     /* "cvcf.pyx":420
7983  *         if fmt.number != None and not filter:
7984  *             if fmt.numbertype == self.NT_UNKNOWN: nmb = "."
7985  *             elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number)             # <<<<<<<<<<<<<<
7986  *             elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles"
7987  *             elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles"
7988  */
7989     __pyx_t_6 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7990     __Pyx_GOTREF(__pyx_t_6);
7991     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7992     __Pyx_GOTREF(__pyx_t_1);
7993     __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7994     __Pyx_GOTREF(__pyx_t_2);
7995     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7996     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7997     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7998     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7999     if (__pyx_t_4) {
8000       __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__number); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8001       __Pyx_GOTREF(__pyx_t_2);
8002       __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8003       __Pyx_GOTREF(__pyx_t_1);
8004       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
8005       __Pyx_GIVEREF(__pyx_t_2);
8006       __pyx_t_2 = 0;
8007       __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8008       __Pyx_GOTREF(__pyx_t_2);
8009       __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8010       __pyx_v_nmb = __pyx_t_2;
8011       __pyx_t_2 = 0;
8012       goto __pyx_L4;
8013     }
8014
8015     /* "cvcf.pyx":421
8016  *             if fmt.numbertype == self.NT_UNKNOWN: nmb = "."
8017  *             elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number)
8018  *             elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles"             # <<<<<<<<<<<<<<
8019  *             elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles"
8020  *             elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes"
8021  */
8022     __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8023     __Pyx_GOTREF(__pyx_t_2);
8024     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8025     __Pyx_GOTREF(__pyx_t_1);
8026     __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8027     __Pyx_GOTREF(__pyx_t_6);
8028     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8029     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8030     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8031     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8032     if (__pyx_t_4) {
8033       __Pyx_INCREF(((PyObject *)__pyx_kp_s_53));
8034       __pyx_v_nmb = ((PyObject *)__pyx_kp_s_53);
8035       goto __pyx_L4;
8036     }
8037
8038     /* "cvcf.pyx":422
8039  *             elif fmt.numbertype == self.NT_NUMBER: nmb = str(fmt.number)
8040  *             elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles"
8041  *             elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles"             # <<<<<<<<<<<<<<
8042  *             elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes"
8043  *             elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes"
8044  */
8045     __pyx_t_6 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8046     __Pyx_GOTREF(__pyx_t_6);
8047     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NR_ALLELES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8048     __Pyx_GOTREF(__pyx_t_1);
8049     __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8050     __Pyx_GOTREF(__pyx_t_2);
8051     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8052     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8053     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8054     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8055     if (__pyx_t_4) {
8056       __Pyx_INCREF(((PyObject *)__pyx_kp_s_54));
8057       __pyx_v_nmb = ((PyObject *)__pyx_kp_s_54);
8058       goto __pyx_L4;
8059     }
8060
8061     /* "cvcf.pyx":423
8062  *             elif fmt.numbertype == self.NT_ALLELES: nmb = "#alleles"
8063  *             elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles"
8064  *             elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes"             # <<<<<<<<<<<<<<
8065  *             elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes"
8066  *             else:
8067  */
8068     __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8069     __Pyx_GOTREF(__pyx_t_2);
8070     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8071     __Pyx_GOTREF(__pyx_t_1);
8072     __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8073     __Pyx_GOTREF(__pyx_t_6);
8074     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8075     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8076     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8077     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8078     if (__pyx_t_4) {
8079       __Pyx_INCREF(((PyObject *)__pyx_kp_s_55));
8080       __pyx_v_nmb = ((PyObject *)__pyx_kp_s_55);
8081       goto __pyx_L4;
8082     }
8083
8084     /* "cvcf.pyx":424
8085  *             elif fmt.numbertype == self.NT_NR_ALLELES: nmb = "#nonref_alleles"
8086  *             elif fmt.numbertype == self.NT_GENOTYPES: nmb = "#genotypes"
8087  *             elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes"             # <<<<<<<<<<<<<<
8088  *             else:
8089  *                 raise ValueError("Unknown number type encountered: %s" % fmt.numbertype)
8090  */
8091     __pyx_t_6 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8092     __Pyx_GOTREF(__pyx_t_6);
8093     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8094     __Pyx_GOTREF(__pyx_t_1);
8095     __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8096     __Pyx_GOTREF(__pyx_t_2);
8097     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8098     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8099     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8100     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8101     if (__pyx_t_4) {
8102       __Pyx_INCREF(((PyObject *)__pyx_kp_s_56));
8103       __pyx_v_nmb = ((PyObject *)__pyx_kp_s_56);
8104       goto __pyx_L4;
8105     }
8106     /*else*/ {
8107
8108       /* "cvcf.pyx":426
8109  *             elif fmt.numbertype == self.NT_PHASED_GENOTYPES: nmb = "#phased_genotypes"
8110  *             else:
8111  *                 raise ValueError("Unknown number type encountered: %s" % fmt.numbertype)             # <<<<<<<<<<<<<<
8112  *             values.append( ('Number',nmb) )
8113  *             values.append( ('Type', fmt.type) )
8114  */
8115       __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8116       __Pyx_GOTREF(__pyx_t_2);
8117       __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_58), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8118       __Pyx_GOTREF(((PyObject *)__pyx_t_1));
8119       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8120       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8121       __Pyx_GOTREF(__pyx_t_2);
8122       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
8123       __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
8124       __pyx_t_1 = 0;
8125       __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8126       __Pyx_GOTREF(__pyx_t_1);
8127       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8128       __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8129       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8130       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8131     }
8132     __pyx_L4:;
8133
8134     /* "cvcf.pyx":427
8135  *             else:
8136  *                 raise ValueError("Unknown number type encountered: %s" % fmt.numbertype)
8137  *             values.append( ('Number',nmb) )             # <<<<<<<<<<<<<<
8138  *             values.append( ('Type', fmt.type) )
8139  *         values.append( ('Description', '"' + fmt.description + '"') )
8140  */
8141     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8142     __Pyx_GOTREF(__pyx_t_1);
8143     __Pyx_INCREF(((PyObject *)__pyx_n_s__Number));
8144     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Number));
8145     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Number));
8146     __Pyx_INCREF(__pyx_v_nmb);
8147     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_nmb);
8148     __Pyx_GIVEREF(__pyx_v_nmb);
8149     __pyx_t_7 = PyList_Append(__pyx_v_values, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8150     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8151
8152     /* "cvcf.pyx":428
8153  *                 raise ValueError("Unknown number type encountered: %s" % fmt.numbertype)
8154  *             values.append( ('Number',nmb) )
8155  *             values.append( ('Type', fmt.type) )             # <<<<<<<<<<<<<<
8156  *         values.append( ('Description', '"' + fmt.description + '"') )
8157  *         if self._version == 33:
8158  */
8159     __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8160     __Pyx_GOTREF(__pyx_t_1);
8161     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8162     __Pyx_GOTREF(__pyx_t_2);
8163     __Pyx_INCREF(((PyObject *)__pyx_n_s__Type));
8164     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__Type));
8165     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Type));
8166     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
8167     __Pyx_GIVEREF(__pyx_t_1);
8168     __pyx_t_1 = 0;
8169     __pyx_t_7 = PyList_Append(__pyx_v_values, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8170     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8171     goto __pyx_L3;
8172   }
8173   __pyx_L3:;
8174
8175   /* "cvcf.pyx":429
8176  *             values.append( ('Number',nmb) )
8177  *             values.append( ('Type', fmt.type) )
8178  *         values.append( ('Description', '"' + fmt.description + '"') )             # <<<<<<<<<<<<<<
8179  *         if self._version == 33:
8180  *             format = ",".join([v for k,v in values])
8181  */
8182   __pyx_t_2 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__description); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8183   __Pyx_GOTREF(__pyx_t_2);
8184   __pyx_t_1 = PyNumber_Add(((PyObject *)__pyx_kp_s_32), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8185   __Pyx_GOTREF(__pyx_t_1);
8186   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8187   __pyx_t_2 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8188   __Pyx_GOTREF(__pyx_t_2);
8189   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8190   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8191   __Pyx_GOTREF(__pyx_t_1);
8192   __Pyx_INCREF(((PyObject *)__pyx_n_s__Description));
8193   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__Description));
8194   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Description));
8195   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
8196   __Pyx_GIVEREF(__pyx_t_2);
8197   __pyx_t_2 = 0;
8198   __pyx_t_7 = PyList_Append(__pyx_v_values, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8199   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8200
8201   /* "cvcf.pyx":430
8202  *             values.append( ('Type', fmt.type) )
8203  *         values.append( ('Description', '"' + fmt.description + '"') )
8204  *         if self._version == 33:             # <<<<<<<<<<<<<<
8205  *             format = ",".join([v for k,v in values])
8206  *         else:
8207  */
8208   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8209   __Pyx_GOTREF(__pyx_t_1);
8210   __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8211   __Pyx_GOTREF(__pyx_t_2);
8212   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8213   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8214   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8215   if (__pyx_t_4) {
8216
8217     /* "cvcf.pyx":431
8218  *         values.append( ('Description', '"' + fmt.description + '"') )
8219  *         if self._version == 33:
8220  *             format = ",".join([v for k,v in values])             # <<<<<<<<<<<<<<
8221  *         else:
8222  *             format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">"
8223  */
8224     __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8225     __Pyx_GOTREF(__pyx_t_2);
8226     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8227     __Pyx_GOTREF(__pyx_t_1);
8228     __pyx_t_6 = ((PyObject *)__pyx_v_values); __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0;
8229     for (;;) {
8230       if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
8231       __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++;
8232       if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
8233         PyObject* sequence = __pyx_t_9;
8234         if (likely(PyTuple_CheckExact(sequence))) {
8235           if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
8236             if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
8237             else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
8238             {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8239           }
8240           __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
8241           __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); 
8242         } else {
8243           if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
8244             if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
8245             else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
8246             {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8247           }
8248           __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
8249           __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
8250         }
8251         __Pyx_INCREF(__pyx_t_10);
8252         __Pyx_INCREF(__pyx_t_11);
8253         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8254       } else {
8255         Py_ssize_t index = -1;
8256         __pyx_t_12 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8257         __Pyx_GOTREF(__pyx_t_12);
8258         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8259         __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
8260         index = 0; __pyx_t_10 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_10)) goto __pyx_L8_unpacking_failed;
8261         __Pyx_GOTREF(__pyx_t_10);
8262         index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L8_unpacking_failed;
8263         __Pyx_GOTREF(__pyx_t_11);
8264         if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8265         __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8266         goto __pyx_L9_unpacking_done;
8267         __pyx_L8_unpacking_failed:;
8268         __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8269         if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
8270         if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
8271         {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8272         __pyx_L9_unpacking_done:;
8273       }
8274       __Pyx_XDECREF(__pyx_v_k);
8275       __pyx_v_k = __pyx_t_10;
8276       __pyx_t_10 = 0;
8277       __Pyx_XDECREF(__pyx_v_v);
8278       __pyx_v_v = __pyx_t_11;
8279       __pyx_t_11 = 0;
8280       if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8281     }
8282     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8283     __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8284     __Pyx_GOTREF(__pyx_t_6);
8285     __Pyx_INCREF(((PyObject *)__pyx_t_1));
8286     PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1));
8287     __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
8288     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8289     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8290     __Pyx_GOTREF(__pyx_t_1);
8291     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8292     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
8293     __pyx_v_format = __pyx_t_1;
8294     __pyx_t_1 = 0;
8295     goto __pyx_L5;
8296   }
8297   /*else*/ {
8298
8299     /* "cvcf.pyx":433
8300  *             format = ",".join([v for k,v in values])
8301  *         else:
8302  *             format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">"             # <<<<<<<<<<<<<<
8303  *         return format
8304  * 
8305  */
8306     __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8307     __Pyx_GOTREF(__pyx_t_1);
8308     __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8309     __Pyx_GOTREF(__pyx_t_6);
8310     __pyx_t_2 = ((PyObject *)__pyx_v_values); __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
8311     for (;;) {
8312       if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
8313       __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++;
8314       if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
8315         PyObject* sequence = __pyx_t_9;
8316         if (likely(PyTuple_CheckExact(sequence))) {
8317           if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
8318             if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
8319             else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
8320             {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8321           }
8322           __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
8323           __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
8324         } else {
8325           if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
8326             if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
8327             else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
8328             {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8329           }
8330           __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
8331           __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
8332         }
8333         __Pyx_INCREF(__pyx_t_11);
8334         __Pyx_INCREF(__pyx_t_10);
8335         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8336       } else {
8337         Py_ssize_t index = -1;
8338         __pyx_t_12 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8339         __Pyx_GOTREF(__pyx_t_12);
8340         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8341         __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
8342         index = 0; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L12_unpacking_failed;
8343         __Pyx_GOTREF(__pyx_t_11);
8344         index = 1; __pyx_t_10 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_10)) goto __pyx_L12_unpacking_failed;
8345         __Pyx_GOTREF(__pyx_t_10);
8346         if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8347         __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8348         goto __pyx_L13_unpacking_done;
8349         __pyx_L12_unpacking_failed:;
8350         __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8351         if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
8352         if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
8353         {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8354         __pyx_L13_unpacking_done:;
8355       }
8356       __Pyx_XDECREF(__pyx_v_k);
8357       __pyx_v_k = __pyx_t_11;
8358       __pyx_t_11 = 0;
8359       __Pyx_XDECREF(__pyx_v_v);
8360       __pyx_v_v = __pyx_t_10;
8361       __pyx_t_10 = 0;
8362       __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8363       __Pyx_GOTREF(__pyx_t_9);
8364       __Pyx_INCREF(__pyx_v_k);
8365       PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_k);
8366       __Pyx_GIVEREF(__pyx_v_k);
8367       __Pyx_INCREF(__pyx_v_v);
8368       PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_v);
8369       __Pyx_GIVEREF(__pyx_v_v);
8370       __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_59), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8371       __Pyx_GOTREF(((PyObject *)__pyx_t_10));
8372       __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
8373       if (unlikely(PyList_Append(__pyx_t_6, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8374       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
8375     }
8376     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8377     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8378     __Pyx_GOTREF(__pyx_t_2);
8379     __Pyx_INCREF(((PyObject *)__pyx_t_6));
8380     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6));
8381     __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
8382     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
8383     __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8384     __Pyx_GOTREF(__pyx_t_6);
8385     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8386     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8387     __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_25), __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8388     __Pyx_GOTREF(__pyx_t_2);
8389     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8390     __pyx_t_6 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_kp_s_28)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8391     __Pyx_GOTREF(__pyx_t_6);
8392     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8393     __pyx_v_format = __pyx_t_6;
8394     __pyx_t_6 = 0;
8395   }
8396   __pyx_L5:;
8397
8398   /* "cvcf.pyx":434
8399  *         else:
8400  *             format = "<" + (",".join( ["%s=%s" % (k,v) for (k,v) in values] )) + ">"
8401  *         return format             # <<<<<<<<<<<<<<
8402  * 
8403  *     def get_expected(self, format, formatdict, alt):
8404  */
8405   __Pyx_XDECREF(__pyx_r);
8406   __Pyx_INCREF(__pyx_v_format);
8407   __pyx_r = __pyx_v_format;
8408   goto __pyx_L0;
8409
8410   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8411   goto __pyx_L0;
8412   __pyx_L1_error:;
8413   __Pyx_XDECREF(__pyx_t_1);
8414   __Pyx_XDECREF(__pyx_t_2);
8415   __Pyx_XDECREF(__pyx_t_6);
8416   __Pyx_XDECREF(__pyx_t_9);
8417   __Pyx_XDECREF(__pyx_t_10);
8418   __Pyx_XDECREF(__pyx_t_11);
8419   __Pyx_XDECREF(__pyx_t_12);
8420   __Pyx_AddTraceback("cvcf.VCF.format_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
8421   __pyx_r = NULL;
8422   __pyx_L0:;
8423   __Pyx_XDECREF(__pyx_v_values);
8424   __Pyx_XDECREF(__pyx_v_nmb);
8425   __Pyx_XDECREF(__pyx_v_format);
8426   __Pyx_XDECREF(__pyx_v_k);
8427   __Pyx_XDECREF(__pyx_v_v);
8428   __Pyx_XGIVEREF(__pyx_r);
8429   __Pyx_RefNannyFinishContext();
8430   return __pyx_r;
8431 }
8432
8433 /* Python wrapper */
8434 static PyObject *__pyx_pw_4cvcf_3VCF_9get_expected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8435 static PyMethodDef __pyx_mdef_4cvcf_3VCF_9get_expected = {__Pyx_NAMESTR("get_expected"), (PyCFunction)__pyx_pw_4cvcf_3VCF_9get_expected, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
8436 static PyObject *__pyx_pw_4cvcf_3VCF_9get_expected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8437   PyObject *__pyx_v_self = 0;
8438   PyObject *__pyx_v_format = 0;
8439   PyObject *__pyx_v_formatdict = 0;
8440   PyObject *__pyx_v_alt = 0;
8441   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__format,&__pyx_n_s__formatdict,&__pyx_n_s__alt,0};
8442   PyObject *__pyx_r = 0;
8443   __Pyx_RefNannyDeclarations
8444   __Pyx_RefNannySetupContext("get_expected (wrapper)", 0);
8445   __pyx_self = __pyx_self;
8446   {
8447     PyObject* values[4] = {0,0,0,0};
8448     if (unlikely(__pyx_kwds)) {
8449       Py_ssize_t kw_args;
8450       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8451       switch (pos_args) {
8452         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8453         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8454         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8455         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8456         case  0: break;
8457         default: goto __pyx_L5_argtuple_error;
8458       }
8459       kw_args = PyDict_Size(__pyx_kwds);
8460       switch (pos_args) {
8461         case  0:
8462         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
8463         if (likely(values[0])) kw_args--;
8464         else goto __pyx_L5_argtuple_error;
8465         case  1:
8466         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format);
8467         if (likely(values[1])) kw_args--;
8468         else {
8469           __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8470         }
8471         case  2:
8472         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__formatdict);
8473         if (likely(values[2])) kw_args--;
8474         else {
8475           __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8476         }
8477         case  3:
8478         values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alt);
8479         if (likely(values[3])) kw_args--;
8480         else {
8481           __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8482         }
8483       }
8484       if (unlikely(kw_args > 0)) {
8485         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_expected") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8486       }
8487     } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
8488       goto __pyx_L5_argtuple_error;
8489     } else {
8490       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8491       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8492       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8493       values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8494     }
8495     __pyx_v_self = values[0];
8496     __pyx_v_format = values[1];
8497     __pyx_v_formatdict = values[2];
8498     __pyx_v_alt = values[3];
8499   }
8500   goto __pyx_L4_argument_unpacking_done;
8501   __pyx_L5_argtuple_error:;
8502   __Pyx_RaiseArgtupleInvalid("get_expected", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8503   __pyx_L3_error:;
8504   __Pyx_AddTraceback("cvcf.VCF.get_expected", __pyx_clineno, __pyx_lineno, __pyx_filename);
8505   __Pyx_RefNannyFinishContext();
8506   return NULL;
8507   __pyx_L4_argument_unpacking_done:;
8508   __pyx_r = __pyx_pf_4cvcf_3VCF_8get_expected(__pyx_self, __pyx_v_self, __pyx_v_format, __pyx_v_formatdict, __pyx_v_alt);
8509   __Pyx_RefNannyFinishContext();
8510   return __pyx_r;
8511 }
8512
8513 /* "cvcf.pyx":436
8514  *         return format
8515  * 
8516  *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
8517  *         fmt = formatdict[format]
8518  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
8519  */
8520
8521 static PyObject *__pyx_pf_4cvcf_3VCF_8get_expected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_alt) {
8522   PyObject *__pyx_v_fmt = NULL;
8523   PyObject *__pyx_r = NULL;
8524   __Pyx_RefNannyDeclarations
8525   PyObject *__pyx_t_1 = NULL;
8526   PyObject *__pyx_t_2 = NULL;
8527   PyObject *__pyx_t_3 = NULL;
8528   int __pyx_t_4;
8529   Py_ssize_t __pyx_t_5;
8530   Py_ssize_t __pyx_t_6;
8531   int __pyx_lineno = 0;
8532   const char *__pyx_filename = NULL;
8533   int __pyx_clineno = 0;
8534   __Pyx_RefNannySetupContext("get_expected", 0);
8535
8536   /* "cvcf.pyx":437
8537  * 
8538  *     def get_expected(self, format, formatdict, alt):
8539  *         fmt = formatdict[format]             # <<<<<<<<<<<<<<
8540  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
8541  *         if fmt.numbertype == self.NT_NUMBER: return fmt.number
8542  */
8543   __pyx_t_1 = PyObject_GetItem(__pyx_v_formatdict, __pyx_v_format); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8544   __Pyx_GOTREF(__pyx_t_1);
8545   __pyx_v_fmt = __pyx_t_1;
8546   __pyx_t_1 = 0;
8547
8548   /* "cvcf.pyx":438
8549  *     def get_expected(self, format, formatdict, alt):
8550  *         fmt = formatdict[format]
8551  *         if fmt.numbertype == self.NT_UNKNOWN: return -1             # <<<<<<<<<<<<<<
8552  *         if fmt.numbertype == self.NT_NUMBER: return fmt.number
8553  *         if fmt.numbertype == self.NT_ALLELES: return len(alt)+1
8554  */
8555   __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8556   __Pyx_GOTREF(__pyx_t_1);
8557   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8558   __Pyx_GOTREF(__pyx_t_2);
8559   __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8560   __Pyx_GOTREF(__pyx_t_3);
8561   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8562   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8563   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8564   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8565   if (__pyx_t_4) {
8566     __Pyx_XDECREF(__pyx_r);
8567     __Pyx_INCREF(__pyx_int_neg_1);
8568     __pyx_r = __pyx_int_neg_1;
8569     goto __pyx_L0;
8570     goto __pyx_L3;
8571   }
8572   __pyx_L3:;
8573
8574   /* "cvcf.pyx":439
8575  *         fmt = formatdict[format]
8576  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
8577  *         if fmt.numbertype == self.NT_NUMBER: return fmt.number             # <<<<<<<<<<<<<<
8578  *         if fmt.numbertype == self.NT_ALLELES: return len(alt)+1
8579  *         if fmt.numbertype == self.NT_NR_ALLELES: return len(alt)
8580  */
8581   __pyx_t_3 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8582   __Pyx_GOTREF(__pyx_t_3);
8583   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8584   __Pyx_GOTREF(__pyx_t_2);
8585   __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8586   __Pyx_GOTREF(__pyx_t_1);
8587   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8588   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8589   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8590   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8591   if (__pyx_t_4) {
8592     __Pyx_XDECREF(__pyx_r);
8593     __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__number); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8594     __Pyx_GOTREF(__pyx_t_1);
8595     __pyx_r = __pyx_t_1;
8596     __pyx_t_1 = 0;
8597     goto __pyx_L0;
8598     goto __pyx_L4;
8599   }
8600   __pyx_L4:;
8601
8602   /* "cvcf.pyx":440
8603  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
8604  *         if fmt.numbertype == self.NT_NUMBER: return fmt.number
8605  *         if fmt.numbertype == self.NT_ALLELES: return len(alt)+1             # <<<<<<<<<<<<<<
8606  *         if fmt.numbertype == self.NT_NR_ALLELES: return len(alt)
8607  *         if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2
8608  */
8609   __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8610   __Pyx_GOTREF(__pyx_t_1);
8611   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8612   __Pyx_GOTREF(__pyx_t_2);
8613   __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8614   __Pyx_GOTREF(__pyx_t_3);
8615   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8616   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8617   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8618   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8619   if (__pyx_t_4) {
8620     __Pyx_XDECREF(__pyx_r);
8621     __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8622     __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_5 + 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8623     __Pyx_GOTREF(__pyx_t_3);
8624     __pyx_r = __pyx_t_3;
8625     __pyx_t_3 = 0;
8626     goto __pyx_L0;
8627     goto __pyx_L5;
8628   }
8629   __pyx_L5:;
8630
8631   /* "cvcf.pyx":441
8632  *         if fmt.numbertype == self.NT_NUMBER: return fmt.number
8633  *         if fmt.numbertype == self.NT_ALLELES: return len(alt)+1
8634  *         if fmt.numbertype == self.NT_NR_ALLELES: return len(alt)             # <<<<<<<<<<<<<<
8635  *         if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2
8636  *         if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1)
8637  */
8638   __pyx_t_3 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8639   __Pyx_GOTREF(__pyx_t_3);
8640   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NR_ALLELES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8641   __Pyx_GOTREF(__pyx_t_2);
8642   __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8643   __Pyx_GOTREF(__pyx_t_1);
8644   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8645   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8646   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8647   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8648   if (__pyx_t_4) {
8649     __Pyx_XDECREF(__pyx_r);
8650     __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8651     __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8652     __Pyx_GOTREF(__pyx_t_1);
8653     __pyx_r = __pyx_t_1;
8654     __pyx_t_1 = 0;
8655     goto __pyx_L0;
8656     goto __pyx_L6;
8657   }
8658   __pyx_L6:;
8659
8660   /* "cvcf.pyx":442
8661  *         if fmt.numbertype == self.NT_ALLELES: return len(alt)+1
8662  *         if fmt.numbertype == self.NT_NR_ALLELES: return len(alt)
8663  *         if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2             # <<<<<<<<<<<<<<
8664  *         if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1)
8665  *         return 0
8666  */
8667   __pyx_t_1 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8668   __Pyx_GOTREF(__pyx_t_1);
8669   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8670   __Pyx_GOTREF(__pyx_t_2);
8671   __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8672   __Pyx_GOTREF(__pyx_t_3);
8673   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8674   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8675   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8676   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8677   if (__pyx_t_4) {
8678     __Pyx_XDECREF(__pyx_r);
8679     __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8680     __pyx_t_6 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8681     __pyx_t_3 = PyInt_FromSsize_t(__Pyx_div_Py_ssize_t(((__pyx_t_5 + 1) * (__pyx_t_6 + 2)), 2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8682     __Pyx_GOTREF(__pyx_t_3);
8683     __pyx_r = __pyx_t_3;
8684     __pyx_t_3 = 0;
8685     goto __pyx_L0;
8686     goto __pyx_L7;
8687   }
8688   __pyx_L7:;
8689
8690   /* "cvcf.pyx":443
8691  *         if fmt.numbertype == self.NT_NR_ALLELES: return len(alt)
8692  *         if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2
8693  *         if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1)             # <<<<<<<<<<<<<<
8694  *         return 0
8695  * 
8696  */
8697   __pyx_t_3 = PyObject_GetAttr(__pyx_v_fmt, __pyx_n_s__numbertype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8698   __Pyx_GOTREF(__pyx_t_3);
8699   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_PHASED_GENOTYPES); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8700   __Pyx_GOTREF(__pyx_t_2);
8701   __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8702   __Pyx_GOTREF(__pyx_t_1);
8703   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8704   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8705   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8706   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8707   if (__pyx_t_4) {
8708     __Pyx_XDECREF(__pyx_r);
8709     __pyx_t_6 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8710     __pyx_t_5 = PyObject_Length(__pyx_v_alt); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8711     __pyx_t_1 = PyInt_FromSsize_t(((__pyx_t_6 + 1) * (__pyx_t_5 + 1))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8712     __Pyx_GOTREF(__pyx_t_1);
8713     __pyx_r = __pyx_t_1;
8714     __pyx_t_1 = 0;
8715     goto __pyx_L0;
8716     goto __pyx_L8;
8717   }
8718   __pyx_L8:;
8719
8720   /* "cvcf.pyx":444
8721  *         if fmt.numbertype == self.NT_GENOTYPES: return ((len(alt)+1)*(len(alt)+2)) // 2
8722  *         if fmt.numbertype == self.NT_PHASED_GENOTYPES: return (len(alt)+1)*(len(alt)+1)
8723  *         return 0             # <<<<<<<<<<<<<<
8724  * 
8725  * 
8726  */
8727   __Pyx_XDECREF(__pyx_r);
8728   __Pyx_INCREF(__pyx_int_0);
8729   __pyx_r = __pyx_int_0;
8730   goto __pyx_L0;
8731
8732   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8733   goto __pyx_L0;
8734   __pyx_L1_error:;
8735   __Pyx_XDECREF(__pyx_t_1);
8736   __Pyx_XDECREF(__pyx_t_2);
8737   __Pyx_XDECREF(__pyx_t_3);
8738   __Pyx_AddTraceback("cvcf.VCF.get_expected", __pyx_clineno, __pyx_lineno, __pyx_filename);
8739   __pyx_r = NULL;
8740   __pyx_L0:;
8741   __Pyx_XDECREF(__pyx_v_fmt);
8742   __Pyx_XGIVEREF(__pyx_r);
8743   __Pyx_RefNannyFinishContext();
8744   return __pyx_r;
8745 }
8746
8747 /* Python wrapper */
8748 static PyObject *__pyx_pw_4cvcf_3VCF_11_add_definition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8749 static PyMethodDef __pyx_mdef_4cvcf_3VCF_11_add_definition = {__Pyx_NAMESTR("_add_definition"), (PyCFunction)__pyx_pw_4cvcf_3VCF_11_add_definition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
8750 static PyObject *__pyx_pw_4cvcf_3VCF_11_add_definition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8751   PyObject *__pyx_v_self = 0;
8752   PyObject *__pyx_v_formatdict = 0;
8753   PyObject *__pyx_v_key = 0;
8754   PyObject *__pyx_v_data = 0;
8755   PyObject *__pyx_v_line = 0;
8756   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__formatdict,&__pyx_n_s__key,&__pyx_n_s__data,&__pyx_n_s__line,0};
8757   PyObject *__pyx_r = 0;
8758   __Pyx_RefNannyDeclarations
8759   __Pyx_RefNannySetupContext("_add_definition (wrapper)", 0);
8760   __pyx_self = __pyx_self;
8761   {
8762     PyObject* values[5] = {0,0,0,0,0};
8763     if (unlikely(__pyx_kwds)) {
8764       Py_ssize_t kw_args;
8765       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8766       switch (pos_args) {
8767         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8768         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8769         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8770         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8771         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8772         case  0: break;
8773         default: goto __pyx_L5_argtuple_error;
8774       }
8775       kw_args = PyDict_Size(__pyx_kwds);
8776       switch (pos_args) {
8777         case  0:
8778         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
8779         if (likely(values[0])) kw_args--;
8780         else goto __pyx_L5_argtuple_error;
8781         case  1:
8782         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__formatdict);
8783         if (likely(values[1])) kw_args--;
8784         else {
8785           __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8786         }
8787         case  2:
8788         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
8789         if (likely(values[2])) kw_args--;
8790         else {
8791           __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8792         }
8793         case  3:
8794         values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data);
8795         if (likely(values[3])) kw_args--;
8796         else {
8797           __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8798         }
8799         case  4:
8800         values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line);
8801         if (likely(values[4])) kw_args--;
8802         else {
8803           __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8804         }
8805       }
8806       if (unlikely(kw_args > 0)) {
8807         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_add_definition") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8808       }
8809     } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
8810       goto __pyx_L5_argtuple_error;
8811     } else {
8812       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8813       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8814       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8815       values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8816       values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8817     }
8818     __pyx_v_self = values[0];
8819     __pyx_v_formatdict = values[1];
8820     __pyx_v_key = values[2];
8821     __pyx_v_data = values[3];
8822     __pyx_v_line = values[4];
8823   }
8824   goto __pyx_L4_argument_unpacking_done;
8825   __pyx_L5_argtuple_error:;
8826   __Pyx_RaiseArgtupleInvalid("_add_definition", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8827   __pyx_L3_error:;
8828   __Pyx_AddTraceback("cvcf.VCF._add_definition", __pyx_clineno, __pyx_lineno, __pyx_filename);
8829   __Pyx_RefNannyFinishContext();
8830   return NULL;
8831   __pyx_L4_argument_unpacking_done:;
8832   __pyx_r = __pyx_pf_4cvcf_3VCF_10_add_definition(__pyx_self, __pyx_v_self, __pyx_v_formatdict, __pyx_v_key, __pyx_v_data, __pyx_v_line);
8833   __Pyx_RefNannyFinishContext();
8834   return __pyx_r;
8835 }
8836
8837 /* "cvcf.pyx":447
8838  * 
8839  * 
8840  *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
8841  *         if key in formatdict: return
8842  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
8843  */
8844
8845 static PyObject *__pyx_pf_4cvcf_3VCF_10_add_definition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_key, PyObject *__pyx_v_data, PyObject *__pyx_v_line) {
8846   PyObject *__pyx_r = NULL;
8847   __Pyx_RefNannyDeclarations
8848   int __pyx_t_1;
8849   PyObject *__pyx_t_2 = NULL;
8850   PyObject *__pyx_t_3 = NULL;
8851   PyObject *__pyx_t_4 = NULL;
8852   int __pyx_lineno = 0;
8853   const char *__pyx_filename = NULL;
8854   int __pyx_clineno = 0;
8855   __Pyx_RefNannySetupContext("_add_definition", 0);
8856   __Pyx_INCREF(__pyx_v_data);
8857
8858   /* "cvcf.pyx":448
8859  * 
8860  *     def _add_definition(self, formatdict, key, data, line ):
8861  *         if key in formatdict: return             # <<<<<<<<<<<<<<
8862  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
8863  *         if data == None:
8864  */
8865   __pyx_t_1 = ((PySequence_Contains(__pyx_v_formatdict, __pyx_v_key))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8866   if (__pyx_t_1) {
8867     __Pyx_XDECREF(__pyx_r);
8868     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8869     goto __pyx_L0;
8870     goto __pyx_L3;
8871   }
8872   __pyx_L3:;
8873
8874   /* "cvcf.pyx":449
8875  *     def _add_definition(self, formatdict, key, data, line ):
8876  *         if key in formatdict: return
8877  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)             # <<<<<<<<<<<<<<
8878  *         if data == None:
8879  *             formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")
8880  */
8881   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8882   __Pyx_GOTREF(__pyx_t_2);
8883   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_UNKNOWN_KEY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8884   __Pyx_GOTREF(__pyx_t_3);
8885   __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8886   __Pyx_GOTREF(__pyx_t_4);
8887   __Pyx_INCREF(__pyx_v_line);
8888   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_line);
8889   __Pyx_GIVEREF(__pyx_v_line);
8890   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
8891   __Pyx_GIVEREF(__pyx_t_3);
8892   __Pyx_INCREF(__pyx_v_key);
8893   PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_key);
8894   __Pyx_GIVEREF(__pyx_v_key);
8895   __pyx_t_3 = 0;
8896   __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8897   __Pyx_GOTREF(__pyx_t_3);
8898   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8899   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
8900   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8901
8902   /* "cvcf.pyx":450
8903  *         if key in formatdict: return
8904  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
8905  *         if data == None:             # <<<<<<<<<<<<<<
8906  *             formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")
8907  *             return
8908  */
8909   __pyx_t_3 = PyObject_RichCompare(__pyx_v_data, Py_None, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8910   __Pyx_GOTREF(__pyx_t_3);
8911   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8912   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8913   if (__pyx_t_1) {
8914
8915     /* "cvcf.pyx":451
8916  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
8917  *         if data == None:
8918  *             formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")             # <<<<<<<<<<<<<<
8919  *             return
8920  *         if data == []: data = [""]             # unsure what type -- say string
8921  */
8922     __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8923     __Pyx_GOTREF(__pyx_t_3);
8924     __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8925     __Pyx_GOTREF(__pyx_t_4);
8926     __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8927     __Pyx_GOTREF(__pyx_t_2);
8928     __Pyx_INCREF(__pyx_v_key);
8929     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
8930     __Pyx_GIVEREF(__pyx_v_key);
8931     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
8932     __Pyx_GIVEREF(__pyx_t_4);
8933     __Pyx_INCREF(__pyx_int_0);
8934     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0);
8935     __Pyx_GIVEREF(__pyx_int_0);
8936     __Pyx_INCREF(((PyObject *)__pyx_n_s__Flag));
8937     PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__Flag));
8938     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Flag));
8939     __Pyx_INCREF(((PyObject *)__pyx_kp_s_60));
8940     PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_60));
8941     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
8942     __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
8943     PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_kp_s_9));
8944     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
8945     __pyx_t_4 = 0;
8946     __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8947     __Pyx_GOTREF(__pyx_t_4);
8948     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8949     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8950     if (PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8951     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8952
8953     /* "cvcf.pyx":452
8954  *         if data == None:
8955  *             formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")
8956  *             return             # <<<<<<<<<<<<<<
8957  *         if data == []: data = [""]             # unsure what type -- say string
8958  *         if type(data[0]) == type(0.0):
8959  */
8960     __Pyx_XDECREF(__pyx_r);
8961     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8962     goto __pyx_L0;
8963     goto __pyx_L4;
8964   }
8965   __pyx_L4:;
8966
8967   /* "cvcf.pyx":453
8968  *             formatdict[key] = FORMAT(key,self.NT_NUMBER,0,"Flag","(Undefined tag)",".")
8969  *             return
8970  *         if data == []: data = [""]             # unsure what type -- say string             # <<<<<<<<<<<<<<
8971  *         if type(data[0]) == type(0.0):
8972  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)
8973  */
8974   __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8975   __Pyx_GOTREF(__pyx_t_4);
8976   __pyx_t_2 = PyObject_RichCompare(__pyx_v_data, ((PyObject *)__pyx_t_4), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8977   __Pyx_GOTREF(__pyx_t_2);
8978   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
8979   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8980   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8981   if (__pyx_t_1) {
8982     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8983     __Pyx_GOTREF(__pyx_t_2);
8984     __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
8985     PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_1));
8986     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
8987     __Pyx_DECREF(__pyx_v_data);
8988     __pyx_v_data = ((PyObject *)__pyx_t_2);
8989     __pyx_t_2 = 0;
8990     goto __pyx_L5;
8991   }
8992   __pyx_L5:;
8993
8994   /* "cvcf.pyx":454
8995  *             return
8996  *         if data == []: data = [""]             # unsure what type -- say string
8997  *         if type(data[0]) == type(0.0):             # <<<<<<<<<<<<<<
8998  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)
8999  *             return
9000  */
9001   __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_data, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9002   __Pyx_GOTREF(__pyx_t_2);
9003   __pyx_t_4 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9004   __Pyx_GOTREF(__pyx_t_4);
9005   __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_2)), ((PyObject *)Py_TYPE(__pyx_t_4)), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9006   __Pyx_GOTREF(__pyx_t_3);
9007   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9008   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9009   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9010   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9011   if (__pyx_t_1) {
9012
9013     /* "cvcf.pyx":455
9014  *         if data == []: data = [""]             # unsure what type -- say string
9015  *         if type(data[0]) == type(0.0):
9016  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)             # <<<<<<<<<<<<<<
9017  *             return
9018  *         if type(data[0]) == type(0):
9019  */
9020     __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9021     __Pyx_GOTREF(__pyx_t_3);
9022     __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9023     __Pyx_GOTREF(__pyx_t_4);
9024     __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9025     __Pyx_GOTREF(__pyx_t_2);
9026     __Pyx_INCREF(__pyx_v_key);
9027     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
9028     __Pyx_GIVEREF(__pyx_v_key);
9029     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
9030     __Pyx_GIVEREF(__pyx_t_4);
9031     __Pyx_INCREF(__pyx_int_neg_1);
9032     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_neg_1);
9033     __Pyx_GIVEREF(__pyx_int_neg_1);
9034     __Pyx_INCREF(((PyObject *)__pyx_n_s__Float));
9035     PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__Float));
9036     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float));
9037     __Pyx_INCREF(((PyObject *)__pyx_kp_s_60));
9038     PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_60));
9039     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
9040     __Pyx_INCREF(Py_None);
9041     PyTuple_SET_ITEM(__pyx_t_2, 5, Py_None);
9042     __Pyx_GIVEREF(Py_None);
9043     __pyx_t_4 = 0;
9044     __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9045     __Pyx_GOTREF(__pyx_t_4);
9046     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9047     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9048     if (PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9049     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9050
9051     /* "cvcf.pyx":456
9052  *         if type(data[0]) == type(0.0):
9053  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)
9054  *             return             # <<<<<<<<<<<<<<
9055  *         if type(data[0]) == type(0):
9056  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)
9057  */
9058     __Pyx_XDECREF(__pyx_r);
9059     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9060     goto __pyx_L0;
9061     goto __pyx_L6;
9062   }
9063   __pyx_L6:;
9064
9065   /* "cvcf.pyx":457
9066  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Float","(Undefined tag)",None)
9067  *             return
9068  *         if type(data[0]) == type(0):             # <<<<<<<<<<<<<<
9069  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)
9070  *             return
9071  */
9072   __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_data, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9073   __Pyx_GOTREF(__pyx_t_4);
9074   __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_4)), ((PyObject *)Py_TYPE(__pyx_int_0)), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9075   __Pyx_GOTREF(__pyx_t_2);
9076   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9077   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9078   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9079   if (__pyx_t_1) {
9080
9081     /* "cvcf.pyx":458
9082  *             return
9083  *         if type(data[0]) == type(0):
9084  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)             # <<<<<<<<<<<<<<
9085  *             return
9086  *         formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"String","(Undefined tag)",".")
9087  */
9088     __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9089     __Pyx_GOTREF(__pyx_t_2);
9090     __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9091     __Pyx_GOTREF(__pyx_t_4);
9092     __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9093     __Pyx_GOTREF(__pyx_t_3);
9094     __Pyx_INCREF(__pyx_v_key);
9095     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
9096     __Pyx_GIVEREF(__pyx_v_key);
9097     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
9098     __Pyx_GIVEREF(__pyx_t_4);
9099     __Pyx_INCREF(__pyx_int_neg_1);
9100     PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_neg_1);
9101     __Pyx_GIVEREF(__pyx_int_neg_1);
9102     __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
9103     PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__Integer));
9104     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
9105     __Pyx_INCREF(((PyObject *)__pyx_kp_s_60));
9106     PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_kp_s_60));
9107     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
9108     __Pyx_INCREF(Py_None);
9109     PyTuple_SET_ITEM(__pyx_t_3, 5, Py_None);
9110     __Pyx_GIVEREF(Py_None);
9111     __pyx_t_4 = 0;
9112     __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9113     __Pyx_GOTREF(__pyx_t_4);
9114     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9115     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
9116     if (PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9117     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9118
9119     /* "cvcf.pyx":459
9120  *         if type(data[0]) == type(0):
9121  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)
9122  *             return             # <<<<<<<<<<<<<<
9123  *         formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"String","(Undefined tag)",".")
9124  * 
9125  */
9126     __Pyx_XDECREF(__pyx_r);
9127     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9128     goto __pyx_L0;
9129     goto __pyx_L7;
9130   }
9131   __pyx_L7:;
9132
9133   /* "cvcf.pyx":460
9134  *             formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"Integer","(Undefined tag)",None)
9135  *             return
9136  *         formatdict[key] = FORMAT(key,self.NT_UNKNOWN,-1,"String","(Undefined tag)",".")             # <<<<<<<<<<<<<<
9137  * 
9138  * 
9139  */
9140   __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9141   __Pyx_GOTREF(__pyx_t_4);
9142   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9143   __Pyx_GOTREF(__pyx_t_3);
9144   __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9145   __Pyx_GOTREF(__pyx_t_2);
9146   __Pyx_INCREF(__pyx_v_key);
9147   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
9148   __Pyx_GIVEREF(__pyx_v_key);
9149   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
9150   __Pyx_GIVEREF(__pyx_t_3);
9151   __Pyx_INCREF(__pyx_int_neg_1);
9152   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_neg_1);
9153   __Pyx_GIVEREF(__pyx_int_neg_1);
9154   __Pyx_INCREF(((PyObject *)__pyx_n_s__String));
9155   PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__String));
9156   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String));
9157   __Pyx_INCREF(((PyObject *)__pyx_kp_s_60));
9158   PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_kp_s_60));
9159   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
9160   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
9161   PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_kp_s_9));
9162   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
9163   __pyx_t_3 = 0;
9164   __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9165   __Pyx_GOTREF(__pyx_t_3);
9166   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9167   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9168   if (PyObject_SetItem(__pyx_v_formatdict, __pyx_v_key, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9169   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9170
9171   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9172   goto __pyx_L0;
9173   __pyx_L1_error:;
9174   __Pyx_XDECREF(__pyx_t_2);
9175   __Pyx_XDECREF(__pyx_t_3);
9176   __Pyx_XDECREF(__pyx_t_4);
9177   __Pyx_AddTraceback("cvcf.VCF._add_definition", __pyx_clineno, __pyx_lineno, __pyx_filename);
9178   __pyx_r = NULL;
9179   __pyx_L0:;
9180   __Pyx_XDECREF(__pyx_v_data);
9181   __Pyx_XGIVEREF(__pyx_r);
9182   __Pyx_RefNannyFinishContext();
9183   return __pyx_r;
9184 }
9185
9186 /* "cvcf.pyx":464
9187  * 
9188  *     # todo: trim trailing missing values
9189  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):             # <<<<<<<<<<<<<<
9190  *         output, sdata = [], []
9191  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
9192  */
9193
9194 static PyObject *__pyx_pf_4cvcf_3VCF_91__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
9195   PyObject *__pyx_r = NULL;
9196   __Pyx_RefNannyDeclarations
9197   PyObject *__pyx_t_1 = NULL;
9198   int __pyx_lineno = 0;
9199   const char *__pyx_filename = NULL;
9200   int __pyx_clineno = 0;
9201   __Pyx_RefNannySetupContext("__defaults__", 0);
9202   __Pyx_XDECREF(__pyx_r);
9203   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9204   __Pyx_GOTREF(__pyx_t_1);
9205   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_key);
9206   PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_key);
9207   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_key);
9208   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_value);
9209   PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_value);
9210   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_value);
9211   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_kp_s_4)));
9212   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_kp_s_4)));
9213   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_kp_s_4)));
9214   __pyx_r = ((PyObject *)__pyx_t_1);
9215   __pyx_t_1 = 0;
9216   goto __pyx_L0;
9217
9218   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9219   goto __pyx_L0;
9220   __pyx_L1_error:;
9221   __Pyx_XDECREF(__pyx_t_1);
9222   __Pyx_AddTraceback("cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9223   __pyx_r = NULL;
9224   __pyx_L0:;
9225   __Pyx_XGIVEREF(__pyx_r);
9226   __Pyx_RefNannyFinishContext();
9227   return __pyx_r;
9228 }
9229
9230 /* Python wrapper */
9231 static PyObject *__pyx_pw_4cvcf_3VCF_13format_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9232 static PyMethodDef __pyx_mdef_4cvcf_3VCF_13format_formatdata = {__Pyx_NAMESTR("format_formatdata"), (PyCFunction)__pyx_pw_4cvcf_3VCF_13format_formatdata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
9233 static PyObject *__pyx_pw_4cvcf_3VCF_13format_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9234   PyObject *__pyx_v_self = 0;
9235   PyObject *__pyx_v_data = 0;
9236   PyObject *__pyx_v_format = 0;
9237   PyObject *__pyx_v_key = 0;
9238   PyObject *__pyx_v_value = 0;
9239   PyObject *__pyx_v_separator = 0;
9240   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__data,&__pyx_n_s__format,&__pyx_n_s__key,&__pyx_n_s__value,&__pyx_n_s__separator,0};
9241   PyObject *__pyx_r = 0;
9242   __Pyx_RefNannyDeclarations
9243   __Pyx_RefNannySetupContext("format_formatdata (wrapper)", 0);
9244   __pyx_self = __pyx_self;
9245   {
9246     PyObject* values[6] = {0,0,0,0,0,0};
9247     __pyx_defaults3 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self);
9248     values[3] = __pyx_dynamic_args->__pyx_arg_key;
9249     values[4] = __pyx_dynamic_args->__pyx_arg_value;
9250     values[5] = ((PyObject *)((PyObject*)__pyx_kp_s_4));
9251     if (unlikely(__pyx_kwds)) {
9252       Py_ssize_t kw_args;
9253       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9254       switch (pos_args) {
9255         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9256         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9257         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9258         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9259         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9260         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9261         case  0: break;
9262         default: goto __pyx_L5_argtuple_error;
9263       }
9264       kw_args = PyDict_Size(__pyx_kwds);
9265       switch (pos_args) {
9266         case  0:
9267         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
9268         if (likely(values[0])) kw_args--;
9269         else goto __pyx_L5_argtuple_error;
9270         case  1:
9271         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data);
9272         if (likely(values[1])) kw_args--;
9273         else {
9274           __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9275         }
9276         case  2:
9277         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format);
9278         if (likely(values[2])) kw_args--;
9279         else {
9280           __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9281         }
9282         case  3:
9283         if (kw_args > 0) {
9284           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
9285           if (value) { values[3] = value; kw_args--; }
9286         }
9287         case  4:
9288         if (kw_args > 0) {
9289           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
9290           if (value) { values[4] = value; kw_args--; }
9291         }
9292         case  5:
9293         if (kw_args > 0) {
9294           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__separator);
9295           if (value) { values[5] = value; kw_args--; }
9296         }
9297       }
9298       if (unlikely(kw_args > 0)) {
9299         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "format_formatdata") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9300       }
9301     } else {
9302       switch (PyTuple_GET_SIZE(__pyx_args)) {
9303         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
9304         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9305         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9306         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9307         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9308         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9309         break;
9310         default: goto __pyx_L5_argtuple_error;
9311       }
9312     }
9313     __pyx_v_self = values[0];
9314     __pyx_v_data = values[1];
9315     __pyx_v_format = values[2];
9316     __pyx_v_key = values[3];
9317     __pyx_v_value = values[4];
9318     __pyx_v_separator = values[5];
9319   }
9320   goto __pyx_L4_argument_unpacking_done;
9321   __pyx_L5_argtuple_error:;
9322   __Pyx_RaiseArgtupleInvalid("format_formatdata", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9323   __pyx_L3_error:;
9324   __Pyx_AddTraceback("cvcf.VCF.format_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
9325   __Pyx_RefNannyFinishContext();
9326   return NULL;
9327   __pyx_L4_argument_unpacking_done:;
9328   __pyx_r = __pyx_pf_4cvcf_3VCF_12format_formatdata(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_format, __pyx_v_key, __pyx_v_value, __pyx_v_separator);
9329   __Pyx_RefNannyFinishContext();
9330   return __pyx_r;
9331 }
9332
9333 static PyObject *__pyx_pf_4cvcf_3VCF_12format_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_format, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_separator) {
9334   PyObject *__pyx_v_output = NULL;
9335   PyObject *__pyx_v_sdata = NULL;
9336   PyObject *__pyx_v_d = NULL;
9337   PyObject *__pyx_v_k = NULL;
9338   PyObject *__pyx_v_idx = NULL;
9339   PyObject *__pyx_v_v = NULL;
9340   PyObject *__pyx_v_last = NULL;
9341   PyObject *__pyx_r = NULL;
9342   __Pyx_RefNannyDeclarations
9343   PyObject *__pyx_t_1 = NULL;
9344   PyObject *__pyx_t_2 = NULL;
9345   int __pyx_t_3;
9346   Py_ssize_t __pyx_t_4;
9347   PyObject *(*__pyx_t_5)(PyObject *);
9348   PyObject *__pyx_t_6 = NULL;
9349   PyObject *__pyx_t_7 = NULL;
9350   Py_ssize_t __pyx_t_8;
9351   PyObject *(*__pyx_t_9)(PyObject *);
9352   PyObject *__pyx_t_10 = NULL;
9353   int __pyx_t_11;
9354   PyObject *(*__pyx_t_12)(PyObject *);
9355   int __pyx_t_13;
9356   int __pyx_t_14;
9357   int __pyx_lineno = 0;
9358   const char *__pyx_filename = NULL;
9359   int __pyx_clineno = 0;
9360   __Pyx_RefNannySetupContext("format_formatdata", 0);
9361   __Pyx_INCREF(__pyx_v_data);
9362
9363   /* "cvcf.pyx":465
9364  *     # todo: trim trailing missing values
9365  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):
9366  *         output, sdata = [], []             # <<<<<<<<<<<<<<
9367  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
9368  *             d = {}
9369  */
9370   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9371   __Pyx_GOTREF(__pyx_t_1);
9372   __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9373   __Pyx_GOTREF(__pyx_t_2);
9374   __pyx_v_output = __pyx_t_1;
9375   __pyx_t_1 = 0;
9376   __pyx_v_sdata = __pyx_t_2;
9377   __pyx_t_2 = 0;
9378
9379   /* "cvcf.pyx":466
9380  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):
9381  *         output, sdata = [], []
9382  *         if type(data) == type([]): # for FORMAT field, make data with dummy values             # <<<<<<<<<<<<<<
9383  *             d = {}
9384  *             for k in data: d[k] = []
9385  */
9386   __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9387   __Pyx_GOTREF(__pyx_t_2);
9388   __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_data)), ((PyObject *)Py_TYPE(((PyObject *)__pyx_t_2))), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9389   __Pyx_GOTREF(__pyx_t_1);
9390   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9391   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9392   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9393   if (__pyx_t_3) {
9394
9395     /* "cvcf.pyx":467
9396  *         output, sdata = [], []
9397  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
9398  *             d = {}             # <<<<<<<<<<<<<<
9399  *             for k in data: d[k] = []
9400  *             data = d
9401  */
9402     __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9403     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
9404     __pyx_v_d = __pyx_t_1;
9405     __pyx_t_1 = 0;
9406
9407     /* "cvcf.pyx":468
9408  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
9409  *             d = {}
9410  *             for k in data: d[k] = []             # <<<<<<<<<<<<<<
9411  *             data = d
9412  *         # convert missing values; and silently add definitions if required
9413  */
9414     if (PyList_CheckExact(__pyx_v_data) || PyTuple_CheckExact(__pyx_v_data)) {
9415       __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
9416       __pyx_t_5 = NULL;
9417     } else {
9418       __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9419       __Pyx_GOTREF(__pyx_t_1);
9420       __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
9421     }
9422     for (;;) {
9423       if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
9424         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
9425         __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
9426       } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
9427         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
9428         __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
9429       } else {
9430         __pyx_t_2 = __pyx_t_5(__pyx_t_1);
9431         if (unlikely(!__pyx_t_2)) {
9432           if (PyErr_Occurred()) {
9433             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
9434             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9435           }
9436           break;
9437         }
9438         __Pyx_GOTREF(__pyx_t_2);
9439       }
9440       __Pyx_XDECREF(__pyx_v_k);
9441       __pyx_v_k = __pyx_t_2;
9442       __pyx_t_2 = 0;
9443       __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9444       __Pyx_GOTREF(__pyx_t_2);
9445       if (PyDict_SetItem(((PyObject *)__pyx_v_d), __pyx_v_k, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9446       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9447     }
9448     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9449
9450     /* "cvcf.pyx":469
9451  *             d = {}
9452  *             for k in data: d[k] = []
9453  *             data = d             # <<<<<<<<<<<<<<
9454  *         # convert missing values; and silently add definitions if required
9455  *         for k in data:
9456  */
9457     __Pyx_INCREF(((PyObject *)__pyx_v_d));
9458     __Pyx_DECREF(__pyx_v_data);
9459     __pyx_v_data = ((PyObject *)__pyx_v_d);
9460     goto __pyx_L3;
9461   }
9462   __pyx_L3:;
9463
9464   /* "cvcf.pyx":471
9465  *             data = d
9466  *         # convert missing values; and silently add definitions if required
9467  *         for k in data:             # <<<<<<<<<<<<<<
9468  *             self._add_definition( format, k, data[k], "(output)" )
9469  *             for idx,v in enumerate(data[k]):
9470  */
9471   if (PyList_CheckExact(__pyx_v_data) || PyTuple_CheckExact(__pyx_v_data)) {
9472     __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
9473     __pyx_t_5 = NULL;
9474   } else {
9475     __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9476     __Pyx_GOTREF(__pyx_t_1);
9477     __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
9478   }
9479   for (;;) {
9480     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
9481       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
9482       __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
9483     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
9484       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
9485       __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
9486     } else {
9487       __pyx_t_2 = __pyx_t_5(__pyx_t_1);
9488       if (unlikely(!__pyx_t_2)) {
9489         if (PyErr_Occurred()) {
9490           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
9491           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9492         }
9493         break;
9494       }
9495       __Pyx_GOTREF(__pyx_t_2);
9496     }
9497     __Pyx_XDECREF(__pyx_v_k);
9498     __pyx_v_k = __pyx_t_2;
9499     __pyx_t_2 = 0;
9500
9501     /* "cvcf.pyx":472
9502  *         # convert missing values; and silently add definitions if required
9503  *         for k in data:
9504  *             self._add_definition( format, k, data[k], "(output)" )             # <<<<<<<<<<<<<<
9505  *             for idx,v in enumerate(data[k]):
9506  *                 if v == format[k].missingvalue: data[k][idx] = "."
9507  */
9508     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___add_definition); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9509     __Pyx_GOTREF(__pyx_t_2);
9510     __pyx_t_6 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9511     __Pyx_GOTREF(__pyx_t_6);
9512     __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9513     __Pyx_GOTREF(__pyx_t_7);
9514     __Pyx_INCREF(__pyx_v_format);
9515     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_format);
9516     __Pyx_GIVEREF(__pyx_v_format);
9517     __Pyx_INCREF(__pyx_v_k);
9518     PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_k);
9519     __Pyx_GIVEREF(__pyx_v_k);
9520     PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
9521     __Pyx_GIVEREF(__pyx_t_6);
9522     __Pyx_INCREF(((PyObject *)__pyx_kp_s_61));
9523     PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_kp_s_61));
9524     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_61));
9525     __pyx_t_6 = 0;
9526     __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9527     __Pyx_GOTREF(__pyx_t_6);
9528     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9529     __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
9530     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9531
9532     /* "cvcf.pyx":473
9533  *         for k in data:
9534  *             self._add_definition( format, k, data[k], "(output)" )
9535  *             for idx,v in enumerate(data[k]):             # <<<<<<<<<<<<<<
9536  *                 if v == format[k].missingvalue: data[k][idx] = "."
9537  *         # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string
9538  */
9539     __Pyx_INCREF(__pyx_int_0);
9540     __pyx_t_6 = __pyx_int_0;
9541     __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9542     __Pyx_GOTREF(__pyx_t_7);
9543     if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
9544       __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
9545       __pyx_t_9 = NULL;
9546     } else {
9547       __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9548       __Pyx_GOTREF(__pyx_t_2);
9549       __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext;
9550     }
9551     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9552     for (;;) {
9553       if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_2)) {
9554         if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
9555         __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++;
9556       } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_2)) {
9557         if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
9558         __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++;
9559       } else {
9560         __pyx_t_7 = __pyx_t_9(__pyx_t_2);
9561         if (unlikely(!__pyx_t_7)) {
9562           if (PyErr_Occurred()) {
9563             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
9564             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9565           }
9566           break;
9567         }
9568         __Pyx_GOTREF(__pyx_t_7);
9569       }
9570       __Pyx_XDECREF(__pyx_v_v);
9571       __pyx_v_v = __pyx_t_7;
9572       __pyx_t_7 = 0;
9573       __Pyx_INCREF(__pyx_t_6);
9574       __Pyx_XDECREF(__pyx_v_idx);
9575       __pyx_v_idx = __pyx_t_6;
9576       __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9577       __Pyx_GOTREF(__pyx_t_7);
9578       __Pyx_DECREF(__pyx_t_6);
9579       __pyx_t_6 = __pyx_t_7;
9580       __pyx_t_7 = 0;
9581
9582       /* "cvcf.pyx":474
9583  *             self._add_definition( format, k, data[k], "(output)" )
9584  *             for idx,v in enumerate(data[k]):
9585  *                 if v == format[k].missingvalue: data[k][idx] = "."             # <<<<<<<<<<<<<<
9586  *         # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string
9587  *         for k in data:
9588  */
9589       __pyx_t_7 = PyObject_GetItem(__pyx_v_format, __pyx_v_k); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9590       __Pyx_GOTREF(__pyx_t_7);
9591       __pyx_t_10 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9592       __Pyx_GOTREF(__pyx_t_10);
9593       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9594       __pyx_t_7 = PyObject_RichCompare(__pyx_v_v, __pyx_t_10, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9595       __Pyx_GOTREF(__pyx_t_7);
9596       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9597       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9598       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9599       if (__pyx_t_3) {
9600         __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9601         __Pyx_GOTREF(__pyx_t_7);
9602         if (PyObject_SetItem(__pyx_t_7, __pyx_v_idx, ((PyObject *)__pyx_kp_s_9)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9603         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9604         goto __pyx_L10;
9605       }
9606       __pyx_L10:;
9607     }
9608     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9609     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9610   }
9611   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9612
9613   /* "cvcf.pyx":476
9614  *                 if v == format[k].missingvalue: data[k][idx] = "."
9615  *         # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string
9616  *         for k in data:             # <<<<<<<<<<<<<<
9617  *             if k != 'GT': sdata.append( (k,data[k]) )
9618  *         sdata.sort()
9619  */
9620   if (PyList_CheckExact(__pyx_v_data) || PyTuple_CheckExact(__pyx_v_data)) {
9621     __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
9622     __pyx_t_5 = NULL;
9623   } else {
9624     __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9625     __Pyx_GOTREF(__pyx_t_1);
9626     __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
9627   }
9628   for (;;) {
9629     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
9630       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
9631       __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++;
9632     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
9633       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
9634       __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++;
9635     } else {
9636       __pyx_t_6 = __pyx_t_5(__pyx_t_1);
9637       if (unlikely(!__pyx_t_6)) {
9638         if (PyErr_Occurred()) {
9639           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
9640           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9641         }
9642         break;
9643       }
9644       __Pyx_GOTREF(__pyx_t_6);
9645     }
9646     __Pyx_XDECREF(__pyx_v_k);
9647     __pyx_v_k = __pyx_t_6;
9648     __pyx_t_6 = 0;
9649
9650     /* "cvcf.pyx":477
9651  *         # make sure GT comes first; and ensure fixed ordering; also convert GT data back to string
9652  *         for k in data:
9653  *             if k != 'GT': sdata.append( (k,data[k]) )             # <<<<<<<<<<<<<<
9654  *         sdata.sort()
9655  *         if 'GT' in data:
9656  */
9657     __pyx_t_3 = __Pyx_PyString_Equals(__pyx_v_k, ((PyObject *)__pyx_n_s__GT), Py_NE); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9658     if (__pyx_t_3) {
9659       __pyx_t_6 = PyObject_GetItem(__pyx_v_data, __pyx_v_k); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9660       __Pyx_GOTREF(__pyx_t_6);
9661       __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9662       __Pyx_GOTREF(__pyx_t_2);
9663       __Pyx_INCREF(__pyx_v_k);
9664       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k);
9665       __Pyx_GIVEREF(__pyx_v_k);
9666       PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
9667       __Pyx_GIVEREF(__pyx_t_6);
9668       __pyx_t_6 = 0;
9669       __pyx_t_11 = PyList_Append(__pyx_v_sdata, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9670       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9671       goto __pyx_L13;
9672     }
9673     __pyx_L13:;
9674   }
9675   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9676
9677   /* "cvcf.pyx":478
9678  *         for k in data:
9679  *             if k != 'GT': sdata.append( (k,data[k]) )
9680  *         sdata.sort()             # <<<<<<<<<<<<<<
9681  *         if 'GT' in data:
9682  *             sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata
9683  */
9684   __pyx_t_11 = PyList_Sort(((PyObject *)__pyx_v_sdata)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9685
9686   /* "cvcf.pyx":479
9687  *             if k != 'GT': sdata.append( (k,data[k]) )
9688  *         sdata.sort()
9689  *         if 'GT' in data:             # <<<<<<<<<<<<<<
9690  *             sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata
9691  *         for k,v in sdata:
9692  */
9693   __pyx_t_3 = ((PySequence_Contains(__pyx_v_data, ((PyObject *)__pyx_n_s__GT)))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9694   if (__pyx_t_3) {
9695
9696     /* "cvcf.pyx":480
9697  *         sdata.sort()
9698  *         if 'GT' in data:
9699  *             sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata             # <<<<<<<<<<<<<<
9700  *         for k,v in sdata:
9701  *             if v == []: v = None
9702  */
9703     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__convertGTback); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9704     __Pyx_GOTREF(__pyx_t_1);
9705     __pyx_t_2 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__GT)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9706     __Pyx_GOTREF(__pyx_t_2);
9707     __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9708     __Pyx_GOTREF(__pyx_t_6);
9709     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
9710     __Pyx_GIVEREF(__pyx_t_1);
9711     PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
9712     __Pyx_GIVEREF(__pyx_t_2);
9713     __pyx_t_1 = 0;
9714     __pyx_t_2 = 0;
9715     __pyx_t_2 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9716     __Pyx_GOTREF(__pyx_t_2);
9717     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
9718     __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9719     __Pyx_GOTREF(__pyx_t_6);
9720     __Pyx_INCREF(((PyObject *)__pyx_n_s__GT));
9721     PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__GT));
9722     __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GT));
9723     PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
9724     __Pyx_GIVEREF(__pyx_t_2);
9725     __pyx_t_2 = 0;
9726     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9727     __Pyx_GOTREF(__pyx_t_2);
9728     PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_6));
9729     __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
9730     __pyx_t_6 = 0;
9731     __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_v_sdata)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9732     __Pyx_GOTREF(((PyObject *)__pyx_t_6));
9733     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9734     __Pyx_DECREF(((PyObject *)__pyx_v_sdata));
9735     __pyx_v_sdata = __pyx_t_6;
9736     __pyx_t_6 = 0;
9737     goto __pyx_L14;
9738   }
9739   __pyx_L14:;
9740
9741   /* "cvcf.pyx":481
9742  *         if 'GT' in data:
9743  *             sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata
9744  *         for k,v in sdata:             # <<<<<<<<<<<<<<
9745  *             if v == []: v = None
9746  *             if key and value:
9747  */
9748   __pyx_t_6 = ((PyObject *)__pyx_v_sdata); __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
9749   for (;;) {
9750     if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
9751     __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
9752     if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
9753       PyObject* sequence = __pyx_t_2;
9754       if (likely(PyTuple_CheckExact(sequence))) {
9755         if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
9756           if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
9757           else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
9758           {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9759         }
9760         __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
9761         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
9762       } else {
9763         if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
9764           if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
9765           else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
9766           {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9767         }
9768         __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
9769         __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
9770       }
9771       __Pyx_INCREF(__pyx_t_1);
9772       __Pyx_INCREF(__pyx_t_7);
9773       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9774     } else {
9775       Py_ssize_t index = -1;
9776       __pyx_t_10 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9777       __Pyx_GOTREF(__pyx_t_10);
9778       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9779       __pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext;
9780       index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L17_unpacking_failed;
9781       __Pyx_GOTREF(__pyx_t_1);
9782       index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L17_unpacking_failed;
9783       __Pyx_GOTREF(__pyx_t_7);
9784       if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9785       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9786       goto __pyx_L18_unpacking_done;
9787       __pyx_L17_unpacking_failed:;
9788       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9789       if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
9790       if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
9791       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9792       __pyx_L18_unpacking_done:;
9793     }
9794     __Pyx_XDECREF(__pyx_v_k);
9795     __pyx_v_k = __pyx_t_1;
9796     __pyx_t_1 = 0;
9797     __Pyx_XDECREF(__pyx_v_v);
9798     __pyx_v_v = __pyx_t_7;
9799     __pyx_t_7 = 0;
9800
9801     /* "cvcf.pyx":482
9802  *             sdata = [('GT',map(self.convertGTback,data['GT']))] + sdata
9803  *         for k,v in sdata:
9804  *             if v == []: v = None             # <<<<<<<<<<<<<<
9805  *             if key and value:
9806  *                 if v != None: output.append( k+"="+','.join(map(str,v)) )
9807  */
9808     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9809     __Pyx_GOTREF(__pyx_t_2);
9810     __pyx_t_7 = PyObject_RichCompare(__pyx_v_v, ((PyObject *)__pyx_t_2), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9811     __Pyx_GOTREF(__pyx_t_7);
9812     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9813     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9814     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9815     if (__pyx_t_3) {
9816       __Pyx_INCREF(Py_None);
9817       __Pyx_DECREF(__pyx_v_v);
9818       __pyx_v_v = Py_None;
9819       goto __pyx_L19;
9820     }
9821     __pyx_L19:;
9822
9823     /* "cvcf.pyx":483
9824  *         for k,v in sdata:
9825  *             if v == []: v = None
9826  *             if key and value:             # <<<<<<<<<<<<<<
9827  *                 if v != None: output.append( k+"="+','.join(map(str,v)) )
9828  *                 else: output.append( k )
9829  */
9830     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9831     if (__pyx_t_3) {
9832       __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9833       __pyx_t_14 = __pyx_t_13;
9834     } else {
9835       __pyx_t_14 = __pyx_t_3;
9836     }
9837     if (__pyx_t_14) {
9838
9839       /* "cvcf.pyx":484
9840  *             if v == []: v = None
9841  *             if key and value:
9842  *                 if v != None: output.append( k+"="+','.join(map(str,v)) )             # <<<<<<<<<<<<<<
9843  *                 else: output.append( k )
9844  *             elif key: output.append(k)
9845  */
9846       __pyx_t_7 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_NE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9847       __Pyx_GOTREF(__pyx_t_7);
9848       __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9849       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9850       if (__pyx_t_14) {
9851         __pyx_t_7 = PyNumber_Add(__pyx_v_k, ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9852         __Pyx_GOTREF(__pyx_t_7);
9853         __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9854         __Pyx_GOTREF(__pyx_t_2);
9855         __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9856         __Pyx_GOTREF(__pyx_t_1);
9857         __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
9858         PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
9859         __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
9860         __Pyx_INCREF(__pyx_v_v);
9861         PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_v);
9862         __Pyx_GIVEREF(__pyx_v_v);
9863         __pyx_t_10 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9864         __Pyx_GOTREF(__pyx_t_10);
9865         __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9866         __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9867         __Pyx_GOTREF(__pyx_t_1);
9868         PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
9869         __Pyx_GIVEREF(__pyx_t_10);
9870         __pyx_t_10 = 0;
9871         __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9872         __Pyx_GOTREF(__pyx_t_10);
9873         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9874         __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9875         __pyx_t_1 = PyNumber_Add(__pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9876         __Pyx_GOTREF(__pyx_t_1);
9877         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9878         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9879         __pyx_t_11 = PyList_Append(__pyx_v_output, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9880         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9881         goto __pyx_L21;
9882       }
9883       /*else*/ {
9884
9885         /* "cvcf.pyx":485
9886  *             if key and value:
9887  *                 if v != None: output.append( k+"="+','.join(map(str,v)) )
9888  *                 else: output.append( k )             # <<<<<<<<<<<<<<
9889  *             elif key: output.append(k)
9890  *             elif value:
9891  */
9892         __pyx_t_11 = PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9893       }
9894       __pyx_L21:;
9895       goto __pyx_L20;
9896     }
9897
9898     /* "cvcf.pyx":486
9899  *                 if v != None: output.append( k+"="+','.join(map(str,v)) )
9900  *                 else: output.append( k )
9901  *             elif key: output.append(k)             # <<<<<<<<<<<<<<
9902  *             elif value:
9903  *                 if v != None: output.append( ','.join(map(str,v)) )
9904  */
9905     __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9906     if (__pyx_t_14) {
9907       __pyx_t_11 = PyList_Append(__pyx_v_output, __pyx_v_k); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9908       goto __pyx_L20;
9909     }
9910
9911     /* "cvcf.pyx":487
9912  *                 else: output.append( k )
9913  *             elif key: output.append(k)
9914  *             elif value:             # <<<<<<<<<<<<<<
9915  *                 if v != None: output.append( ','.join(map(str,v)) )
9916  *                 else: output.append( "." )                    # should not happen
9917  */
9918     __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9919     if (__pyx_t_14) {
9920
9921       /* "cvcf.pyx":488
9922  *             elif key: output.append(k)
9923  *             elif value:
9924  *                 if v != None: output.append( ','.join(map(str,v)) )             # <<<<<<<<<<<<<<
9925  *                 else: output.append( "." )                    # should not happen
9926  *         # snip off trailing missing data
9927  */
9928       __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9929       __Pyx_GOTREF(__pyx_t_1);
9930       __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9931       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9932       if (__pyx_t_14) {
9933         __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9934         __Pyx_GOTREF(__pyx_t_1);
9935         __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9936         __Pyx_GOTREF(__pyx_t_10);
9937         __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
9938         PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
9939         __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
9940         __Pyx_INCREF(__pyx_v_v);
9941         PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_v);
9942         __Pyx_GIVEREF(__pyx_v_v);
9943         __pyx_t_7 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9944         __Pyx_GOTREF(__pyx_t_7);
9945         __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
9946         __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9947         __Pyx_GOTREF(__pyx_t_10);
9948         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
9949         __Pyx_GIVEREF(__pyx_t_7);
9950         __pyx_t_7 = 0;
9951         __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9952         __Pyx_GOTREF(__pyx_t_7);
9953         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9954         __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
9955         __pyx_t_11 = PyList_Append(__pyx_v_output, __pyx_t_7); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9956         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9957         goto __pyx_L22;
9958       }
9959       /*else*/ {
9960
9961         /* "cvcf.pyx":489
9962  *             elif value:
9963  *                 if v != None: output.append( ','.join(map(str,v)) )
9964  *                 else: output.append( "." )                    # should not happen             # <<<<<<<<<<<<<<
9965  *         # snip off trailing missing data
9966  *         while len(output) > 1:
9967  */
9968         __pyx_t_7 = ((PyObject *)__pyx_kp_s_9);
9969         __Pyx_INCREF(__pyx_t_7);
9970         __pyx_t_11 = PyList_Append(__pyx_v_output, __pyx_t_7); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9971         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9972       }
9973       __pyx_L22:;
9974       goto __pyx_L20;
9975     }
9976     __pyx_L20:;
9977   }
9978   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9979
9980   /* "cvcf.pyx":491
9981  *                 else: output.append( "." )                    # should not happen
9982  *         # snip off trailing missing data
9983  *         while len(output) > 1:             # <<<<<<<<<<<<<<
9984  *             last = output[-1].replace(',','').replace('.','')
9985  *             if len(last)>0: break
9986  */
9987   while (1) {
9988     if (unlikely(((PyObject *)__pyx_v_output) == Py_None)) {
9989       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
9990     }
9991     __pyx_t_4 = PyList_GET_SIZE(((PyObject *)__pyx_v_output)); 
9992     __pyx_t_14 = (__pyx_t_4 > 1);
9993     if (!__pyx_t_14) break;
9994
9995     /* "cvcf.pyx":492
9996  *         # snip off trailing missing data
9997  *         while len(output) > 1:
9998  *             last = output[-1].replace(',','').replace('.','')             # <<<<<<<<<<<<<<
9999  *             if len(last)>0: break
10000  *             output = output[:-1]
10001  */
10002     __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_output), -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10003     __Pyx_GOTREF(__pyx_t_6);
10004     __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__replace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10005     __Pyx_GOTREF(__pyx_t_7);
10006     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10007     __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_62), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10008     __Pyx_GOTREF(__pyx_t_6);
10009     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10010     __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__replace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10011     __Pyx_GOTREF(__pyx_t_7);
10012     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10013     __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10014     __Pyx_GOTREF(__pyx_t_6);
10015     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10016     __Pyx_XDECREF(__pyx_v_last);
10017     __pyx_v_last = __pyx_t_6;
10018     __pyx_t_6 = 0;
10019
10020     /* "cvcf.pyx":493
10021  *         while len(output) > 1:
10022  *             last = output[-1].replace(',','').replace('.','')
10023  *             if len(last)>0: break             # <<<<<<<<<<<<<<
10024  *             output = output[:-1]
10025  *         return separator.join(output)
10026  */
10027     __pyx_t_4 = PyObject_Length(__pyx_v_last); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10028     __pyx_t_14 = (__pyx_t_4 > 0);
10029     if (__pyx_t_14) {
10030       goto __pyx_L24_break;
10031       goto __pyx_L25;
10032     }
10033     __pyx_L25:;
10034
10035     /* "cvcf.pyx":494
10036  *             last = output[-1].replace(',','').replace('.','')
10037  *             if len(last)>0: break
10038  *             output = output[:-1]             # <<<<<<<<<<<<<<
10039  *         return separator.join(output)
10040  * 
10041  */
10042     __pyx_t_6 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_output), 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10043     __Pyx_GOTREF(((PyObject *)__pyx_t_6));
10044     __Pyx_DECREF(((PyObject *)__pyx_v_output));
10045     __pyx_v_output = __pyx_t_6;
10046     __pyx_t_6 = 0;
10047   }
10048   __pyx_L24_break:;
10049
10050   /* "cvcf.pyx":495
10051  *             if len(last)>0: break
10052  *             output = output[:-1]
10053  *         return separator.join(output)             # <<<<<<<<<<<<<<
10054  * 
10055  * 
10056  */
10057   __Pyx_XDECREF(__pyx_r);
10058   __pyx_t_6 = PyObject_GetAttr(__pyx_v_separator, __pyx_n_s__join); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10059   __Pyx_GOTREF(__pyx_t_6);
10060   __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10061   __Pyx_GOTREF(__pyx_t_7);
10062   __Pyx_INCREF(((PyObject *)__pyx_v_output));
10063   PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_output));
10064   __Pyx_GIVEREF(((PyObject *)__pyx_v_output));
10065   __pyx_t_10 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10066   __Pyx_GOTREF(__pyx_t_10);
10067   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10068   __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
10069   __pyx_r = __pyx_t_10;
10070   __pyx_t_10 = 0;
10071   goto __pyx_L0;
10072
10073   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10074   goto __pyx_L0;
10075   __pyx_L1_error:;
10076   __Pyx_XDECREF(__pyx_t_1);
10077   __Pyx_XDECREF(__pyx_t_2);
10078   __Pyx_XDECREF(__pyx_t_6);
10079   __Pyx_XDECREF(__pyx_t_7);
10080   __Pyx_XDECREF(__pyx_t_10);
10081   __Pyx_AddTraceback("cvcf.VCF.format_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
10082   __pyx_r = NULL;
10083   __pyx_L0:;
10084   __Pyx_XDECREF(__pyx_v_output);
10085   __Pyx_XDECREF(__pyx_v_sdata);
10086   __Pyx_XDECREF(__pyx_v_d);
10087   __Pyx_XDECREF(__pyx_v_k);
10088   __Pyx_XDECREF(__pyx_v_idx);
10089   __Pyx_XDECREF(__pyx_v_v);
10090   __Pyx_XDECREF(__pyx_v_last);
10091   __Pyx_XDECREF(__pyx_v_data);
10092   __Pyx_XGIVEREF(__pyx_r);
10093   __Pyx_RefNannyFinishContext();
10094   return __pyx_r;
10095 }
10096
10097 /* Python wrapper */
10098 static PyObject *__pyx_pw_4cvcf_3VCF_15enter_default_format(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
10099 static PyMethodDef __pyx_mdef_4cvcf_3VCF_15enter_default_format = {__Pyx_NAMESTR("enter_default_format"), (PyCFunction)__pyx_pw_4cvcf_3VCF_15enter_default_format, METH_O, __Pyx_DOCSTR(0)};
10100 static PyObject *__pyx_pw_4cvcf_3VCF_15enter_default_format(PyObject *__pyx_self, PyObject *__pyx_v_self) {
10101   PyObject *__pyx_r = 0;
10102   __Pyx_RefNannyDeclarations
10103   __Pyx_RefNannySetupContext("enter_default_format (wrapper)", 0);
10104   __pyx_self = __pyx_self;
10105   __pyx_r = __pyx_pf_4cvcf_3VCF_14enter_default_format(__pyx_self, ((PyObject *)__pyx_v_self));
10106   __Pyx_RefNannyFinishContext();
10107   return __pyx_r;
10108 }
10109
10110 /* "cvcf.pyx":498
10111  * 
10112  * 
10113  *     def enter_default_format(self):             # <<<<<<<<<<<<<<
10114  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
10115  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
10116  */
10117
10118 static PyObject *__pyx_pf_4cvcf_3VCF_14enter_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
10119   PyObject *__pyx_v_f = NULL;
10120   PyObject *__pyx_r = NULL;
10121   __Pyx_RefNannyDeclarations
10122   PyObject *__pyx_t_1 = NULL;
10123   PyObject *__pyx_t_2 = NULL;
10124   PyObject *__pyx_t_3 = NULL;
10125   PyObject *__pyx_t_4 = NULL;
10126   PyObject *__pyx_t_5 = NULL;
10127   PyObject *__pyx_t_6 = NULL;
10128   PyObject *__pyx_t_7 = NULL;
10129   PyObject *__pyx_t_8 = NULL;
10130   PyObject *__pyx_t_9 = NULL;
10131   PyObject *__pyx_t_10 = NULL;
10132   PyObject *__pyx_t_11 = NULL;
10133   PyObject *__pyx_t_12 = NULL;
10134   PyObject *__pyx_t_13 = NULL;
10135   PyObject *__pyx_t_14 = NULL;
10136   PyObject *__pyx_t_15 = NULL;
10137   PyObject *__pyx_t_16 = NULL;
10138   Py_ssize_t __pyx_t_17;
10139   int __pyx_t_18;
10140   int __pyx_lineno = 0;
10141   const char *__pyx_filename = NULL;
10142   int __pyx_clineno = 0;
10143   __Pyx_RefNannySetupContext("enter_default_format", 0);
10144
10145   /* "cvcf.pyx":499
10146  * 
10147  *     def enter_default_format(self):
10148  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),             # <<<<<<<<<<<<<<
10149  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
10150  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
10151  */
10152   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10153   __Pyx_GOTREF(__pyx_t_1);
10154   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10155   __Pyx_GOTREF(__pyx_t_2);
10156   __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10157   __Pyx_GOTREF(__pyx_t_3);
10158   __Pyx_INCREF(((PyObject *)__pyx_n_s__GT));
10159   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__GT));
10160   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GT));
10161   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
10162   __Pyx_GIVEREF(__pyx_t_2);
10163   __Pyx_INCREF(__pyx_int_1);
10164   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_1);
10165   __Pyx_GIVEREF(__pyx_int_1);
10166   __Pyx_INCREF(((PyObject *)__pyx_n_s__String));
10167   PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__String));
10168   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String));
10169   __Pyx_INCREF(((PyObject *)__pyx_n_s__Genotype));
10170   PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_n_s__Genotype));
10171   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Genotype));
10172   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
10173   PyTuple_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_kp_s_9));
10174   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
10175   __pyx_t_2 = 0;
10176   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10177   __Pyx_GOTREF(__pyx_t_2);
10178   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10179   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
10180
10181   /* "cvcf.pyx":500
10182  *     def enter_default_format(self):
10183  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
10184  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),             # <<<<<<<<<<<<<<
10185  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
10186  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
10187  */
10188   __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10189   __Pyx_GOTREF(__pyx_t_3);
10190   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10191   __Pyx_GOTREF(__pyx_t_1);
10192   __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10193   __Pyx_GOTREF(__pyx_t_4);
10194   __Pyx_INCREF(((PyObject *)__pyx_n_s__DP));
10195   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__DP));
10196   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DP));
10197   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
10198   __Pyx_GIVEREF(__pyx_t_1);
10199   __Pyx_INCREF(__pyx_int_1);
10200   PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_1);
10201   __Pyx_GIVEREF(__pyx_int_1);
10202   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
10203   PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_n_s__Integer));
10204   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
10205   __Pyx_INCREF(((PyObject *)__pyx_kp_s_64));
10206   PyTuple_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_kp_s_64));
10207   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_64));
10208   __Pyx_INCREF(__pyx_int_neg_1);
10209   PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_int_neg_1);
10210   __Pyx_GIVEREF(__pyx_int_neg_1);
10211   __pyx_t_1 = 0;
10212   __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10213   __Pyx_GOTREF(__pyx_t_1);
10214   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10215   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
10216
10217   /* "cvcf.pyx":501
10218  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
10219  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
10220  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),             # <<<<<<<<<<<<<<
10221  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
10222  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
10223  */
10224   __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10225   __Pyx_GOTREF(__pyx_t_4);
10226   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10227   __Pyx_GOTREF(__pyx_t_3);
10228   __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10229   __Pyx_GOTREF(__pyx_t_5);
10230   __Pyx_INCREF(((PyObject *)__pyx_n_s__FT));
10231   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s__FT));
10232   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FT));
10233   PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
10234   __Pyx_GIVEREF(__pyx_t_3);
10235   __Pyx_INCREF(__pyx_int_1);
10236   PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_1);
10237   __Pyx_GIVEREF(__pyx_int_1);
10238   __Pyx_INCREF(((PyObject *)__pyx_n_s__String));
10239   PyTuple_SET_ITEM(__pyx_t_5, 3, ((PyObject *)__pyx_n_s__String));
10240   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__String));
10241   __Pyx_INCREF(((PyObject *)__pyx_kp_s_65));
10242   PyTuple_SET_ITEM(__pyx_t_5, 4, ((PyObject *)__pyx_kp_s_65));
10243   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_65));
10244   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
10245   PyTuple_SET_ITEM(__pyx_t_5, 5, ((PyObject *)__pyx_kp_s_9));
10246   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
10247   __pyx_t_3 = 0;
10248   __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10249   __Pyx_GOTREF(__pyx_t_3);
10250   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10251   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
10252
10253   /* "cvcf.pyx":502
10254  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
10255  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
10256  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),             # <<<<<<<<<<<<<<
10257  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
10258  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
10259  */
10260   __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10261   __Pyx_GOTREF(__pyx_t_5);
10262   __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10263   __Pyx_GOTREF(__pyx_t_4);
10264   __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10265   __Pyx_GOTREF(__pyx_t_6);
10266   __Pyx_INCREF(((PyObject *)__pyx_n_s__GL));
10267   PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__GL));
10268   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GL));
10269   PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
10270   __Pyx_GIVEREF(__pyx_t_4);
10271   __Pyx_INCREF(__pyx_int_neg_1);
10272   PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_neg_1);
10273   __Pyx_GIVEREF(__pyx_int_neg_1);
10274   __Pyx_INCREF(((PyObject *)__pyx_n_s__Float));
10275   PyTuple_SET_ITEM(__pyx_t_6, 3, ((PyObject *)__pyx_n_s__Float));
10276   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float));
10277   __Pyx_INCREF(((PyObject *)__pyx_kp_s_66));
10278   PyTuple_SET_ITEM(__pyx_t_6, 4, ((PyObject *)__pyx_kp_s_66));
10279   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_66));
10280   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
10281   PyTuple_SET_ITEM(__pyx_t_6, 5, ((PyObject *)__pyx_kp_s_9));
10282   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
10283   __pyx_t_4 = 0;
10284   __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10285   __Pyx_GOTREF(__pyx_t_4);
10286   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10287   __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
10288
10289   /* "cvcf.pyx":503
10290  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
10291  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
10292  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),             # <<<<<<<<<<<<<<
10293  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
10294  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),
10295  */
10296   __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10297   __Pyx_GOTREF(__pyx_t_6);
10298   __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10299   __Pyx_GOTREF(__pyx_t_5);
10300   __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10301   __Pyx_GOTREF(__pyx_t_7);
10302   __Pyx_INCREF(((PyObject *)__pyx_n_s__GLE));
10303   PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__GLE));
10304   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GLE));
10305   PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
10306   __Pyx_GIVEREF(__pyx_t_5);
10307   __Pyx_INCREF(__pyx_int_neg_1);
10308   PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_neg_1);
10309   __Pyx_GIVEREF(__pyx_int_neg_1);
10310   __Pyx_INCREF(((PyObject *)__pyx_n_s__Float));
10311   PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_n_s__Float));
10312   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float));
10313   __Pyx_INCREF(((PyObject *)__pyx_kp_s_66));
10314   PyTuple_SET_ITEM(__pyx_t_7, 4, ((PyObject *)__pyx_kp_s_66));
10315   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_66));
10316   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
10317   PyTuple_SET_ITEM(__pyx_t_7, 5, ((PyObject *)__pyx_kp_s_9));
10318   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
10319   __pyx_t_5 = 0;
10320   __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10321   __Pyx_GOTREF(__pyx_t_5);
10322   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10323   __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
10324
10325   /* "cvcf.pyx":504
10326  *                   FORMAT('GL',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
10327  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
10328  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),             # <<<<<<<<<<<<<<
10329  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),
10330  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),
10331  */
10332   __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10333   __Pyx_GOTREF(__pyx_t_7);
10334   __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10335   __Pyx_GOTREF(__pyx_t_6);
10336   __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10337   __Pyx_GOTREF(__pyx_t_8);
10338   __Pyx_INCREF(((PyObject *)__pyx_n_s__GQ));
10339   PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_n_s__GQ));
10340   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GQ));
10341   PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
10342   __Pyx_GIVEREF(__pyx_t_6);
10343   __Pyx_INCREF(__pyx_int_1);
10344   PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_int_1);
10345   __Pyx_GIVEREF(__pyx_int_1);
10346   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
10347   PyTuple_SET_ITEM(__pyx_t_8, 3, ((PyObject *)__pyx_n_s__Integer));
10348   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
10349   __Pyx_INCREF(((PyObject *)__pyx_kp_s_67));
10350   PyTuple_SET_ITEM(__pyx_t_8, 4, ((PyObject *)__pyx_kp_s_67));
10351   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_67));
10352   __Pyx_INCREF(__pyx_int_neg_1);
10353   PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_int_neg_1);
10354   __Pyx_GIVEREF(__pyx_int_neg_1);
10355   __pyx_t_6 = 0;
10356   __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10357   __Pyx_GOTREF(__pyx_t_6);
10358   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10359   __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
10360
10361   /* "cvcf.pyx":505
10362  *                   FORMAT('GLE',self.NT_UNKNOWN,-1,'Float','Genotype likelihoods','.'),
10363  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
10364  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),             # <<<<<<<<<<<<<<
10365  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),
10366  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),
10367  */
10368   __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10369   __Pyx_GOTREF(__pyx_t_8);
10370   __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10371   __Pyx_GOTREF(__pyx_t_7);
10372   __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10373   __Pyx_GOTREF(__pyx_t_9);
10374   __Pyx_INCREF(((PyObject *)__pyx_n_s__PL));
10375   PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_n_s__PL));
10376   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PL));
10377   PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
10378   __Pyx_GIVEREF(__pyx_t_7);
10379   __Pyx_INCREF(__pyx_int_neg_1);
10380   PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_int_neg_1);
10381   __Pyx_GIVEREF(__pyx_int_neg_1);
10382   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
10383   PyTuple_SET_ITEM(__pyx_t_9, 3, ((PyObject *)__pyx_n_s__Integer));
10384   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
10385   __Pyx_INCREF(((PyObject *)__pyx_kp_s_68));
10386   PyTuple_SET_ITEM(__pyx_t_9, 4, ((PyObject *)__pyx_kp_s_68));
10387   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_68));
10388   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
10389   PyTuple_SET_ITEM(__pyx_t_9, 5, ((PyObject *)__pyx_kp_s_9));
10390   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
10391   __pyx_t_7 = 0;
10392   __pyx_t_7 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10393   __Pyx_GOTREF(__pyx_t_7);
10394   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10395   __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
10396
10397   /* "cvcf.pyx":506
10398  *                   FORMAT('GQ',self.NT_NUMBER,1,'Integer','Genotype Quality',-1),
10399  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),
10400  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),             # <<<<<<<<<<<<<<
10401  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),
10402  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
10403  */
10404   __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10405   __Pyx_GOTREF(__pyx_t_9);
10406   __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10407   __Pyx_GOTREF(__pyx_t_8);
10408   __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10409   __Pyx_GOTREF(__pyx_t_10);
10410   __Pyx_INCREF(((PyObject *)__pyx_n_s__GP));
10411   PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_n_s__GP));
10412   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GP));
10413   PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
10414   __Pyx_GIVEREF(__pyx_t_8);
10415   __Pyx_INCREF(__pyx_int_neg_1);
10416   PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_int_neg_1);
10417   __Pyx_GIVEREF(__pyx_int_neg_1);
10418   __Pyx_INCREF(((PyObject *)__pyx_n_s__Float));
10419   PyTuple_SET_ITEM(__pyx_t_10, 3, ((PyObject *)__pyx_n_s__Float));
10420   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Float));
10421   __Pyx_INCREF(((PyObject *)__pyx_kp_s_69));
10422   PyTuple_SET_ITEM(__pyx_t_10, 4, ((PyObject *)__pyx_kp_s_69));
10423   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_69));
10424   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
10425   PyTuple_SET_ITEM(__pyx_t_10, 5, ((PyObject *)__pyx_kp_s_9));
10426   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
10427   __pyx_t_8 = 0;
10428   __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10429   __Pyx_GOTREF(__pyx_t_8);
10430   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10431   __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
10432
10433   /* "cvcf.pyx":507
10434  *                   FORMAT('PL',self.NT_GENOTYPES,-1,'Integer','Phred-scaled genotype likelihoods', '.'),
10435  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),
10436  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),             # <<<<<<<<<<<<<<
10437  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
10438  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),
10439  */
10440   __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10441   __Pyx_GOTREF(__pyx_t_10);
10442   __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_GENOTYPES); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10443   __Pyx_GOTREF(__pyx_t_9);
10444   __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10445   __Pyx_GOTREF(__pyx_t_11);
10446   __Pyx_INCREF(((PyObject *)__pyx_n_s__GQ));
10447   PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_n_s__GQ));
10448   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GQ));
10449   PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9);
10450   __Pyx_GIVEREF(__pyx_t_9);
10451   __Pyx_INCREF(__pyx_int_neg_1);
10452   PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_int_neg_1);
10453   __Pyx_GIVEREF(__pyx_int_neg_1);
10454   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
10455   PyTuple_SET_ITEM(__pyx_t_11, 3, ((PyObject *)__pyx_n_s__Integer));
10456   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
10457   __Pyx_INCREF(((PyObject *)__pyx_kp_s_70));
10458   PyTuple_SET_ITEM(__pyx_t_11, 4, ((PyObject *)__pyx_kp_s_70));
10459   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_70));
10460   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
10461   PyTuple_SET_ITEM(__pyx_t_11, 5, ((PyObject *)__pyx_kp_s_9));
10462   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
10463   __pyx_t_9 = 0;
10464   __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10465   __Pyx_GOTREF(__pyx_t_9);
10466   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10467   __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
10468
10469   /* "cvcf.pyx":508
10470  *                   FORMAT('GP',self.NT_GENOTYPES,-1,'Float','Genotype posterior probabilities','.'),
10471  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),
10472  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid             # <<<<<<<<<<<<<<
10473  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),
10474  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),
10475  */
10476   __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10477   __Pyx_GOTREF(__pyx_t_11);
10478   __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10479   __Pyx_GOTREF(__pyx_t_10);
10480   __pyx_t_12 = PyTuple_New(6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10481   __Pyx_GOTREF(__pyx_t_12);
10482   __Pyx_INCREF(((PyObject *)__pyx_n_s__HQ));
10483   PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_n_s__HQ));
10484   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HQ));
10485   PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
10486   __Pyx_GIVEREF(__pyx_t_10);
10487   __Pyx_INCREF(__pyx_int_neg_1);
10488   PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_int_neg_1);
10489   __Pyx_GIVEREF(__pyx_int_neg_1);
10490   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
10491   PyTuple_SET_ITEM(__pyx_t_12, 3, ((PyObject *)__pyx_n_s__Integer));
10492   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
10493   __Pyx_INCREF(((PyObject *)__pyx_kp_s_71));
10494   PyTuple_SET_ITEM(__pyx_t_12, 4, ((PyObject *)__pyx_kp_s_71));
10495   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_71));
10496   __Pyx_INCREF(__pyx_int_neg_1);
10497   PyTuple_SET_ITEM(__pyx_t_12, 5, __pyx_int_neg_1);
10498   __Pyx_GIVEREF(__pyx_int_neg_1);
10499   __pyx_t_10 = 0;
10500   __pyx_t_10 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10501   __Pyx_GOTREF(__pyx_t_10);
10502   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10503   __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
10504
10505   /* "cvcf.pyx":509
10506  *                   FORMAT('GQ',self.NT_GENOTYPES,-1,'Integer','Conditional genotype quality','.'),
10507  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
10508  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),             # <<<<<<<<<<<<<<
10509  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),
10510  *                   FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1),
10511  */
10512   __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10513   __Pyx_GOTREF(__pyx_t_12);
10514   __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_UNKNOWN); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10515   __Pyx_GOTREF(__pyx_t_11);
10516   __pyx_t_13 = PyTuple_New(6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10517   __Pyx_GOTREF(__pyx_t_13);
10518   __Pyx_INCREF(((PyObject *)__pyx_n_s__PS));
10519   PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_n_s__PS));
10520   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PS));
10521   PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11);
10522   __Pyx_GIVEREF(__pyx_t_11);
10523   __Pyx_INCREF(__pyx_int_neg_1);
10524   PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_int_neg_1);
10525   __Pyx_GIVEREF(__pyx_int_neg_1);
10526   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
10527   PyTuple_SET_ITEM(__pyx_t_13, 3, ((PyObject *)__pyx_n_s__Integer));
10528   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
10529   __Pyx_INCREF(((PyObject *)__pyx_kp_s_72));
10530   PyTuple_SET_ITEM(__pyx_t_13, 4, ((PyObject *)__pyx_kp_s_72));
10531   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_72));
10532   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
10533   PyTuple_SET_ITEM(__pyx_t_13, 5, ((PyObject *)__pyx_kp_s_9));
10534   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
10535   __pyx_t_11 = 0;
10536   __pyx_t_11 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10537   __Pyx_GOTREF(__pyx_t_11);
10538   __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10539   __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
10540
10541   /* "cvcf.pyx":510
10542  *                   FORMAT('HQ',self.NT_UNKNOWN,-1,'Integer','Haplotype Quality',-1),    # unknown number, since may be haploid
10543  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),
10544  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),             # <<<<<<<<<<<<<<
10545  *                   FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1),
10546  *                   FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1),
10547  */
10548   __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10549   __Pyx_GOTREF(__pyx_t_13);
10550   __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10551   __Pyx_GOTREF(__pyx_t_12);
10552   __pyx_t_14 = PyTuple_New(6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10553   __Pyx_GOTREF(__pyx_t_14);
10554   __Pyx_INCREF(((PyObject *)__pyx_n_s__PQ));
10555   PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_n_s__PQ));
10556   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PQ));
10557   PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_12);
10558   __Pyx_GIVEREF(__pyx_t_12);
10559   __Pyx_INCREF(__pyx_int_1);
10560   PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_int_1);
10561   __Pyx_GIVEREF(__pyx_int_1);
10562   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
10563   PyTuple_SET_ITEM(__pyx_t_14, 3, ((PyObject *)__pyx_n_s__Integer));
10564   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
10565   __Pyx_INCREF(((PyObject *)__pyx_kp_s_73));
10566   PyTuple_SET_ITEM(__pyx_t_14, 4, ((PyObject *)__pyx_kp_s_73));
10567   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73));
10568   __Pyx_INCREF(__pyx_int_neg_1);
10569   PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_int_neg_1);
10570   __Pyx_GIVEREF(__pyx_int_neg_1);
10571   __pyx_t_12 = 0;
10572   __pyx_t_12 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10573   __Pyx_GOTREF(__pyx_t_12);
10574   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10575   __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
10576
10577   /* "cvcf.pyx":511
10578  *                   FORMAT('PS',self.NT_UNKNOWN,-1,'Integer','Phase set','.'),
10579  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),
10580  *                   FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1),             # <<<<<<<<<<<<<<
10581  *                   FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1),
10582  *                   ]:
10583  */
10584   __pyx_t_14 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10585   __Pyx_GOTREF(__pyx_t_14);
10586   __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_ALLELES); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10587   __Pyx_GOTREF(__pyx_t_13);
10588   __pyx_t_15 = PyTuple_New(6); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10589   __Pyx_GOTREF(__pyx_t_15);
10590   __Pyx_INCREF(((PyObject *)__pyx_n_s__EC));
10591   PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_n_s__EC));
10592   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EC));
10593   PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_13);
10594   __Pyx_GIVEREF(__pyx_t_13);
10595   __Pyx_INCREF(__pyx_int_1);
10596   PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_int_1);
10597   __Pyx_GIVEREF(__pyx_int_1);
10598   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
10599   PyTuple_SET_ITEM(__pyx_t_15, 3, ((PyObject *)__pyx_n_s__Integer));
10600   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
10601   __Pyx_INCREF(((PyObject *)__pyx_kp_s_74));
10602   PyTuple_SET_ITEM(__pyx_t_15, 4, ((PyObject *)__pyx_kp_s_74));
10603   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_74));
10604   __Pyx_INCREF(__pyx_int_neg_1);
10605   PyTuple_SET_ITEM(__pyx_t_15, 5, __pyx_int_neg_1);
10606   __Pyx_GIVEREF(__pyx_int_neg_1);
10607   __pyx_t_13 = 0;
10608   __pyx_t_13 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10609   __Pyx_GOTREF(__pyx_t_13);
10610   __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10611   __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
10612
10613   /* "cvcf.pyx":512
10614  *                   FORMAT('PQ',self.NT_NUMBER,1,'Integer','Phasing quality',-1),
10615  *                   FORMAT('EC',self.NT_ALLELES,1,'Integer','Expected alternate allel counts',-1),
10616  *                   FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1),             # <<<<<<<<<<<<<<
10617  *                   ]:
10618  *             if f.id not in self._format:
10619  */
10620   __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__FORMAT); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10621   __Pyx_GOTREF(__pyx_t_15);
10622   __pyx_t_14 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__NT_NUMBER); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10623   __Pyx_GOTREF(__pyx_t_14);
10624   __pyx_t_16 = PyTuple_New(6); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10625   __Pyx_GOTREF(__pyx_t_16);
10626   __Pyx_INCREF(((PyObject *)__pyx_n_s__MQ));
10627   PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_n_s__MQ));
10628   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MQ));
10629   PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_14);
10630   __Pyx_GIVEREF(__pyx_t_14);
10631   __Pyx_INCREF(__pyx_int_1);
10632   PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_int_1);
10633   __Pyx_GIVEREF(__pyx_int_1);
10634   __Pyx_INCREF(((PyObject *)__pyx_n_s__Integer));
10635   PyTuple_SET_ITEM(__pyx_t_16, 3, ((PyObject *)__pyx_n_s__Integer));
10636   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Integer));
10637   __Pyx_INCREF(((PyObject *)__pyx_kp_s_75));
10638   PyTuple_SET_ITEM(__pyx_t_16, 4, ((PyObject *)__pyx_kp_s_75));
10639   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_75));
10640   __Pyx_INCREF(__pyx_int_neg_1);
10641   PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_int_neg_1);
10642   __Pyx_GIVEREF(__pyx_int_neg_1);
10643   __pyx_t_14 = 0;
10644   __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10645   __Pyx_GOTREF(__pyx_t_14);
10646   __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10647   __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
10648   __pyx_t_16 = PyList_New(14); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10649   __Pyx_GOTREF(__pyx_t_16);
10650   PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_2);
10651   __Pyx_GIVEREF(__pyx_t_2);
10652   PyList_SET_ITEM(__pyx_t_16, 1, __pyx_t_1);
10653   __Pyx_GIVEREF(__pyx_t_1);
10654   PyList_SET_ITEM(__pyx_t_16, 2, __pyx_t_3);
10655   __Pyx_GIVEREF(__pyx_t_3);
10656   PyList_SET_ITEM(__pyx_t_16, 3, __pyx_t_4);
10657   __Pyx_GIVEREF(__pyx_t_4);
10658   PyList_SET_ITEM(__pyx_t_16, 4, __pyx_t_5);
10659   __Pyx_GIVEREF(__pyx_t_5);
10660   PyList_SET_ITEM(__pyx_t_16, 5, __pyx_t_6);
10661   __Pyx_GIVEREF(__pyx_t_6);
10662   PyList_SET_ITEM(__pyx_t_16, 6, __pyx_t_7);
10663   __Pyx_GIVEREF(__pyx_t_7);
10664   PyList_SET_ITEM(__pyx_t_16, 7, __pyx_t_8);
10665   __Pyx_GIVEREF(__pyx_t_8);
10666   PyList_SET_ITEM(__pyx_t_16, 8, __pyx_t_9);
10667   __Pyx_GIVEREF(__pyx_t_9);
10668   PyList_SET_ITEM(__pyx_t_16, 9, __pyx_t_10);
10669   __Pyx_GIVEREF(__pyx_t_10);
10670   PyList_SET_ITEM(__pyx_t_16, 10, __pyx_t_11);
10671   __Pyx_GIVEREF(__pyx_t_11);
10672   PyList_SET_ITEM(__pyx_t_16, 11, __pyx_t_12);
10673   __Pyx_GIVEREF(__pyx_t_12);
10674   PyList_SET_ITEM(__pyx_t_16, 12, __pyx_t_13);
10675   __Pyx_GIVEREF(__pyx_t_13);
10676   PyList_SET_ITEM(__pyx_t_16, 13, __pyx_t_14);
10677   __Pyx_GIVEREF(__pyx_t_14);
10678   __pyx_t_2 = 0;
10679   __pyx_t_1 = 0;
10680   __pyx_t_3 = 0;
10681   __pyx_t_4 = 0;
10682   __pyx_t_5 = 0;
10683   __pyx_t_6 = 0;
10684   __pyx_t_7 = 0;
10685   __pyx_t_8 = 0;
10686   __pyx_t_9 = 0;
10687   __pyx_t_10 = 0;
10688   __pyx_t_11 = 0;
10689   __pyx_t_12 = 0;
10690   __pyx_t_13 = 0;
10691   __pyx_t_14 = 0;
10692   __pyx_t_14 = ((PyObject *)__pyx_t_16); __Pyx_INCREF(__pyx_t_14); __pyx_t_17 = 0;
10693   __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
10694   for (;;) {
10695
10696     /* "cvcf.pyx":499
10697  * 
10698  *     def enter_default_format(self):
10699  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),             # <<<<<<<<<<<<<<
10700  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
10701  *                   FORMAT('FT',self.NT_NUMBER,1,'String','Sample Genotype Filter','.'),
10702  */
10703     if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_14)) break;
10704     __pyx_t_16 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_17); __Pyx_INCREF(__pyx_t_16); __pyx_t_17++;
10705     __Pyx_XDECREF(__pyx_v_f);
10706     __pyx_v_f = __pyx_t_16;
10707     __pyx_t_16 = 0;
10708
10709     /* "cvcf.pyx":514
10710  *                   FORMAT('MQ',self.NT_NUMBER,1,'Integer','RMS mapping quality',-1),
10711  *                   ]:
10712  *             if f.id not in self._format:             # <<<<<<<<<<<<<<
10713  *                 self._format[f.id] = f
10714  * 
10715  */
10716     __pyx_t_16 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10717     __Pyx_GOTREF(__pyx_t_16);
10718     __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10719     __Pyx_GOTREF(__pyx_t_13);
10720     __pyx_t_18 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_13, __pyx_t_16))); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10721     __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10722     __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10723     if (__pyx_t_18) {
10724
10725       /* "cvcf.pyx":515
10726  *                   ]:
10727  *             if f.id not in self._format:
10728  *                 self._format[f.id] = f             # <<<<<<<<<<<<<<
10729  * 
10730  *     def parse_header( self, line ):
10731  */
10732       __pyx_t_13 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10733       __Pyx_GOTREF(__pyx_t_13);
10734       __pyx_t_16 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10735       __Pyx_GOTREF(__pyx_t_16);
10736       if (PyObject_SetItem(__pyx_t_13, __pyx_t_16, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10737       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10738       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10739       goto __pyx_L5;
10740     }
10741     __pyx_L5:;
10742   }
10743   __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10744
10745   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10746   goto __pyx_L0;
10747   __pyx_L1_error:;
10748   __Pyx_XDECREF(__pyx_t_1);
10749   __Pyx_XDECREF(__pyx_t_2);
10750   __Pyx_XDECREF(__pyx_t_3);
10751   __Pyx_XDECREF(__pyx_t_4);
10752   __Pyx_XDECREF(__pyx_t_5);
10753   __Pyx_XDECREF(__pyx_t_6);
10754   __Pyx_XDECREF(__pyx_t_7);
10755   __Pyx_XDECREF(__pyx_t_8);
10756   __Pyx_XDECREF(__pyx_t_9);
10757   __Pyx_XDECREF(__pyx_t_10);
10758   __Pyx_XDECREF(__pyx_t_11);
10759   __Pyx_XDECREF(__pyx_t_12);
10760   __Pyx_XDECREF(__pyx_t_13);
10761   __Pyx_XDECREF(__pyx_t_14);
10762   __Pyx_XDECREF(__pyx_t_15);
10763   __Pyx_XDECREF(__pyx_t_16);
10764   __Pyx_AddTraceback("cvcf.VCF.enter_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
10765   __pyx_r = NULL;
10766   __pyx_L0:;
10767   __Pyx_XDECREF(__pyx_v_f);
10768   __Pyx_XGIVEREF(__pyx_r);
10769   __Pyx_RefNannyFinishContext();
10770   return __pyx_r;
10771 }
10772
10773 /* Python wrapper */
10774 static PyObject *__pyx_pw_4cvcf_3VCF_17parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10775 static PyMethodDef __pyx_mdef_4cvcf_3VCF_17parse_header = {__Pyx_NAMESTR("parse_header"), (PyCFunction)__pyx_pw_4cvcf_3VCF_17parse_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
10776 static PyObject *__pyx_pw_4cvcf_3VCF_17parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10777   PyObject *__pyx_v_self = 0;
10778   PyObject *__pyx_v_line = 0;
10779   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,0};
10780   PyObject *__pyx_r = 0;
10781   __Pyx_RefNannyDeclarations
10782   __Pyx_RefNannySetupContext("parse_header (wrapper)", 0);
10783   __pyx_self = __pyx_self;
10784   {
10785     PyObject* values[2] = {0,0};
10786     if (unlikely(__pyx_kwds)) {
10787       Py_ssize_t kw_args;
10788       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10789       switch (pos_args) {
10790         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10791         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10792         case  0: break;
10793         default: goto __pyx_L5_argtuple_error;
10794       }
10795       kw_args = PyDict_Size(__pyx_kwds);
10796       switch (pos_args) {
10797         case  0:
10798         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
10799         if (likely(values[0])) kw_args--;
10800         else goto __pyx_L5_argtuple_error;
10801         case  1:
10802         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line);
10803         if (likely(values[1])) kw_args--;
10804         else {
10805           __Pyx_RaiseArgtupleInvalid("parse_header", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10806         }
10807       }
10808       if (unlikely(kw_args > 0)) {
10809         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10810       }
10811     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
10812       goto __pyx_L5_argtuple_error;
10813     } else {
10814       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10815       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10816     }
10817     __pyx_v_self = values[0];
10818     __pyx_v_line = values[1];
10819   }
10820   goto __pyx_L4_argument_unpacking_done;
10821   __pyx_L5_argtuple_error:;
10822   __Pyx_RaiseArgtupleInvalid("parse_header", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10823   __pyx_L3_error:;
10824   __Pyx_AddTraceback("cvcf.VCF.parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
10825   __Pyx_RefNannyFinishContext();
10826   return NULL;
10827   __pyx_L4_argument_unpacking_done:;
10828   __pyx_r = __pyx_pf_4cvcf_3VCF_16parse_header(__pyx_self, __pyx_v_self, __pyx_v_line);
10829   __Pyx_RefNannyFinishContext();
10830   return __pyx_r;
10831 }
10832
10833 /* "cvcf.pyx":517
10834  *                 self._format[f.id] = f
10835  * 
10836  *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
10837  *         assert line.startswith('##')
10838  *         elts = line[2:].split('=')
10839  */
10840
10841 static PyObject *__pyx_pf_4cvcf_3VCF_16parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line) {
10842   PyObject *__pyx_v_elts = NULL;
10843   PyObject *__pyx_v_key = NULL;
10844   PyObject *__pyx_v_value = NULL;
10845   PyObject *__pyx_v_f = NULL;
10846   PyObject *__pyx_r = NULL;
10847   __Pyx_RefNannyDeclarations
10848   PyObject *__pyx_t_1 = NULL;
10849   PyObject *__pyx_t_2 = NULL;
10850   int __pyx_t_3;
10851   PyObject *__pyx_t_4 = NULL;
10852   PyObject *__pyx_t_5 = NULL;
10853   int __pyx_lineno = 0;
10854   const char *__pyx_filename = NULL;
10855   int __pyx_clineno = 0;
10856   __Pyx_RefNannySetupContext("parse_header", 0);
10857
10858   /* "cvcf.pyx":518
10859  * 
10860  *     def parse_header( self, line ):
10861  *         assert line.startswith('##')             # <<<<<<<<<<<<<<
10862  *         elts = line[2:].split('=')
10863  *         key = elts[0].strip()
10864  */
10865   #ifndef CYTHON_WITHOUT_ASSERTIONS
10866   __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10867   __Pyx_GOTREF(__pyx_t_1);
10868   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_77), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10869   __Pyx_GOTREF(__pyx_t_2);
10870   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10871   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10872   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10873   if (unlikely(!__pyx_t_3)) {
10874     PyErr_SetNone(PyExc_AssertionError);
10875     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10876   }
10877   #endif
10878
10879   /* "cvcf.pyx":519
10880  *     def parse_header( self, line ):
10881  *         assert line.startswith('##')
10882  *         elts = line[2:].split('=')             # <<<<<<<<<<<<<<
10883  *         key = elts[0].strip()
10884  *         value = '='.join(elts[1:]).strip()
10885  */
10886   __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_line, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10887   __Pyx_GOTREF(__pyx_t_2);
10888   __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10889   __Pyx_GOTREF(__pyx_t_1);
10890   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10891   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_78), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10892   __Pyx_GOTREF(__pyx_t_2);
10893   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10894   __pyx_v_elts = __pyx_t_2;
10895   __pyx_t_2 = 0;
10896
10897   /* "cvcf.pyx":520
10898  *         assert line.startswith('##')
10899  *         elts = line[2:].split('=')
10900  *         key = elts[0].strip()             # <<<<<<<<<<<<<<
10901  *         value = '='.join(elts[1:]).strip()
10902  *         if key == "fileformat":
10903  */
10904   __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10905   __Pyx_GOTREF(__pyx_t_2);
10906   __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10907   __Pyx_GOTREF(__pyx_t_1);
10908   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10909   __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 = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10910   __Pyx_GOTREF(__pyx_t_2);
10911   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10912   __pyx_v_key = __pyx_t_2;
10913   __pyx_t_2 = 0;
10914
10915   /* "cvcf.pyx":521
10916  *         elts = line[2:].split('=')
10917  *         key = elts[0].strip()
10918  *         value = '='.join(elts[1:]).strip()             # <<<<<<<<<<<<<<
10919  *         if key == "fileformat":
10920  *             if value == "VCFv3.3":
10921  */
10922   __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_14), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10923   __Pyx_GOTREF(__pyx_t_2);
10924   __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_elts, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10925   __Pyx_GOTREF(__pyx_t_1);
10926   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10927   __Pyx_GOTREF(__pyx_t_4);
10928   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
10929   __Pyx_GIVEREF(__pyx_t_1);
10930   __pyx_t_1 = 0;
10931   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10932   __Pyx_GOTREF(__pyx_t_1);
10933   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10934   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
10935   __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__strip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10936   __Pyx_GOTREF(__pyx_t_4);
10937   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10938   __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10939   __Pyx_GOTREF(__pyx_t_1);
10940   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10941   __pyx_v_value = __pyx_t_1;
10942   __pyx_t_1 = 0;
10943
10944   /* "cvcf.pyx":522
10945  *         key = elts[0].strip()
10946  *         value = '='.join(elts[1:]).strip()
10947  *         if key == "fileformat":             # <<<<<<<<<<<<<<
10948  *             if value == "VCFv3.3":
10949  *                 self._version = 33
10950  */
10951   __pyx_t_3 = __Pyx_PyString_Equals(__pyx_v_key, ((PyObject *)__pyx_n_s__fileformat), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10952   if (__pyx_t_3) {
10953
10954     /* "cvcf.pyx":523
10955  *         value = '='.join(elts[1:]).strip()
10956  *         if key == "fileformat":
10957  *             if value == "VCFv3.3":             # <<<<<<<<<<<<<<
10958  *                 self._version = 33
10959  *             elif value == "VCFv4.0":
10960  */
10961     __pyx_t_3 = __Pyx_PyString_Equals(__pyx_v_value, ((PyObject *)__pyx_kp_s_79), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10962     if (__pyx_t_3) {
10963
10964       /* "cvcf.pyx":524
10965  *         if key == "fileformat":
10966  *             if value == "VCFv3.3":
10967  *                 self._version = 33             # <<<<<<<<<<<<<<
10968  *             elif value == "VCFv4.0":
10969  *                 self._version = 40
10970  */
10971       if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_int_33) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10972       goto __pyx_L4;
10973     }
10974
10975     /* "cvcf.pyx":525
10976  *             if value == "VCFv3.3":
10977  *                 self._version = 33
10978  *             elif value == "VCFv4.0":             # <<<<<<<<<<<<<<
10979  *                 self._version = 40
10980  *             elif value == "VCFv4.1":
10981  */
10982     __pyx_t_3 = __Pyx_PyString_Equals(__pyx_v_value, ((PyObject *)__pyx_kp_s_80), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10983     if (__pyx_t_3) {
10984
10985       /* "cvcf.pyx":526
10986  *                 self._version = 33
10987  *             elif value == "VCFv4.0":
10988  *                 self._version = 40             # <<<<<<<<<<<<<<
10989  *             elif value == "VCFv4.1":
10990  *                 # AH - for testing
10991  */
10992       if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10993       goto __pyx_L4;
10994     }
10995
10996     /* "cvcf.pyx":527
10997  *             elif value == "VCFv4.0":
10998  *                 self._version = 40
10999  *             elif value == "VCFv4.1":             # <<<<<<<<<<<<<<
11000  *                 # AH - for testing
11001  *                 self._version = 40
11002  */
11003     __pyx_t_3 = __Pyx_PyString_Equals(__pyx_v_value, ((PyObject *)__pyx_kp_s_81), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11004     if (__pyx_t_3) {
11005
11006       /* "cvcf.pyx":529
11007  *             elif value == "VCFv4.1":
11008  *                 # AH - for testing
11009  *                 self._version = 40             # <<<<<<<<<<<<<<
11010  *             else:
11011  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)
11012  */
11013       if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11014       goto __pyx_L4;
11015     }
11016     /*else*/ {
11017
11018       /* "cvcf.pyx":531
11019  *                 self._version = 40
11020  *             else:
11021  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)             # <<<<<<<<<<<<<<
11022  *         elif key == "INFO":
11023  *             f = self.parse_format(line, value)
11024  */
11025       __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11026       __Pyx_GOTREF(__pyx_t_1);
11027       __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_82); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11028       __Pyx_GOTREF(__pyx_t_4);
11029       __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11030       __Pyx_GOTREF(__pyx_t_2);
11031       __Pyx_INCREF(__pyx_v_line);
11032       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
11033       __Pyx_GIVEREF(__pyx_v_line);
11034       PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
11035       __Pyx_GIVEREF(__pyx_t_4);
11036       __pyx_t_4 = 0;
11037       __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11038       __Pyx_GOTREF(__pyx_t_4);
11039       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11040       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11041       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11042     }
11043     __pyx_L4:;
11044     goto __pyx_L3;
11045   }
11046
11047   /* "cvcf.pyx":532
11048  *             else:
11049  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)
11050  *         elif key == "INFO":             # <<<<<<<<<<<<<<
11051  *             f = self.parse_format(line, value)
11052  *             self._info[ f.id ] = f
11053  */
11054   __pyx_t_3 = __Pyx_PyString_Equals(__pyx_v_key, ((PyObject *)__pyx_n_s__INFO), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11055   if (__pyx_t_3) {
11056
11057     /* "cvcf.pyx":533
11058  *                 self.error(line,self.UNKNOWN_FORMAT_STRING)
11059  *         elif key == "INFO":
11060  *             f = self.parse_format(line, value)             # <<<<<<<<<<<<<<
11061  *             self._info[ f.id ] = f
11062  *         elif key == "FILTER":
11063  */
11064     __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11065     __Pyx_GOTREF(__pyx_t_4);
11066     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11067     __Pyx_GOTREF(__pyx_t_2);
11068     __Pyx_INCREF(__pyx_v_line);
11069     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
11070     __Pyx_GIVEREF(__pyx_v_line);
11071     __Pyx_INCREF(__pyx_v_value);
11072     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value);
11073     __Pyx_GIVEREF(__pyx_v_value);
11074     __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11075     __Pyx_GOTREF(__pyx_t_1);
11076     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11077     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11078     __pyx_v_f = __pyx_t_1;
11079     __pyx_t_1 = 0;
11080
11081     /* "cvcf.pyx":534
11082  *         elif key == "INFO":
11083  *             f = self.parse_format(line, value)
11084  *             self._info[ f.id ] = f             # <<<<<<<<<<<<<<
11085  *         elif key == "FILTER":
11086  *             f = self.parse_format(line, value, filter=True)
11087  */
11088     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11089     __Pyx_GOTREF(__pyx_t_1);
11090     __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11091     __Pyx_GOTREF(__pyx_t_2);
11092     if (PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11093     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11094     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11095     goto __pyx_L3;
11096   }
11097
11098   /* "cvcf.pyx":535
11099  *             f = self.parse_format(line, value)
11100  *             self._info[ f.id ] = f
11101  *         elif key == "FILTER":             # <<<<<<<<<<<<<<
11102  *             f = self.parse_format(line, value, filter=True)
11103  *             self._filter[ f.id ] = f
11104  */
11105   __pyx_t_3 = __Pyx_PyString_Equals(__pyx_v_key, ((PyObject *)__pyx_n_s__FILTER), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11106   if (__pyx_t_3) {
11107
11108     /* "cvcf.pyx":536
11109  *             self._info[ f.id ] = f
11110  *         elif key == "FILTER":
11111  *             f = self.parse_format(line, value, filter=True)             # <<<<<<<<<<<<<<
11112  *             self._filter[ f.id ] = f
11113  *         elif key == "FORMAT":
11114  */
11115     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11116     __Pyx_GOTREF(__pyx_t_2);
11117     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11118     __Pyx_GOTREF(__pyx_t_1);
11119     __Pyx_INCREF(__pyx_v_line);
11120     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
11121     __Pyx_GIVEREF(__pyx_v_line);
11122     __Pyx_INCREF(__pyx_v_value);
11123     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
11124     __Pyx_GIVEREF(__pyx_v_value);
11125     __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11126     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
11127     __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11128     __Pyx_GOTREF(__pyx_t_5);
11129     if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__filter), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11130     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11131     __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11132     __Pyx_GOTREF(__pyx_t_5);
11133     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11134     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11135     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
11136     __pyx_v_f = __pyx_t_5;
11137     __pyx_t_5 = 0;
11138
11139     /* "cvcf.pyx":537
11140  *         elif key == "FILTER":
11141  *             f = self.parse_format(line, value, filter=True)
11142  *             self._filter[ f.id ] = f             # <<<<<<<<<<<<<<
11143  *         elif key == "FORMAT":
11144  *             f = self.parse_format(line, value)
11145  */
11146     __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11147     __Pyx_GOTREF(__pyx_t_5);
11148     __pyx_t_4 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11149     __Pyx_GOTREF(__pyx_t_4);
11150     if (PyObject_SetItem(__pyx_t_5, __pyx_t_4, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11151     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11152     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11153     goto __pyx_L3;
11154   }
11155
11156   /* "cvcf.pyx":538
11157  *             f = self.parse_format(line, value, filter=True)
11158  *             self._filter[ f.id ] = f
11159  *         elif key == "FORMAT":             # <<<<<<<<<<<<<<
11160  *             f = self.parse_format(line, value)
11161  *             self._format[ f.id ] = f
11162  */
11163   __pyx_t_3 = __Pyx_PyString_Equals(__pyx_v_key, ((PyObject *)__pyx_n_s__FORMAT), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11164   if (__pyx_t_3) {
11165
11166     /* "cvcf.pyx":539
11167  *             self._filter[ f.id ] = f
11168  *         elif key == "FORMAT":
11169  *             f = self.parse_format(line, value)             # <<<<<<<<<<<<<<
11170  *             self._format[ f.id ] = f
11171  *         else:
11172  */
11173     __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11174     __Pyx_GOTREF(__pyx_t_4);
11175     __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11176     __Pyx_GOTREF(__pyx_t_5);
11177     __Pyx_INCREF(__pyx_v_line);
11178     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_line);
11179     __Pyx_GIVEREF(__pyx_v_line);
11180     __Pyx_INCREF(__pyx_v_value);
11181     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
11182     __Pyx_GIVEREF(__pyx_v_value);
11183     __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11184     __Pyx_GOTREF(__pyx_t_1);
11185     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11186     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
11187     __pyx_v_f = __pyx_t_1;
11188     __pyx_t_1 = 0;
11189
11190     /* "cvcf.pyx":540
11191  *         elif key == "FORMAT":
11192  *             f = self.parse_format(line, value)
11193  *             self._format[ f.id ] = f             # <<<<<<<<<<<<<<
11194  *         else:
11195  *             # keep other keys in the header field
11196  */
11197     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11198     __Pyx_GOTREF(__pyx_t_1);
11199     __pyx_t_5 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11200     __Pyx_GOTREF(__pyx_t_5);
11201     if (PyObject_SetItem(__pyx_t_1, __pyx_t_5, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11202     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11203     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11204     goto __pyx_L3;
11205   }
11206   /*else*/ {
11207
11208     /* "cvcf.pyx":543
11209  *         else:
11210  *             # keep other keys in the header field
11211  *             self._header.append( (key,value) )             # <<<<<<<<<<<<<<
11212  * 
11213  * 
11214  */
11215     __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___header); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11216     __Pyx_GOTREF(__pyx_t_5);
11217     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11218     __Pyx_GOTREF(__pyx_t_1);
11219     __Pyx_INCREF(__pyx_v_key);
11220     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
11221     __Pyx_GIVEREF(__pyx_v_key);
11222     __Pyx_INCREF(__pyx_v_value);
11223     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
11224     __Pyx_GIVEREF(__pyx_v_value);
11225     __pyx_t_4 = __Pyx_PyObject_Append(__pyx_t_5, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11226     __Pyx_GOTREF(__pyx_t_4);
11227     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11228     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11229     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11230   }
11231   __pyx_L3:;
11232
11233   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11234   goto __pyx_L0;
11235   __pyx_L1_error:;
11236   __Pyx_XDECREF(__pyx_t_1);
11237   __Pyx_XDECREF(__pyx_t_2);
11238   __Pyx_XDECREF(__pyx_t_4);
11239   __Pyx_XDECREF(__pyx_t_5);
11240   __Pyx_AddTraceback("cvcf.VCF.parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
11241   __pyx_r = NULL;
11242   __pyx_L0:;
11243   __Pyx_XDECREF(__pyx_v_elts);
11244   __Pyx_XDECREF(__pyx_v_key);
11245   __Pyx_XDECREF(__pyx_v_value);
11246   __Pyx_XDECREF(__pyx_v_f);
11247   __Pyx_XGIVEREF(__pyx_r);
11248   __Pyx_RefNannyFinishContext();
11249   return __pyx_r;
11250 }
11251
11252 /* Python wrapper */
11253 static PyObject *__pyx_pw_4cvcf_3VCF_19write_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11254 static PyMethodDef __pyx_mdef_4cvcf_3VCF_19write_header = {__Pyx_NAMESTR("write_header"), (PyCFunction)__pyx_pw_4cvcf_3VCF_19write_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
11255 static PyObject *__pyx_pw_4cvcf_3VCF_19write_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11256   PyObject *__pyx_v_self = 0;
11257   PyObject *__pyx_v_stream = 0;
11258   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
11259   PyObject *__pyx_r = 0;
11260   __Pyx_RefNannyDeclarations
11261   __Pyx_RefNannySetupContext("write_header (wrapper)", 0);
11262   __pyx_self = __pyx_self;
11263   {
11264     PyObject* values[2] = {0,0};
11265     if (unlikely(__pyx_kwds)) {
11266       Py_ssize_t kw_args;
11267       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11268       switch (pos_args) {
11269         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11270         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11271         case  0: break;
11272         default: goto __pyx_L5_argtuple_error;
11273       }
11274       kw_args = PyDict_Size(__pyx_kwds);
11275       switch (pos_args) {
11276         case  0:
11277         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
11278         if (likely(values[0])) kw_args--;
11279         else goto __pyx_L5_argtuple_error;
11280         case  1:
11281         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream);
11282         if (likely(values[1])) kw_args--;
11283         else {
11284           __Pyx_RaiseArgtupleInvalid("write_header", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11285         }
11286       }
11287       if (unlikely(kw_args > 0)) {
11288         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11289       }
11290     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11291       goto __pyx_L5_argtuple_error;
11292     } else {
11293       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11294       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11295     }
11296     __pyx_v_self = values[0];
11297     __pyx_v_stream = values[1];
11298   }
11299   goto __pyx_L4_argument_unpacking_done;
11300   __pyx_L5_argtuple_error:;
11301   __Pyx_RaiseArgtupleInvalid("write_header", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11302   __pyx_L3_error:;
11303   __Pyx_AddTraceback("cvcf.VCF.write_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
11304   __Pyx_RefNannyFinishContext();
11305   return NULL;
11306   __pyx_L4_argument_unpacking_done:;
11307   __pyx_r = __pyx_pf_4cvcf_3VCF_18write_header(__pyx_self, __pyx_v_self, __pyx_v_stream);
11308   __Pyx_RefNannyFinishContext();
11309   return __pyx_r;
11310 }
11311
11312 /* "cvcf.pyx":546
11313  * 
11314  * 
11315  *     def write_header( self, stream ):             # <<<<<<<<<<<<<<
11316  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))
11317  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
11318  */
11319
11320 static PyObject *__pyx_pf_4cvcf_3VCF_18write_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
11321   PyObject *__pyx_v_key = NULL;
11322   PyObject *__pyx_v_value = NULL;
11323   PyObject *__pyx_v_var = NULL;
11324   PyObject *__pyx_v_label = NULL;
11325   PyObject *__pyx_v_f = NULL;
11326   PyObject *__pyx_r = NULL;
11327   __Pyx_RefNannyDeclarations
11328   PyObject *__pyx_t_1 = NULL;
11329   PyObject *__pyx_t_2 = NULL;
11330   PyObject *__pyx_t_3 = NULL;
11331   PyObject *__pyx_t_4 = NULL;
11332   Py_ssize_t __pyx_t_5;
11333   PyObject *(*__pyx_t_6)(PyObject *);
11334   PyObject *__pyx_t_7 = NULL;
11335   PyObject *(*__pyx_t_8)(PyObject *);
11336   Py_ssize_t __pyx_t_9;
11337   PyObject *__pyx_t_10 = NULL;
11338   int __pyx_t_11;
11339   PyObject *__pyx_t_12 = NULL;
11340   int __pyx_lineno = 0;
11341   const char *__pyx_filename = NULL;
11342   int __pyx_clineno = 0;
11343   __Pyx_RefNannySetupContext("write_header", 0);
11344
11345   /* "cvcf.pyx":547
11346  * 
11347  *     def write_header( self, stream ):
11348  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))             # <<<<<<<<<<<<<<
11349  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
11350  *         for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]:
11351  */
11352   __pyx_t_1 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11353   __Pyx_GOTREF(__pyx_t_1);
11354   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11355   __Pyx_GOTREF(__pyx_t_2);
11356   __pyx_t_3 = PyNumber_FloorDivide(__pyx_t_2, __pyx_int_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11357   __Pyx_GOTREF(__pyx_t_3);
11358   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11359   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11360   __Pyx_GOTREF(__pyx_t_2);
11361   __pyx_t_4 = PyNumber_Remainder(__pyx_t_2, __pyx_int_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11362   __Pyx_GOTREF(__pyx_t_4);
11363   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11364   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11365   __Pyx_GOTREF(__pyx_t_2);
11366   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
11367   __Pyx_GIVEREF(__pyx_t_3);
11368   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
11369   __Pyx_GIVEREF(__pyx_t_4);
11370   __pyx_t_3 = 0;
11371   __pyx_t_4 = 0;
11372   __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_83), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11373   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
11374   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11375   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11376   __Pyx_GOTREF(__pyx_t_2);
11377   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
11378   __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
11379   __pyx_t_4 = 0;
11380   __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11381   __Pyx_GOTREF(__pyx_t_4);
11382   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11383   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11384   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11385
11386   /* "cvcf.pyx":548
11387  *     def write_header( self, stream ):
11388  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))
11389  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))             # <<<<<<<<<<<<<<
11390  *         for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]:
11391  *             for f in var.itervalues(): stream.write("##%s=%s\n" % (label,self.format_format(f,filter=(label=="FILTER"))))
11392  */
11393   __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___header); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11394   __Pyx_GOTREF(__pyx_t_4);
11395   if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
11396     __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
11397     __pyx_t_6 = NULL;
11398   } else {
11399     __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11400     __Pyx_GOTREF(__pyx_t_2);
11401     __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
11402   }
11403   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11404   for (;;) {
11405     if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) {
11406       if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
11407       __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++;
11408     } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) {
11409       if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11410       __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++;
11411     } else {
11412       __pyx_t_4 = __pyx_t_6(__pyx_t_2);
11413       if (unlikely(!__pyx_t_4)) {
11414         if (PyErr_Occurred()) {
11415           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
11416           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11417         }
11418         break;
11419       }
11420       __Pyx_GOTREF(__pyx_t_4);
11421     }
11422     if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
11423       PyObject* sequence = __pyx_t_4;
11424       if (likely(PyTuple_CheckExact(sequence))) {
11425         if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
11426           if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
11427           else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
11428           {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11429         }
11430         __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
11431         __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
11432       } else {
11433         if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
11434           if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
11435           else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
11436           {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11437         }
11438         __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
11439         __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
11440       }
11441       __Pyx_INCREF(__pyx_t_1);
11442       __Pyx_INCREF(__pyx_t_3);
11443       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11444     } else {
11445       Py_ssize_t index = -1;
11446       __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11447       __Pyx_GOTREF(__pyx_t_7);
11448       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11449       __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
11450       index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
11451       __Pyx_GOTREF(__pyx_t_1);
11452       index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
11453       __Pyx_GOTREF(__pyx_t_3);
11454       if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11455       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11456       goto __pyx_L6_unpacking_done;
11457       __pyx_L5_unpacking_failed:;
11458       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11459       if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
11460       if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
11461       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11462       __pyx_L6_unpacking_done:;
11463     }
11464     __Pyx_XDECREF(__pyx_v_key);
11465     __pyx_v_key = __pyx_t_1;
11466     __pyx_t_1 = 0;
11467     __Pyx_XDECREF(__pyx_v_value);
11468     __pyx_v_value = __pyx_t_3;
11469     __pyx_t_3 = 0;
11470     __pyx_t_4 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11471     __Pyx_GOTREF(__pyx_t_4);
11472     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11473     __Pyx_GOTREF(__pyx_t_3);
11474     __Pyx_INCREF(__pyx_v_key);
11475     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
11476     __Pyx_GIVEREF(__pyx_v_key);
11477     __Pyx_INCREF(__pyx_v_value);
11478     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value);
11479     __Pyx_GIVEREF(__pyx_v_value);
11480     __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_84), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11481     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
11482     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
11483     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11484     __Pyx_GOTREF(__pyx_t_3);
11485     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
11486     __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
11487     __pyx_t_1 = 0;
11488     __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11489     __Pyx_GOTREF(__pyx_t_1);
11490     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11491     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
11492     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11493   }
11494   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11495
11496   /* "cvcf.pyx":549
11497  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))
11498  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
11499  *         for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]:             # <<<<<<<<<<<<<<
11500  *             for f in var.itervalues(): stream.write("##%s=%s\n" % (label,self.format_format(f,filter=(label=="FILTER"))))
11501  * 
11502  */
11503   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11504   __Pyx_GOTREF(__pyx_t_2);
11505   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11506   __Pyx_GOTREF(__pyx_t_1);
11507   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
11508   __Pyx_GIVEREF(__pyx_t_2);
11509   __Pyx_INCREF(((PyObject *)__pyx_n_s__INFO));
11510   PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__INFO));
11511   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__INFO));
11512   __pyx_t_2 = 0;
11513   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11514   __Pyx_GOTREF(__pyx_t_2);
11515   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11516   __Pyx_GOTREF(__pyx_t_3);
11517   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
11518   __Pyx_GIVEREF(__pyx_t_2);
11519   __Pyx_INCREF(((PyObject *)__pyx_n_s__FILTER));
11520   PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__FILTER));
11521   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FILTER));
11522   __pyx_t_2 = 0;
11523   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11524   __Pyx_GOTREF(__pyx_t_2);
11525   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11526   __Pyx_GOTREF(__pyx_t_4);
11527   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
11528   __Pyx_GIVEREF(__pyx_t_2);
11529   __Pyx_INCREF(((PyObject *)__pyx_n_s__FORMAT));
11530   PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__FORMAT));
11531   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FORMAT));
11532   __pyx_t_2 = 0;
11533   __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11534   __Pyx_GOTREF(__pyx_t_2);
11535   PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
11536   __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
11537   PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_3));
11538   __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
11539   PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_4));
11540   __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
11541   __pyx_t_1 = 0;
11542   __pyx_t_3 = 0;
11543   __pyx_t_4 = 0;
11544   __pyx_t_4 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
11545   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11546   for (;;) {
11547     if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
11548     __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
11549     if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
11550       PyObject* sequence = __pyx_t_2;
11551       if (likely(PyTuple_CheckExact(sequence))) {
11552         if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
11553           if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
11554           else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
11555           {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11556         }
11557         __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
11558         __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
11559       } else {
11560         if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
11561           if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
11562           else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
11563           {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11564         }
11565         __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
11566         __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
11567       }
11568       __Pyx_INCREF(__pyx_t_3);
11569       __Pyx_INCREF(__pyx_t_1);
11570       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11571     } else {
11572       Py_ssize_t index = -1;
11573       __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11574       __Pyx_GOTREF(__pyx_t_7);
11575       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11576       __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
11577       index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
11578       __Pyx_GOTREF(__pyx_t_3);
11579       index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed;
11580       __Pyx_GOTREF(__pyx_t_1);
11581       if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11582       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11583       goto __pyx_L10_unpacking_done;
11584       __pyx_L9_unpacking_failed:;
11585       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11586       if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
11587       if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
11588       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11589       __pyx_L10_unpacking_done:;
11590     }
11591     __Pyx_XDECREF(__pyx_v_var);
11592     __pyx_v_var = __pyx_t_3;
11593     __pyx_t_3 = 0;
11594     __Pyx_XDECREF(__pyx_v_label);
11595     __pyx_v_label = __pyx_t_1;
11596     __pyx_t_1 = 0;
11597
11598     /* "cvcf.pyx":550
11599  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
11600  *         for var,label in [(self._info,"INFO"),(self._filter,"FILTER"),(self._format,"FORMAT")]:
11601  *             for f in var.itervalues(): stream.write("##%s=%s\n" % (label,self.format_format(f,filter=(label=="FILTER"))))             # <<<<<<<<<<<<<<
11602  * 
11603  * 
11604  */
11605     __pyx_t_2 = PyObject_GetAttr(__pyx_v_var, __pyx_n_s__itervalues); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11606     __Pyx_GOTREF(__pyx_t_2);
11607     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11608     __Pyx_GOTREF(__pyx_t_1);
11609     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11610     if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
11611       __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
11612       __pyx_t_6 = NULL;
11613     } else {
11614       __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11615       __Pyx_GOTREF(__pyx_t_2);
11616       __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
11617     }
11618     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11619     for (;;) {
11620       if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) {
11621         if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
11622         __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++;
11623       } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) {
11624         if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11625         __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++;
11626       } else {
11627         __pyx_t_1 = __pyx_t_6(__pyx_t_2);
11628         if (unlikely(!__pyx_t_1)) {
11629           if (PyErr_Occurred()) {
11630             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
11631             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11632           }
11633           break;
11634         }
11635         __Pyx_GOTREF(__pyx_t_1);
11636       }
11637       __Pyx_XDECREF(__pyx_v_f);
11638       __pyx_v_f = __pyx_t_1;
11639       __pyx_t_1 = 0;
11640       __pyx_t_1 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11641       __Pyx_GOTREF(__pyx_t_1);
11642       __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11643       __Pyx_GOTREF(__pyx_t_3);
11644       __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11645       __Pyx_GOTREF(__pyx_t_7);
11646       __Pyx_INCREF(__pyx_v_f);
11647       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_f);
11648       __Pyx_GIVEREF(__pyx_v_f);
11649       __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11650       __Pyx_GOTREF(((PyObject *)__pyx_t_10));
11651       __pyx_t_11 = __Pyx_PyString_Equals(__pyx_v_label, ((PyObject *)__pyx_n_s__FILTER), Py_EQ); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11652       __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11653       __Pyx_GOTREF(__pyx_t_12);
11654       if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__filter), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11655       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
11656       __pyx_t_12 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11657       __Pyx_GOTREF(__pyx_t_12);
11658       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11659       __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
11660       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
11661       __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11662       __Pyx_GOTREF(__pyx_t_10);
11663       __Pyx_INCREF(__pyx_v_label);
11664       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_label);
11665       __Pyx_GIVEREF(__pyx_v_label);
11666       PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_12);
11667       __Pyx_GIVEREF(__pyx_t_12);
11668       __pyx_t_12 = 0;
11669       __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_84), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11670       __Pyx_GOTREF(((PyObject *)__pyx_t_12));
11671       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
11672       __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11673       __Pyx_GOTREF(__pyx_t_10);
11674       PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_12));
11675       __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
11676       __pyx_t_12 = 0;
11677       __pyx_t_12 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11678       __Pyx_GOTREF(__pyx_t_12);
11679       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11680       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
11681       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
11682     }
11683     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11684   }
11685   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11686
11687   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11688   goto __pyx_L0;
11689   __pyx_L1_error:;
11690   __Pyx_XDECREF(__pyx_t_1);
11691   __Pyx_XDECREF(__pyx_t_2);
11692   __Pyx_XDECREF(__pyx_t_3);
11693   __Pyx_XDECREF(__pyx_t_4);
11694   __Pyx_XDECREF(__pyx_t_7);
11695   __Pyx_XDECREF(__pyx_t_10);
11696   __Pyx_XDECREF(__pyx_t_12);
11697   __Pyx_AddTraceback("cvcf.VCF.write_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
11698   __pyx_r = NULL;
11699   __pyx_L0:;
11700   __Pyx_XDECREF(__pyx_v_key);
11701   __Pyx_XDECREF(__pyx_v_value);
11702   __Pyx_XDECREF(__pyx_v_var);
11703   __Pyx_XDECREF(__pyx_v_label);
11704   __Pyx_XDECREF(__pyx_v_f);
11705   __Pyx_XGIVEREF(__pyx_r);
11706   __Pyx_RefNannyFinishContext();
11707   return __pyx_r;
11708 }
11709
11710 /* Python wrapper */
11711 static PyObject *__pyx_pw_4cvcf_3VCF_21parse_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11712 static PyMethodDef __pyx_mdef_4cvcf_3VCF_21parse_heading = {__Pyx_NAMESTR("parse_heading"), (PyCFunction)__pyx_pw_4cvcf_3VCF_21parse_heading, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
11713 static PyObject *__pyx_pw_4cvcf_3VCF_21parse_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11714   PyObject *__pyx_v_self = 0;
11715   PyObject *__pyx_v_line = 0;
11716   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,0};
11717   PyObject *__pyx_r = 0;
11718   __Pyx_RefNannyDeclarations
11719   __Pyx_RefNannySetupContext("parse_heading (wrapper)", 0);
11720   __pyx_self = __pyx_self;
11721   {
11722     PyObject* values[2] = {0,0};
11723     if (unlikely(__pyx_kwds)) {
11724       Py_ssize_t kw_args;
11725       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11726       switch (pos_args) {
11727         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11728         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11729         case  0: break;
11730         default: goto __pyx_L5_argtuple_error;
11731       }
11732       kw_args = PyDict_Size(__pyx_kwds);
11733       switch (pos_args) {
11734         case  0:
11735         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
11736         if (likely(values[0])) kw_args--;
11737         else goto __pyx_L5_argtuple_error;
11738         case  1:
11739         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line);
11740         if (likely(values[1])) kw_args--;
11741         else {
11742           __Pyx_RaiseArgtupleInvalid("parse_heading", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11743         }
11744       }
11745       if (unlikely(kw_args > 0)) {
11746         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_heading") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11747       }
11748     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11749       goto __pyx_L5_argtuple_error;
11750     } else {
11751       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11752       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11753     }
11754     __pyx_v_self = values[0];
11755     __pyx_v_line = values[1];
11756   }
11757   goto __pyx_L4_argument_unpacking_done;
11758   __pyx_L5_argtuple_error:;
11759   __Pyx_RaiseArgtupleInvalid("parse_heading", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11760   __pyx_L3_error:;
11761   __Pyx_AddTraceback("cvcf.VCF.parse_heading", __pyx_clineno, __pyx_lineno, __pyx_filename);
11762   __Pyx_RefNannyFinishContext();
11763   return NULL;
11764   __pyx_L4_argument_unpacking_done:;
11765   __pyx_r = __pyx_pf_4cvcf_3VCF_20parse_heading(__pyx_self, __pyx_v_self, __pyx_v_line);
11766   __Pyx_RefNannyFinishContext();
11767   return __pyx_r;
11768 }
11769
11770 /* "cvcf.pyx":553
11771  * 
11772  * 
11773  *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
11774  *         assert line.startswith('#')
11775  *         assert not line.startswith('##')
11776  */
11777
11778 static PyObject *__pyx_pf_4cvcf_3VCF_20parse_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line) {
11779   PyObject *__pyx_v_headings = NULL;
11780   PyObject *__pyx_v_i = NULL;
11781   PyObject *__pyx_v_s = NULL;
11782   PyObject *__pyx_v_err = NULL;
11783   PyObject *__pyx_v_x = NULL;
11784   PyObject *__pyx_v_y = NULL;
11785   PyObject *__pyx_r = NULL;
11786   __Pyx_RefNannyDeclarations
11787   PyObject *__pyx_t_1 = NULL;
11788   PyObject *__pyx_t_2 = NULL;
11789   int __pyx_t_3;
11790   Py_ssize_t __pyx_t_4;
11791   int __pyx_t_5;
11792   int __pyx_t_6;
11793   PyObject *__pyx_t_7 = NULL;
11794   PyObject *(*__pyx_t_8)(PyObject *);
11795   Py_ssize_t __pyx_t_9;
11796   PyObject *__pyx_t_10 = NULL;
11797   PyObject *__pyx_t_11 = NULL;
11798   int __pyx_lineno = 0;
11799   const char *__pyx_filename = NULL;
11800   int __pyx_clineno = 0;
11801   __Pyx_RefNannySetupContext("parse_heading", 0);
11802
11803   /* "cvcf.pyx":554
11804  * 
11805  *     def parse_heading( self, line ):
11806  *         assert line.startswith('#')             # <<<<<<<<<<<<<<
11807  *         assert not line.startswith('##')
11808  *         headings = line[1:].split('\t')
11809  */
11810   #ifndef CYTHON_WITHOUT_ASSERTIONS
11811   __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11812   __Pyx_GOTREF(__pyx_t_1);
11813   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11814   __Pyx_GOTREF(__pyx_t_2);
11815   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11816   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11817   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11818   if (unlikely(!__pyx_t_3)) {
11819     PyErr_SetNone(PyExc_AssertionError);
11820     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11821   }
11822   #endif
11823
11824   /* "cvcf.pyx":555
11825  *     def parse_heading( self, line ):
11826  *         assert line.startswith('#')
11827  *         assert not line.startswith('##')             # <<<<<<<<<<<<<<
11828  *         headings = line[1:].split('\t')
11829  *         # test for 8, as FORMAT field might be missing
11830  */
11831   #ifndef CYTHON_WITHOUT_ASSERTIONS
11832   __pyx_t_2 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11833   __Pyx_GOTREF(__pyx_t_2);
11834   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11835   __Pyx_GOTREF(__pyx_t_1);
11836   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11837   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11838   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11839   if (unlikely(!(!__pyx_t_3))) {
11840     PyErr_SetNone(PyExc_AssertionError);
11841     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11842   }
11843   #endif
11844
11845   /* "cvcf.pyx":556
11846  *         assert line.startswith('#')
11847  *         assert not line.startswith('##')
11848  *         headings = line[1:].split('\t')             # <<<<<<<<<<<<<<
11849  *         # test for 8, as FORMAT field might be missing
11850  *         if len(headings)==1 and len(line[1:].split()) >= 8:
11851  */
11852   __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11853   __Pyx_GOTREF(__pyx_t_1);
11854   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11855   __Pyx_GOTREF(__pyx_t_2);
11856   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11857   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11858   __Pyx_GOTREF(__pyx_t_1);
11859   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11860   __pyx_v_headings = __pyx_t_1;
11861   __pyx_t_1 = 0;
11862
11863   /* "cvcf.pyx":558
11864  *         headings = line[1:].split('\t')
11865  *         # test for 8, as FORMAT field might be missing
11866  *         if len(headings)==1 and len(line[1:].split()) >= 8:             # <<<<<<<<<<<<<<
11867  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
11868  *             headings = line[1:].split()
11869  */
11870   __pyx_t_4 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11871   __pyx_t_3 = (__pyx_t_4 == 1);
11872   if (__pyx_t_3) {
11873     __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11874     __Pyx_GOTREF(__pyx_t_1);
11875     __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11876     __Pyx_GOTREF(__pyx_t_2);
11877     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11878     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11879     __Pyx_GOTREF(__pyx_t_1);
11880     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11881     __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11882     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11883     __pyx_t_5 = (__pyx_t_4 >= 8);
11884     __pyx_t_6 = __pyx_t_5;
11885   } else {
11886     __pyx_t_6 = __pyx_t_3;
11887   }
11888   if (__pyx_t_6) {
11889
11890     /* "cvcf.pyx":559
11891  *         # test for 8, as FORMAT field might be missing
11892  *         if len(headings)==1 and len(line[1:].split()) >= 8:
11893  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)             # <<<<<<<<<<<<<<
11894  *             headings = line[1:].split()
11895  * 
11896  */
11897     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11898     __Pyx_GOTREF(__pyx_t_1);
11899     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_90); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11900     __Pyx_GOTREF(__pyx_t_2);
11901     __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11902     __Pyx_GOTREF(__pyx_t_7);
11903     __Pyx_INCREF(__pyx_v_line);
11904     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
11905     __Pyx_GIVEREF(__pyx_v_line);
11906     PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
11907     __Pyx_GIVEREF(__pyx_t_2);
11908     __pyx_t_2 = 0;
11909     __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11910     __Pyx_GOTREF(__pyx_t_2);
11911     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11912     __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
11913     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11914
11915     /* "cvcf.pyx":560
11916  *         if len(headings)==1 and len(line[1:].split()) >= 8:
11917  *             self.error(line,self.HEADING_NOT_SEPARATED_BY_TABS)
11918  *             headings = line[1:].split()             # <<<<<<<<<<<<<<
11919  * 
11920  *         for i,s in enumerate(self._required):
11921  */
11922     __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11923     __Pyx_GOTREF(__pyx_t_2);
11924     __pyx_t_7 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11925     __Pyx_GOTREF(__pyx_t_7);
11926     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11927     __pyx_t_2 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11928     __Pyx_GOTREF(__pyx_t_2);
11929     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11930     __Pyx_DECREF(__pyx_v_headings);
11931     __pyx_v_headings = __pyx_t_2;
11932     __pyx_t_2 = 0;
11933     goto __pyx_L3;
11934   }
11935   __pyx_L3:;
11936
11937   /* "cvcf.pyx":562
11938  *             headings = line[1:].split()
11939  * 
11940  *         for i,s in enumerate(self._required):             # <<<<<<<<<<<<<<
11941  * 
11942  *             if len(headings)<=i or headings[i] != s:
11943  */
11944   __Pyx_INCREF(__pyx_int_0);
11945   __pyx_t_2 = __pyx_int_0;
11946   __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___required); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11947   __Pyx_GOTREF(__pyx_t_7);
11948   if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
11949     __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
11950     __pyx_t_8 = NULL;
11951   } else {
11952     __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11953     __Pyx_GOTREF(__pyx_t_1);
11954     __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
11955   }
11956   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11957   for (;;) {
11958     if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_1)) {
11959       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
11960       __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++;
11961     } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_1)) {
11962       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
11963       __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++;
11964     } else {
11965       __pyx_t_7 = __pyx_t_8(__pyx_t_1);
11966       if (unlikely(!__pyx_t_7)) {
11967         if (PyErr_Occurred()) {
11968           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
11969           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11970         }
11971         break;
11972       }
11973       __Pyx_GOTREF(__pyx_t_7);
11974     }
11975     __Pyx_XDECREF(__pyx_v_s);
11976     __pyx_v_s = __pyx_t_7;
11977     __pyx_t_7 = 0;
11978     __Pyx_INCREF(__pyx_t_2);
11979     __Pyx_XDECREF(__pyx_v_i);
11980     __pyx_v_i = __pyx_t_2;
11981     __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11982     __Pyx_GOTREF(__pyx_t_7);
11983     __Pyx_DECREF(__pyx_t_2);
11984     __pyx_t_2 = __pyx_t_7;
11985     __pyx_t_7 = 0;
11986
11987     /* "cvcf.pyx":564
11988  *         for i,s in enumerate(self._required):
11989  * 
11990  *             if len(headings)<=i or headings[i] != s:             # <<<<<<<<<<<<<<
11991  * 
11992  *                 if len(headings) <= i:
11993  */
11994     __pyx_t_9 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11995     __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11996     __Pyx_GOTREF(__pyx_t_7);
11997     __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_v_i, Py_LE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11998     __Pyx_GOTREF(__pyx_t_10);
11999     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12000     __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12001     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12002     if (!__pyx_t_6) {
12003       __pyx_t_10 = PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12004       __Pyx_GOTREF(__pyx_t_10);
12005       __pyx_t_7 = PyObject_RichCompare(__pyx_t_10, __pyx_v_s, Py_NE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12006       __Pyx_GOTREF(__pyx_t_7);
12007       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12008       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12009       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12010       __pyx_t_5 = __pyx_t_3;
12011     } else {
12012       __pyx_t_5 = __pyx_t_6;
12013     }
12014     if (__pyx_t_5) {
12015
12016       /* "cvcf.pyx":566
12017  *             if len(headings)<=i or headings[i] != s:
12018  * 
12019  *                 if len(headings) <= i:             # <<<<<<<<<<<<<<
12020  *                     err = "(%sth entry not found)" % (i+1)
12021  *                 else:
12022  */
12023       __pyx_t_9 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12024       __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12025       __Pyx_GOTREF(__pyx_t_7);
12026       __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_v_i, Py_LE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12027       __Pyx_GOTREF(__pyx_t_10);
12028       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12029       __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12030       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12031       if (__pyx_t_5) {
12032
12033         /* "cvcf.pyx":567
12034  * 
12035  *                 if len(headings) <= i:
12036  *                     err = "(%sth entry not found)" % (i+1)             # <<<<<<<<<<<<<<
12037  *                 else:
12038  *                     err = "(found %s, expected %s)" % (headings[i],s)
12039  */
12040         __pyx_t_10 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12041         __Pyx_GOTREF(__pyx_t_10);
12042         __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_91), __pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12043         __Pyx_GOTREF(((PyObject *)__pyx_t_7));
12044         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12045         __Pyx_XDECREF(__pyx_v_err);
12046         __pyx_v_err = ((PyObject *)__pyx_t_7);
12047         __pyx_t_7 = 0;
12048         goto __pyx_L7;
12049       }
12050       /*else*/ {
12051
12052         /* "cvcf.pyx":569
12053  *                     err = "(%sth entry not found)" % (i+1)
12054  *                 else:
12055  *                     err = "(found %s, expected %s)" % (headings[i],s)             # <<<<<<<<<<<<<<
12056  * 
12057  *                 #self.error(line,self.BADLY_FORMATTED_HEADING,err)
12058  */
12059         __pyx_t_7 = PyObject_GetItem(__pyx_v_headings, __pyx_v_i); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12060         __Pyx_GOTREF(__pyx_t_7);
12061         __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12062         __Pyx_GOTREF(__pyx_t_10);
12063         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
12064         __Pyx_GIVEREF(__pyx_t_7);
12065         __Pyx_INCREF(__pyx_v_s);
12066         PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_s);
12067         __Pyx_GIVEREF(__pyx_v_s);
12068         __pyx_t_7 = 0;
12069         __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_92), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12070         __Pyx_GOTREF(((PyObject *)__pyx_t_7));
12071         __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
12072         __Pyx_XDECREF(__pyx_v_err);
12073         __pyx_v_err = ((PyObject *)__pyx_t_7);
12074         __pyx_t_7 = 0;
12075       }
12076       __pyx_L7:;
12077
12078       /* "cvcf.pyx":573
12079  *                 #self.error(line,self.BADLY_FORMATTED_HEADING,err)
12080  *                 # allow FORMAT column to be absent
12081  *                 if len(headings) == 8:             # <<<<<<<<<<<<<<
12082  *                     headings.append("FORMAT")
12083  *                 else:
12084  */
12085       __pyx_t_9 = PyObject_Length(__pyx_v_headings); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12086       __pyx_t_5 = (__pyx_t_9 == 8);
12087       if (__pyx_t_5) {
12088
12089         /* "cvcf.pyx":574
12090  *                 # allow FORMAT column to be absent
12091  *                 if len(headings) == 8:
12092  *                     headings.append("FORMAT")             # <<<<<<<<<<<<<<
12093  *                 else:
12094  *                     self.error(line,self.BADLY_FORMATTED_HEADING,err)
12095  */
12096         __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_headings, ((PyObject *)__pyx_n_s__FORMAT)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12097         __Pyx_GOTREF(__pyx_t_7);
12098         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12099         goto __pyx_L8;
12100       }
12101       /*else*/ {
12102
12103         /* "cvcf.pyx":576
12104  *                     headings.append("FORMAT")
12105  *                 else:
12106  *                     self.error(line,self.BADLY_FORMATTED_HEADING,err)             # <<<<<<<<<<<<<<
12107  * 
12108  *         self._samples = headings[9:]
12109  */
12110         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12111         __Pyx_GOTREF(__pyx_t_7);
12112         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_93); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12113         __Pyx_GOTREF(__pyx_t_10);
12114         __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12115         __Pyx_GOTREF(__pyx_t_11);
12116         __Pyx_INCREF(__pyx_v_line);
12117         PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_line);
12118         __Pyx_GIVEREF(__pyx_v_line);
12119         PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10);
12120         __Pyx_GIVEREF(__pyx_t_10);
12121         __Pyx_INCREF(__pyx_v_err);
12122         PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_err);
12123         __Pyx_GIVEREF(__pyx_v_err);
12124         __pyx_t_10 = 0;
12125         __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12126         __Pyx_GOTREF(__pyx_t_10);
12127         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12128         __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
12129         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12130       }
12131       __pyx_L8:;
12132       goto __pyx_L6;
12133     }
12134     __pyx_L6:;
12135   }
12136   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12137   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12138
12139   /* "cvcf.pyx":578
12140  *                     self.error(line,self.BADLY_FORMATTED_HEADING,err)
12141  * 
12142  *         self._samples = headings[9:]             # <<<<<<<<<<<<<<
12143  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )
12144  * 
12145  */
12146   __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_headings, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12147   __Pyx_GOTREF(__pyx_t_2);
12148   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___samples, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12149   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12150
12151   /* "cvcf.pyx":579
12152  * 
12153  *         self._samples = headings[9:]
12154  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )             # <<<<<<<<<<<<<<
12155  * 
12156  *     def write_heading( self, stream ):
12157  */
12158   __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12159   __Pyx_GOTREF(__pyx_t_2);
12160   __Pyx_INCREF(__pyx_int_0);
12161   __pyx_t_1 = __pyx_int_0;
12162   __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12163   __Pyx_GOTREF(__pyx_t_10);
12164   if (PyList_CheckExact(__pyx_t_10) || PyTuple_CheckExact(__pyx_t_10)) {
12165     __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
12166     __pyx_t_8 = NULL;
12167   } else {
12168     __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12169     __Pyx_GOTREF(__pyx_t_11);
12170     __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext;
12171   }
12172   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12173   for (;;) {
12174     if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_11)) {
12175       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
12176       __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
12177     } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_11)) {
12178       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
12179       __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
12180     } else {
12181       __pyx_t_10 = __pyx_t_8(__pyx_t_11);
12182       if (unlikely(!__pyx_t_10)) {
12183         if (PyErr_Occurred()) {
12184           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
12185           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12186         }
12187         break;
12188       }
12189       __Pyx_GOTREF(__pyx_t_10);
12190     }
12191     __Pyx_XDECREF(__pyx_v_y);
12192     __pyx_v_y = __pyx_t_10;
12193     __pyx_t_10 = 0;
12194     __Pyx_INCREF(__pyx_t_1);
12195     __Pyx_XDECREF(__pyx_v_x);
12196     __pyx_v_x = __pyx_t_1;
12197     __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12198     __Pyx_GOTREF(__pyx_t_10);
12199     __Pyx_DECREF(__pyx_t_1);
12200     __pyx_t_1 = __pyx_t_10;
12201     __pyx_t_10 = 0;
12202     __pyx_t_10 = PyNumber_Add(__pyx_v_x, __pyx_int_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12203     __Pyx_GOTREF(__pyx_t_10);
12204     __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12205     __Pyx_GOTREF(__pyx_t_7);
12206     __Pyx_INCREF(__pyx_v_y);
12207     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_y);
12208     __Pyx_GIVEREF(__pyx_v_y);
12209     PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_10);
12210     __Pyx_GIVEREF(__pyx_t_10);
12211     __pyx_t_10 = 0;
12212     if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12213     __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
12214   }
12215   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12216   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12217   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12218   __Pyx_GOTREF(__pyx_t_1);
12219   __Pyx_INCREF(((PyObject *)__pyx_t_2));
12220   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
12221   __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
12222   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12223   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12224   __Pyx_GOTREF(__pyx_t_2);
12225   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
12226   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___sample2column, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12227   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12228
12229   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12230   goto __pyx_L0;
12231   __pyx_L1_error:;
12232   __Pyx_XDECREF(__pyx_t_1);
12233   __Pyx_XDECREF(__pyx_t_2);
12234   __Pyx_XDECREF(__pyx_t_7);
12235   __Pyx_XDECREF(__pyx_t_10);
12236   __Pyx_XDECREF(__pyx_t_11);
12237   __Pyx_AddTraceback("cvcf.VCF.parse_heading", __pyx_clineno, __pyx_lineno, __pyx_filename);
12238   __pyx_r = NULL;
12239   __pyx_L0:;
12240   __Pyx_XDECREF(__pyx_v_headings);
12241   __Pyx_XDECREF(__pyx_v_i);
12242   __Pyx_XDECREF(__pyx_v_s);
12243   __Pyx_XDECREF(__pyx_v_err);
12244   __Pyx_XDECREF(__pyx_v_x);
12245   __Pyx_XDECREF(__pyx_v_y);
12246   __Pyx_XGIVEREF(__pyx_r);
12247   __Pyx_RefNannyFinishContext();
12248   return __pyx_r;
12249 }
12250
12251 /* Python wrapper */
12252 static PyObject *__pyx_pw_4cvcf_3VCF_23write_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12253 static PyMethodDef __pyx_mdef_4cvcf_3VCF_23write_heading = {__Pyx_NAMESTR("write_heading"), (PyCFunction)__pyx_pw_4cvcf_3VCF_23write_heading, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
12254 static PyObject *__pyx_pw_4cvcf_3VCF_23write_heading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12255   PyObject *__pyx_v_self = 0;
12256   PyObject *__pyx_v_stream = 0;
12257   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
12258   PyObject *__pyx_r = 0;
12259   __Pyx_RefNannyDeclarations
12260   __Pyx_RefNannySetupContext("write_heading (wrapper)", 0);
12261   __pyx_self = __pyx_self;
12262   {
12263     PyObject* values[2] = {0,0};
12264     if (unlikely(__pyx_kwds)) {
12265       Py_ssize_t kw_args;
12266       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12267       switch (pos_args) {
12268         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12269         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12270         case  0: break;
12271         default: goto __pyx_L5_argtuple_error;
12272       }
12273       kw_args = PyDict_Size(__pyx_kwds);
12274       switch (pos_args) {
12275         case  0:
12276         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
12277         if (likely(values[0])) kw_args--;
12278         else goto __pyx_L5_argtuple_error;
12279         case  1:
12280         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream);
12281         if (likely(values[1])) kw_args--;
12282         else {
12283           __Pyx_RaiseArgtupleInvalid("write_heading", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12284         }
12285       }
12286       if (unlikely(kw_args > 0)) {
12287         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_heading") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12288       }
12289     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12290       goto __pyx_L5_argtuple_error;
12291     } else {
12292       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12293       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12294     }
12295     __pyx_v_self = values[0];
12296     __pyx_v_stream = values[1];
12297   }
12298   goto __pyx_L4_argument_unpacking_done;
12299   __pyx_L5_argtuple_error:;
12300   __Pyx_RaiseArgtupleInvalid("write_heading", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12301   __pyx_L3_error:;
12302   __Pyx_AddTraceback("cvcf.VCF.write_heading", __pyx_clineno, __pyx_lineno, __pyx_filename);
12303   __Pyx_RefNannyFinishContext();
12304   return NULL;
12305   __pyx_L4_argument_unpacking_done:;
12306   __pyx_r = __pyx_pf_4cvcf_3VCF_22write_heading(__pyx_self, __pyx_v_self, __pyx_v_stream);
12307   __Pyx_RefNannyFinishContext();
12308   return __pyx_r;
12309 }
12310
12311 /* "cvcf.pyx":581
12312  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )
12313  * 
12314  *     def write_heading( self, stream ):             # <<<<<<<<<<<<<<
12315  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
12316  * 
12317  */
12318
12319 static PyObject *__pyx_pf_4cvcf_3VCF_22write_heading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
12320   PyObject *__pyx_r = NULL;
12321   __Pyx_RefNannyDeclarations
12322   PyObject *__pyx_t_1 = NULL;
12323   PyObject *__pyx_t_2 = NULL;
12324   PyObject *__pyx_t_3 = NULL;
12325   PyObject *__pyx_t_4 = NULL;
12326   PyObject *__pyx_t_5 = NULL;
12327   int __pyx_lineno = 0;
12328   const char *__pyx_filename = NULL;
12329   int __pyx_clineno = 0;
12330   __Pyx_RefNannySetupContext("write_heading", 0);
12331
12332   /* "cvcf.pyx":582
12333  * 
12334  *     def write_heading( self, stream ):
12335  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")             # <<<<<<<<<<<<<<
12336  * 
12337  *     def convertGT(self, GTstring):
12338  */
12339   __pyx_t_1 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12340   __Pyx_GOTREF(__pyx_t_1);
12341   __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_88), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12342   __Pyx_GOTREF(__pyx_t_2);
12343   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___required); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12344   __Pyx_GOTREF(__pyx_t_3);
12345   __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12346   __Pyx_GOTREF(__pyx_t_4);
12347   __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12348   __Pyx_GOTREF(__pyx_t_5);
12349   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12350   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12351   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12352   __Pyx_GOTREF(__pyx_t_4);
12353   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
12354   __Pyx_GIVEREF(__pyx_t_5);
12355   __pyx_t_5 = 0;
12356   __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12357   __Pyx_GOTREF(__pyx_t_5);
12358   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12359   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
12360   __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_kp_s_85), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12361   __Pyx_GOTREF(__pyx_t_4);
12362   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12363   __pyx_t_5 = PyNumber_Add(__pyx_t_4, ((PyObject *)__pyx_kp_s_94)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12364   __Pyx_GOTREF(__pyx_t_5);
12365   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12366   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12367   __Pyx_GOTREF(__pyx_t_4);
12368   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
12369   __Pyx_GIVEREF(__pyx_t_5);
12370   __pyx_t_5 = 0;
12371   __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12372   __Pyx_GOTREF(__pyx_t_5);
12373   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12374   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
12375   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12376
12377   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12378   goto __pyx_L0;
12379   __pyx_L1_error:;
12380   __Pyx_XDECREF(__pyx_t_1);
12381   __Pyx_XDECREF(__pyx_t_2);
12382   __Pyx_XDECREF(__pyx_t_3);
12383   __Pyx_XDECREF(__pyx_t_4);
12384   __Pyx_XDECREF(__pyx_t_5);
12385   __Pyx_AddTraceback("cvcf.VCF.write_heading", __pyx_clineno, __pyx_lineno, __pyx_filename);
12386   __pyx_r = NULL;
12387   __pyx_L0:;
12388   __Pyx_XGIVEREF(__pyx_r);
12389   __Pyx_RefNannyFinishContext();
12390   return __pyx_r;
12391 }
12392
12393 /* Python wrapper */
12394 static PyObject *__pyx_pw_4cvcf_3VCF_25convertGT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12395 static PyMethodDef __pyx_mdef_4cvcf_3VCF_25convertGT = {__Pyx_NAMESTR("convertGT"), (PyCFunction)__pyx_pw_4cvcf_3VCF_25convertGT, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
12396 static PyObject *__pyx_pw_4cvcf_3VCF_25convertGT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12397   PyObject *__pyx_v_self = 0;
12398   PyObject *__pyx_v_GTstring = 0;
12399   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__GTstring,0};
12400   PyObject *__pyx_r = 0;
12401   __Pyx_RefNannyDeclarations
12402   __Pyx_RefNannySetupContext("convertGT (wrapper)", 0);
12403   __pyx_self = __pyx_self;
12404   {
12405     PyObject* values[2] = {0,0};
12406     if (unlikely(__pyx_kwds)) {
12407       Py_ssize_t kw_args;
12408       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12409       switch (pos_args) {
12410         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12411         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12412         case  0: break;
12413         default: goto __pyx_L5_argtuple_error;
12414       }
12415       kw_args = PyDict_Size(__pyx_kwds);
12416       switch (pos_args) {
12417         case  0:
12418         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
12419         if (likely(values[0])) kw_args--;
12420         else goto __pyx_L5_argtuple_error;
12421         case  1:
12422         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__GTstring);
12423         if (likely(values[1])) kw_args--;
12424         else {
12425           __Pyx_RaiseArgtupleInvalid("convertGT", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12426         }
12427       }
12428       if (unlikely(kw_args > 0)) {
12429         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convertGT") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12430       }
12431     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12432       goto __pyx_L5_argtuple_error;
12433     } else {
12434       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12435       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12436     }
12437     __pyx_v_self = values[0];
12438     __pyx_v_GTstring = values[1];
12439   }
12440   goto __pyx_L4_argument_unpacking_done;
12441   __pyx_L5_argtuple_error:;
12442   __Pyx_RaiseArgtupleInvalid("convertGT", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12443   __pyx_L3_error:;
12444   __Pyx_AddTraceback("cvcf.VCF.convertGT", __pyx_clineno, __pyx_lineno, __pyx_filename);
12445   __Pyx_RefNannyFinishContext();
12446   return NULL;
12447   __pyx_L4_argument_unpacking_done:;
12448   __pyx_r = __pyx_pf_4cvcf_3VCF_24convertGT(__pyx_self, __pyx_v_self, __pyx_v_GTstring);
12449   __Pyx_RefNannyFinishContext();
12450   return __pyx_r;
12451 }
12452
12453 /* "cvcf.pyx":584
12454  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
12455  * 
12456  *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
12457  *         if GTstring == ".": return ["."]
12458  *         try:
12459  */
12460
12461 static PyObject *__pyx_pf_4cvcf_3VCF_24convertGT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_GTstring) {
12462   PyObject *__pyx_v_gts = NULL;
12463   PyObject *__pyx_r = NULL;
12464   __Pyx_RefNannyDeclarations
12465   int __pyx_t_1;
12466   PyObject *__pyx_t_2 = NULL;
12467   PyObject *__pyx_t_3 = NULL;
12468   PyObject *__pyx_t_4 = NULL;
12469   PyObject *__pyx_t_5 = NULL;
12470   PyObject *__pyx_t_6 = NULL;
12471   PyObject *__pyx_t_7 = NULL;
12472   Py_ssize_t __pyx_t_8;
12473   int __pyx_t_9;
12474   int __pyx_t_10;
12475   Py_ssize_t __pyx_t_11;
12476   PyObject *__pyx_t_12 = NULL;
12477   int __pyx_t_13;
12478   PyObject *__pyx_t_14 = NULL;
12479   PyObject *__pyx_t_15 = NULL;
12480   PyObject *__pyx_t_16 = NULL;
12481   int __pyx_lineno = 0;
12482   const char *__pyx_filename = NULL;
12483   int __pyx_clineno = 0;
12484   __Pyx_RefNannySetupContext("convertGT", 0);
12485
12486   /* "cvcf.pyx":585
12487  * 
12488  *     def convertGT(self, GTstring):
12489  *         if GTstring == ".": return ["."]             # <<<<<<<<<<<<<<
12490  *         try:
12491  *             gts = gtsRegEx.split(GTstring)
12492  */
12493   __pyx_t_1 = __Pyx_PyString_Equals(__pyx_v_GTstring, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12494   if (__pyx_t_1) {
12495     __Pyx_XDECREF(__pyx_r);
12496     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12497     __Pyx_GOTREF(__pyx_t_2);
12498     __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
12499     PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_9));
12500     __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
12501     __pyx_r = ((PyObject *)__pyx_t_2);
12502     __pyx_t_2 = 0;
12503     goto __pyx_L0;
12504     goto __pyx_L3;
12505   }
12506   __pyx_L3:;
12507
12508   /* "cvcf.pyx":586
12509  *     def convertGT(self, GTstring):
12510  *         if GTstring == ".": return ["."]
12511  *         try:             # <<<<<<<<<<<<<<
12512  *             gts = gtsRegEx.split(GTstring)
12513  *             if len(gts) == 1: return [int(gts[0])]
12514  */
12515   {
12516     __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
12517     __Pyx_XGOTREF(__pyx_t_3);
12518     __Pyx_XGOTREF(__pyx_t_4);
12519     __Pyx_XGOTREF(__pyx_t_5);
12520     /*try:*/ {
12521
12522       /* "cvcf.pyx":587
12523  *         if GTstring == ".": return ["."]
12524  *         try:
12525  *             gts = gtsRegEx.split(GTstring)             # <<<<<<<<<<<<<<
12526  *             if len(gts) == 1: return [int(gts[0])]
12527  *             if len(gts) != 2: raise ValueError()
12528  */
12529       __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__gtsRegEx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12530       __Pyx_GOTREF(__pyx_t_2);
12531       __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__split); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12532       __Pyx_GOTREF(__pyx_t_6);
12533       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12534       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12535       __Pyx_GOTREF(__pyx_t_2);
12536       __Pyx_INCREF(__pyx_v_GTstring);
12537       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_GTstring);
12538       __Pyx_GIVEREF(__pyx_v_GTstring);
12539       __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12540       __Pyx_GOTREF(__pyx_t_7);
12541       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12542       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12543       __pyx_v_gts = __pyx_t_7;
12544       __pyx_t_7 = 0;
12545
12546       /* "cvcf.pyx":588
12547  *         try:
12548  *             gts = gtsRegEx.split(GTstring)
12549  *             if len(gts) == 1: return [int(gts[0])]             # <<<<<<<<<<<<<<
12550  *             if len(gts) != 2: raise ValueError()
12551  *             if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]]
12552  */
12553       __pyx_t_8 = PyObject_Length(__pyx_v_gts); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12554       __pyx_t_1 = (__pyx_t_8 == 1);
12555       if (__pyx_t_1) {
12556         __Pyx_XDECREF(__pyx_r);
12557         __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12558         __Pyx_GOTREF(__pyx_t_7);
12559         __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12560         __Pyx_GOTREF(__pyx_t_2);
12561         PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
12562         __Pyx_GIVEREF(__pyx_t_7);
12563         __pyx_t_7 = 0;
12564         __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12565         __Pyx_GOTREF(__pyx_t_7);
12566         __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12567         __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12568         __Pyx_GOTREF(__pyx_t_2);
12569         PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
12570         __Pyx_GIVEREF(__pyx_t_7);
12571         __pyx_t_7 = 0;
12572         __pyx_r = ((PyObject *)__pyx_t_2);
12573         __pyx_t_2 = 0;
12574         goto __pyx_L8_try_return;
12575         goto __pyx_L12;
12576       }
12577       __pyx_L12:;
12578
12579       /* "cvcf.pyx":589
12580  *             gts = gtsRegEx.split(GTstring)
12581  *             if len(gts) == 1: return [int(gts[0])]
12582  *             if len(gts) != 2: raise ValueError()             # <<<<<<<<<<<<<<
12583  *             if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]]
12584  *             return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])]
12585  */
12586       __pyx_t_8 = PyObject_Length(__pyx_v_gts); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12587       __pyx_t_1 = (__pyx_t_8 != 2);
12588       if (__pyx_t_1) {
12589         __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12590         __Pyx_GOTREF(__pyx_t_2);
12591         __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12592         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12593         {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12594         goto __pyx_L13;
12595       }
12596       __pyx_L13:;
12597
12598       /* "cvcf.pyx":590
12599  *             if len(gts) == 1: return [int(gts[0])]
12600  *             if len(gts) != 2: raise ValueError()
12601  *             if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]]             # <<<<<<<<<<<<<<
12602  *             return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])]
12603  *         except ValueError:
12604  */
12605       __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12606       __Pyx_GOTREF(__pyx_t_2);
12607       __pyx_t_1 = __Pyx_PyString_Equals(__pyx_t_2, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12608       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12609       if (__pyx_t_1) {
12610         __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12611         __Pyx_GOTREF(__pyx_t_2);
12612         __pyx_t_9 = __Pyx_PyString_Equals(__pyx_t_2, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12613         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12614         __pyx_t_10 = __pyx_t_9;
12615       } else {
12616         __pyx_t_10 = __pyx_t_1;
12617       }
12618       if (__pyx_t_10) {
12619         __Pyx_XDECREF(__pyx_r);
12620         __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12621         __Pyx_GOTREF(__pyx_t_2);
12622         __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12623         __Pyx_GOTREF(__pyx_t_7);
12624         __pyx_t_8 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12625         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12626         __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12627         __Pyx_GOTREF(__pyx_t_7);
12628         __pyx_t_11 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12629         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12630         __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v_GTstring, __pyx_t_8, (-__pyx_t_11)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12631         __Pyx_GOTREF(__pyx_t_7);
12632         __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12633         __Pyx_GOTREF(__pyx_t_6);
12634         __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12635         __Pyx_GOTREF(__pyx_t_12);
12636         PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_2);
12637         __Pyx_GIVEREF(__pyx_t_2);
12638         PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_7);
12639         __Pyx_GIVEREF(__pyx_t_7);
12640         PyList_SET_ITEM(__pyx_t_12, 2, __pyx_t_6);
12641         __Pyx_GIVEREF(__pyx_t_6);
12642         __pyx_t_2 = 0;
12643         __pyx_t_7 = 0;
12644         __pyx_t_6 = 0;
12645         __pyx_r = ((PyObject *)__pyx_t_12);
12646         __pyx_t_12 = 0;
12647         goto __pyx_L8_try_return;
12648         goto __pyx_L14;
12649       }
12650       __pyx_L14:;
12651
12652       /* "cvcf.pyx":591
12653  *             if len(gts) != 2: raise ValueError()
12654  *             if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]]
12655  *             return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])]             # <<<<<<<<<<<<<<
12656  *         except ValueError:
12657  *             self.error(self._line,self.BAD_GENOTYPE,GTstring)
12658  */
12659       __Pyx_XDECREF(__pyx_r);
12660       __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12661       __Pyx_GOTREF(__pyx_t_12);
12662       __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12663       __Pyx_GOTREF(__pyx_t_6);
12664       PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12);
12665       __Pyx_GIVEREF(__pyx_t_12);
12666       __pyx_t_12 = 0;
12667       __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12668       __Pyx_GOTREF(__pyx_t_12);
12669       __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
12670       __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_gts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12671       __Pyx_GOTREF(__pyx_t_6);
12672       __pyx_t_11 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12673       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12674       __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12675       __Pyx_GOTREF(__pyx_t_6);
12676       __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12677       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12678       __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_GTstring, __pyx_t_11, (-__pyx_t_8)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12679       __Pyx_GOTREF(__pyx_t_6);
12680       __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_gts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12681       __Pyx_GOTREF(__pyx_t_7);
12682       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12683       __Pyx_GOTREF(__pyx_t_2);
12684       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
12685       __Pyx_GIVEREF(__pyx_t_7);
12686       __pyx_t_7 = 0;
12687       __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12688       __Pyx_GOTREF(__pyx_t_7);
12689       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12690       __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12691       __Pyx_GOTREF(__pyx_t_2);
12692       PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_12);
12693       __Pyx_GIVEREF(__pyx_t_12);
12694       PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
12695       __Pyx_GIVEREF(__pyx_t_6);
12696       PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_7);
12697       __Pyx_GIVEREF(__pyx_t_7);
12698       __pyx_t_12 = 0;
12699       __pyx_t_6 = 0;
12700       __pyx_t_7 = 0;
12701       __pyx_r = ((PyObject *)__pyx_t_2);
12702       __pyx_t_2 = 0;
12703       goto __pyx_L8_try_return;
12704     }
12705     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12706     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12707     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12708     goto __pyx_L11_try_end;
12709     __pyx_L8_try_return:;
12710     __Pyx_XGIVEREF(__pyx_t_3);
12711     __Pyx_XGIVEREF(__pyx_t_4);
12712     __Pyx_XGIVEREF(__pyx_t_5);
12713     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
12714     goto __pyx_L0;
12715     __pyx_L4_error:;
12716     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
12717     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12718     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12719     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12720
12721     /* "cvcf.pyx":592
12722  *             if gts[0] == "." and gts[1] == ".": return [gts[0],GTstring[len(gts[0]):-len(gts[1])],gts[1]]
12723  *             return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])]
12724  *         except ValueError:             # <<<<<<<<<<<<<<
12725  *             self.error(self._line,self.BAD_GENOTYPE,GTstring)
12726  *             return [".","|","."]
12727  */
12728     __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
12729     if (__pyx_t_13) {
12730       __Pyx_AddTraceback("cvcf.VCF.convertGT", __pyx_clineno, __pyx_lineno, __pyx_filename);
12731       if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12732       __Pyx_GOTREF(__pyx_t_2);
12733       __Pyx_GOTREF(__pyx_t_7);
12734       __Pyx_GOTREF(__pyx_t_6);
12735
12736       /* "cvcf.pyx":593
12737  *             return [int(gts[0]),GTstring[len(gts[0]):-len(gts[1])],int(gts[1])]
12738  *         except ValueError:
12739  *             self.error(self._line,self.BAD_GENOTYPE,GTstring)             # <<<<<<<<<<<<<<
12740  *             return [".","|","."]
12741  * 
12742  */
12743       __pyx_t_12 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12744       __Pyx_GOTREF(__pyx_t_12);
12745       __pyx_t_14 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___line); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12746       __Pyx_GOTREF(__pyx_t_14);
12747       __pyx_t_15 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__BAD_GENOTYPE); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12748       __Pyx_GOTREF(__pyx_t_15);
12749       __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12750       __Pyx_GOTREF(__pyx_t_16);
12751       PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14);
12752       __Pyx_GIVEREF(__pyx_t_14);
12753       PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_15);
12754       __Pyx_GIVEREF(__pyx_t_15);
12755       __Pyx_INCREF(__pyx_v_GTstring);
12756       PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_v_GTstring);
12757       __Pyx_GIVEREF(__pyx_v_GTstring);
12758       __pyx_t_14 = 0;
12759       __pyx_t_15 = 0;
12760       __pyx_t_15 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12761       __Pyx_GOTREF(__pyx_t_15);
12762       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12763       __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
12764       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
12765
12766       /* "cvcf.pyx":594
12767  *         except ValueError:
12768  *             self.error(self._line,self.BAD_GENOTYPE,GTstring)
12769  *             return [".","|","."]             # <<<<<<<<<<<<<<
12770  * 
12771  *     def convertGTback(self, GTdata):
12772  */
12773       __Pyx_XDECREF(__pyx_r);
12774       __pyx_t_15 = PyList_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12775       __Pyx_GOTREF(__pyx_t_15);
12776       __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
12777       PyList_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_kp_s_9));
12778       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
12779       __Pyx_INCREF(((PyObject *)__pyx_kp_s_95));
12780       PyList_SET_ITEM(__pyx_t_15, 1, ((PyObject *)__pyx_kp_s_95));
12781       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_95));
12782       __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
12783       PyList_SET_ITEM(__pyx_t_15, 2, ((PyObject *)__pyx_kp_s_9));
12784       __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
12785       __pyx_r = ((PyObject *)__pyx_t_15);
12786       __pyx_t_15 = 0;
12787       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12788       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12789       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12790       goto __pyx_L7_except_return;
12791       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12792       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12793       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12794       goto __pyx_L5_exception_handled;
12795     }
12796     __pyx_L6_except_error:;
12797     __Pyx_XGIVEREF(__pyx_t_3);
12798     __Pyx_XGIVEREF(__pyx_t_4);
12799     __Pyx_XGIVEREF(__pyx_t_5);
12800     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
12801     goto __pyx_L1_error;
12802     __pyx_L7_except_return:;
12803     __Pyx_XGIVEREF(__pyx_t_3);
12804     __Pyx_XGIVEREF(__pyx_t_4);
12805     __Pyx_XGIVEREF(__pyx_t_5);
12806     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
12807     goto __pyx_L0;
12808     __pyx_L5_exception_handled:;
12809     __Pyx_XGIVEREF(__pyx_t_3);
12810     __Pyx_XGIVEREF(__pyx_t_4);
12811     __Pyx_XGIVEREF(__pyx_t_5);
12812     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
12813     __pyx_L11_try_end:;
12814   }
12815
12816   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12817   goto __pyx_L0;
12818   __pyx_L1_error:;
12819   __Pyx_XDECREF(__pyx_t_2);
12820   __Pyx_XDECREF(__pyx_t_6);
12821   __Pyx_XDECREF(__pyx_t_7);
12822   __Pyx_XDECREF(__pyx_t_12);
12823   __Pyx_XDECREF(__pyx_t_14);
12824   __Pyx_XDECREF(__pyx_t_15);
12825   __Pyx_XDECREF(__pyx_t_16);
12826   __Pyx_AddTraceback("cvcf.VCF.convertGT", __pyx_clineno, __pyx_lineno, __pyx_filename);
12827   __pyx_r = NULL;
12828   __pyx_L0:;
12829   __Pyx_XDECREF(__pyx_v_gts);
12830   __Pyx_XGIVEREF(__pyx_r);
12831   __Pyx_RefNannyFinishContext();
12832   return __pyx_r;
12833 }
12834
12835 /* Python wrapper */
12836 static PyObject *__pyx_pw_4cvcf_3VCF_27convertGTback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12837 static PyMethodDef __pyx_mdef_4cvcf_3VCF_27convertGTback = {__Pyx_NAMESTR("convertGTback"), (PyCFunction)__pyx_pw_4cvcf_3VCF_27convertGTback, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
12838 static PyObject *__pyx_pw_4cvcf_3VCF_27convertGTback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12839   CYTHON_UNUSED PyObject *__pyx_v_self = 0;
12840   PyObject *__pyx_v_GTdata = 0;
12841   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__GTdata,0};
12842   PyObject *__pyx_r = 0;
12843   __Pyx_RefNannyDeclarations
12844   __Pyx_RefNannySetupContext("convertGTback (wrapper)", 0);
12845   __pyx_self = __pyx_self;
12846   {
12847     PyObject* values[2] = {0,0};
12848     if (unlikely(__pyx_kwds)) {
12849       Py_ssize_t kw_args;
12850       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12851       switch (pos_args) {
12852         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12853         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12854         case  0: break;
12855         default: goto __pyx_L5_argtuple_error;
12856       }
12857       kw_args = PyDict_Size(__pyx_kwds);
12858       switch (pos_args) {
12859         case  0:
12860         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
12861         if (likely(values[0])) kw_args--;
12862         else goto __pyx_L5_argtuple_error;
12863         case  1:
12864         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__GTdata);
12865         if (likely(values[1])) kw_args--;
12866         else {
12867           __Pyx_RaiseArgtupleInvalid("convertGTback", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12868         }
12869       }
12870       if (unlikely(kw_args > 0)) {
12871         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convertGTback") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12872       }
12873     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12874       goto __pyx_L5_argtuple_error;
12875     } else {
12876       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12877       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12878     }
12879     __pyx_v_self = values[0];
12880     __pyx_v_GTdata = values[1];
12881   }
12882   goto __pyx_L4_argument_unpacking_done;
12883   __pyx_L5_argtuple_error:;
12884   __Pyx_RaiseArgtupleInvalid("convertGTback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12885   __pyx_L3_error:;
12886   __Pyx_AddTraceback("cvcf.VCF.convertGTback", __pyx_clineno, __pyx_lineno, __pyx_filename);
12887   __Pyx_RefNannyFinishContext();
12888   return NULL;
12889   __pyx_L4_argument_unpacking_done:;
12890   __pyx_r = __pyx_pf_4cvcf_3VCF_26convertGTback(__pyx_self, __pyx_v_self, __pyx_v_GTdata);
12891   __Pyx_RefNannyFinishContext();
12892   return __pyx_r;
12893 }
12894
12895 /* "cvcf.pyx":596
12896  *             return [".","|","."]
12897  * 
12898  *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
12899  *         return ''.join(map(str,GTdata))
12900  * 
12901  */
12902
12903 static PyObject *__pyx_pf_4cvcf_3VCF_26convertGTback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_GTdata) {
12904   PyObject *__pyx_r = NULL;
12905   __Pyx_RefNannyDeclarations
12906   PyObject *__pyx_t_1 = NULL;
12907   PyObject *__pyx_t_2 = NULL;
12908   PyObject *__pyx_t_3 = NULL;
12909   int __pyx_lineno = 0;
12910   const char *__pyx_filename = NULL;
12911   int __pyx_clineno = 0;
12912   __Pyx_RefNannySetupContext("convertGTback", 0);
12913
12914   /* "cvcf.pyx":597
12915  * 
12916  *     def convertGTback(self, GTdata):
12917  *         return ''.join(map(str,GTdata))             # <<<<<<<<<<<<<<
12918  * 
12919  *     def parse_formatdata( self, key, value, formatdict, line ):
12920  */
12921   __Pyx_XDECREF(__pyx_r);
12922   __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12923   __Pyx_GOTREF(__pyx_t_1);
12924   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12925   __Pyx_GOTREF(__pyx_t_2);
12926   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
12927   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
12928   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
12929   __Pyx_INCREF(__pyx_v_GTdata);
12930   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_GTdata);
12931   __Pyx_GIVEREF(__pyx_v_GTdata);
12932   __pyx_t_3 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12933   __Pyx_GOTREF(__pyx_t_3);
12934   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12935   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12936   __Pyx_GOTREF(__pyx_t_2);
12937   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
12938   __Pyx_GIVEREF(__pyx_t_3);
12939   __pyx_t_3 = 0;
12940   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12941   __Pyx_GOTREF(__pyx_t_3);
12942   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12943   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12944   __pyx_r = __pyx_t_3;
12945   __pyx_t_3 = 0;
12946   goto __pyx_L0;
12947
12948   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12949   goto __pyx_L0;
12950   __pyx_L1_error:;
12951   __Pyx_XDECREF(__pyx_t_1);
12952   __Pyx_XDECREF(__pyx_t_2);
12953   __Pyx_XDECREF(__pyx_t_3);
12954   __Pyx_AddTraceback("cvcf.VCF.convertGTback", __pyx_clineno, __pyx_lineno, __pyx_filename);
12955   __pyx_r = NULL;
12956   __pyx_L0:;
12957   __Pyx_XGIVEREF(__pyx_r);
12958   __Pyx_RefNannyFinishContext();
12959   return __pyx_r;
12960 }
12961
12962 /* Python wrapper */
12963 static PyObject *__pyx_pw_4cvcf_3VCF_29parse_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12964 static PyMethodDef __pyx_mdef_4cvcf_3VCF_29parse_formatdata = {__Pyx_NAMESTR("parse_formatdata"), (PyCFunction)__pyx_pw_4cvcf_3VCF_29parse_formatdata, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
12965 static PyObject *__pyx_pw_4cvcf_3VCF_29parse_formatdata(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12966   PyObject *__pyx_v_self = 0;
12967   PyObject *__pyx_v_key = 0;
12968   PyObject *__pyx_v_value = 0;
12969   PyObject *__pyx_v_formatdict = 0;
12970   PyObject *__pyx_v_line = 0;
12971   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__key,&__pyx_n_s__value,&__pyx_n_s__formatdict,&__pyx_n_s__line,0};
12972   PyObject *__pyx_r = 0;
12973   __Pyx_RefNannyDeclarations
12974   __Pyx_RefNannySetupContext("parse_formatdata (wrapper)", 0);
12975   __pyx_self = __pyx_self;
12976   {
12977     PyObject* values[5] = {0,0,0,0,0};
12978     if (unlikely(__pyx_kwds)) {
12979       Py_ssize_t kw_args;
12980       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12981       switch (pos_args) {
12982         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
12983         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12984         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12985         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12986         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12987         case  0: break;
12988         default: goto __pyx_L5_argtuple_error;
12989       }
12990       kw_args = PyDict_Size(__pyx_kwds);
12991       switch (pos_args) {
12992         case  0:
12993         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
12994         if (likely(values[0])) kw_args--;
12995         else goto __pyx_L5_argtuple_error;
12996         case  1:
12997         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
12998         if (likely(values[1])) kw_args--;
12999         else {
13000           __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13001         }
13002         case  2:
13003         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
13004         if (likely(values[2])) kw_args--;
13005         else {
13006           __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13007         }
13008         case  3:
13009         values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__formatdict);
13010         if (likely(values[3])) kw_args--;
13011         else {
13012           __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13013         }
13014         case  4:
13015         values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line);
13016         if (likely(values[4])) kw_args--;
13017         else {
13018           __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13019         }
13020       }
13021       if (unlikely(kw_args > 0)) {
13022         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_formatdata") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13023       }
13024     } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
13025       goto __pyx_L5_argtuple_error;
13026     } else {
13027       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13028       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13029       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13030       values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13031       values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13032     }
13033     __pyx_v_self = values[0];
13034     __pyx_v_key = values[1];
13035     __pyx_v_value = values[2];
13036     __pyx_v_formatdict = values[3];
13037     __pyx_v_line = values[4];
13038   }
13039   goto __pyx_L4_argument_unpacking_done;
13040   __pyx_L5_argtuple_error:;
13041   __Pyx_RaiseArgtupleInvalid("parse_formatdata", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13042   __pyx_L3_error:;
13043   __Pyx_AddTraceback("cvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
13044   __Pyx_RefNannyFinishContext();
13045   return NULL;
13046   __pyx_L4_argument_unpacking_done:;
13047   __pyx_r = __pyx_pf_4cvcf_3VCF_28parse_formatdata(__pyx_self, __pyx_v_self, __pyx_v_key, __pyx_v_value, __pyx_v_formatdict, __pyx_v_line);
13048   __Pyx_RefNannyFinishContext();
13049   return __pyx_r;
13050 }
13051
13052 /* "cvcf.pyx":599
13053  *         return ''.join(map(str,GTdata))
13054  * 
13055  *     def parse_formatdata( self, key, value, formatdict, line ):             # <<<<<<<<<<<<<<
13056  *         # To do: check that the right number of values is present
13057  *         f = formatdict.get(key,None)
13058  */
13059
13060 static PyObject *__pyx_pf_4cvcf_3VCF_28parse_formatdata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_formatdict, PyObject *__pyx_v_line) {
13061   PyObject *__pyx_v_f = NULL;
13062   PyObject *__pyx_v_values = NULL;
13063   PyObject *__pyx_v_idx = NULL;
13064   PyObject *__pyx_v_v = NULL;
13065   PyObject *__pyx_r = NULL;
13066   __Pyx_RefNannyDeclarations
13067   PyObject *__pyx_t_1 = NULL;
13068   PyObject *__pyx_t_2 = NULL;
13069   PyObject *__pyx_t_3 = NULL;
13070   int __pyx_t_4;
13071   int __pyx_t_5;
13072   int __pyx_t_6;
13073   Py_ssize_t __pyx_t_7;
13074   int __pyx_t_8;
13075   PyObject *__pyx_t_9 = NULL;
13076   PyObject *(*__pyx_t_10)(PyObject *);
13077   PyObject *__pyx_t_11 = NULL;
13078   PyObject *__pyx_t_12 = NULL;
13079   PyObject *__pyx_t_13 = NULL;
13080   PyObject *__pyx_t_14 = NULL;
13081   PyObject *__pyx_t_15 = NULL;
13082   PyObject *__pyx_t_16 = NULL;
13083   PyObject *__pyx_t_17 = NULL;
13084   PyObject *__pyx_t_18 = NULL;
13085   Py_ssize_t __pyx_t_19;
13086   int __pyx_lineno = 0;
13087   const char *__pyx_filename = NULL;
13088   int __pyx_clineno = 0;
13089   __Pyx_RefNannySetupContext("parse_formatdata", 0);
13090
13091   /* "cvcf.pyx":601
13092  *     def parse_formatdata( self, key, value, formatdict, line ):
13093  *         # To do: check that the right number of values is present
13094  *         f = formatdict.get(key,None)             # <<<<<<<<<<<<<<
13095  *         if f == None:
13096  *             self._add_definition(formatdict, key, value, line )
13097  */
13098   __pyx_t_1 = PyObject_GetAttr(__pyx_v_formatdict, __pyx_n_s__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13099   __Pyx_GOTREF(__pyx_t_1);
13100   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13101   __Pyx_GOTREF(__pyx_t_2);
13102   __Pyx_INCREF(__pyx_v_key);
13103   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
13104   __Pyx_GIVEREF(__pyx_v_key);
13105   __Pyx_INCREF(Py_None);
13106   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
13107   __Pyx_GIVEREF(Py_None);
13108   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13109   __Pyx_GOTREF(__pyx_t_3);
13110   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13111   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
13112   __pyx_v_f = __pyx_t_3;
13113   __pyx_t_3 = 0;
13114
13115   /* "cvcf.pyx":602
13116  *         # To do: check that the right number of values is present
13117  *         f = formatdict.get(key,None)
13118  *         if f == None:             # <<<<<<<<<<<<<<
13119  *             self._add_definition(formatdict, key, value, line )
13120  *             f = formatdict[key]
13121  */
13122   __pyx_t_3 = PyObject_RichCompare(__pyx_v_f, Py_None, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13123   __Pyx_GOTREF(__pyx_t_3);
13124   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13125   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13126   if (__pyx_t_4) {
13127
13128     /* "cvcf.pyx":603
13129  *         f = formatdict.get(key,None)
13130  *         if f == None:
13131  *             self._add_definition(formatdict, key, value, line )             # <<<<<<<<<<<<<<
13132  *             f = formatdict[key]
13133  *         if f.type == "Flag":
13134  */
13135     __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___add_definition); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13136     __Pyx_GOTREF(__pyx_t_3);
13137     __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13138     __Pyx_GOTREF(__pyx_t_2);
13139     __Pyx_INCREF(__pyx_v_formatdict);
13140     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_formatdict);
13141     __Pyx_GIVEREF(__pyx_v_formatdict);
13142     __Pyx_INCREF(__pyx_v_key);
13143     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_key);
13144     __Pyx_GIVEREF(__pyx_v_key);
13145     __Pyx_INCREF(__pyx_v_value);
13146     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_value);
13147     __Pyx_GIVEREF(__pyx_v_value);
13148     __Pyx_INCREF(__pyx_v_line);
13149     PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_line);
13150     __Pyx_GIVEREF(__pyx_v_line);
13151     __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13152     __Pyx_GOTREF(__pyx_t_1);
13153     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13154     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
13155     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13156
13157     /* "cvcf.pyx":604
13158  *         if f == None:
13159  *             self._add_definition(formatdict, key, value, line )
13160  *             f = formatdict[key]             # <<<<<<<<<<<<<<
13161  *         if f.type == "Flag":
13162  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
13163  */
13164     __pyx_t_1 = PyObject_GetItem(__pyx_v_formatdict, __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13165     __Pyx_GOTREF(__pyx_t_1);
13166     __Pyx_DECREF(__pyx_v_f);
13167     __pyx_v_f = __pyx_t_1;
13168     __pyx_t_1 = 0;
13169     goto __pyx_L3;
13170   }
13171   __pyx_L3:;
13172
13173   /* "cvcf.pyx":605
13174  *             self._add_definition(formatdict, key, value, line )
13175  *             f = formatdict[key]
13176  *         if f.type == "Flag":             # <<<<<<<<<<<<<<
13177  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
13178  *             return []
13179  */
13180   __pyx_t_1 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13181   __Pyx_GOTREF(__pyx_t_1);
13182   __pyx_t_4 = __Pyx_PyString_Equals(__pyx_t_1, ((PyObject *)__pyx_n_s__Flag), Py_EQ); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13183   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13184   if (__pyx_t_4) {
13185
13186     /* "cvcf.pyx":606
13187  *             f = formatdict[key]
13188  *         if f.type == "Flag":
13189  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)             # <<<<<<<<<<<<<<
13190  *             return []
13191  *         values = value.split(',')
13192  */
13193     __pyx_t_4 = (__pyx_v_value != Py_None);
13194     if (__pyx_t_4) {
13195       __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13196       __Pyx_GOTREF(__pyx_t_1);
13197       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_96); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13198       __Pyx_GOTREF(__pyx_t_2);
13199       __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13200       __Pyx_GOTREF(__pyx_t_3);
13201       __Pyx_INCREF(__pyx_v_line);
13202       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_line);
13203       __Pyx_GIVEREF(__pyx_v_line);
13204       PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
13205       __Pyx_GIVEREF(__pyx_t_2);
13206       __pyx_t_2 = 0;
13207       __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13208       __Pyx_GOTREF(__pyx_t_2);
13209       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13210       __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
13211       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13212       goto __pyx_L5;
13213     }
13214     __pyx_L5:;
13215
13216     /* "cvcf.pyx":607
13217  *         if f.type == "Flag":
13218  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
13219  *             return []             # <<<<<<<<<<<<<<
13220  *         values = value.split(',')
13221  *         # deal with trailing data in some early VCF files
13222  */
13223     __Pyx_XDECREF(__pyx_r);
13224     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13225     __Pyx_GOTREF(__pyx_t_2);
13226     __pyx_r = ((PyObject *)__pyx_t_2);
13227     __pyx_t_2 = 0;
13228     goto __pyx_L0;
13229     goto __pyx_L4;
13230   }
13231   __pyx_L4:;
13232
13233   /* "cvcf.pyx":608
13234  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
13235  *             return []
13236  *         values = value.split(',')             # <<<<<<<<<<<<<<
13237  *         # deal with trailing data in some early VCF files
13238  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
13239  */
13240   __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13241   __Pyx_GOTREF(__pyx_t_2);
13242   __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13243   __Pyx_GOTREF(__pyx_t_3);
13244   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13245   __pyx_v_values = __pyx_t_3;
13246   __pyx_t_3 = 0;
13247
13248   /* "cvcf.pyx":610
13249  *         values = value.split(',')
13250  *         # deal with trailing data in some early VCF files
13251  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:             # <<<<<<<<<<<<<<
13252  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
13253  *             values[-1] = values[-1].split(';')[0]
13254  */
13255   __pyx_t_3 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13256   __Pyx_GOTREF(__pyx_t_3);
13257   __pyx_t_4 = __Pyx_PyString_Equals(__pyx_t_3, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13258   if (!((int)__pyx_t_4)) {
13259     __pyx_t_5 = __Pyx_PyString_Equals(__pyx_t_3, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13260     __pyx_t_6 = ((int)__pyx_t_5);
13261   } else {
13262     __pyx_t_6 = ((int)__pyx_t_4);
13263   }
13264   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13265   __pyx_t_4 = __pyx_t_6;
13266   if (__pyx_t_4) {
13267     __pyx_t_7 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13268     __pyx_t_6 = (__pyx_t_7 > 0);
13269     if (__pyx_t_6) {
13270       __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13271       __Pyx_GOTREF(__pyx_t_3);
13272       __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__find); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13273       __Pyx_GOTREF(__pyx_t_2);
13274       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13275       __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13276       __Pyx_GOTREF(__pyx_t_3);
13277       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13278       __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_neg_1, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13279       __Pyx_GOTREF(__pyx_t_2);
13280       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13281       __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13282       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13283       __pyx_t_8 = __pyx_t_5;
13284     } else {
13285       __pyx_t_8 = __pyx_t_6;
13286     }
13287     __pyx_t_6 = __pyx_t_8;
13288   } else {
13289     __pyx_t_6 = __pyx_t_4;
13290   }
13291   if (__pyx_t_6) {
13292
13293     /* "cvcf.pyx":611
13294  *         # deal with trailing data in some early VCF files
13295  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
13296  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])             # <<<<<<<<<<<<<<
13297  *             values[-1] = values[-1].split(';')[0]
13298  *         if f.type == "Integer":
13299  */
13300     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13301     __Pyx_GOTREF(__pyx_t_2);
13302     __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_TRAILING_DATA); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13303     __Pyx_GOTREF(__pyx_t_3);
13304     __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13305     __Pyx_GOTREF(__pyx_t_1);
13306     __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13307     __Pyx_GOTREF(__pyx_t_9);
13308     __Pyx_INCREF(__pyx_v_line);
13309     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
13310     __Pyx_GIVEREF(__pyx_v_line);
13311     PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
13312     __Pyx_GIVEREF(__pyx_t_3);
13313     PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_1);
13314     __Pyx_GIVEREF(__pyx_t_1);
13315     __pyx_t_3 = 0;
13316     __pyx_t_1 = 0;
13317     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13318     __Pyx_GOTREF(__pyx_t_1);
13319     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13320     __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
13321     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13322
13323     /* "cvcf.pyx":612
13324  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
13325  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
13326  *             values[-1] = values[-1].split(';')[0]             # <<<<<<<<<<<<<<
13327  *         if f.type == "Integer":
13328  *             for idx,v in enumerate(values):
13329  */
13330     __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_values, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13331     __Pyx_GOTREF(__pyx_t_1);
13332     __pyx_t_9 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13333     __Pyx_GOTREF(__pyx_t_9);
13334     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13335     __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13336     __Pyx_GOTREF(__pyx_t_1);
13337     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13338     __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13339     __Pyx_GOTREF(__pyx_t_9);
13340     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13341     if (__Pyx_SetItemInt(__pyx_v_values, -1, __pyx_t_9, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13342     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13343     goto __pyx_L6;
13344   }
13345   __pyx_L6:;
13346
13347   /* "cvcf.pyx":613
13348  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
13349  *             values[-1] = values[-1].split(';')[0]
13350  *         if f.type == "Integer":             # <<<<<<<<<<<<<<
13351  *             for idx,v in enumerate(values):
13352  *                 try:
13353  */
13354   __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13355   __Pyx_GOTREF(__pyx_t_9);
13356   __pyx_t_6 = __Pyx_PyString_Equals(__pyx_t_9, ((PyObject *)__pyx_n_s__Integer), Py_EQ); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13357   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13358   if (__pyx_t_6) {
13359
13360     /* "cvcf.pyx":614
13361  *             values[-1] = values[-1].split(';')[0]
13362  *         if f.type == "Integer":
13363  *             for idx,v in enumerate(values):             # <<<<<<<<<<<<<<
13364  *                 try:
13365  *                     if v == ".": values[idx] = f.missingvalue
13366  */
13367     __Pyx_INCREF(__pyx_int_0);
13368     __pyx_t_9 = __pyx_int_0;
13369     if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
13370       __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
13371       __pyx_t_10 = NULL;
13372     } else {
13373       __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13374       __Pyx_GOTREF(__pyx_t_1);
13375       __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext;
13376     }
13377     for (;;) {
13378       if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_1)) {
13379         if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
13380         __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
13381       } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_1)) {
13382         if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
13383         __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
13384       } else {
13385         __pyx_t_2 = __pyx_t_10(__pyx_t_1);
13386         if (unlikely(!__pyx_t_2)) {
13387           if (PyErr_Occurred()) {
13388             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
13389             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13390           }
13391           break;
13392         }
13393         __Pyx_GOTREF(__pyx_t_2);
13394       }
13395       __Pyx_XDECREF(__pyx_v_v);
13396       __pyx_v_v = __pyx_t_2;
13397       __pyx_t_2 = 0;
13398       __Pyx_INCREF(__pyx_t_9);
13399       __Pyx_XDECREF(__pyx_v_idx);
13400       __pyx_v_idx = __pyx_t_9;
13401       __pyx_t_2 = PyNumber_Add(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13402       __Pyx_GOTREF(__pyx_t_2);
13403       __Pyx_DECREF(__pyx_t_9);
13404       __pyx_t_9 = __pyx_t_2;
13405       __pyx_t_2 = 0;
13406
13407       /* "cvcf.pyx":615
13408  *         if f.type == "Integer":
13409  *             for idx,v in enumerate(values):
13410  *                 try:             # <<<<<<<<<<<<<<
13411  *                     if v == ".": values[idx] = f.missingvalue
13412  *                     else:        values[idx] = int(v)
13413  */
13414       {
13415         __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
13416         __Pyx_XGOTREF(__pyx_t_11);
13417         __Pyx_XGOTREF(__pyx_t_12);
13418         __Pyx_XGOTREF(__pyx_t_13);
13419         /*try:*/ {
13420
13421           /* "cvcf.pyx":616
13422  *             for idx,v in enumerate(values):
13423  *                 try:
13424  *                     if v == ".": values[idx] = f.missingvalue             # <<<<<<<<<<<<<<
13425  *                     else:        values[idx] = int(v)
13426  *                 except:
13427  */
13428           __pyx_t_6 = __Pyx_PyString_Equals(__pyx_v_v, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
13429           if (__pyx_t_6) {
13430             __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
13431             __Pyx_GOTREF(__pyx_t_2);
13432             if (PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
13433             __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13434             goto __pyx_L18;
13435           }
13436           /*else*/ {
13437
13438             /* "cvcf.pyx":617
13439  *                 try:
13440  *                     if v == ".": values[idx] = f.missingvalue
13441  *                     else:        values[idx] = int(v)             # <<<<<<<<<<<<<<
13442  *                 except:
13443  *                     self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values)))
13444  */
13445             __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
13446             __Pyx_GOTREF(__pyx_t_2);
13447             __Pyx_INCREF(__pyx_v_v);
13448             PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v);
13449             __Pyx_GIVEREF(__pyx_v_v);
13450             __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
13451             __Pyx_GOTREF(__pyx_t_3);
13452             __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
13453             if (PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
13454             __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13455           }
13456           __pyx_L18:;
13457         }
13458         __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
13459         __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
13460         __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
13461         goto __pyx_L17_try_end;
13462         __pyx_L10_error:;
13463         __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13464         __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13465
13466         /* "cvcf.pyx":618
13467  *                     if v == ".": values[idx] = f.missingvalue
13468  *                     else:        values[idx] = int(v)
13469  *                 except:             # <<<<<<<<<<<<<<
13470  *                     self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values)))
13471  *                     return [0] * len(values)
13472  */
13473         /*except:*/ {
13474           __Pyx_AddTraceback("cvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
13475           if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13476           __Pyx_GOTREF(__pyx_t_3);
13477           __Pyx_GOTREF(__pyx_t_2);
13478           __Pyx_GOTREF(__pyx_t_14);
13479
13480           /* "cvcf.pyx":619
13481  *                     else:        values[idx] = int(v)
13482  *                 except:
13483  *                     self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values)))             # <<<<<<<<<<<<<<
13484  *                     return [0] * len(values)
13485  *             return values
13486  */
13487           __pyx_t_15 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13488           __Pyx_GOTREF(__pyx_t_15);
13489           __pyx_t_16 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_100); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13490           __Pyx_GOTREF(__pyx_t_16);
13491           __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13492           __Pyx_GOTREF(__pyx_t_17);
13493           __Pyx_INCREF(__pyx_v_values);
13494           PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_values);
13495           __Pyx_GIVEREF(__pyx_v_values);
13496           __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13497           __Pyx_GOTREF(__pyx_t_18);
13498           __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
13499           __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13500           __Pyx_GOTREF(__pyx_t_17);
13501           __Pyx_INCREF(__pyx_v_key);
13502           PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_key);
13503           __Pyx_GIVEREF(__pyx_v_key);
13504           PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18);
13505           __Pyx_GIVEREF(__pyx_t_18);
13506           __pyx_t_18 = 0;
13507           __pyx_t_18 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_59), ((PyObject *)__pyx_t_17)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13508           __Pyx_GOTREF(((PyObject *)__pyx_t_18));
13509           __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
13510           __pyx_t_17 = PyTuple_New(3); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13511           __Pyx_GOTREF(__pyx_t_17);
13512           __Pyx_INCREF(__pyx_v_line);
13513           PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_line);
13514           __Pyx_GIVEREF(__pyx_v_line);
13515           PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_16);
13516           __Pyx_GIVEREF(__pyx_t_16);
13517           PyTuple_SET_ITEM(__pyx_t_17, 2, ((PyObject *)__pyx_t_18));
13518           __Pyx_GIVEREF(((PyObject *)__pyx_t_18));
13519           __pyx_t_16 = 0;
13520           __pyx_t_18 = 0;
13521           __pyx_t_18 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13522           __Pyx_GOTREF(__pyx_t_18);
13523           __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
13524           __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
13525           __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
13526
13527           /* "cvcf.pyx":620
13528  *                 except:
13529  *                     self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values)))
13530  *                     return [0] * len(values)             # <<<<<<<<<<<<<<
13531  *             return values
13532  *         elif f.type == "String":
13533  */
13534           __Pyx_XDECREF(__pyx_r);
13535           __pyx_t_19 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13536           __pyx_t_18 = PyList_New(1 * ((__pyx_t_19<0) ? 0:__pyx_t_19)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
13537           __Pyx_GOTREF(__pyx_t_18);
13538           { Py_ssize_t __pyx_temp;
13539             for (__pyx_temp=0; __pyx_temp < __pyx_t_19; __pyx_temp++) {
13540               __Pyx_INCREF(__pyx_int_0);
13541               PyList_SET_ITEM(__pyx_t_18, __pyx_temp, __pyx_int_0);
13542               __Pyx_GIVEREF(__pyx_int_0);
13543             }
13544           }
13545           __pyx_r = ((PyObject *)__pyx_t_18);
13546           __pyx_t_18 = 0;
13547           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13548           __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13549           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13550           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13551           __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13552           goto __pyx_L13_except_return;
13553           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13554           __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13555           __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13556           goto __pyx_L11_exception_handled;
13557         }
13558         __pyx_L12_except_error:;
13559         __Pyx_XGIVEREF(__pyx_t_11);
13560         __Pyx_XGIVEREF(__pyx_t_12);
13561         __Pyx_XGIVEREF(__pyx_t_13);
13562         __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
13563         goto __pyx_L1_error;
13564         __pyx_L13_except_return:;
13565         __Pyx_XGIVEREF(__pyx_t_11);
13566         __Pyx_XGIVEREF(__pyx_t_12);
13567         __Pyx_XGIVEREF(__pyx_t_13);
13568         __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
13569         goto __pyx_L0;
13570         __pyx_L11_exception_handled:;
13571         __Pyx_XGIVEREF(__pyx_t_11);
13572         __Pyx_XGIVEREF(__pyx_t_12);
13573         __Pyx_XGIVEREF(__pyx_t_13);
13574         __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
13575         __pyx_L17_try_end:;
13576       }
13577     }
13578     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13579     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13580
13581     /* "cvcf.pyx":621
13582  *                     self.error(line,self.ERROR_FORMAT_NOT_INTEGER,"%s=%s" % (key, str(values)))
13583  *                     return [0] * len(values)
13584  *             return values             # <<<<<<<<<<<<<<
13585  *         elif f.type == "String":
13586  *             self._line = line
13587  */
13588     __Pyx_XDECREF(__pyx_r);
13589     __Pyx_INCREF(__pyx_v_values);
13590     __pyx_r = __pyx_v_values;
13591     goto __pyx_L0;
13592     goto __pyx_L7;
13593   }
13594
13595   /* "cvcf.pyx":622
13596  *                     return [0] * len(values)
13597  *             return values
13598  *         elif f.type == "String":             # <<<<<<<<<<<<<<
13599  *             self._line = line
13600  *             if f.id == "GT": values = list(map( self.convertGT, values ))
13601  */
13602   __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13603   __Pyx_GOTREF(__pyx_t_9);
13604   __pyx_t_6 = __Pyx_PyString_Equals(__pyx_t_9, ((PyObject *)__pyx_n_s__String), Py_EQ); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13605   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13606   if (__pyx_t_6) {
13607
13608     /* "cvcf.pyx":623
13609  *             return values
13610  *         elif f.type == "String":
13611  *             self._line = line             # <<<<<<<<<<<<<<
13612  *             if f.id == "GT": values = list(map( self.convertGT, values ))
13613  *             return values
13614  */
13615     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___line, __pyx_v_line) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13616
13617     /* "cvcf.pyx":624
13618  *         elif f.type == "String":
13619  *             self._line = line
13620  *             if f.id == "GT": values = list(map( self.convertGT, values ))             # <<<<<<<<<<<<<<
13621  *             return values
13622  *         elif f.type == "Character":
13623  */
13624     __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__id); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13625     __Pyx_GOTREF(__pyx_t_9);
13626     __pyx_t_6 = __Pyx_PyString_Equals(__pyx_t_9, ((PyObject *)__pyx_n_s__GT), Py_EQ); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13627     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13628     if (__pyx_t_6) {
13629       __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__convertGT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13630       __Pyx_GOTREF(__pyx_t_9);
13631       __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13632       __Pyx_GOTREF(__pyx_t_1);
13633       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
13634       __Pyx_GIVEREF(__pyx_t_9);
13635       __Pyx_INCREF(__pyx_v_values);
13636       PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_values);
13637       __Pyx_GIVEREF(__pyx_v_values);
13638       __pyx_t_9 = 0;
13639       __pyx_t_9 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13640       __Pyx_GOTREF(__pyx_t_9);
13641       __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
13642       __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13643       __Pyx_GOTREF(__pyx_t_1);
13644       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
13645       __Pyx_GIVEREF(__pyx_t_9);
13646       __pyx_t_9 = 0;
13647       __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13648       __Pyx_GOTREF(__pyx_t_9);
13649       __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
13650       __Pyx_DECREF(__pyx_v_values);
13651       __pyx_v_values = __pyx_t_9;
13652       __pyx_t_9 = 0;
13653       goto __pyx_L21;
13654     }
13655     __pyx_L21:;
13656
13657     /* "cvcf.pyx":625
13658  *             self._line = line
13659  *             if f.id == "GT": values = list(map( self.convertGT, values ))
13660  *             return values             # <<<<<<<<<<<<<<
13661  *         elif f.type == "Character":
13662  *             for v in values:
13663  */
13664     __Pyx_XDECREF(__pyx_r);
13665     __Pyx_INCREF(__pyx_v_values);
13666     __pyx_r = __pyx_v_values;
13667     goto __pyx_L0;
13668     goto __pyx_L7;
13669   }
13670
13671   /* "cvcf.pyx":626
13672  *             if f.id == "GT": values = list(map( self.convertGT, values ))
13673  *             return values
13674  *         elif f.type == "Character":             # <<<<<<<<<<<<<<
13675  *             for v in values:
13676  *                 if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)
13677  */
13678   __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13679   __Pyx_GOTREF(__pyx_t_9);
13680   __pyx_t_6 = __Pyx_PyString_Equals(__pyx_t_9, ((PyObject *)__pyx_n_s__Character), Py_EQ); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13681   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13682   if (__pyx_t_6) {
13683
13684     /* "cvcf.pyx":627
13685  *             return values
13686  *         elif f.type == "Character":
13687  *             for v in values:             # <<<<<<<<<<<<<<
13688  *                 if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)
13689  *             return values
13690  */
13691     if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
13692       __pyx_t_9 = __pyx_v_values; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0;
13693       __pyx_t_10 = NULL;
13694     } else {
13695       __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13696       __Pyx_GOTREF(__pyx_t_9);
13697       __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
13698     }
13699     for (;;) {
13700       if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_9)) {
13701         if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
13702         __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++;
13703       } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_9)) {
13704         if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
13705         __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++;
13706       } else {
13707         __pyx_t_1 = __pyx_t_10(__pyx_t_9);
13708         if (unlikely(!__pyx_t_1)) {
13709           if (PyErr_Occurred()) {
13710             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
13711             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13712           }
13713           break;
13714         }
13715         __Pyx_GOTREF(__pyx_t_1);
13716       }
13717       __Pyx_XDECREF(__pyx_v_v);
13718       __pyx_v_v = __pyx_t_1;
13719       __pyx_t_1 = 0;
13720
13721       /* "cvcf.pyx":628
13722  *         elif f.type == "Character":
13723  *             for v in values:
13724  *                 if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)             # <<<<<<<<<<<<<<
13725  *             return values
13726  *         elif f.type == "Float":
13727  */
13728       __pyx_t_19 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13729       __pyx_t_6 = (__pyx_t_19 != 1);
13730       if (__pyx_t_6) {
13731         __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13732         __Pyx_GOTREF(__pyx_t_1);
13733         __pyx_t_14 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_101); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13734         __Pyx_GOTREF(__pyx_t_14);
13735         __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13736         __Pyx_GOTREF(__pyx_t_2);
13737         __Pyx_INCREF(__pyx_v_line);
13738         PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
13739         __Pyx_GIVEREF(__pyx_v_line);
13740         PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
13741         __Pyx_GIVEREF(__pyx_t_14);
13742         __pyx_t_14 = 0;
13743         __pyx_t_14 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13744         __Pyx_GOTREF(__pyx_t_14);
13745         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13746         __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
13747         __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13748         goto __pyx_L24;
13749       }
13750       __pyx_L24:;
13751     }
13752     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13753
13754     /* "cvcf.pyx":629
13755  *             for v in values:
13756  *                 if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)
13757  *             return values             # <<<<<<<<<<<<<<
13758  *         elif f.type == "Float":
13759  *             for idx,v in enumerate(values):
13760  */
13761     __Pyx_XDECREF(__pyx_r);
13762     __Pyx_INCREF(__pyx_v_values);
13763     __pyx_r = __pyx_v_values;
13764     goto __pyx_L0;
13765     goto __pyx_L7;
13766   }
13767
13768   /* "cvcf.pyx":630
13769  *                 if len(v) != 1: self.error(line,self.ERROR_FORMAT_NOT_CHAR)
13770  *             return values
13771  *         elif f.type == "Float":             # <<<<<<<<<<<<<<
13772  *             for idx,v in enumerate(values):
13773  *                 if v == ".": values[idx] = f.missingvalue
13774  */
13775   __pyx_t_9 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13776   __Pyx_GOTREF(__pyx_t_9);
13777   __pyx_t_6 = __Pyx_PyString_Equals(__pyx_t_9, ((PyObject *)__pyx_n_s__Float), Py_EQ); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13778   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13779   if (__pyx_t_6) {
13780
13781     /* "cvcf.pyx":631
13782  *             return values
13783  *         elif f.type == "Float":
13784  *             for idx,v in enumerate(values):             # <<<<<<<<<<<<<<
13785  *                 if v == ".": values[idx] = f.missingvalue
13786  *             try: return list(map(float,values))
13787  */
13788     __Pyx_INCREF(__pyx_int_0);
13789     __pyx_t_9 = __pyx_int_0;
13790     if (PyList_CheckExact(__pyx_v_values) || PyTuple_CheckExact(__pyx_v_values)) {
13791       __pyx_t_14 = __pyx_v_values; __Pyx_INCREF(__pyx_t_14); __pyx_t_7 = 0;
13792       __pyx_t_10 = NULL;
13793     } else {
13794       __pyx_t_7 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13795       __Pyx_GOTREF(__pyx_t_14);
13796       __pyx_t_10 = Py_TYPE(__pyx_t_14)->tp_iternext;
13797     }
13798     for (;;) {
13799       if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_14)) {
13800         if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_14)) break;
13801         __pyx_t_2 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
13802       } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_14)) {
13803         if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
13804         __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++;
13805       } else {
13806         __pyx_t_2 = __pyx_t_10(__pyx_t_14);
13807         if (unlikely(!__pyx_t_2)) {
13808           if (PyErr_Occurred()) {
13809             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
13810             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13811           }
13812           break;
13813         }
13814         __Pyx_GOTREF(__pyx_t_2);
13815       }
13816       __Pyx_XDECREF(__pyx_v_v);
13817       __pyx_v_v = __pyx_t_2;
13818       __pyx_t_2 = 0;
13819       __Pyx_INCREF(__pyx_t_9);
13820       __Pyx_XDECREF(__pyx_v_idx);
13821       __pyx_v_idx = __pyx_t_9;
13822       __pyx_t_2 = PyNumber_Add(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13823       __Pyx_GOTREF(__pyx_t_2);
13824       __Pyx_DECREF(__pyx_t_9);
13825       __pyx_t_9 = __pyx_t_2;
13826       __pyx_t_2 = 0;
13827
13828       /* "cvcf.pyx":632
13829  *         elif f.type == "Float":
13830  *             for idx,v in enumerate(values):
13831  *                 if v == ".": values[idx] = f.missingvalue             # <<<<<<<<<<<<<<
13832  *             try: return list(map(float,values))
13833  *             except:
13834  */
13835       __pyx_t_6 = __Pyx_PyString_Equals(__pyx_v_v, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13836       if (__pyx_t_6) {
13837         __pyx_t_2 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__missingvalue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13838         __Pyx_GOTREF(__pyx_t_2);
13839         if (PyObject_SetItem(__pyx_v_values, __pyx_v_idx, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13840         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13841         goto __pyx_L27;
13842       }
13843       __pyx_L27:;
13844     }
13845     __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13846     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13847
13848     /* "cvcf.pyx":633
13849  *             for idx,v in enumerate(values):
13850  *                 if v == ".": values[idx] = f.missingvalue
13851  *             try: return list(map(float,values))             # <<<<<<<<<<<<<<
13852  *             except:
13853  *                 self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values)))
13854  */
13855     {
13856       __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
13857       __Pyx_XGOTREF(__pyx_t_13);
13858       __Pyx_XGOTREF(__pyx_t_12);
13859       __Pyx_XGOTREF(__pyx_t_11);
13860       /*try:*/ {
13861         __Pyx_XDECREF(__pyx_r);
13862         __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
13863         __Pyx_GOTREF(__pyx_t_9);
13864         __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
13865         PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)((PyObject*)(&PyFloat_Type))));
13866         __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
13867         __Pyx_INCREF(__pyx_v_values);
13868         PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_values);
13869         __Pyx_GIVEREF(__pyx_v_values);
13870         __pyx_t_14 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
13871         __Pyx_GOTREF(__pyx_t_14);
13872         __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
13873         __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
13874         __Pyx_GOTREF(__pyx_t_9);
13875         PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14);
13876         __Pyx_GIVEREF(__pyx_t_14);
13877         __pyx_t_14 = 0;
13878         __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
13879         __Pyx_GOTREF(__pyx_t_14);
13880         __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
13881         __pyx_r = __pyx_t_14;
13882         __pyx_t_14 = 0;
13883         goto __pyx_L32_try_return;
13884       }
13885       __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
13886       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
13887       __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
13888       goto __pyx_L35_try_end;
13889       __pyx_L32_try_return:;
13890       __Pyx_XGIVEREF(__pyx_t_13);
13891       __Pyx_XGIVEREF(__pyx_t_12);
13892       __Pyx_XGIVEREF(__pyx_t_11);
13893       __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
13894       goto __pyx_L0;
13895       __pyx_L28_error:;
13896       __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
13897       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
13898       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
13899       __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
13900       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13901       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13902       __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13903       __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13904       __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
13905
13906       /* "cvcf.pyx":634
13907  *                 if v == ".": values[idx] = f.missingvalue
13908  *             try: return list(map(float,values))
13909  *             except:             # <<<<<<<<<<<<<<
13910  *                 self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values)))
13911  *                 return [0.0] * len(values)
13912  */
13913       /*except:*/ {
13914         __Pyx_AddTraceback("cvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
13915         if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_9, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13916         __Pyx_GOTREF(__pyx_t_14);
13917         __Pyx_GOTREF(__pyx_t_9);
13918         __Pyx_GOTREF(__pyx_t_2);
13919
13920         /* "cvcf.pyx":635
13921  *             try: return list(map(float,values))
13922  *             except:
13923  *                 self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values)))             # <<<<<<<<<<<<<<
13924  *                 return [0.0] * len(values)
13925  *         else:
13926  */
13927         __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13928         __Pyx_GOTREF(__pyx_t_1);
13929         __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_102); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13930         __Pyx_GOTREF(__pyx_t_3);
13931         __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13932         __Pyx_GOTREF(__pyx_t_18);
13933         __Pyx_INCREF(__pyx_v_values);
13934         PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_values);
13935         __Pyx_GIVEREF(__pyx_v_values);
13936         __pyx_t_17 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13937         __Pyx_GOTREF(__pyx_t_17);
13938         __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
13939         __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13940         __Pyx_GOTREF(__pyx_t_18);
13941         __Pyx_INCREF(__pyx_v_key);
13942         PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_key);
13943         __Pyx_GIVEREF(__pyx_v_key);
13944         PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_17);
13945         __Pyx_GIVEREF(__pyx_t_17);
13946         __pyx_t_17 = 0;
13947         __pyx_t_17 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_59), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13948         __Pyx_GOTREF(((PyObject *)__pyx_t_17));
13949         __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
13950         __pyx_t_18 = PyTuple_New(3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13951         __Pyx_GOTREF(__pyx_t_18);
13952         __Pyx_INCREF(__pyx_v_line);
13953         PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_line);
13954         __Pyx_GIVEREF(__pyx_v_line);
13955         PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_3);
13956         __Pyx_GIVEREF(__pyx_t_3);
13957         PyTuple_SET_ITEM(__pyx_t_18, 2, ((PyObject *)__pyx_t_17));
13958         __Pyx_GIVEREF(((PyObject *)__pyx_t_17));
13959         __pyx_t_3 = 0;
13960         __pyx_t_17 = 0;
13961         __pyx_t_17 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13962         __Pyx_GOTREF(__pyx_t_17);
13963         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13964         __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
13965         __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
13966
13967         /* "cvcf.pyx":636
13968  *             except:
13969  *                 self.error(line,self.ERROR_FORMAT_NOT_NUMERICAL,"%s=%s" % (key, str(values)))
13970  *                 return [0.0] * len(values)             # <<<<<<<<<<<<<<
13971  *         else:
13972  *             # can't happen
13973  */
13974         __Pyx_XDECREF(__pyx_r);
13975         __pyx_t_17 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13976         __Pyx_GOTREF(__pyx_t_17);
13977         __pyx_t_7 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13978         __pyx_t_18 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
13979         __Pyx_GOTREF(__pyx_t_18);
13980         { Py_ssize_t __pyx_temp;
13981           for (__pyx_temp=0; __pyx_temp < __pyx_t_7; __pyx_temp++) {
13982             __Pyx_INCREF(__pyx_t_17);
13983             PyList_SET_ITEM(__pyx_t_18, __pyx_temp, __pyx_t_17);
13984             __Pyx_GIVEREF(__pyx_t_17);
13985           }
13986         }
13987         __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
13988         __pyx_r = ((PyObject *)__pyx_t_18);
13989         __pyx_t_18 = 0;
13990         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13991         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13992         __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13993         goto __pyx_L31_except_return;
13994         __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13995         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13996         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13997         goto __pyx_L29_exception_handled;
13998       }
13999       __pyx_L30_except_error:;
14000       __Pyx_XGIVEREF(__pyx_t_13);
14001       __Pyx_XGIVEREF(__pyx_t_12);
14002       __Pyx_XGIVEREF(__pyx_t_11);
14003       __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
14004       goto __pyx_L1_error;
14005       __pyx_L31_except_return:;
14006       __Pyx_XGIVEREF(__pyx_t_13);
14007       __Pyx_XGIVEREF(__pyx_t_12);
14008       __Pyx_XGIVEREF(__pyx_t_11);
14009       __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
14010       goto __pyx_L0;
14011       __pyx_L29_exception_handled:;
14012       __Pyx_XGIVEREF(__pyx_t_13);
14013       __Pyx_XGIVEREF(__pyx_t_12);
14014       __Pyx_XGIVEREF(__pyx_t_11);
14015       __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
14016       __pyx_L35_try_end:;
14017     }
14018     goto __pyx_L7;
14019   }
14020   /*else*/ {
14021
14022     /* "cvcf.pyx":639
14023  *         else:
14024  *             # can't happen
14025  *             self.error(line,self.ERROR_INFO_STRING)             # <<<<<<<<<<<<<<
14026  * 
14027  *     def inregion(self, chrom, pos):
14028  */
14029     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14030     __Pyx_GOTREF(__pyx_t_2);
14031     __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14032     __Pyx_GOTREF(__pyx_t_9);
14033     __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14034     __Pyx_GOTREF(__pyx_t_14);
14035     __Pyx_INCREF(__pyx_v_line);
14036     PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_line);
14037     __Pyx_GIVEREF(__pyx_v_line);
14038     PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_9);
14039     __Pyx_GIVEREF(__pyx_t_9);
14040     __pyx_t_9 = 0;
14041     __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14042     __Pyx_GOTREF(__pyx_t_9);
14043     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14044     __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
14045     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14046   }
14047   __pyx_L7:;
14048
14049   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14050   goto __pyx_L0;
14051   __pyx_L1_error:;
14052   __Pyx_XDECREF(__pyx_t_1);
14053   __Pyx_XDECREF(__pyx_t_2);
14054   __Pyx_XDECREF(__pyx_t_3);
14055   __Pyx_XDECREF(__pyx_t_9);
14056   __Pyx_XDECREF(__pyx_t_14);
14057   __Pyx_XDECREF(__pyx_t_15);
14058   __Pyx_XDECREF(__pyx_t_16);
14059   __Pyx_XDECREF(__pyx_t_17);
14060   __Pyx_XDECREF(__pyx_t_18);
14061   __Pyx_AddTraceback("cvcf.VCF.parse_formatdata", __pyx_clineno, __pyx_lineno, __pyx_filename);
14062   __pyx_r = NULL;
14063   __pyx_L0:;
14064   __Pyx_XDECREF(__pyx_v_f);
14065   __Pyx_XDECREF(__pyx_v_values);
14066   __Pyx_XDECREF(__pyx_v_idx);
14067   __Pyx_XDECREF(__pyx_v_v);
14068   __Pyx_XGIVEREF(__pyx_r);
14069   __Pyx_RefNannyFinishContext();
14070   return __pyx_r;
14071 }
14072
14073 /* Python wrapper */
14074 static PyObject *__pyx_pw_4cvcf_3VCF_31inregion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14075 static PyMethodDef __pyx_mdef_4cvcf_3VCF_31inregion = {__Pyx_NAMESTR("inregion"), (PyCFunction)__pyx_pw_4cvcf_3VCF_31inregion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
14076 static PyObject *__pyx_pw_4cvcf_3VCF_31inregion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14077   PyObject *__pyx_v_self = 0;
14078   PyObject *__pyx_v_chrom = 0;
14079   PyObject *__pyx_v_pos = 0;
14080   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__chrom,&__pyx_n_s__pos,0};
14081   PyObject *__pyx_r = 0;
14082   __Pyx_RefNannyDeclarations
14083   __Pyx_RefNannySetupContext("inregion (wrapper)", 0);
14084   __pyx_self = __pyx_self;
14085   {
14086     PyObject* values[3] = {0,0,0};
14087     if (unlikely(__pyx_kwds)) {
14088       Py_ssize_t kw_args;
14089       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14090       switch (pos_args) {
14091         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14092         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14093         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14094         case  0: break;
14095         default: goto __pyx_L5_argtuple_error;
14096       }
14097       kw_args = PyDict_Size(__pyx_kwds);
14098       switch (pos_args) {
14099         case  0:
14100         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
14101         if (likely(values[0])) kw_args--;
14102         else goto __pyx_L5_argtuple_error;
14103         case  1:
14104         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__chrom);
14105         if (likely(values[1])) kw_args--;
14106         else {
14107           __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14108         }
14109         case  2:
14110         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos);
14111         if (likely(values[2])) kw_args--;
14112         else {
14113           __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14114         }
14115       }
14116       if (unlikely(kw_args > 0)) {
14117         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inregion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14118       }
14119     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14120       goto __pyx_L5_argtuple_error;
14121     } else {
14122       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14123       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14124       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14125     }
14126     __pyx_v_self = values[0];
14127     __pyx_v_chrom = values[1];
14128     __pyx_v_pos = values[2];
14129   }
14130   goto __pyx_L4_argument_unpacking_done;
14131   __pyx_L5_argtuple_error:;
14132   __Pyx_RaiseArgtupleInvalid("inregion", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14133   __pyx_L3_error:;
14134   __Pyx_AddTraceback("cvcf.VCF.inregion", __pyx_clineno, __pyx_lineno, __pyx_filename);
14135   __Pyx_RefNannyFinishContext();
14136   return NULL;
14137   __pyx_L4_argument_unpacking_done:;
14138   __pyx_r = __pyx_pf_4cvcf_3VCF_30inregion(__pyx_self, __pyx_v_self, __pyx_v_chrom, __pyx_v_pos);
14139   __Pyx_RefNannyFinishContext();
14140   return __pyx_r;
14141 }
14142
14143 /* "cvcf.pyx":641
14144  *             self.error(line,self.ERROR_INFO_STRING)
14145  * 
14146  *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
14147  *         if not self._regions: return True
14148  *         for r in self._regions:
14149  */
14150
14151 static PyObject *__pyx_pf_4cvcf_3VCF_30inregion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_pos) {
14152   PyObject *__pyx_v_r = NULL;
14153   PyObject *__pyx_r = NULL;
14154   __Pyx_RefNannyDeclarations
14155   PyObject *__pyx_t_1 = NULL;
14156   int __pyx_t_2;
14157   int __pyx_t_3;
14158   PyObject *__pyx_t_4 = NULL;
14159   Py_ssize_t __pyx_t_5;
14160   PyObject *(*__pyx_t_6)(PyObject *);
14161   PyObject *__pyx_t_7 = NULL;
14162   PyObject *__pyx_t_8 = NULL;
14163   int __pyx_t_9;
14164   int __pyx_lineno = 0;
14165   const char *__pyx_filename = NULL;
14166   int __pyx_clineno = 0;
14167   __Pyx_RefNannySetupContext("inregion", 0);
14168
14169   /* "cvcf.pyx":642
14170  * 
14171  *     def inregion(self, chrom, pos):
14172  *         if not self._regions: return True             # <<<<<<<<<<<<<<
14173  *         for r in self._regions:
14174  *             if r[0] == chrom and r[1] <= pos < r[2]: return True
14175  */
14176   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___regions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14177   __Pyx_GOTREF(__pyx_t_1);
14178   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14179   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14180   __pyx_t_3 = (!__pyx_t_2);
14181   if (__pyx_t_3) {
14182     __Pyx_XDECREF(__pyx_r);
14183     __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14184     __Pyx_GOTREF(__pyx_t_1);
14185     __pyx_r = __pyx_t_1;
14186     __pyx_t_1 = 0;
14187     goto __pyx_L0;
14188     goto __pyx_L3;
14189   }
14190   __pyx_L3:;
14191
14192   /* "cvcf.pyx":643
14193  *     def inregion(self, chrom, pos):
14194  *         if not self._regions: return True
14195  *         for r in self._regions:             # <<<<<<<<<<<<<<
14196  *             if r[0] == chrom and r[1] <= pos < r[2]: return True
14197  *         return False
14198  */
14199   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___regions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14200   __Pyx_GOTREF(__pyx_t_1);
14201   if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
14202     __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
14203     __pyx_t_6 = NULL;
14204   } else {
14205     __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14206     __Pyx_GOTREF(__pyx_t_4);
14207     __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
14208   }
14209   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14210   for (;;) {
14211     if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
14212       if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
14213       __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++;
14214     } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
14215       if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
14216       __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++;
14217     } else {
14218       __pyx_t_1 = __pyx_t_6(__pyx_t_4);
14219       if (unlikely(!__pyx_t_1)) {
14220         if (PyErr_Occurred()) {
14221           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
14222           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14223         }
14224         break;
14225       }
14226       __Pyx_GOTREF(__pyx_t_1);
14227     }
14228     __Pyx_XDECREF(__pyx_v_r);
14229     __pyx_v_r = __pyx_t_1;
14230     __pyx_t_1 = 0;
14231
14232     /* "cvcf.pyx":644
14233  *         if not self._regions: return True
14234  *         for r in self._regions:
14235  *             if r[0] == chrom and r[1] <= pos < r[2]: return True             # <<<<<<<<<<<<<<
14236  *         return False
14237  * 
14238  */
14239     __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_r, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14240     __Pyx_GOTREF(__pyx_t_1);
14241     __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_v_chrom, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14242     __Pyx_GOTREF(__pyx_t_7);
14243     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14244     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14245     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14246     if (__pyx_t_3) {
14247       __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_r, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14248       __Pyx_GOTREF(__pyx_t_7);
14249       __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_v_pos, Py_LE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14250       __Pyx_GOTREF(__pyx_t_1);
14251       if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
14252         __Pyx_DECREF(__pyx_t_1);
14253         __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_r, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14254         __Pyx_GOTREF(__pyx_t_8);
14255         __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos, __pyx_t_8, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14256         __Pyx_GOTREF(__pyx_t_1);
14257         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14258       }
14259       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14260       __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14261       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14262       __pyx_t_9 = __pyx_t_2;
14263     } else {
14264       __pyx_t_9 = __pyx_t_3;
14265     }
14266     if (__pyx_t_9) {
14267       __Pyx_XDECREF(__pyx_r);
14268       __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14269       __Pyx_GOTREF(__pyx_t_1);
14270       __pyx_r = __pyx_t_1;
14271       __pyx_t_1 = 0;
14272       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14273       goto __pyx_L0;
14274       goto __pyx_L6;
14275     }
14276     __pyx_L6:;
14277   }
14278   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14279
14280   /* "cvcf.pyx":645
14281  *         for r in self._regions:
14282  *             if r[0] == chrom and r[1] <= pos < r[2]: return True
14283  *         return False             # <<<<<<<<<<<<<<
14284  * 
14285  *     def parse_data( self, line, lineparse=False ):
14286  */
14287   __Pyx_XDECREF(__pyx_r);
14288   __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14289   __Pyx_GOTREF(__pyx_t_4);
14290   __pyx_r = __pyx_t_4;
14291   __pyx_t_4 = 0;
14292   goto __pyx_L0;
14293
14294   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14295   goto __pyx_L0;
14296   __pyx_L1_error:;
14297   __Pyx_XDECREF(__pyx_t_1);
14298   __Pyx_XDECREF(__pyx_t_4);
14299   __Pyx_XDECREF(__pyx_t_7);
14300   __Pyx_XDECREF(__pyx_t_8);
14301   __Pyx_AddTraceback("cvcf.VCF.inregion", __pyx_clineno, __pyx_lineno, __pyx_filename);
14302   __pyx_r = NULL;
14303   __pyx_L0:;
14304   __Pyx_XDECREF(__pyx_v_r);
14305   __Pyx_XGIVEREF(__pyx_r);
14306   __Pyx_RefNannyFinishContext();
14307   return __pyx_r;
14308 }
14309
14310 /* "cvcf.pyx":647
14311  *         return False
14312  * 
14313  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
14314  *         cols = line.split('\t')
14315  *         if len(cols) != len(self._samples)+9:
14316  */
14317
14318 static PyObject *__pyx_pf_4cvcf_3VCF_93__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
14319   PyObject *__pyx_r = NULL;
14320   __Pyx_RefNannyDeclarations
14321   PyObject *__pyx_t_1 = NULL;
14322   int __pyx_lineno = 0;
14323   const char *__pyx_filename = NULL;
14324   int __pyx_clineno = 0;
14325   __Pyx_RefNannySetupContext("__defaults__", 0);
14326   __Pyx_XDECREF(__pyx_r);
14327   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14328   __Pyx_GOTREF(__pyx_t_1);
14329   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_lineparse);
14330   PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_lineparse);
14331   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_lineparse);
14332   __pyx_r = ((PyObject *)__pyx_t_1);
14333   __pyx_t_1 = 0;
14334   goto __pyx_L0;
14335
14336   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14337   goto __pyx_L0;
14338   __pyx_L1_error:;
14339   __Pyx_XDECREF(__pyx_t_1);
14340   __Pyx_AddTraceback("cvcf.VCF.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14341   __pyx_r = NULL;
14342   __pyx_L0:;
14343   __Pyx_XGIVEREF(__pyx_r);
14344   __Pyx_RefNannyFinishContext();
14345   return __pyx_r;
14346 }
14347
14348 /* Python wrapper */
14349 static PyObject *__pyx_pw_4cvcf_3VCF_33parse_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14350 static PyMethodDef __pyx_mdef_4cvcf_3VCF_33parse_data = {__Pyx_NAMESTR("parse_data"), (PyCFunction)__pyx_pw_4cvcf_3VCF_33parse_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
14351 static PyObject *__pyx_pw_4cvcf_3VCF_33parse_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14352   PyObject *__pyx_v_self = 0;
14353   PyObject *__pyx_v_line = 0;
14354   PyObject *__pyx_v_lineparse = 0;
14355   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,&__pyx_n_s__lineparse,0};
14356   PyObject *__pyx_r = 0;
14357   __Pyx_RefNannyDeclarations
14358   __Pyx_RefNannySetupContext("parse_data (wrapper)", 0);
14359   __pyx_self = __pyx_self;
14360   {
14361     PyObject* values[3] = {0,0,0};
14362     __pyx_defaults4 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self);
14363     values[2] = __pyx_dynamic_args->__pyx_arg_lineparse;
14364     if (unlikely(__pyx_kwds)) {
14365       Py_ssize_t kw_args;
14366       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14367       switch (pos_args) {
14368         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14369         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14370         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14371         case  0: break;
14372         default: goto __pyx_L5_argtuple_error;
14373       }
14374       kw_args = PyDict_Size(__pyx_kwds);
14375       switch (pos_args) {
14376         case  0:
14377         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
14378         if (likely(values[0])) kw_args--;
14379         else goto __pyx_L5_argtuple_error;
14380         case  1:
14381         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line);
14382         if (likely(values[1])) kw_args--;
14383         else {
14384           __Pyx_RaiseArgtupleInvalid("parse_data", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14385         }
14386         case  2:
14387         if (kw_args > 0) {
14388           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lineparse);
14389           if (value) { values[2] = value; kw_args--; }
14390         }
14391       }
14392       if (unlikely(kw_args > 0)) {
14393         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_data") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14394       }
14395     } else {
14396       switch (PyTuple_GET_SIZE(__pyx_args)) {
14397         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14398         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14399         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14400         break;
14401         default: goto __pyx_L5_argtuple_error;
14402       }
14403     }
14404     __pyx_v_self = values[0];
14405     __pyx_v_line = values[1];
14406     __pyx_v_lineparse = values[2];
14407   }
14408   goto __pyx_L4_argument_unpacking_done;
14409   __pyx_L5_argtuple_error:;
14410   __Pyx_RaiseArgtupleInvalid("parse_data", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14411   __pyx_L3_error:;
14412   __Pyx_AddTraceback("cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
14413   __Pyx_RefNannyFinishContext();
14414   return NULL;
14415   __pyx_L4_argument_unpacking_done:;
14416   __pyx_r = __pyx_pf_4cvcf_3VCF_32parse_data(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_lineparse);
14417   __Pyx_RefNannyFinishContext();
14418   return __pyx_r;
14419 }
14420 static PyObject *__pyx_gb_4cvcf_3VCF_10parse_data_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
14421
14422 /* "cvcf.pyx":790
14423  *         if alt:
14424  *             for i in range(1,min(len(ref),min(map(len,alt)))):
14425  *                 if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():             # <<<<<<<<<<<<<<
14426  *                     break
14427  *                 ref, alt = ref[:-1], [allele[:-1] for allele in alt]
14428  */
14429
14430 static PyObject *__pyx_pf_4cvcf_3VCF_10parse_data_genexpr(PyObject *__pyx_self) {
14431   struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
14432   PyObject *__pyx_r = NULL;
14433   __Pyx_RefNannyDeclarations
14434   int __pyx_lineno = 0;
14435   const char *__pyx_filename = NULL;
14436   int __pyx_clineno = 0;
14437   __Pyx_RefNannySetupContext("genexpr", 0);
14438   __pyx_cur_scope = (struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *)__pyx_ptype_4cvcf___pyx_scope_struct_1_genexpr->tp_new(__pyx_ptype_4cvcf___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
14439   if (unlikely(!__pyx_cur_scope)) {
14440     __Pyx_RefNannyFinishContext();
14441     return NULL;
14442   }
14443   __Pyx_GOTREF(__pyx_cur_scope);
14444   __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *) __pyx_self;
14445   __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
14446   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
14447   {
14448     __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cvcf_3VCF_10parse_data_2generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14449     __Pyx_DECREF(__pyx_cur_scope);
14450     __Pyx_RefNannyFinishContext();
14451     return (PyObject *) gen;
14452   }
14453
14454   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14455   goto __pyx_L0;
14456   __pyx_L1_error:;
14457   __Pyx_AddTraceback("cvcf.VCF.parse_data.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
14458   __pyx_r = NULL;
14459   __pyx_L0:;
14460   __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
14461   __Pyx_XGIVEREF(__pyx_r);
14462   __Pyx_RefNannyFinishContext();
14463   return __pyx_r;
14464 }
14465
14466 static PyObject *__pyx_gb_4cvcf_3VCF_10parse_data_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
14467 {
14468   struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
14469   PyObject *__pyx_r = NULL;
14470   PyObject *__pyx_t_1 = NULL;
14471   Py_ssize_t __pyx_t_2;
14472   PyObject *(*__pyx_t_3)(PyObject *);
14473   PyObject *__pyx_t_4 = NULL;
14474   PyObject *__pyx_t_5 = NULL;
14475   __Pyx_RefNannyDeclarations
14476   __Pyx_RefNannySetupContext("None", 0);
14477   switch (__pyx_generator->resume_label) {
14478     case 0: goto __pyx_L3_first_run;
14479     case 1: goto __pyx_L6_resume_from_yield;
14480     default: /* CPython raises the right error here */
14481     __Pyx_RefNannyFinishContext();
14482     return NULL;
14483   }
14484   __pyx_L3_first_run:;
14485   if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14486   if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt)) { __Pyx_RaiseClosureNameError("alt"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
14487   if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt)) {
14488     __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
14489     __pyx_t_3 = NULL;
14490   } else {
14491     __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14492     __Pyx_GOTREF(__pyx_t_1);
14493     __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
14494   }
14495   for (;;) {
14496     if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
14497       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
14498       __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
14499     } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
14500       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
14501       __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
14502     } else {
14503       __pyx_t_4 = __pyx_t_3(__pyx_t_1);
14504       if (unlikely(!__pyx_t_4)) {
14505         if (PyErr_Occurred()) {
14506           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
14507           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14508         }
14509         break;
14510       }
14511       __Pyx_GOTREF(__pyx_t_4);
14512     }
14513     __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_allele);
14514     __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_allele);
14515     __Pyx_GIVEREF(__pyx_t_4);
14516     __pyx_cur_scope->__pyx_v_allele = __pyx_t_4;
14517     __pyx_t_4 = 0;
14518     __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_allele, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14519     __Pyx_GOTREF(__pyx_t_4);
14520     __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__upper); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14521     __Pyx_GOTREF(__pyx_t_5);
14522     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14523     __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 = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14524     __Pyx_GOTREF(__pyx_t_4);
14525     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14526     __pyx_r = __pyx_t_4;
14527     __pyx_t_4 = 0;
14528     __Pyx_XGIVEREF(__pyx_t_1);
14529     __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
14530     __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
14531     __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
14532     __Pyx_XGIVEREF(__pyx_r);
14533     __Pyx_RefNannyFinishContext();
14534     /* return from generator, yielding value */
14535     __pyx_generator->resume_label = 1;
14536     return __pyx_r;
14537     __pyx_L6_resume_from_yield:;
14538     __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
14539     __pyx_cur_scope->__pyx_t_0 = 0;
14540     __Pyx_XGOTREF(__pyx_t_1);
14541     __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
14542     __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
14543     if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14544   }
14545   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14546   PyErr_SetNone(PyExc_StopIteration);
14547   goto __pyx_L0;
14548   __pyx_L1_error:;
14549   __Pyx_XDECREF(__pyx_t_1);
14550   __Pyx_XDECREF(__pyx_t_4);
14551   __Pyx_XDECREF(__pyx_t_5);
14552   __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
14553   __pyx_L0:;
14554   __Pyx_XDECREF(__pyx_r);
14555   __pyx_generator->resume_label = -1;
14556   __Pyx_RefNannyFinishContext();
14557   return NULL;
14558 }
14559
14560 /* "cvcf.pyx":647
14561  *         return False
14562  * 
14563  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
14564  *         cols = line.split('\t')
14565  *         if len(cols) != len(self._samples)+9:
14566  */
14567
14568 static PyObject *__pyx_pf_4cvcf_3VCF_32parse_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_lineparse) {
14569   struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *__pyx_cur_scope;
14570   PyObject *__pyx_v_cols = NULL;
14571   PyObject *__pyx_v_chrom = NULL;
14572   PyObject *__pyx_v_pos = NULL;
14573   PyObject *__pyx_v_id = NULL;
14574   PyObject *__pyx_v_ref = NULL;
14575   PyObject *__pyx_v_c = NULL;
14576   PyObject *__pyx_v_left = NULL;
14577   PyObject *__pyx_v_faref_leftflank = NULL;
14578   PyObject *__pyx_v_faref = NULL;
14579   double __pyx_v_qual;
14580   PyObject *__pyx_v_filter = NULL;
14581   PyObject *__pyx_v_info = NULL;
14582   PyObject *__pyx_v_blurp = NULL;
14583   PyObject *__pyx_v_elts = NULL;
14584   PyObject *__pyx_v_v = NULL;
14585   PyObject *__pyx_v_format = NULL;
14586   PyObject *__pyx_v_f = NULL;
14587   PyObject *__pyx_v_newalts = NULL;
14588   int __pyx_v_have_deletions;
14589   PyObject *__pyx_v_a = NULL;
14590   PyObject *__pyx_v_l = NULL;
14591   PyObject *__pyx_v_addns = NULL;
14592   PyObject *__pyx_v_i = NULL;
14593   PyObject *__pyx_v_na = NULL;
14594   PyObject *__pyx_v_s = NULL;
14595   PyObject *__pyx_v_addn = NULL;
14596   PyObject *__pyx_v_allele = NULL;
14597   int __pyx_v_movable;
14598   PyObject *__pyx_v_longest = NULL;
14599   PyObject *__pyx_v_shortest = NULL;
14600   PyObject *__pyx_v_samples = NULL;
14601   PyObject *__pyx_v_sample = NULL;
14602   PyObject *__pyx_v_dict = NULL;
14603   PyObject *__pyx_v_values = NULL;
14604   PyObject *__pyx_v_idx = NULL;
14605   PyObject *__pyx_v_expected = NULL;
14606   PyObject *__pyx_v_value = NULL;
14607   PyObject *__pyx_v_d = NULL;
14608   PyObject *__pyx_v_key = NULL;
14609   PyObject *__pyx_r = NULL;
14610   __Pyx_RefNannyDeclarations
14611   PyObject *__pyx_t_1 = NULL;
14612   PyObject *__pyx_t_2 = NULL;
14613   Py_ssize_t __pyx_t_3;
14614   Py_ssize_t __pyx_t_4;
14615   int __pyx_t_5;
14616   PyObject *__pyx_t_6 = NULL;
14617   PyObject *__pyx_t_7 = NULL;
14618   PyObject *__pyx_t_8 = NULL;
14619   PyObject *__pyx_t_9 = NULL;
14620   PyObject *__pyx_t_10 = NULL;
14621   PyObject *__pyx_t_11 = NULL;
14622   PyObject *__pyx_t_12 = NULL;
14623   PyObject *__pyx_t_13 = NULL;
14624   int __pyx_t_14;
14625   PyObject *(*__pyx_t_15)(PyObject *);
14626   long __pyx_t_16;
14627   double __pyx_t_17;
14628   int __pyx_t_18;
14629   int __pyx_t_19;
14630   int __pyx_t_20;
14631   Py_ssize_t __pyx_t_21;
14632   PyObject *__pyx_t_22 = NULL;
14633   PyObject *__pyx_t_23 = NULL;
14634   PyObject *__pyx_t_24 = NULL;
14635   int __pyx_t_25;
14636   PyObject *(*__pyx_t_26)(PyObject *);
14637   PyObject *(*__pyx_t_27)(PyObject *);
14638   int __pyx_lineno = 0;
14639   const char *__pyx_filename = NULL;
14640   int __pyx_clineno = 0;
14641   __Pyx_RefNannySetupContext("parse_data", 0);
14642   __pyx_cur_scope = (struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *)__pyx_ptype_4cvcf___pyx_scope_struct__parse_data->tp_new(__pyx_ptype_4cvcf___pyx_scope_struct__parse_data, __pyx_empty_tuple, NULL);
14643   if (unlikely(!__pyx_cur_scope)) {
14644     __Pyx_RefNannyFinishContext();
14645     return NULL;
14646   }
14647   __Pyx_GOTREF(__pyx_cur_scope);
14648
14649   /* "cvcf.pyx":648
14650  * 
14651  *     def parse_data( self, line, lineparse=False ):
14652  *         cols = line.split('\t')             # <<<<<<<<<<<<<<
14653  *         if len(cols) != len(self._samples)+9:
14654  *             # gracefully deal with absent FORMAT column
14655  */
14656   __pyx_t_1 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14657   __Pyx_GOTREF(__pyx_t_1);
14658   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14659   __Pyx_GOTREF(__pyx_t_2);
14660   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14661   __pyx_v_cols = __pyx_t_2;
14662   __pyx_t_2 = 0;
14663
14664   /* "cvcf.pyx":649
14665  *     def parse_data( self, line, lineparse=False ):
14666  *         cols = line.split('\t')
14667  *         if len(cols) != len(self._samples)+9:             # <<<<<<<<<<<<<<
14668  *             # gracefully deal with absent FORMAT column
14669  *             # and those missing samples
14670  */
14671   __pyx_t_3 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14672   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14673   __Pyx_GOTREF(__pyx_t_2);
14674   __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14675   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14676   __pyx_t_5 = (__pyx_t_3 != (__pyx_t_4 + 9));
14677   if (__pyx_t_5) {
14678
14679     /* "cvcf.pyx":652
14680  *             # gracefully deal with absent FORMAT column
14681  *             # and those missing samples
14682  *             if len(cols) == 8:             # <<<<<<<<<<<<<<
14683  *                 cols.append("")
14684  *             else:
14685  */
14686     __pyx_t_4 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14687     __pyx_t_5 = (__pyx_t_4 == 8);
14688     if (__pyx_t_5) {
14689
14690       /* "cvcf.pyx":653
14691  *             # and those missing samples
14692  *             if len(cols) == 8:
14693  *                 cols.append("")             # <<<<<<<<<<<<<<
14694  *             else:
14695  *                 self.error(line,
14696  */
14697       __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_cols, ((PyObject *)__pyx_kp_s_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14698       __Pyx_GOTREF(__pyx_t_2);
14699       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14700       goto __pyx_L4;
14701     }
14702     /*else*/ {
14703
14704       /* "cvcf.pyx":655
14705  *                 cols.append("")
14706  *             else:
14707  *                 self.error(line,             # <<<<<<<<<<<<<<
14708  *                            self.BAD_NUMBER_OF_COLUMNS,
14709  *                            "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols)))
14710  */
14711       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14712       __Pyx_GOTREF(__pyx_t_2);
14713
14714       /* "cvcf.pyx":656
14715  *             else:
14716  *                 self.error(line,
14717  *                            self.BAD_NUMBER_OF_COLUMNS,             # <<<<<<<<<<<<<<
14718  *                            "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols)))
14719  * 
14720  */
14721       __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_104); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14722       __Pyx_GOTREF(__pyx_t_1);
14723
14724       /* "cvcf.pyx":657
14725  *                 self.error(line,
14726  *                            self.BAD_NUMBER_OF_COLUMNS,
14727  *                            "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols)))             # <<<<<<<<<<<<<<
14728  * 
14729  *         chrom = cols[0]
14730  */
14731       __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14732       __Pyx_GOTREF(__pyx_t_6);
14733       __pyx_t_4 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14734       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14735       __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_4 + 9)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14736       __Pyx_GOTREF(__pyx_t_6);
14737       __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14738       __Pyx_GOTREF(__pyx_t_7);
14739       __pyx_t_4 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14740       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14741       __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14742       __Pyx_GOTREF(__pyx_t_7);
14743       __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14744       __Pyx_GOTREF(__pyx_t_8);
14745       __pyx_t_4 = PyObject_Length(__pyx_v_cols); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14746       __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14747       __Pyx_GOTREF(__pyx_t_9);
14748       __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14749       __Pyx_GOTREF(__pyx_t_10);
14750       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
14751       __Pyx_GIVEREF(__pyx_t_6);
14752       PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_7);
14753       __Pyx_GIVEREF(__pyx_t_7);
14754       PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_8);
14755       __Pyx_GIVEREF(__pyx_t_8);
14756       PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_9);
14757       __Pyx_GIVEREF(__pyx_t_9);
14758       __pyx_t_6 = 0;
14759       __pyx_t_7 = 0;
14760       __pyx_t_8 = 0;
14761       __pyx_t_9 = 0;
14762       __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_105), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14763       __Pyx_GOTREF(((PyObject *)__pyx_t_9));
14764       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
14765       __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14766       __Pyx_GOTREF(__pyx_t_10);
14767       __Pyx_INCREF(__pyx_v_line);
14768       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
14769       __Pyx_GIVEREF(__pyx_v_line);
14770       PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_1);
14771       __Pyx_GIVEREF(__pyx_t_1);
14772       PyTuple_SET_ITEM(__pyx_t_10, 2, ((PyObject *)__pyx_t_9));
14773       __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
14774       __pyx_t_1 = 0;
14775       __pyx_t_9 = 0;
14776       __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14777       __Pyx_GOTREF(__pyx_t_9);
14778       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14779       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
14780       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14781     }
14782     __pyx_L4:;
14783     goto __pyx_L3;
14784   }
14785   __pyx_L3:;
14786
14787   /* "cvcf.pyx":659
14788  *                            "expected %s for %s samples (%s), got %s" % (len(self._samples)+9, len(self._samples), self._samples, len(cols)))
14789  * 
14790  *         chrom = cols[0]             # <<<<<<<<<<<<<<
14791  * 
14792  *         # get 0-based position
14793  */
14794   __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14795   __Pyx_GOTREF(__pyx_t_9);
14796   __pyx_v_chrom = __pyx_t_9;
14797   __pyx_t_9 = 0;
14798
14799   /* "cvcf.pyx":662
14800  * 
14801  *         # get 0-based position
14802  *         try:    pos = int(cols[1])-1             # <<<<<<<<<<<<<<
14803  *         except: self.error(line,self.POS_NOT_NUMERICAL)
14804  *         if pos < 0: self.error(line,self.POS_NOT_POSITIVE)
14805  */
14806   {
14807     __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
14808     __Pyx_XGOTREF(__pyx_t_11);
14809     __Pyx_XGOTREF(__pyx_t_12);
14810     __Pyx_XGOTREF(__pyx_t_13);
14811     /*try:*/ {
14812       __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
14813       __Pyx_GOTREF(__pyx_t_9);
14814       __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
14815       __Pyx_GOTREF(__pyx_t_10);
14816       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
14817       __Pyx_GIVEREF(__pyx_t_9);
14818       __pyx_t_9 = 0;
14819       __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
14820       __Pyx_GOTREF(__pyx_t_9);
14821       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
14822       __pyx_t_10 = PyNumber_Subtract(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
14823       __Pyx_GOTREF(__pyx_t_10);
14824       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14825       __pyx_v_pos = __pyx_t_10;
14826       __pyx_t_10 = 0;
14827     }
14828     __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
14829     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
14830     __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
14831     goto __pyx_L12_try_end;
14832     __pyx_L5_error:;
14833     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14834     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14835     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
14836     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14837     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14838     __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14839     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14840
14841     /* "cvcf.pyx":663
14842  *         # get 0-based position
14843  *         try:    pos = int(cols[1])-1
14844  *         except: self.error(line,self.POS_NOT_NUMERICAL)             # <<<<<<<<<<<<<<
14845  *         if pos < 0: self.error(line,self.POS_NOT_POSITIVE)
14846  * 
14847  */
14848     /*except:*/ {
14849       __Pyx_AddTraceback("cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
14850       if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
14851       __Pyx_GOTREF(__pyx_t_10);
14852       __Pyx_GOTREF(__pyx_t_9);
14853       __Pyx_GOTREF(__pyx_t_2);
14854       __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
14855       __Pyx_GOTREF(__pyx_t_1);
14856       __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__POS_NOT_NUMERICAL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
14857       __Pyx_GOTREF(__pyx_t_8);
14858       __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
14859       __Pyx_GOTREF(__pyx_t_7);
14860       __Pyx_INCREF(__pyx_v_line);
14861       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
14862       __Pyx_GIVEREF(__pyx_v_line);
14863       PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
14864       __Pyx_GIVEREF(__pyx_t_8);
14865       __pyx_t_8 = 0;
14866       __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
14867       __Pyx_GOTREF(__pyx_t_8);
14868       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14869       __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
14870       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14871       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14872       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14873       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14874       goto __pyx_L6_exception_handled;
14875     }
14876     __pyx_L7_except_error:;
14877     __Pyx_XGIVEREF(__pyx_t_11);
14878     __Pyx_XGIVEREF(__pyx_t_12);
14879     __Pyx_XGIVEREF(__pyx_t_13);
14880     __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
14881     goto __pyx_L1_error;
14882     __pyx_L6_exception_handled:;
14883     __Pyx_XGIVEREF(__pyx_t_11);
14884     __Pyx_XGIVEREF(__pyx_t_12);
14885     __Pyx_XGIVEREF(__pyx_t_13);
14886     __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
14887     __pyx_L12_try_end:;
14888   }
14889
14890   /* "cvcf.pyx":664
14891  *         try:    pos = int(cols[1])-1
14892  *         except: self.error(line,self.POS_NOT_NUMERICAL)
14893  *         if pos < 0: self.error(line,self.POS_NOT_POSITIVE)             # <<<<<<<<<<<<<<
14894  * 
14895  *         # implement filtering
14896  */
14897   if (unlikely(!__pyx_v_pos)) { __Pyx_RaiseUnboundLocalError("pos"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
14898   __pyx_t_2 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14899   __Pyx_GOTREF(__pyx_t_2);
14900   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14901   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14902   if (__pyx_t_5) {
14903     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14904     __Pyx_GOTREF(__pyx_t_2);
14905     __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__POS_NOT_POSITIVE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14906     __Pyx_GOTREF(__pyx_t_9);
14907     __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14908     __Pyx_GOTREF(__pyx_t_10);
14909     __Pyx_INCREF(__pyx_v_line);
14910     PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
14911     __Pyx_GIVEREF(__pyx_v_line);
14912     PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
14913     __Pyx_GIVEREF(__pyx_t_9);
14914     __pyx_t_9 = 0;
14915     __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14916     __Pyx_GOTREF(__pyx_t_9);
14917     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14918     __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
14919     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14920     goto __pyx_L15;
14921   }
14922   __pyx_L15:;
14923
14924   /* "cvcf.pyx":667
14925  * 
14926  *         # implement filtering
14927  *         if not self.inregion(chrom,pos): return None             # <<<<<<<<<<<<<<
14928  * 
14929  *         # end of first-pass parse for sortedVCF
14930  */
14931   __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__inregion); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14932   __Pyx_GOTREF(__pyx_t_9);
14933   __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14934   __Pyx_GOTREF(__pyx_t_10);
14935   __Pyx_INCREF(__pyx_v_chrom);
14936   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_chrom);
14937   __Pyx_GIVEREF(__pyx_v_chrom);
14938   __Pyx_INCREF(__pyx_v_pos);
14939   PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_pos);
14940   __Pyx_GIVEREF(__pyx_v_pos);
14941   __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14942   __Pyx_GOTREF(__pyx_t_2);
14943   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14944   __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
14945   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14946   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14947   __pyx_t_14 = (!__pyx_t_5);
14948   if (__pyx_t_14) {
14949     __Pyx_XDECREF(__pyx_r);
14950     __Pyx_INCREF(Py_None);
14951     __pyx_r = Py_None;
14952     goto __pyx_L0;
14953     goto __pyx_L16;
14954   }
14955   __pyx_L16:;
14956
14957   /* "cvcf.pyx":670
14958  * 
14959  *         # end of first-pass parse for sortedVCF
14960  *         if lineparse: return chrom, pos, line             # <<<<<<<<<<<<<<
14961  * 
14962  *         id = cols[2]
14963  */
14964   __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_lineparse); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14965   if (__pyx_t_14) {
14966     __Pyx_XDECREF(__pyx_r);
14967     __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14968     __Pyx_GOTREF(__pyx_t_2);
14969     __Pyx_INCREF(__pyx_v_chrom);
14970     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
14971     __Pyx_GIVEREF(__pyx_v_chrom);
14972     __Pyx_INCREF(__pyx_v_pos);
14973     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_pos);
14974     __Pyx_GIVEREF(__pyx_v_pos);
14975     __Pyx_INCREF(__pyx_v_line);
14976     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_line);
14977     __Pyx_GIVEREF(__pyx_v_line);
14978     __pyx_r = ((PyObject *)__pyx_t_2);
14979     __pyx_t_2 = 0;
14980     goto __pyx_L0;
14981     goto __pyx_L17;
14982   }
14983   __pyx_L17:;
14984
14985   /* "cvcf.pyx":672
14986  *         if lineparse: return chrom, pos, line
14987  * 
14988  *         id = cols[2]             # <<<<<<<<<<<<<<
14989  * 
14990  *         ref = cols[3].upper()
14991  */
14992   __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14993   __Pyx_GOTREF(__pyx_t_2);
14994   __pyx_v_id = __pyx_t_2;
14995   __pyx_t_2 = 0;
14996
14997   /* "cvcf.pyx":674
14998  *         id = cols[2]
14999  * 
15000  *         ref = cols[3].upper()             # <<<<<<<<<<<<<<
15001  *         if ref == ".":
15002  *             self.error(line,self.MISSING_REF)
15003  */
15004   __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cols, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15005   __Pyx_GOTREF(__pyx_t_2);
15006   __pyx_t_10 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15007   __Pyx_GOTREF(__pyx_t_10);
15008   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15009   __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15010   __Pyx_GOTREF(__pyx_t_2);
15011   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15012   __pyx_v_ref = __pyx_t_2;
15013   __pyx_t_2 = 0;
15014
15015   /* "cvcf.pyx":675
15016  * 
15017  *         ref = cols[3].upper()
15018  *         if ref == ".":             # <<<<<<<<<<<<<<
15019  *             self.error(line,self.MISSING_REF)
15020  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
15021  */
15022   __pyx_t_14 = __Pyx_PyString_Equals(__pyx_v_ref, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15023   if (__pyx_t_14) {
15024
15025     /* "cvcf.pyx":676
15026  *         ref = cols[3].upper()
15027  *         if ref == ".":
15028  *             self.error(line,self.MISSING_REF)             # <<<<<<<<<<<<<<
15029  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
15030  *             else:                   ref = ""
15031  */
15032     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15033     __Pyx_GOTREF(__pyx_t_2);
15034     __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__MISSING_REF); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15035     __Pyx_GOTREF(__pyx_t_10);
15036     __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15037     __Pyx_GOTREF(__pyx_t_9);
15038     __Pyx_INCREF(__pyx_v_line);
15039     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
15040     __Pyx_GIVEREF(__pyx_v_line);
15041     PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
15042     __Pyx_GIVEREF(__pyx_t_10);
15043     __pyx_t_10 = 0;
15044     __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15045     __Pyx_GOTREF(__pyx_t_10);
15046     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15047     __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
15048     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15049
15050     /* "cvcf.pyx":677
15051  *         if ref == ".":
15052  *             self.error(line,self.MISSING_REF)
15053  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)             # <<<<<<<<<<<<<<
15054  *             else:                   ref = ""
15055  *         else:
15056  */
15057     __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15058     __Pyx_GOTREF(__pyx_t_10);
15059     __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15060     __Pyx_GOTREF(__pyx_t_9);
15061     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15062     __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15063     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15064     if (__pyx_t_14) {
15065       __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15066       __Pyx_GOTREF(__pyx_t_9);
15067       __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15068       __Pyx_GOTREF(__pyx_t_10);
15069       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15070       __Pyx_GOTREF(__pyx_t_2);
15071       __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15072       __Pyx_GOTREF(__pyx_t_8);
15073       __Pyx_INCREF(__pyx_v_chrom);
15074       PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_chrom);
15075       __Pyx_GIVEREF(__pyx_v_chrom);
15076       __Pyx_INCREF(__pyx_v_pos);
15077       PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_pos);
15078       __Pyx_GIVEREF(__pyx_v_pos);
15079       PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_10);
15080       __Pyx_GIVEREF(__pyx_t_10);
15081       PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_2);
15082       __Pyx_GIVEREF(__pyx_t_2);
15083       __pyx_t_10 = 0;
15084       __pyx_t_2 = 0;
15085       __pyx_t_2 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15086       __Pyx_GOTREF(__pyx_t_2);
15087       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15088       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
15089       __Pyx_DECREF(__pyx_v_ref);
15090       __pyx_v_ref = __pyx_t_2;
15091       __pyx_t_2 = 0;
15092       goto __pyx_L19;
15093     }
15094     /*else*/ {
15095
15096       /* "cvcf.pyx":678
15097  *             self.error(line,self.MISSING_REF)
15098  *             if self._version == 33: ref = get_sequence(chrom,pos,pos+1,self._reference)
15099  *             else:                   ref = ""             # <<<<<<<<<<<<<<
15100  *         else:
15101  *             for c in ref:
15102  */
15103       __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
15104       __Pyx_DECREF(__pyx_v_ref);
15105       __pyx_v_ref = ((PyObject *)__pyx_kp_s_1);
15106     }
15107     __pyx_L19:;
15108     goto __pyx_L18;
15109   }
15110   /*else*/ {
15111
15112     /* "cvcf.pyx":680
15113  *             else:                   ref = ""
15114  *         else:
15115  *             for c in ref:             # <<<<<<<<<<<<<<
15116  *                 if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF)
15117  *             if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference)
15118  */
15119     if (PyList_CheckExact(__pyx_v_ref) || PyTuple_CheckExact(__pyx_v_ref)) {
15120       __pyx_t_2 = __pyx_v_ref; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
15121       __pyx_t_15 = NULL;
15122     } else {
15123       __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15124       __Pyx_GOTREF(__pyx_t_2);
15125       __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
15126     }
15127     for (;;) {
15128       if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
15129         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
15130         __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
15131       } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
15132         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
15133         __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
15134       } else {
15135         __pyx_t_8 = __pyx_t_15(__pyx_t_2);
15136         if (unlikely(!__pyx_t_8)) {
15137           if (PyErr_Occurred()) {
15138             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
15139             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15140           }
15141           break;
15142         }
15143         __Pyx_GOTREF(__pyx_t_8);
15144       }
15145       __Pyx_XDECREF(__pyx_v_c);
15146       __pyx_v_c = __pyx_t_8;
15147       __pyx_t_8 = 0;
15148
15149       /* "cvcf.pyx":681
15150  *         else:
15151  *             for c in ref:
15152  *                 if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF)             # <<<<<<<<<<<<<<
15153  *             if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference)
15154  * 
15155  */
15156       __pyx_t_14 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_n_s__ACGTN), __pyx_v_c))); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15157       if (__pyx_t_14) {
15158         __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15159         __Pyx_GOTREF(__pyx_t_8);
15160         __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__UNKNOWN_CHAR_IN_REF); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15161         __Pyx_GOTREF(__pyx_t_9);
15162         __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15163         __Pyx_GOTREF(__pyx_t_10);
15164         __Pyx_INCREF(__pyx_v_line);
15165         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
15166         __Pyx_GIVEREF(__pyx_v_line);
15167         PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
15168         __Pyx_GIVEREF(__pyx_t_9);
15169         __pyx_t_9 = 0;
15170         __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15171         __Pyx_GOTREF(__pyx_t_9);
15172         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15173         __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
15174         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15175         goto __pyx_L22;
15176       }
15177       __pyx_L22:;
15178     }
15179     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15180
15181     /* "cvcf.pyx":682
15182  *             for c in ref:
15183  *                 if c not in "ACGTN": self.error(line,self.UNKNOWN_CHAR_IN_REF)
15184  *             if "N" in ref: ref = get_sequence(chrom,pos,pos+len(ref),self._reference)             # <<<<<<<<<<<<<<
15185  * 
15186  *         # make sure reference is sane
15187  */
15188     __pyx_t_14 = ((PySequence_Contains(__pyx_v_ref, ((PyObject *)__pyx_n_s__N)))); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15189     if (__pyx_t_14) {
15190       __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15191       __Pyx_GOTREF(__pyx_t_2);
15192       __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15193       __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15194       __Pyx_GOTREF(__pyx_t_9);
15195       __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15196       __Pyx_GOTREF(__pyx_t_10);
15197       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15198       __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15199       __Pyx_GOTREF(__pyx_t_9);
15200       __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15201       __Pyx_GOTREF(__pyx_t_8);
15202       __Pyx_INCREF(__pyx_v_chrom);
15203       PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_chrom);
15204       __Pyx_GIVEREF(__pyx_v_chrom);
15205       __Pyx_INCREF(__pyx_v_pos);
15206       PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_pos);
15207       __Pyx_GIVEREF(__pyx_v_pos);
15208       PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_10);
15209       __Pyx_GIVEREF(__pyx_t_10);
15210       PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_9);
15211       __Pyx_GIVEREF(__pyx_t_9);
15212       __pyx_t_10 = 0;
15213       __pyx_t_9 = 0;
15214       __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15215       __Pyx_GOTREF(__pyx_t_9);
15216       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15217       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
15218       __Pyx_DECREF(__pyx_v_ref);
15219       __pyx_v_ref = __pyx_t_9;
15220       __pyx_t_9 = 0;
15221       goto __pyx_L23;
15222     }
15223     __pyx_L23:;
15224   }
15225   __pyx_L18:;
15226
15227   /* "cvcf.pyx":685
15228  * 
15229  *         # make sure reference is sane
15230  *         if self._reference:             # <<<<<<<<<<<<<<
15231  *             left = max(0,pos-100)
15232  *             faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)
15233  */
15234   __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15235   __Pyx_GOTREF(__pyx_t_9);
15236   __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15237   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15238   if (__pyx_t_14) {
15239
15240     /* "cvcf.pyx":686
15241  *         # make sure reference is sane
15242  *         if self._reference:
15243  *             left = max(0,pos-100)             # <<<<<<<<<<<<<<
15244  *             faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)
15245  *             faref = faref_leftflank[pos-left:]
15246  */
15247     __pyx_t_9 = PyNumber_Subtract(__pyx_v_pos, __pyx_int_100); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15248     __Pyx_GOTREF(__pyx_t_9);
15249     __pyx_t_16 = 0;
15250     __pyx_t_2 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15251     __Pyx_GOTREF(__pyx_t_2);
15252     __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_t_2, Py_GT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15253     __Pyx_GOTREF(__pyx_t_10);
15254     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15255     __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15256     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15257     if (__pyx_t_14) {
15258       __Pyx_INCREF(__pyx_t_9);
15259       __pyx_t_8 = __pyx_t_9;
15260     } else {
15261       __pyx_t_10 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15262       __Pyx_GOTREF(__pyx_t_10);
15263       __pyx_t_8 = __pyx_t_10;
15264       __pyx_t_10 = 0;
15265     }
15266     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15267     __Pyx_INCREF(__pyx_t_8);
15268     __pyx_v_left = __pyx_t_8;
15269     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15270
15271     /* "cvcf.pyx":687
15272  *         if self._reference:
15273  *             left = max(0,pos-100)
15274  *             faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)             # <<<<<<<<<<<<<<
15275  *             faref = faref_leftflank[pos-left:]
15276  *             if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))
15277  */
15278     __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15279     __Pyx_GOTREF(__pyx_t_8);
15280     __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15281     __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15282     __Pyx_GOTREF(__pyx_t_9);
15283     __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15284     __Pyx_GOTREF(__pyx_t_10);
15285     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15286     __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15287     __Pyx_GOTREF(__pyx_t_9);
15288     __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15289     __Pyx_GOTREF(__pyx_t_2);
15290     __Pyx_INCREF(__pyx_v_chrom);
15291     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
15292     __Pyx_GIVEREF(__pyx_v_chrom);
15293     __Pyx_INCREF(__pyx_v_left);
15294     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_left);
15295     __Pyx_GIVEREF(__pyx_v_left);
15296     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_10);
15297     __Pyx_GIVEREF(__pyx_t_10);
15298     PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_9);
15299     __Pyx_GIVEREF(__pyx_t_9);
15300     __pyx_t_10 = 0;
15301     __pyx_t_9 = 0;
15302     __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15303     __Pyx_GOTREF(__pyx_t_9);
15304     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15305     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
15306     __pyx_v_faref_leftflank = __pyx_t_9;
15307     __pyx_t_9 = 0;
15308
15309     /* "cvcf.pyx":688
15310  *             left = max(0,pos-100)
15311  *             faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)
15312  *             faref = faref_leftflank[pos-left:]             # <<<<<<<<<<<<<<
15313  *             if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))
15314  *             ref = faref
15315  */
15316     __pyx_t_9 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15317     __Pyx_GOTREF(__pyx_t_9);
15318     __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15319     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15320     __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_faref_leftflank, __pyx_t_4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15321     __Pyx_GOTREF(__pyx_t_9);
15322     __pyx_v_faref = __pyx_t_9;
15323     __pyx_t_9 = 0;
15324
15325     /* "cvcf.pyx":689
15326  *             faref_leftflank = get_sequence(chrom,left,pos+len(ref),self._reference)
15327  *             faref = faref_leftflank[pos-left:]
15328  *             if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))             # <<<<<<<<<<<<<<
15329  *             ref = faref
15330  * 
15331  */
15332     __pyx_t_9 = PyObject_RichCompare(__pyx_v_faref, __pyx_v_ref, Py_NE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15333     __Pyx_GOTREF(__pyx_t_9);
15334     __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15335     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15336     if (__pyx_t_14) {
15337       __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15338       __Pyx_GOTREF(__pyx_t_9);
15339       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__WRONG_REF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15340       __Pyx_GOTREF(__pyx_t_2);
15341       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15342       __Pyx_GOTREF(__pyx_t_8);
15343       __Pyx_INCREF(__pyx_v_faref);
15344       PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_faref);
15345       __Pyx_GIVEREF(__pyx_v_faref);
15346       __Pyx_INCREF(__pyx_v_ref);
15347       PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ref);
15348       __Pyx_GIVEREF(__pyx_v_ref);
15349       __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_106), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15350       __Pyx_GOTREF(((PyObject *)__pyx_t_10));
15351       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
15352       __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15353       __Pyx_GOTREF(__pyx_t_8);
15354       __Pyx_INCREF(__pyx_v_line);
15355       PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_line);
15356       __Pyx_GIVEREF(__pyx_v_line);
15357       PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
15358       __Pyx_GIVEREF(__pyx_t_2);
15359       PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_10));
15360       __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
15361       __pyx_t_2 = 0;
15362       __pyx_t_10 = 0;
15363       __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15364       __Pyx_GOTREF(__pyx_t_10);
15365       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15366       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
15367       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15368       goto __pyx_L25;
15369     }
15370     __pyx_L25:;
15371
15372     /* "cvcf.pyx":690
15373  *             faref = faref_leftflank[pos-left:]
15374  *             if faref != ref: self.error(line,self.WRONG_REF,"(reference is %s, VCF says %s)" % (faref,ref))
15375  *             ref = faref             # <<<<<<<<<<<<<<
15376  * 
15377  *         # convert v3.3 to v4.0 alleles below
15378  */
15379     __Pyx_INCREF(__pyx_v_faref);
15380     __Pyx_DECREF(__pyx_v_ref);
15381     __pyx_v_ref = __pyx_v_faref;
15382     goto __pyx_L24;
15383   }
15384   __pyx_L24:;
15385
15386   /* "cvcf.pyx":693
15387  * 
15388  *         # convert v3.3 to v4.0 alleles below
15389  *         if cols[4] == ".": alt = []             # <<<<<<<<<<<<<<
15390  *         else: alt = cols[4].upper().split(',')
15391  * 
15392  */
15393   __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15394   __Pyx_GOTREF(__pyx_t_10);
15395   __pyx_t_14 = __Pyx_PyString_Equals(__pyx_t_10, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15396   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15397   if (__pyx_t_14) {
15398     __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15399     __Pyx_GOTREF(__pyx_t_10);
15400     __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
15401     __pyx_cur_scope->__pyx_v_alt = ((PyObject *)__pyx_t_10);
15402     __pyx_t_10 = 0;
15403     goto __pyx_L26;
15404   }
15405   /*else*/ {
15406
15407     /* "cvcf.pyx":694
15408  *         # convert v3.3 to v4.0 alleles below
15409  *         if cols[4] == ".": alt = []
15410  *         else: alt = cols[4].upper().split(',')             # <<<<<<<<<<<<<<
15411  * 
15412  *         if cols[5] == ".": qual = -1
15413  */
15414     __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15415     __Pyx_GOTREF(__pyx_t_10);
15416     __pyx_t_8 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__upper); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15417     __Pyx_GOTREF(__pyx_t_8);
15418     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15419     __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15420     __Pyx_GOTREF(__pyx_t_10);
15421     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15422     __pyx_t_8 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15423     __Pyx_GOTREF(__pyx_t_8);
15424     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15425     __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_107), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15426     __Pyx_GOTREF(__pyx_t_10);
15427     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15428     __Pyx_GIVEREF(__pyx_t_10);
15429     __pyx_cur_scope->__pyx_v_alt = __pyx_t_10;
15430     __pyx_t_10 = 0;
15431   }
15432   __pyx_L26:;
15433
15434   /* "cvcf.pyx":696
15435  *         else: alt = cols[4].upper().split(',')
15436  * 
15437  *         if cols[5] == ".": qual = -1             # <<<<<<<<<<<<<<
15438  *         else:
15439  *             try:    qual = float(cols[5])
15440  */
15441   __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15442   __Pyx_GOTREF(__pyx_t_10);
15443   __pyx_t_14 = __Pyx_PyString_Equals(__pyx_t_10, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15444   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15445   if (__pyx_t_14) {
15446     __pyx_v_qual = -1.0;
15447     goto __pyx_L27;
15448   }
15449   /*else*/ {
15450
15451     /* "cvcf.pyx":698
15452  *         if cols[5] == ".": qual = -1
15453  *         else:
15454  *             try:    qual = float(cols[5])             # <<<<<<<<<<<<<<
15455  *             except: self.error(line,self.QUAL_NOT_NUMERICAL)
15456  * 
15457  */
15458     {
15459       __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
15460       __Pyx_XGOTREF(__pyx_t_13);
15461       __Pyx_XGOTREF(__pyx_t_12);
15462       __Pyx_XGOTREF(__pyx_t_11);
15463       /*try:*/ {
15464         __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_cols, 5, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
15465         __Pyx_GOTREF(__pyx_t_10);
15466         __pyx_t_17 = __Pyx_PyObject_AsDouble(__pyx_t_10); if (unlikely(__pyx_t_17 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
15467         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15468         __pyx_v_qual = __pyx_t_17;
15469       }
15470       __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
15471       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
15472       __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
15473       goto __pyx_L35_try_end;
15474       __pyx_L28_error:;
15475       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15476       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
15477       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15478       __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
15479       __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15480       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
15481       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15482
15483       /* "cvcf.pyx":699
15484  *         else:
15485  *             try:    qual = float(cols[5])
15486  *             except: self.error(line,self.QUAL_NOT_NUMERICAL)             # <<<<<<<<<<<<<<
15487  * 
15488  *         # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
15489  */
15490       /*except:*/ {
15491         __Pyx_AddTraceback("cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
15492         if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
15493         __Pyx_GOTREF(__pyx_t_10);
15494         __Pyx_GOTREF(__pyx_t_8);
15495         __Pyx_GOTREF(__pyx_t_9);
15496         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
15497         __Pyx_GOTREF(__pyx_t_2);
15498         __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__QUAL_NOT_NUMERICAL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
15499         __Pyx_GOTREF(__pyx_t_7);
15500         __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
15501         __Pyx_GOTREF(__pyx_t_1);
15502         __Pyx_INCREF(__pyx_v_line);
15503         PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_line);
15504         __Pyx_GIVEREF(__pyx_v_line);
15505         PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
15506         __Pyx_GIVEREF(__pyx_t_7);
15507         __pyx_t_7 = 0;
15508         __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L30_except_error;}
15509         __Pyx_GOTREF(__pyx_t_7);
15510         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15511         __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
15512         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15513         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15514         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15515         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15516         goto __pyx_L29_exception_handled;
15517       }
15518       __pyx_L30_except_error:;
15519       __Pyx_XGIVEREF(__pyx_t_13);
15520       __Pyx_XGIVEREF(__pyx_t_12);
15521       __Pyx_XGIVEREF(__pyx_t_11);
15522       __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
15523       goto __pyx_L1_error;
15524       __pyx_L29_exception_handled:;
15525       __Pyx_XGIVEREF(__pyx_t_13);
15526       __Pyx_XGIVEREF(__pyx_t_12);
15527       __Pyx_XGIVEREF(__pyx_t_11);
15528       __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
15529       __pyx_L35_try_end:;
15530     }
15531   }
15532   __pyx_L27:;
15533
15534   /* "cvcf.pyx":702
15535  * 
15536  *         # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
15537  *         if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = []             # <<<<<<<<<<<<<<
15538  *         else: filter = cols[6].split(';')
15539  * 
15540  */
15541   __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15542   __Pyx_GOTREF(__pyx_t_9);
15543   __pyx_t_14 = __Pyx_PyString_Equals(__pyx_t_9, ((PyObject *)__pyx_kp_s_9), Py_EQ); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15544   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15545   if (!__pyx_t_14) {
15546     __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15547     __Pyx_GOTREF(__pyx_t_9);
15548     __pyx_t_5 = __Pyx_PyString_Equals(__pyx_t_9, ((PyObject *)__pyx_n_s__PASS), Py_EQ); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15549     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15550     if (!__pyx_t_5) {
15551       __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15552       __Pyx_GOTREF(__pyx_t_9);
15553       __pyx_t_18 = __Pyx_PyString_Equals(__pyx_t_9, ((PyObject *)__pyx_kp_s__0), Py_EQ); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15554       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15555       __pyx_t_19 = __pyx_t_18;
15556     } else {
15557       __pyx_t_19 = __pyx_t_5;
15558     }
15559     __pyx_t_5 = __pyx_t_19;
15560   } else {
15561     __pyx_t_5 = __pyx_t_14;
15562   }
15563   if (__pyx_t_5) {
15564     __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15565     __Pyx_GOTREF(__pyx_t_9);
15566     __pyx_v_filter = ((PyObject *)__pyx_t_9);
15567     __pyx_t_9 = 0;
15568     goto __pyx_L38;
15569   }
15570   /*else*/ {
15571
15572     /* "cvcf.pyx":703
15573  *         # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
15574  *         if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = []
15575  *         else: filter = cols[6].split(';')             # <<<<<<<<<<<<<<
15576  * 
15577  *         # dictionary of keys, and list of values
15578  */
15579     __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15580     __Pyx_GOTREF(__pyx_t_9);
15581     __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15582     __Pyx_GOTREF(__pyx_t_8);
15583     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15584     __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15585     __Pyx_GOTREF(__pyx_t_9);
15586     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15587     __pyx_v_filter = __pyx_t_9;
15588     __pyx_t_9 = 0;
15589   }
15590   __pyx_L38:;
15591
15592   /* "cvcf.pyx":706
15593  * 
15594  *         # dictionary of keys, and list of values
15595  *         info = {}             # <<<<<<<<<<<<<<
15596  *         if cols[7] != ".":
15597  *             for blurp in cols[7].split(';'):
15598  */
15599   __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15600   __Pyx_GOTREF(((PyObject *)__pyx_t_9));
15601   __pyx_v_info = __pyx_t_9;
15602   __pyx_t_9 = 0;
15603
15604   /* "cvcf.pyx":707
15605  *         # dictionary of keys, and list of values
15606  *         info = {}
15607  *         if cols[7] != ".":             # <<<<<<<<<<<<<<
15608  *             for blurp in cols[7].split(';'):
15609  *                 elts = blurp.split('=')
15610  */
15611   __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15612   __Pyx_GOTREF(__pyx_t_9);
15613   __pyx_t_5 = __Pyx_PyString_Equals(__pyx_t_9, ((PyObject *)__pyx_kp_s_9), Py_NE); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15614   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15615   if (__pyx_t_5) {
15616
15617     /* "cvcf.pyx":708
15618  *         info = {}
15619  *         if cols[7] != ".":
15620  *             for blurp in cols[7].split(';'):             # <<<<<<<<<<<<<<
15621  *                 elts = blurp.split('=')
15622  *                 if len(elts) == 1: v = None
15623  */
15624     __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cols, 7, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15625     __Pyx_GOTREF(__pyx_t_9);
15626     __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15627     __Pyx_GOTREF(__pyx_t_8);
15628     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15629     __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15630     __Pyx_GOTREF(__pyx_t_9);
15631     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15632     if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
15633       __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
15634       __pyx_t_15 = NULL;
15635     } else {
15636       __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15637       __Pyx_GOTREF(__pyx_t_8);
15638       __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
15639     }
15640     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15641     for (;;) {
15642       if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
15643         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
15644         __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++;
15645       } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
15646         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
15647         __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++;
15648       } else {
15649         __pyx_t_9 = __pyx_t_15(__pyx_t_8);
15650         if (unlikely(!__pyx_t_9)) {
15651           if (PyErr_Occurred()) {
15652             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
15653             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15654           }
15655           break;
15656         }
15657         __Pyx_GOTREF(__pyx_t_9);
15658       }
15659       __Pyx_XDECREF(__pyx_v_blurp);
15660       __pyx_v_blurp = __pyx_t_9;
15661       __pyx_t_9 = 0;
15662
15663       /* "cvcf.pyx":709
15664  *         if cols[7] != ".":
15665  *             for blurp in cols[7].split(';'):
15666  *                 elts = blurp.split('=')             # <<<<<<<<<<<<<<
15667  *                 if len(elts) == 1: v = None
15668  *                 elif len(elts) == 2: v = elts[1]
15669  */
15670       __pyx_t_9 = PyObject_GetAttr(__pyx_v_blurp, __pyx_n_s__split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15671       __Pyx_GOTREF(__pyx_t_9);
15672       __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_110), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15673       __Pyx_GOTREF(__pyx_t_10);
15674       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15675       __Pyx_XDECREF(__pyx_v_elts);
15676       __pyx_v_elts = __pyx_t_10;
15677       __pyx_t_10 = 0;
15678
15679       /* "cvcf.pyx":710
15680  *             for blurp in cols[7].split(';'):
15681  *                 elts = blurp.split('=')
15682  *                 if len(elts) == 1: v = None             # <<<<<<<<<<<<<<
15683  *                 elif len(elts) == 2: v = elts[1]
15684  *                 else: self.error(line,self.ERROR_INFO_STRING)
15685  */
15686       __pyx_t_3 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15687       __pyx_t_5 = (__pyx_t_3 == 1);
15688       if (__pyx_t_5) {
15689         __Pyx_INCREF(Py_None);
15690         __Pyx_XDECREF(__pyx_v_v);
15691         __pyx_v_v = Py_None;
15692         goto __pyx_L42;
15693       }
15694
15695       /* "cvcf.pyx":711
15696  *                 elts = blurp.split('=')
15697  *                 if len(elts) == 1: v = None
15698  *                 elif len(elts) == 2: v = elts[1]             # <<<<<<<<<<<<<<
15699  *                 else: self.error(line,self.ERROR_INFO_STRING)
15700  *                 info[elts[0]] = self.parse_formatdata(elts[0],
15701  */
15702       __pyx_t_3 = PyObject_Length(__pyx_v_elts); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15703       __pyx_t_5 = (__pyx_t_3 == 2);
15704       if (__pyx_t_5) {
15705         __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_elts, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15706         __Pyx_GOTREF(__pyx_t_10);
15707         __Pyx_XDECREF(__pyx_v_v);
15708         __pyx_v_v = __pyx_t_10;
15709         __pyx_t_10 = 0;
15710         goto __pyx_L42;
15711       }
15712       /*else*/ {
15713
15714         /* "cvcf.pyx":712
15715  *                 if len(elts) == 1: v = None
15716  *                 elif len(elts) == 2: v = elts[1]
15717  *                 else: self.error(line,self.ERROR_INFO_STRING)             # <<<<<<<<<<<<<<
15718  *                 info[elts[0]] = self.parse_formatdata(elts[0],
15719  *                                                       v,
15720  */
15721         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15722         __Pyx_GOTREF(__pyx_t_10);
15723         __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ERROR_INFO_STRING); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15724         __Pyx_GOTREF(__pyx_t_9);
15725         __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15726         __Pyx_GOTREF(__pyx_t_7);
15727         __Pyx_INCREF(__pyx_v_line);
15728         PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
15729         __Pyx_GIVEREF(__pyx_v_line);
15730         PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9);
15731         __Pyx_GIVEREF(__pyx_t_9);
15732         __pyx_t_9 = 0;
15733         __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15734         __Pyx_GOTREF(__pyx_t_9);
15735         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15736         __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
15737         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15738       }
15739       __pyx_L42:;
15740
15741       /* "cvcf.pyx":713
15742  *                 elif len(elts) == 2: v = elts[1]
15743  *                 else: self.error(line,self.ERROR_INFO_STRING)
15744  *                 info[elts[0]] = self.parse_formatdata(elts[0],             # <<<<<<<<<<<<<<
15745  *                                                       v,
15746  *                                                       self._info,
15747  */
15748       __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15749       __Pyx_GOTREF(__pyx_t_9);
15750       __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15751       __Pyx_GOTREF(__pyx_t_7);
15752
15753       /* "cvcf.pyx":714
15754  *                 else: self.error(line,self.ERROR_INFO_STRING)
15755  *                 info[elts[0]] = self.parse_formatdata(elts[0],
15756  *                                                       v,             # <<<<<<<<<<<<<<
15757  *                                                       self._info,
15758  *                                                       line)
15759  */
15760       if (unlikely(!__pyx_v_v)) { __Pyx_RaiseUnboundLocalError("v"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
15761
15762       /* "cvcf.pyx":715
15763  *                 info[elts[0]] = self.parse_formatdata(elts[0],
15764  *                                                       v,
15765  *                                                       self._info,             # <<<<<<<<<<<<<<
15766  *                                                       line)
15767  * 
15768  */
15769       __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15770       __Pyx_GOTREF(__pyx_t_10);
15771
15772       /* "cvcf.pyx":716
15773  *                                                       v,
15774  *                                                       self._info,
15775  *                                                       line)             # <<<<<<<<<<<<<<
15776  * 
15777  *         # Gracefully deal with absent FORMAT column
15778  */
15779       __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15780       __Pyx_GOTREF(__pyx_t_1);
15781       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
15782       __Pyx_GIVEREF(__pyx_t_7);
15783       __Pyx_INCREF(__pyx_v_v);
15784       PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_v);
15785       __Pyx_GIVEREF(__pyx_v_v);
15786       PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_10);
15787       __Pyx_GIVEREF(__pyx_t_10);
15788       __Pyx_INCREF(__pyx_v_line);
15789       PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_line);
15790       __Pyx_GIVEREF(__pyx_v_line);
15791       __pyx_t_7 = 0;
15792       __pyx_t_10 = 0;
15793       __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15794       __Pyx_GOTREF(__pyx_t_10);
15795       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15796       __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
15797
15798       /* "cvcf.pyx":713
15799  *                 elif len(elts) == 2: v = elts[1]
15800  *                 else: self.error(line,self.ERROR_INFO_STRING)
15801  *                 info[elts[0]] = self.parse_formatdata(elts[0],             # <<<<<<<<<<<<<<
15802  *                                                       v,
15803  *                                                       self._info,
15804  */
15805       __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_elts, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15806       __Pyx_GOTREF(__pyx_t_1);
15807       if (PyDict_SetItem(((PyObject *)__pyx_v_info), __pyx_t_1, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15808       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15809       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15810     }
15811     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15812     goto __pyx_L39;
15813   }
15814   __pyx_L39:;
15815
15816   /* "cvcf.pyx":719
15817  * 
15818  *         # Gracefully deal with absent FORMAT column
15819  *         if cols[8] == "": format = []             # <<<<<<<<<<<<<<
15820  *         else: format = cols[8].split(':')
15821  * 
15822  */
15823   __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cols, 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15824   __Pyx_GOTREF(__pyx_t_8);
15825   __pyx_t_5 = __Pyx_PyString_Equals(__pyx_t_8, ((PyObject *)__pyx_kp_s_1), Py_EQ); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15826   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15827   if (__pyx_t_5) {
15828     __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15829     __Pyx_GOTREF(__pyx_t_8);
15830     __pyx_v_format = ((PyObject *)__pyx_t_8);
15831     __pyx_t_8 = 0;
15832     goto __pyx_L43;
15833   }
15834   /*else*/ {
15835
15836     /* "cvcf.pyx":720
15837  *         # Gracefully deal with absent FORMAT column
15838  *         if cols[8] == "": format = []
15839  *         else: format = cols[8].split(':')             # <<<<<<<<<<<<<<
15840  * 
15841  *         # check: all filters are defined
15842  */
15843     __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cols, 8, sizeof(long), PyInt_FromLong); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15844     __Pyx_GOTREF(__pyx_t_8);
15845     __pyx_t_10 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__split); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15846     __Pyx_GOTREF(__pyx_t_10);
15847     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15848     __pyx_t_8 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_111), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15849     __Pyx_GOTREF(__pyx_t_8);
15850     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15851     __pyx_v_format = __pyx_t_8;
15852     __pyx_t_8 = 0;
15853   }
15854   __pyx_L43:;
15855
15856   /* "cvcf.pyx":723
15857  * 
15858  *         # check: all filters are defined
15859  *         for f in filter:             # <<<<<<<<<<<<<<
15860  *             if f not in self._filter: self.error(line,self.FILTER_NOT_DEFINED, f)
15861  * 
15862  */
15863   if (PyList_CheckExact(__pyx_v_filter) || PyTuple_CheckExact(__pyx_v_filter)) {
15864     __pyx_t_8 = __pyx_v_filter; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
15865     __pyx_t_15 = NULL;
15866   } else {
15867     __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_filter); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15868     __Pyx_GOTREF(__pyx_t_8);
15869     __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
15870   }
15871   for (;;) {
15872     if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
15873       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
15874       __pyx_t_10 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
15875     } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
15876       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
15877       __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
15878     } else {
15879       __pyx_t_10 = __pyx_t_15(__pyx_t_8);
15880       if (unlikely(!__pyx_t_10)) {
15881         if (PyErr_Occurred()) {
15882           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
15883           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15884         }
15885         break;
15886       }
15887       __Pyx_GOTREF(__pyx_t_10);
15888     }
15889     __Pyx_XDECREF(__pyx_v_f);
15890     __pyx_v_f = __pyx_t_10;
15891     __pyx_t_10 = 0;
15892
15893     /* "cvcf.pyx":724
15894  *         # check: all filters are defined
15895  *         for f in filter:
15896  *             if f not in self._filter: self.error(line,self.FILTER_NOT_DEFINED, f)             # <<<<<<<<<<<<<<
15897  * 
15898  *         # check: format fields are defined
15899  */
15900     __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15901     __Pyx_GOTREF(__pyx_t_10);
15902     __pyx_t_5 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_10, __pyx_v_f))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15903     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15904     if (__pyx_t_5) {
15905       __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15906       __Pyx_GOTREF(__pyx_t_10);
15907       __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FILTER_NOT_DEFINED); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15908       __Pyx_GOTREF(__pyx_t_1);
15909       __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15910       __Pyx_GOTREF(__pyx_t_9);
15911       __Pyx_INCREF(__pyx_v_line);
15912       PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_line);
15913       __Pyx_GIVEREF(__pyx_v_line);
15914       PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
15915       __Pyx_GIVEREF(__pyx_t_1);
15916       __Pyx_INCREF(__pyx_v_f);
15917       PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_f);
15918       __Pyx_GIVEREF(__pyx_v_f);
15919       __pyx_t_1 = 0;
15920       __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15921       __Pyx_GOTREF(__pyx_t_1);
15922       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15923       __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
15924       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15925       goto __pyx_L46;
15926     }
15927     __pyx_L46:;
15928   }
15929   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15930
15931   /* "cvcf.pyx":727
15932  * 
15933  *         # check: format fields are defined
15934  *         if self._format:             # <<<<<<<<<<<<<<
15935  *             for f in format:
15936  *                 if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f)
15937  */
15938   __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15939   __Pyx_GOTREF(__pyx_t_8);
15940   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15941   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15942   if (__pyx_t_5) {
15943
15944     /* "cvcf.pyx":728
15945  *         # check: format fields are defined
15946  *         if self._format:
15947  *             for f in format:             # <<<<<<<<<<<<<<
15948  *                 if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f)
15949  * 
15950  */
15951     if (PyList_CheckExact(__pyx_v_format) || PyTuple_CheckExact(__pyx_v_format)) {
15952       __pyx_t_8 = __pyx_v_format; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
15953       __pyx_t_15 = NULL;
15954     } else {
15955       __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15956       __Pyx_GOTREF(__pyx_t_8);
15957       __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
15958     }
15959     for (;;) {
15960       if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
15961         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
15962         __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
15963       } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
15964         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
15965         __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
15966       } else {
15967         __pyx_t_1 = __pyx_t_15(__pyx_t_8);
15968         if (unlikely(!__pyx_t_1)) {
15969           if (PyErr_Occurred()) {
15970             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
15971             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15972           }
15973           break;
15974         }
15975         __Pyx_GOTREF(__pyx_t_1);
15976       }
15977       __Pyx_XDECREF(__pyx_v_f);
15978       __pyx_v_f = __pyx_t_1;
15979       __pyx_t_1 = 0;
15980
15981       /* "cvcf.pyx":729
15982  *         if self._format:
15983  *             for f in format:
15984  *                 if f not in self._format: self.error(line,self.FORMAT_NOT_DEFINED, f)             # <<<<<<<<<<<<<<
15985  * 
15986  *         # convert v3.3 alleles
15987  */
15988       __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15989       __Pyx_GOTREF(__pyx_t_1);
15990       __pyx_t_5 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_1, __pyx_v_f))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15991       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15992       if (__pyx_t_5) {
15993         __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15994         __Pyx_GOTREF(__pyx_t_1);
15995         __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__FORMAT_NOT_DEFINED); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15996         __Pyx_GOTREF(__pyx_t_9);
15997         __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15998         __Pyx_GOTREF(__pyx_t_10);
15999         __Pyx_INCREF(__pyx_v_line);
16000         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
16001         __Pyx_GIVEREF(__pyx_v_line);
16002         PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
16003         __Pyx_GIVEREF(__pyx_t_9);
16004         __Pyx_INCREF(__pyx_v_f);
16005         PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_f);
16006         __Pyx_GIVEREF(__pyx_v_f);
16007         __pyx_t_9 = 0;
16008         __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16009         __Pyx_GOTREF(__pyx_t_9);
16010         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16011         __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
16012         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16013         goto __pyx_L50;
16014       }
16015       __pyx_L50:;
16016     }
16017     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16018     goto __pyx_L47;
16019   }
16020   __pyx_L47:;
16021
16022   /* "cvcf.pyx":732
16023  * 
16024  *         # convert v3.3 alleles
16025  *         if self._version == 33:             # <<<<<<<<<<<<<<
16026  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)
16027  *             newalts = []
16028  */
16029   __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16030   __Pyx_GOTREF(__pyx_t_8);
16031   __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16032   __Pyx_GOTREF(__pyx_t_9);
16033   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16034   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16035   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16036   if (__pyx_t_5) {
16037
16038     /* "cvcf.pyx":733
16039  *         # convert v3.3 alleles
16040  *         if self._version == 33:
16041  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)             # <<<<<<<<<<<<<<
16042  *             newalts = []
16043  *             have_deletions = False
16044  */
16045     __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16046     __pyx_t_5 = (__pyx_t_4 != 1);
16047     if (__pyx_t_5) {
16048       __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16049       __Pyx_GOTREF(__pyx_t_9);
16050       __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V33_BAD_REF); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16051       __Pyx_GOTREF(__pyx_t_8);
16052       __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16053       __Pyx_GOTREF(__pyx_t_10);
16054       __Pyx_INCREF(__pyx_v_line);
16055       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
16056       __Pyx_GIVEREF(__pyx_v_line);
16057       PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
16058       __Pyx_GIVEREF(__pyx_t_8);
16059       __pyx_t_8 = 0;
16060       __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16061       __Pyx_GOTREF(__pyx_t_8);
16062       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16063       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
16064       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16065       goto __pyx_L52;
16066     }
16067     __pyx_L52:;
16068
16069     /* "cvcf.pyx":734
16070  *         if self._version == 33:
16071  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)
16072  *             newalts = []             # <<<<<<<<<<<<<<
16073  *             have_deletions = False
16074  *             for a in alt:
16075  */
16076     __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16077     __Pyx_GOTREF(__pyx_t_8);
16078     __pyx_v_newalts = __pyx_t_8;
16079     __pyx_t_8 = 0;
16080
16081     /* "cvcf.pyx":735
16082  *             if len(ref) != 1: self.error(line,self.V33_BAD_REF)
16083  *             newalts = []
16084  *             have_deletions = False             # <<<<<<<<<<<<<<
16085  *             for a in alt:
16086  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
16087  */
16088     __pyx_v_have_deletions = 0;
16089
16090     /* "cvcf.pyx":736
16091  *             newalts = []
16092  *             have_deletions = False
16093  *             for a in alt:             # <<<<<<<<<<<<<<
16094  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
16095  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
16096  */
16097     if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
16098       __pyx_t_8 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
16099       __pyx_t_15 = NULL;
16100     } else {
16101       __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16102       __Pyx_GOTREF(__pyx_t_8);
16103       __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
16104     }
16105     for (;;) {
16106       if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
16107         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
16108         __pyx_t_10 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
16109       } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
16110         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
16111         __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
16112       } else {
16113         __pyx_t_10 = __pyx_t_15(__pyx_t_8);
16114         if (unlikely(!__pyx_t_10)) {
16115           if (PyErr_Occurred()) {
16116             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
16117             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16118           }
16119           break;
16120         }
16121         __Pyx_GOTREF(__pyx_t_10);
16122       }
16123       __Pyx_XDECREF(__pyx_v_a);
16124       __pyx_v_a = __pyx_t_10;
16125       __pyx_t_10 = 0;
16126
16127       /* "cvcf.pyx":737
16128  *             have_deletions = False
16129  *             for a in alt:
16130  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference             # <<<<<<<<<<<<<<
16131  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
16132  *                 elif a.startswith('D'): # allow D<seq> and D<num>
16133  */
16134       __pyx_t_3 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16135       __pyx_t_5 = (__pyx_t_3 == 1);
16136       if (__pyx_t_5) {
16137         __pyx_t_10 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16138         __Pyx_GOTREF(__pyx_t_10);
16139         __pyx_t_9 = PyNumber_Add(__pyx_v_a, __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16140         __Pyx_GOTREF(__pyx_t_9);
16141         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16142         __Pyx_DECREF(__pyx_v_a);
16143         __pyx_v_a = __pyx_t_9;
16144         __pyx_t_9 = 0;
16145         goto __pyx_L55;
16146       }
16147
16148       /* "cvcf.pyx":738
16149  *             for a in alt:
16150  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
16151  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference             # <<<<<<<<<<<<<<
16152  *                 elif a.startswith('D'): # allow D<seq> and D<num>
16153  *                     have_deletions = True
16154  */
16155       __pyx_t_9 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16156       __Pyx_GOTREF(__pyx_t_9);
16157       __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_k_tuple_112), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16158       __Pyx_GOTREF(__pyx_t_10);
16159       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16160       __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16161       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16162       if (__pyx_t_5) {
16163         __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16164         __Pyx_GOTREF(__pyx_t_10);
16165         __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16166         __Pyx_GOTREF(__pyx_t_9);
16167         __pyx_t_1 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16168         __Pyx_GOTREF(__pyx_t_1);
16169         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16170         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16171         __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16172         __Pyx_GOTREF(__pyx_t_9);
16173         __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16174         __Pyx_GOTREF(__pyx_t_10);
16175         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16176         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16177         __Pyx_DECREF(__pyx_v_a);
16178         __pyx_v_a = __pyx_t_10;
16179         __pyx_t_10 = 0;
16180         goto __pyx_L55;
16181       }
16182
16183       /* "cvcf.pyx":739
16184  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
16185  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
16186  *                 elif a.startswith('D'): # allow D<seq> and D<num>             # <<<<<<<<<<<<<<
16187  *                     have_deletions = True
16188  *                     try:
16189  */
16190       __pyx_t_10 = PyObject_GetAttr(__pyx_v_a, __pyx_n_s__startswith); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16191       __Pyx_GOTREF(__pyx_t_10);
16192       __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_113), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16193       __Pyx_GOTREF(__pyx_t_9);
16194       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16195       __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16196       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16197       if (__pyx_t_5) {
16198
16199         /* "cvcf.pyx":740
16200  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
16201  *                 elif a.startswith('D'): # allow D<seq> and D<num>
16202  *                     have_deletions = True             # <<<<<<<<<<<<<<
16203  *                     try:
16204  *                         l = int(a[1:])          # throws ValueError if sequence
16205  */
16206         __pyx_v_have_deletions = 1;
16207
16208         /* "cvcf.pyx":741
16209  *                 elif a.startswith('D'): # allow D<seq> and D<num>
16210  *                     have_deletions = True
16211  *                     try:             # <<<<<<<<<<<<<<
16212  *                         l = int(a[1:])          # throws ValueError if sequence
16213  *                         if len(ref) < l:        # add to reference if necessary
16214  */
16215         {
16216           __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
16217           __Pyx_XGOTREF(__pyx_t_11);
16218           __Pyx_XGOTREF(__pyx_t_12);
16219           __Pyx_XGOTREF(__pyx_t_13);
16220           /*try:*/ {
16221
16222             /* "cvcf.pyx":742
16223  *                     have_deletions = True
16224  *                     try:
16225  *                         l = int(a[1:])          # throws ValueError if sequence             # <<<<<<<<<<<<<<
16226  *                         if len(ref) < l:        # add to reference if necessary
16227  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
16228  */
16229             __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16230             __Pyx_GOTREF(__pyx_t_9);
16231             __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16232             __Pyx_GOTREF(__pyx_t_10);
16233             PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
16234             __Pyx_GIVEREF(__pyx_t_9);
16235             __pyx_t_9 = 0;
16236             __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16237             __Pyx_GOTREF(__pyx_t_9);
16238             __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
16239             __Pyx_XDECREF(__pyx_v_l);
16240             __pyx_v_l = __pyx_t_9;
16241             __pyx_t_9 = 0;
16242
16243             /* "cvcf.pyx":743
16244  *                     try:
16245  *                         l = int(a[1:])          # throws ValueError if sequence
16246  *                         if len(ref) < l:        # add to reference if necessary             # <<<<<<<<<<<<<<
16247  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
16248  *                             ref += addns
16249  */
16250             __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16251             __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16252             __Pyx_GOTREF(__pyx_t_9);
16253             __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_v_l, Py_LT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16254             __Pyx_GOTREF(__pyx_t_10);
16255             __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16256             __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16257             __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16258             if (__pyx_t_5) {
16259
16260               /* "cvcf.pyx":744
16261  *                         l = int(a[1:])          # throws ValueError if sequence
16262  *                         if len(ref) < l:        # add to reference if necessary
16263  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)             # <<<<<<<<<<<<<<
16264  *                             ref += addns
16265  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
16266  */
16267               __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16268               __Pyx_GOTREF(__pyx_t_10);
16269               __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16270               __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16271               __Pyx_GOTREF(__pyx_t_9);
16272               __pyx_t_1 = PyNumber_Add(__pyx_v_pos, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16273               __Pyx_GOTREF(__pyx_t_1);
16274               __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16275               __pyx_t_9 = PyNumber_Add(__pyx_v_pos, __pyx_v_l); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16276               __Pyx_GOTREF(__pyx_t_9);
16277               __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16278               __Pyx_GOTREF(__pyx_t_7);
16279               __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16280               __Pyx_GOTREF(__pyx_t_2);
16281               __Pyx_INCREF(__pyx_v_chrom);
16282               PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
16283               __Pyx_GIVEREF(__pyx_v_chrom);
16284               PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
16285               __Pyx_GIVEREF(__pyx_t_1);
16286               PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_9);
16287               __Pyx_GIVEREF(__pyx_t_9);
16288               PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_7);
16289               __Pyx_GIVEREF(__pyx_t_7);
16290               __pyx_t_1 = 0;
16291               __pyx_t_9 = 0;
16292               __pyx_t_7 = 0;
16293               __pyx_t_7 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16294               __Pyx_GOTREF(__pyx_t_7);
16295               __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16296               __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
16297               __Pyx_XDECREF(__pyx_v_addns);
16298               __pyx_v_addns = __pyx_t_7;
16299               __pyx_t_7 = 0;
16300
16301               /* "cvcf.pyx":745
16302  *                         if len(ref) < l:        # add to reference if necessary
16303  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
16304  *                             ref += addns             # <<<<<<<<<<<<<<
16305  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
16306  *                         a = ref[l:]             # new deletion, deleting pos...pos+l
16307  */
16308               __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16309               __Pyx_GOTREF(__pyx_t_7);
16310               __Pyx_DECREF(__pyx_v_ref);
16311               __pyx_v_ref = __pyx_t_7;
16312               __pyx_t_7 = 0;
16313
16314               /* "cvcf.pyx":746
16315  *                             addns = get_sequence(chrom,pos+len(ref),pos+l,self._reference)
16316  *                             ref += addns
16317  *                             for i,na in enumerate(newalts): newalts[i] = na+addns             # <<<<<<<<<<<<<<
16318  *                         a = ref[l:]             # new deletion, deleting pos...pos+l
16319  *                     except ValueError:
16320  */
16321               __Pyx_INCREF(__pyx_int_0);
16322               __pyx_t_7 = __pyx_int_0;
16323               __pyx_t_2 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
16324               for (;;) {
16325                 if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
16326                 __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_10); __pyx_t_3++;
16327                 __Pyx_XDECREF(__pyx_v_na);
16328                 __pyx_v_na = __pyx_t_10;
16329                 __pyx_t_10 = 0;
16330                 __Pyx_INCREF(__pyx_t_7);
16331                 __Pyx_XDECREF(__pyx_v_i);
16332                 __pyx_v_i = __pyx_t_7;
16333                 __pyx_t_10 = PyNumber_Add(__pyx_t_7, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16334                 __Pyx_GOTREF(__pyx_t_10);
16335                 __Pyx_DECREF(__pyx_t_7);
16336                 __pyx_t_7 = __pyx_t_10;
16337                 __pyx_t_10 = 0;
16338                 __pyx_t_10 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16339                 __Pyx_GOTREF(__pyx_t_10);
16340                 if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16341                 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16342               }
16343               __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16344               __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16345               goto __pyx_L64;
16346             }
16347             __pyx_L64:;
16348
16349             /* "cvcf.pyx":747
16350  *                             ref += addns
16351  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
16352  *                         a = ref[l:]             # new deletion, deleting pos...pos+l             # <<<<<<<<<<<<<<
16353  *                     except ValueError:
16354  *                         s = a[1:]
16355  */
16356             __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_l); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16357             __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v_ref, __pyx_t_3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L56_error;}
16358             __Pyx_GOTREF(__pyx_t_7);
16359             __Pyx_DECREF(__pyx_v_a);
16360             __pyx_v_a = __pyx_t_7;
16361             __pyx_t_7 = 0;
16362           }
16363           __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
16364           __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
16365           __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
16366           goto __pyx_L63_try_end;
16367           __pyx_L56_error:;
16368           __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16369           __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16370           __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16371           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16372           __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16373           __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16374
16375           /* "cvcf.pyx":748
16376  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
16377  *                         a = ref[l:]             # new deletion, deleting pos...pos+l
16378  *                     except ValueError:             # <<<<<<<<<<<<<<
16379  *                         s = a[1:]
16380  *                         if len(ref) < len(s):   # add Ns to reference if necessary
16381  */
16382           __pyx_t_20 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
16383           if (__pyx_t_20) {
16384             __Pyx_AddTraceback("cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
16385             if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16386             __Pyx_GOTREF(__pyx_t_7);
16387             __Pyx_GOTREF(__pyx_t_2);
16388             __Pyx_GOTREF(__pyx_t_10);
16389
16390             /* "cvcf.pyx":749
16391  *                         a = ref[l:]             # new deletion, deleting pos...pos+l
16392  *                     except ValueError:
16393  *                         s = a[1:]             # <<<<<<<<<<<<<<
16394  *                         if len(ref) < len(s):   # add Ns to reference if necessary
16395  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
16396  */
16397             __pyx_t_9 = __Pyx_PySequence_GetSlice(__pyx_v_a, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16398             __Pyx_GOTREF(__pyx_t_9);
16399             __Pyx_XDECREF(__pyx_v_s);
16400             __pyx_v_s = __pyx_t_9;
16401             __pyx_t_9 = 0;
16402
16403             /* "cvcf.pyx":750
16404  *                     except ValueError:
16405  *                         s = a[1:]
16406  *                         if len(ref) < len(s):   # add Ns to reference if necessary             # <<<<<<<<<<<<<<
16407  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
16408  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
16409  */
16410             __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16411             __pyx_t_21 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16412             __pyx_t_5 = (__pyx_t_3 < __pyx_t_21);
16413             if (__pyx_t_5) {
16414
16415               /* "cvcf.pyx":751
16416  *                         s = a[1:]
16417  *                         if len(ref) < len(s):   # add Ns to reference if necessary
16418  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)             # <<<<<<<<<<<<<<
16419  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
16420  *                                 self.error(line,self.V33_UNMATCHED_DELETION,
16421  */
16422               __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16423               __Pyx_GOTREF(__pyx_t_9);
16424               __pyx_t_21 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16425               __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16426               __Pyx_GOTREF(__pyx_t_1);
16427               __pyx_t_6 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16428               __Pyx_GOTREF(__pyx_t_6);
16429               __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16430               __pyx_t_21 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16431               __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16432               __Pyx_GOTREF(__pyx_t_1);
16433               __pyx_t_22 = PyNumber_Add(__pyx_v_pos, __pyx_t_1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16434               __Pyx_GOTREF(__pyx_t_22);
16435               __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16436               __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16437               __Pyx_GOTREF(__pyx_t_1);
16438               __pyx_t_23 = PyTuple_New(4); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16439               __Pyx_GOTREF(__pyx_t_23);
16440               __Pyx_INCREF(__pyx_v_chrom);
16441               PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_chrom);
16442               __Pyx_GIVEREF(__pyx_v_chrom);
16443               PyTuple_SET_ITEM(__pyx_t_23, 1, __pyx_t_6);
16444               __Pyx_GIVEREF(__pyx_t_6);
16445               PyTuple_SET_ITEM(__pyx_t_23, 2, __pyx_t_22);
16446               __Pyx_GIVEREF(__pyx_t_22);
16447               PyTuple_SET_ITEM(__pyx_t_23, 3, __pyx_t_1);
16448               __Pyx_GIVEREF(__pyx_t_1);
16449               __pyx_t_6 = 0;
16450               __pyx_t_22 = 0;
16451               __pyx_t_1 = 0;
16452               __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16453               __Pyx_GOTREF(__pyx_t_1);
16454               __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16455               __Pyx_DECREF(((PyObject *)__pyx_t_23)); __pyx_t_23 = 0;
16456               __Pyx_XDECREF(__pyx_v_addns);
16457               __pyx_v_addns = __pyx_t_1;
16458               __pyx_t_1 = 0;
16459
16460               /* "cvcf.pyx":752
16461  *                         if len(ref) < len(s):   # add Ns to reference if necessary
16462  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
16463  *                             if not s.endswith(addns) and addns != 'N'*len(addns):             # <<<<<<<<<<<<<<
16464  *                                 self.error(line,self.V33_UNMATCHED_DELETION,
16465  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
16466  */
16467               __pyx_t_1 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__endswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16468               __Pyx_GOTREF(__pyx_t_1);
16469               __pyx_t_23 = PyTuple_New(1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16470               __Pyx_GOTREF(__pyx_t_23);
16471               __Pyx_INCREF(__pyx_v_addns);
16472               PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_addns);
16473               __Pyx_GIVEREF(__pyx_v_addns);
16474               __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_23), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16475               __Pyx_GOTREF(__pyx_t_9);
16476               __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16477               __Pyx_DECREF(((PyObject *)__pyx_t_23)); __pyx_t_23 = 0;
16478               __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16479               __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16480               __pyx_t_14 = (!__pyx_t_5);
16481               if (__pyx_t_14) {
16482                 __pyx_t_21 = PyObject_Length(__pyx_v_addns); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16483                 __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16484                 __Pyx_GOTREF(__pyx_t_9);
16485                 __pyx_t_23 = PyNumber_Multiply(((PyObject *)__pyx_n_s__N), __pyx_t_9); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16486                 __Pyx_GOTREF(((PyObject *)__pyx_t_23));
16487                 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16488                 __pyx_t_5 = __Pyx_PyString_Equals(__pyx_v_addns, ((PyObject *)__pyx_t_23), Py_NE); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16489                 __Pyx_DECREF(((PyObject *)__pyx_t_23)); __pyx_t_23 = 0;
16490                 __pyx_t_19 = __pyx_t_5;
16491               } else {
16492                 __pyx_t_19 = __pyx_t_14;
16493               }
16494               if (__pyx_t_19) {
16495
16496                 /* "cvcf.pyx":753
16497  *                             addns = get_sequence(chrom,pos+len(ref),pos+len(s),self._reference)
16498  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
16499  *                                 self.error(line,self.V33_UNMATCHED_DELETION,             # <<<<<<<<<<<<<<
16500  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
16501  *                             ref += addns
16502  */
16503                 __pyx_t_23 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16504                 __Pyx_GOTREF(__pyx_t_23);
16505                 __pyx_t_9 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_114); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16506                 __Pyx_GOTREF(__pyx_t_9);
16507
16508                 /* "cvcf.pyx":754
16509  *                             if not s.endswith(addns) and addns != 'N'*len(addns):
16510  *                                 self.error(line,self.V33_UNMATCHED_DELETION,
16511  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))             # <<<<<<<<<<<<<<
16512  *                             ref += addns
16513  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
16514  */
16515                 __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16516                 __Pyx_GOTREF(__pyx_t_1);
16517                 __pyx_t_21 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16518                 __pyx_t_22 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16519                 __Pyx_GOTREF(__pyx_t_22);
16520                 __pyx_t_6 = PyNumber_Add(__pyx_v_pos, __pyx_t_22); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16521                 __Pyx_GOTREF(__pyx_t_6);
16522                 __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
16523                 __pyx_t_22 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16524                 __Pyx_GOTREF(__pyx_t_22);
16525                 __pyx_t_24 = PyTuple_New(4); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16526                 __Pyx_GOTREF(__pyx_t_24);
16527                 __Pyx_INCREF(__pyx_v_chrom);
16528                 PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_chrom);
16529                 __Pyx_GIVEREF(__pyx_v_chrom);
16530                 __Pyx_INCREF(__pyx_v_pos);
16531                 PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_v_pos);
16532                 __Pyx_GIVEREF(__pyx_v_pos);
16533                 PyTuple_SET_ITEM(__pyx_t_24, 2, __pyx_t_6);
16534                 __Pyx_GIVEREF(__pyx_t_6);
16535                 PyTuple_SET_ITEM(__pyx_t_24, 3, __pyx_t_22);
16536                 __Pyx_GIVEREF(__pyx_t_22);
16537                 __pyx_t_6 = 0;
16538                 __pyx_t_22 = 0;
16539                 __pyx_t_22 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16540                 __Pyx_GOTREF(__pyx_t_22);
16541                 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16542                 __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
16543                 __pyx_t_24 = PyTuple_New(2); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16544                 __Pyx_GOTREF(__pyx_t_24);
16545                 __Pyx_INCREF(__pyx_v_a);
16546                 PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_a);
16547                 __Pyx_GIVEREF(__pyx_v_a);
16548                 PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_22);
16549                 __Pyx_GIVEREF(__pyx_t_22);
16550                 __pyx_t_22 = 0;
16551                 __pyx_t_22 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_115), ((PyObject *)__pyx_t_24)); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16552                 __Pyx_GOTREF(((PyObject *)__pyx_t_22));
16553                 __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
16554                 __pyx_t_24 = PyTuple_New(3); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16555                 __Pyx_GOTREF(__pyx_t_24);
16556                 __Pyx_INCREF(__pyx_v_line);
16557                 PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_line);
16558                 __Pyx_GIVEREF(__pyx_v_line);
16559                 PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_9);
16560                 __Pyx_GIVEREF(__pyx_t_9);
16561                 PyTuple_SET_ITEM(__pyx_t_24, 2, ((PyObject *)__pyx_t_22));
16562                 __Pyx_GIVEREF(((PyObject *)__pyx_t_22));
16563                 __pyx_t_9 = 0;
16564                 __pyx_t_22 = 0;
16565                 __pyx_t_22 = PyObject_Call(__pyx_t_23, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16566                 __Pyx_GOTREF(__pyx_t_22);
16567                 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16568                 __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
16569                 __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
16570                 goto __pyx_L70;
16571               }
16572               __pyx_L70:;
16573
16574               /* "cvcf.pyx":755
16575  *                                 self.error(line,self.V33_UNMATCHED_DELETION,
16576  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
16577  *                             ref += addns             # <<<<<<<<<<<<<<
16578  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
16579  *                         a = ref[len(s):]        # new deletion, deleting from pos
16580  */
16581               __pyx_t_22 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addns); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16582               __Pyx_GOTREF(__pyx_t_22);
16583               __Pyx_DECREF(__pyx_v_ref);
16584               __pyx_v_ref = __pyx_t_22;
16585               __pyx_t_22 = 0;
16586
16587               /* "cvcf.pyx":756
16588  *                                            "(deletion is %s, reference is %s)" % (a,get_sequence(chrom,pos,pos+len(s),self._reference)))
16589  *                             ref += addns
16590  *                             for i,na in enumerate(newalts): newalts[i] = na+addns             # <<<<<<<<<<<<<<
16591  *                         a = ref[len(s):]        # new deletion, deleting from pos
16592  *                 else:
16593  */
16594               __Pyx_INCREF(__pyx_int_0);
16595               __pyx_t_22 = __pyx_int_0;
16596               __pyx_t_24 = ((PyObject *)__pyx_v_newalts); __Pyx_INCREF(__pyx_t_24); __pyx_t_21 = 0;
16597               for (;;) {
16598                 if (__pyx_t_21 >= PyList_GET_SIZE(__pyx_t_24)) break;
16599                 __pyx_t_23 = PyList_GET_ITEM(__pyx_t_24, __pyx_t_21); __Pyx_INCREF(__pyx_t_23); __pyx_t_21++;
16600                 __Pyx_XDECREF(__pyx_v_na);
16601                 __pyx_v_na = __pyx_t_23;
16602                 __pyx_t_23 = 0;
16603                 __Pyx_INCREF(__pyx_t_22);
16604                 __Pyx_XDECREF(__pyx_v_i);
16605                 __pyx_v_i = __pyx_t_22;
16606                 __pyx_t_23 = PyNumber_Add(__pyx_t_22, __pyx_int_1); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16607                 __Pyx_GOTREF(__pyx_t_23);
16608                 __Pyx_DECREF(__pyx_t_22);
16609                 __pyx_t_22 = __pyx_t_23;
16610                 __pyx_t_23 = 0;
16611                 __pyx_t_23 = PyNumber_Add(__pyx_v_na, __pyx_v_addns); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16612                 __Pyx_GOTREF(__pyx_t_23);
16613                 if (PyObject_SetItem(((PyObject *)__pyx_v_newalts), __pyx_v_i, __pyx_t_23) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16614                 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16615               }
16616               __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
16617               __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
16618               goto __pyx_L69;
16619             }
16620             __pyx_L69:;
16621
16622             /* "cvcf.pyx":757
16623  *                             ref += addns
16624  *                             for i,na in enumerate(newalts): newalts[i] = na+addns
16625  *                         a = ref[len(s):]        # new deletion, deleting from pos             # <<<<<<<<<<<<<<
16626  *                 else:
16627  *                     self.error(line,self.V33_BAD_ALLELE)
16628  */
16629             __pyx_t_21 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16630             __pyx_t_22 = __Pyx_PySequence_GetSlice(__pyx_v_ref, __pyx_t_21, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L58_except_error;}
16631             __Pyx_GOTREF(__pyx_t_22);
16632             __Pyx_DECREF(__pyx_v_a);
16633             __pyx_v_a = __pyx_t_22;
16634             __pyx_t_22 = 0;
16635             __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16636             __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16637             __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16638             goto __pyx_L57_exception_handled;
16639           }
16640           __pyx_L58_except_error:;
16641           __Pyx_XGIVEREF(__pyx_t_11);
16642           __Pyx_XGIVEREF(__pyx_t_12);
16643           __Pyx_XGIVEREF(__pyx_t_13);
16644           __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
16645           goto __pyx_L1_error;
16646           __pyx_L57_exception_handled:;
16647           __Pyx_XGIVEREF(__pyx_t_11);
16648           __Pyx_XGIVEREF(__pyx_t_12);
16649           __Pyx_XGIVEREF(__pyx_t_13);
16650           __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
16651           __pyx_L63_try_end:;
16652         }
16653         goto __pyx_L55;
16654       }
16655       /*else*/ {
16656
16657         /* "cvcf.pyx":759
16658  *                         a = ref[len(s):]        # new deletion, deleting from pos
16659  *                 else:
16660  *                     self.error(line,self.V33_BAD_ALLELE)             # <<<<<<<<<<<<<<
16661  *                 newalts.append(a)
16662  *             alt = newalts
16663  */
16664         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16665         __Pyx_GOTREF(__pyx_t_10);
16666         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V33_BAD_ALLELE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16667         __Pyx_GOTREF(__pyx_t_2);
16668         __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16669         __Pyx_GOTREF(__pyx_t_7);
16670         __Pyx_INCREF(__pyx_v_line);
16671         PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
16672         __Pyx_GIVEREF(__pyx_v_line);
16673         PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
16674         __Pyx_GIVEREF(__pyx_t_2);
16675         __pyx_t_2 = 0;
16676         __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16677         __Pyx_GOTREF(__pyx_t_2);
16678         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16679         __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
16680         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16681       }
16682       __pyx_L55:;
16683
16684       /* "cvcf.pyx":760
16685  *                 else:
16686  *                     self.error(line,self.V33_BAD_ALLELE)
16687  *                 newalts.append(a)             # <<<<<<<<<<<<<<
16688  *             alt = newalts
16689  *             # deletion alleles exist, add dummy 1st reference allele, and account for leading base
16690  */
16691       __pyx_t_25 = PyList_Append(__pyx_v_newalts, __pyx_v_a); if (unlikely(__pyx_t_25 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16692     }
16693     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16694
16695     /* "cvcf.pyx":761
16696  *                     self.error(line,self.V33_BAD_ALLELE)
16697  *                 newalts.append(a)
16698  *             alt = newalts             # <<<<<<<<<<<<<<
16699  *             # deletion alleles exist, add dummy 1st reference allele, and account for leading base
16700  *             if have_deletions:
16701  */
16702     __Pyx_INCREF(((PyObject *)__pyx_v_newalts));
16703     __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
16704     __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
16705     __Pyx_GIVEREF(((PyObject *)__pyx_v_newalts));
16706     __pyx_cur_scope->__pyx_v_alt = ((PyObject *)__pyx_v_newalts);
16707
16708     /* "cvcf.pyx":763
16709  *             alt = newalts
16710  *             # deletion alleles exist, add dummy 1st reference allele, and account for leading base
16711  *             if have_deletions:             # <<<<<<<<<<<<<<
16712  *                 if pos == 0:
16713  *                     # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
16714  */
16715     if (__pyx_v_have_deletions) {
16716
16717       /* "cvcf.pyx":764
16718  *             # deletion alleles exist, add dummy 1st reference allele, and account for leading base
16719  *             if have_deletions:
16720  *                 if pos == 0:             # <<<<<<<<<<<<<<
16721  *                     # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
16722  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
16723  */
16724       __pyx_t_8 = PyObject_RichCompare(__pyx_v_pos, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16725       __Pyx_GOTREF(__pyx_t_8);
16726       __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16727       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16728       if (__pyx_t_19) {
16729
16730         /* "cvcf.pyx":766
16731  *                 if pos == 0:
16732  *                     # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
16733  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)             # <<<<<<<<<<<<<<
16734  *                     ref += addn
16735  *                     alt = [allele+addn for allele in alt]
16736  */
16737         __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16738         __Pyx_GOTREF(__pyx_t_8);
16739         __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16740         __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16741         __Pyx_GOTREF(__pyx_t_2);
16742         __pyx_t_7 = PyNumber_Add(__pyx_v_pos, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16743         __Pyx_GOTREF(__pyx_t_7);
16744         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16745         __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16746         __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16747         __Pyx_GOTREF(__pyx_t_2);
16748         __pyx_t_10 = PyNumber_Add(__pyx_v_pos, __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16749         __Pyx_GOTREF(__pyx_t_10);
16750         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16751         __pyx_t_2 = PyNumber_Add(__pyx_t_10, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16752         __Pyx_GOTREF(__pyx_t_2);
16753         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16754         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16755         __Pyx_GOTREF(__pyx_t_10);
16756         __pyx_t_22 = PyTuple_New(4); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16757         __Pyx_GOTREF(__pyx_t_22);
16758         __Pyx_INCREF(__pyx_v_chrom);
16759         PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_v_chrom);
16760         __Pyx_GIVEREF(__pyx_v_chrom);
16761         PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_7);
16762         __Pyx_GIVEREF(__pyx_t_7);
16763         PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_t_2);
16764         __Pyx_GIVEREF(__pyx_t_2);
16765         PyTuple_SET_ITEM(__pyx_t_22, 3, __pyx_t_10);
16766         __Pyx_GIVEREF(__pyx_t_10);
16767         __pyx_t_7 = 0;
16768         __pyx_t_2 = 0;
16769         __pyx_t_10 = 0;
16770         __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16771         __Pyx_GOTREF(__pyx_t_10);
16772         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16773         __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
16774         __pyx_v_addn = __pyx_t_10;
16775         __pyx_t_10 = 0;
16776
16777         /* "cvcf.pyx":767
16778  *                     # Petr Danacek's: we can't have a leading nucleotide at (1-based) position 1
16779  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
16780  *                     ref += addn             # <<<<<<<<<<<<<<
16781  *                     alt = [allele+addn for allele in alt]
16782  *                 else:
16783  */
16784         __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_v_ref, __pyx_v_addn); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16785         __Pyx_GOTREF(__pyx_t_10);
16786         __Pyx_DECREF(__pyx_v_ref);
16787         __pyx_v_ref = __pyx_t_10;
16788         __pyx_t_10 = 0;
16789
16790         /* "cvcf.pyx":768
16791  *                     addn = get_sequence(chrom,pos+len(ref),pos+len(ref)+1,self._reference)
16792  *                     ref += addn
16793  *                     alt = [allele+addn for allele in alt]             # <<<<<<<<<<<<<<
16794  *                 else:
16795  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
16796  */
16797         __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16798         __Pyx_GOTREF(__pyx_t_10);
16799         if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
16800           __pyx_t_22 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_22); __pyx_t_4 = 0;
16801           __pyx_t_15 = NULL;
16802         } else {
16803           __pyx_t_4 = -1; __pyx_t_22 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16804           __Pyx_GOTREF(__pyx_t_22);
16805           __pyx_t_15 = Py_TYPE(__pyx_t_22)->tp_iternext;
16806         }
16807         for (;;) {
16808           if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_22)) {
16809             if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_22)) break;
16810             __pyx_t_8 = PyList_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
16811           } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_22)) {
16812             if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_22)) break;
16813             __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
16814           } else {
16815             __pyx_t_8 = __pyx_t_15(__pyx_t_22);
16816             if (unlikely(!__pyx_t_8)) {
16817               if (PyErr_Occurred()) {
16818                 if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
16819                 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16820               }
16821               break;
16822             }
16823             __Pyx_GOTREF(__pyx_t_8);
16824           }
16825           __Pyx_XDECREF(__pyx_v_allele);
16826           __pyx_v_allele = __pyx_t_8;
16827           __pyx_t_8 = 0;
16828           __pyx_t_8 = PyNumber_Add(__pyx_v_allele, __pyx_v_addn); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16829           __Pyx_GOTREF(__pyx_t_8);
16830           if (unlikely(PyList_Append(__pyx_t_10, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16831           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16832         }
16833         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
16834         __Pyx_INCREF(((PyObject *)__pyx_t_10));
16835         __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
16836         __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
16837         __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
16838         __pyx_cur_scope->__pyx_v_alt = ((PyObject *)__pyx_t_10);
16839         __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
16840         goto __pyx_L74;
16841       }
16842       /*else*/ {
16843
16844         /* "cvcf.pyx":770
16845  *                     alt = [allele+addn for allele in alt]
16846  *                 else:
16847  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)             # <<<<<<<<<<<<<<
16848  *                     ref = addn + ref
16849  *                     alt = [addn + allele for allele in alt]
16850  */
16851         __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__get_sequence); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16852         __Pyx_GOTREF(__pyx_t_10);
16853         __pyx_t_22 = PyNumber_Subtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16854         __Pyx_GOTREF(__pyx_t_22);
16855         __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16856         __Pyx_GOTREF(__pyx_t_8);
16857         __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16858         __Pyx_GOTREF(__pyx_t_2);
16859         __Pyx_INCREF(__pyx_v_chrom);
16860         PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom);
16861         __Pyx_GIVEREF(__pyx_v_chrom);
16862         PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_22);
16863         __Pyx_GIVEREF(__pyx_t_22);
16864         __Pyx_INCREF(__pyx_v_pos);
16865         PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_pos);
16866         __Pyx_GIVEREF(__pyx_v_pos);
16867         PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_8);
16868         __Pyx_GIVEREF(__pyx_t_8);
16869         __pyx_t_22 = 0;
16870         __pyx_t_8 = 0;
16871         __pyx_t_8 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16872         __Pyx_GOTREF(__pyx_t_8);
16873         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16874         __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
16875         __pyx_v_addn = __pyx_t_8;
16876         __pyx_t_8 = 0;
16877
16878         /* "cvcf.pyx":771
16879  *                 else:
16880  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
16881  *                     ref = addn + ref             # <<<<<<<<<<<<<<
16882  *                     alt = [addn + allele for allele in alt]
16883  *                     pos -= 1
16884  */
16885         __pyx_t_8 = PyNumber_Add(__pyx_v_addn, __pyx_v_ref); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16886         __Pyx_GOTREF(__pyx_t_8);
16887         __Pyx_DECREF(__pyx_v_ref);
16888         __pyx_v_ref = __pyx_t_8;
16889         __pyx_t_8 = 0;
16890
16891         /* "cvcf.pyx":772
16892  *                     addn = get_sequence(chrom,pos-1,pos,self._reference)
16893  *                     ref = addn + ref
16894  *                     alt = [addn + allele for allele in alt]             # <<<<<<<<<<<<<<
16895  *                     pos -= 1
16896  *         else:
16897  */
16898         __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16899         __Pyx_GOTREF(__pyx_t_8);
16900         if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
16901           __pyx_t_2 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
16902           __pyx_t_15 = NULL;
16903         } else {
16904           __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16905           __Pyx_GOTREF(__pyx_t_2);
16906           __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
16907         }
16908         for (;;) {
16909           if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_2)) {
16910             if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
16911             __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
16912           } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_2)) {
16913             if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
16914             __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_10); __pyx_t_4++;
16915           } else {
16916             __pyx_t_10 = __pyx_t_15(__pyx_t_2);
16917             if (unlikely(!__pyx_t_10)) {
16918               if (PyErr_Occurred()) {
16919                 if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
16920                 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16921               }
16922               break;
16923             }
16924             __Pyx_GOTREF(__pyx_t_10);
16925           }
16926           __Pyx_XDECREF(__pyx_v_allele);
16927           __pyx_v_allele = __pyx_t_10;
16928           __pyx_t_10 = 0;
16929           __pyx_t_10 = PyNumber_Add(__pyx_v_addn, __pyx_v_allele); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16930           __Pyx_GOTREF(__pyx_t_10);
16931           if (unlikely(PyList_Append(__pyx_t_8, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16932           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16933         }
16934         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16935         __Pyx_INCREF(((PyObject *)__pyx_t_8));
16936         __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
16937         __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
16938         __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
16939         __pyx_cur_scope->__pyx_v_alt = ((PyObject *)__pyx_t_8);
16940         __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
16941
16942         /* "cvcf.pyx":773
16943  *                     ref = addn + ref
16944  *                     alt = [addn + allele for allele in alt]
16945  *                     pos -= 1             # <<<<<<<<<<<<<<
16946  *         else:
16947  *             # format v4.0 -- just check for nucleotides
16948  */
16949         __pyx_t_8 = PyNumber_InPlaceSubtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16950         __Pyx_GOTREF(__pyx_t_8);
16951         __Pyx_DECREF(__pyx_v_pos);
16952         __pyx_v_pos = __pyx_t_8;
16953         __pyx_t_8 = 0;
16954       }
16955       __pyx_L74:;
16956       goto __pyx_L73;
16957     }
16958     __pyx_L73:;
16959     goto __pyx_L51;
16960   }
16961   /*else*/ {
16962
16963     /* "cvcf.pyx":776
16964  *         else:
16965  *             # format v4.0 -- just check for nucleotides
16966  *             for allele in alt:             # <<<<<<<<<<<<<<
16967  *                 if not alleleRegEx.match(allele):
16968  *                     self.error(line,self.V40_BAD_ALLELE,allele)
16969  */
16970     if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
16971       __pyx_t_8 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
16972       __pyx_t_15 = NULL;
16973     } else {
16974       __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16975       __Pyx_GOTREF(__pyx_t_8);
16976       __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
16977     }
16978     for (;;) {
16979       if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
16980         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
16981         __pyx_t_2 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
16982       } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
16983         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
16984         __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
16985       } else {
16986         __pyx_t_2 = __pyx_t_15(__pyx_t_8);
16987         if (unlikely(!__pyx_t_2)) {
16988           if (PyErr_Occurred()) {
16989             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
16990             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16991           }
16992           break;
16993         }
16994         __Pyx_GOTREF(__pyx_t_2);
16995       }
16996       __Pyx_XDECREF(__pyx_v_allele);
16997       __pyx_v_allele = __pyx_t_2;
16998       __pyx_t_2 = 0;
16999
17000       /* "cvcf.pyx":777
17001  *             # format v4.0 -- just check for nucleotides
17002  *             for allele in alt:
17003  *                 if not alleleRegEx.match(allele):             # <<<<<<<<<<<<<<
17004  *                     self.error(line,self.V40_BAD_ALLELE,allele)
17005  * 
17006  */
17007       __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__alleleRegEx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17008       __Pyx_GOTREF(__pyx_t_2);
17009       __pyx_t_10 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__match); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17010       __Pyx_GOTREF(__pyx_t_10);
17011       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17012       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17013       __Pyx_GOTREF(__pyx_t_2);
17014       __Pyx_INCREF(__pyx_v_allele);
17015       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_allele);
17016       __Pyx_GIVEREF(__pyx_v_allele);
17017       __pyx_t_22 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17018       __Pyx_GOTREF(__pyx_t_22);
17019       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17020       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
17021       __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17022       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17023       __pyx_t_14 = (!__pyx_t_19);
17024       if (__pyx_t_14) {
17025
17026         /* "cvcf.pyx":778
17027  *             for allele in alt:
17028  *                 if not alleleRegEx.match(allele):
17029  *                     self.error(line,self.V40_BAD_ALLELE,allele)             # <<<<<<<<<<<<<<
17030  * 
17031  *         # check for leading nucleotide in indel calls
17032  */
17033         __pyx_t_22 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17034         __Pyx_GOTREF(__pyx_t_22);
17035         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__V40_BAD_ALLELE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17036         __Pyx_GOTREF(__pyx_t_2);
17037         __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17038         __Pyx_GOTREF(__pyx_t_10);
17039         __Pyx_INCREF(__pyx_v_line);
17040         PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_line);
17041         __Pyx_GIVEREF(__pyx_v_line);
17042         PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
17043         __Pyx_GIVEREF(__pyx_t_2);
17044         __Pyx_INCREF(__pyx_v_allele);
17045         PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_allele);
17046         __Pyx_GIVEREF(__pyx_v_allele);
17047         __pyx_t_2 = 0;
17048         __pyx_t_2 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17049         __Pyx_GOTREF(__pyx_t_2);
17050         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17051         __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
17052         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17053         goto __pyx_L81;
17054       }
17055       __pyx_L81:;
17056     }
17057     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17058   }
17059   __pyx_L51:;
17060
17061   /* "cvcf.pyx":781
17062  * 
17063  *         # check for leading nucleotide in indel calls
17064  *         for allele in alt:             # <<<<<<<<<<<<<<
17065  *             if len(allele) != len(ref):
17066  *                 if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)
17067  */
17068   if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
17069     __pyx_t_8 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
17070     __pyx_t_15 = NULL;
17071   } else {
17072     __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17073     __Pyx_GOTREF(__pyx_t_8);
17074     __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
17075   }
17076   for (;;) {
17077     if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
17078       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
17079       __pyx_t_2 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
17080     } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
17081       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
17082       __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
17083     } else {
17084       __pyx_t_2 = __pyx_t_15(__pyx_t_8);
17085       if (unlikely(!__pyx_t_2)) {
17086         if (PyErr_Occurred()) {
17087           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
17088           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17089         }
17090         break;
17091       }
17092       __Pyx_GOTREF(__pyx_t_2);
17093     }
17094     __Pyx_XDECREF(__pyx_v_allele);
17095     __pyx_v_allele = __pyx_t_2;
17096     __pyx_t_2 = 0;
17097
17098     /* "cvcf.pyx":782
17099  *         # check for leading nucleotide in indel calls
17100  *         for allele in alt:
17101  *             if len(allele) != len(ref):             # <<<<<<<<<<<<<<
17102  *                 if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)
17103  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():
17104  */
17105     __pyx_t_21 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17106     __pyx_t_3 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17107     __pyx_t_14 = (__pyx_t_21 != __pyx_t_3);
17108     if (__pyx_t_14) {
17109
17110       /* "cvcf.pyx":783
17111  *         for allele in alt:
17112  *             if len(allele) != len(ref):
17113  *                 if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)             # <<<<<<<<<<<<<<
17114  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():
17115  *                     self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE)
17116  */
17117       __pyx_t_3 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17118       __pyx_t_14 = (__pyx_t_3 == 0);
17119       if (__pyx_t_14) {
17120         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17121         __Pyx_GOTREF(__pyx_t_2);
17122         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ZERO_LENGTH_ALLELE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17123         __Pyx_GOTREF(__pyx_t_10);
17124         __pyx_t_22 = PyTuple_New(2); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17125         __Pyx_GOTREF(__pyx_t_22);
17126         __Pyx_INCREF(__pyx_v_line);
17127         PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_v_line);
17128         __Pyx_GIVEREF(__pyx_v_line);
17129         PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_10);
17130         __Pyx_GIVEREF(__pyx_t_10);
17131         __pyx_t_10 = 0;
17132         __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17133         __Pyx_GOTREF(__pyx_t_10);
17134         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17135         __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
17136         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17137         goto __pyx_L85;
17138       }
17139       __pyx_L85:;
17140
17141       /* "cvcf.pyx":784
17142  *             if len(allele) != len(ref):
17143  *                 if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)
17144  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():             # <<<<<<<<<<<<<<
17145  *                     self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE)
17146  * 
17147  */
17148       __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17149       __Pyx_GOTREF(__pyx_t_10);
17150       __pyx_t_22 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__upper); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17151       __Pyx_GOTREF(__pyx_t_22);
17152       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17153       __pyx_t_10 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17154       __Pyx_GOTREF(__pyx_t_10);
17155       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17156       __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17157       __Pyx_GOTREF(__pyx_t_22);
17158       __pyx_t_2 = PyObject_GetAttr(__pyx_t_22, __pyx_n_s__upper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17159       __Pyx_GOTREF(__pyx_t_2);
17160       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17161       __pyx_t_22 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17162       __Pyx_GOTREF(__pyx_t_22);
17163       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17164       __pyx_t_2 = PyObject_RichCompare(__pyx_t_10, __pyx_t_22, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17165       __Pyx_GOTREF(__pyx_t_2);
17166       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17167       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17168       __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17169       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17170       if (__pyx_t_14) {
17171         __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ref, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17172         __Pyx_GOTREF(__pyx_t_2);
17173         __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_allele, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17174         __Pyx_GOTREF(__pyx_t_22);
17175         __pyx_t_10 = PyNumber_Add(__pyx_t_2, __pyx_t_22); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17176         __Pyx_GOTREF(__pyx_t_10);
17177         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17178         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17179         __pyx_t_22 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__upper); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17180         __Pyx_GOTREF(__pyx_t_22);
17181         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17182         __pyx_t_10 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17183         __Pyx_GOTREF(__pyx_t_10);
17184         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17185         __pyx_t_19 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_t_10, ((PyObject *)__pyx_n_s__N)))); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17186         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17187         __pyx_t_5 = __pyx_t_19;
17188       } else {
17189         __pyx_t_5 = __pyx_t_14;
17190       }
17191       if (__pyx_t_5) {
17192
17193         /* "cvcf.pyx":785
17194  *                 if len(allele) == 0: self.error(line,self.ZERO_LENGTH_ALLELE)
17195  *                 if ref[0].upper() != allele[0].upper() and "N" not in (ref[0]+allele[0]).upper():
17196  *                     self.error(line,self.MISSING_INDEL_ALLELE_REF_BASE)             # <<<<<<<<<<<<<<
17197  * 
17198  *         # trim trailing bases in alleles
17199  */
17200         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17201         __Pyx_GOTREF(__pyx_t_10);
17202         __pyx_t_22 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_116); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17203         __Pyx_GOTREF(__pyx_t_22);
17204         __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17205         __Pyx_GOTREF(__pyx_t_2);
17206         __Pyx_INCREF(__pyx_v_line);
17207         PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line);
17208         __Pyx_GIVEREF(__pyx_v_line);
17209         PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_22);
17210         __Pyx_GIVEREF(__pyx_t_22);
17211         __pyx_t_22 = 0;
17212         __pyx_t_22 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17213         __Pyx_GOTREF(__pyx_t_22);
17214         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17215         __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
17216         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17217         goto __pyx_L86;
17218       }
17219       __pyx_L86:;
17220       goto __pyx_L84;
17221     }
17222     __pyx_L84:;
17223   }
17224   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17225
17226   /* "cvcf.pyx":788
17227  * 
17228  *         # trim trailing bases in alleles
17229  *         if alt:             # <<<<<<<<<<<<<<
17230  *             for i in range(1,min(len(ref),min(map(len,alt)))):
17231  *                 if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
17232  */
17233   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_alt); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17234   if (__pyx_t_5) {
17235
17236     /* "cvcf.pyx":789
17237  *         # trim trailing bases in alleles
17238  *         if alt:
17239  *             for i in range(1,min(len(ref),min(map(len,alt)))):             # <<<<<<<<<<<<<<
17240  *                 if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
17241  *                     break
17242  */
17243     __pyx_t_8 = __Pyx_GetName(__pyx_b, __pyx_n_s__len); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17244     __Pyx_GOTREF(__pyx_t_8);
17245     __pyx_t_22 = PyTuple_New(2); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17246     __Pyx_GOTREF(__pyx_t_22);
17247     PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_8);
17248     __Pyx_GIVEREF(__pyx_t_8);
17249     __Pyx_INCREF(__pyx_cur_scope->__pyx_v_alt);
17250     PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_cur_scope->__pyx_v_alt);
17251     __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alt);
17252     __pyx_t_8 = 0;
17253     __pyx_t_8 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17254     __Pyx_GOTREF(__pyx_t_8);
17255     __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
17256     __pyx_t_22 = PyTuple_New(1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17257     __Pyx_GOTREF(__pyx_t_22);
17258     PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_8);
17259     __Pyx_GIVEREF(__pyx_t_8);
17260     __pyx_t_8 = 0;
17261     __pyx_t_8 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17262     __Pyx_GOTREF(__pyx_t_8);
17263     __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
17264     __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17265     __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17266     __Pyx_GOTREF(__pyx_t_2);
17267     __pyx_t_10 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_LT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17268     __Pyx_GOTREF(__pyx_t_10);
17269     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17270     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17271     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17272     if (__pyx_t_5) {
17273       __Pyx_INCREF(__pyx_t_8);
17274       __pyx_t_22 = __pyx_t_8;
17275     } else {
17276       __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17277       __Pyx_GOTREF(__pyx_t_10);
17278       __pyx_t_22 = __pyx_t_10;
17279       __pyx_t_10 = 0;
17280     }
17281     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17282     __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17283     __Pyx_GOTREF(__pyx_t_8);
17284     __Pyx_INCREF(__pyx_int_1);
17285     PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_int_1);
17286     __Pyx_GIVEREF(__pyx_int_1);
17287     __Pyx_INCREF(__pyx_t_22);
17288     PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_22);
17289     __Pyx_GIVEREF(__pyx_t_22);
17290     __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17291     __pyx_t_22 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17292     __Pyx_GOTREF(__pyx_t_22);
17293     __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
17294     if (PyList_CheckExact(__pyx_t_22) || PyTuple_CheckExact(__pyx_t_22)) {
17295       __pyx_t_8 = __pyx_t_22; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
17296       __pyx_t_15 = NULL;
17297     } else {
17298       __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_22); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17299       __Pyx_GOTREF(__pyx_t_8);
17300       __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
17301     }
17302     __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17303     for (;;) {
17304       if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
17305         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
17306         __pyx_t_22 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_22); __pyx_t_4++;
17307       } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
17308         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
17309         __pyx_t_22 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_22); __pyx_t_4++;
17310       } else {
17311         __pyx_t_22 = __pyx_t_15(__pyx_t_8);
17312         if (unlikely(!__pyx_t_22)) {
17313           if (PyErr_Occurred()) {
17314             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
17315             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17316           }
17317           break;
17318         }
17319         __Pyx_GOTREF(__pyx_t_22);
17320       }
17321       __Pyx_XDECREF(__pyx_v_i);
17322       __pyx_v_i = __pyx_t_22;
17323       __pyx_t_22 = 0;
17324
17325       /* "cvcf.pyx":790
17326  *         if alt:
17327  *             for i in range(1,min(len(ref),min(map(len,alt)))):
17328  *                 if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():             # <<<<<<<<<<<<<<
17329  *                     break
17330  *                 ref, alt = ref[:-1], [allele[:-1] for allele in alt]
17331  */
17332       __pyx_t_22 = __pyx_pf_4cvcf_3VCF_10parse_data_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17333       __Pyx_GOTREF(__pyx_t_22);
17334       __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17335       __Pyx_GOTREF(__pyx_t_10);
17336       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_22);
17337       __Pyx_GIVEREF(__pyx_t_22);
17338       __pyx_t_22 = 0;
17339       __pyx_t_22 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17340       __Pyx_GOTREF(__pyx_t_22);
17341       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
17342       __pyx_t_3 = PySet_Size(__pyx_t_22); 
17343       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17344       __pyx_t_5 = (__pyx_t_3 > 1);
17345       if (!__pyx_t_5) {
17346         __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_ref, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17347         __Pyx_GOTREF(__pyx_t_22);
17348         __pyx_t_10 = PyObject_GetAttr(__pyx_t_22, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17349         __Pyx_GOTREF(__pyx_t_10);
17350         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17351         __pyx_t_22 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17352         __Pyx_GOTREF(__pyx_t_22);
17353         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17354         __pyx_t_10 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_alt, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17355         __Pyx_GOTREF(__pyx_t_10);
17356         __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17357         __Pyx_GOTREF(__pyx_t_2);
17358         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17359         __pyx_t_10 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17360         __Pyx_GOTREF(__pyx_t_10);
17361         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17362         __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17363         __Pyx_GOTREF(__pyx_t_2);
17364         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17365         __pyx_t_10 = PyObject_RichCompare(__pyx_t_22, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17366         __Pyx_GOTREF(__pyx_t_10);
17367         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17368         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17369         __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17370         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17371         __pyx_t_19 = __pyx_t_14;
17372       } else {
17373         __pyx_t_19 = __pyx_t_5;
17374       }
17375       if (__pyx_t_19) {
17376
17377         /* "cvcf.pyx":791
17378  *             for i in range(1,min(len(ref),min(map(len,alt)))):
17379  *                 if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
17380  *                     break             # <<<<<<<<<<<<<<
17381  *                 ref, alt = ref[:-1], [allele[:-1] for allele in alt]
17382  * 
17383  */
17384         goto __pyx_L89_break;
17385         goto __pyx_L90;
17386       }
17387       __pyx_L90:;
17388
17389       /* "cvcf.pyx":792
17390  *                 if len(set(allele[-1].upper() for allele in alt)) > 1 or ref[-1].upper() != alt[0][-1].upper():
17391  *                     break
17392  *                 ref, alt = ref[:-1], [allele[:-1] for allele in alt]             # <<<<<<<<<<<<<<
17393  * 
17394  *         # left-align alleles, if a reference is available
17395  */
17396       __pyx_t_10 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17397       __Pyx_GOTREF(__pyx_t_10);
17398       __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17399       __Pyx_GOTREF(__pyx_t_2);
17400       if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
17401         __pyx_t_22 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_22); __pyx_t_3 = 0;
17402         __pyx_t_26 = NULL;
17403       } else {
17404         __pyx_t_3 = -1; __pyx_t_22 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17405         __Pyx_GOTREF(__pyx_t_22);
17406         __pyx_t_26 = Py_TYPE(__pyx_t_22)->tp_iternext;
17407       }
17408       for (;;) {
17409         if (!__pyx_t_26 && PyList_CheckExact(__pyx_t_22)) {
17410           if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_22)) break;
17411           __pyx_t_7 = PyList_GET_ITEM(__pyx_t_22, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++;
17412         } else if (!__pyx_t_26 && PyTuple_CheckExact(__pyx_t_22)) {
17413           if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_22)) break;
17414           __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_22, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++;
17415         } else {
17416           __pyx_t_7 = __pyx_t_26(__pyx_t_22);
17417           if (unlikely(!__pyx_t_7)) {
17418             if (PyErr_Occurred()) {
17419               if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
17420               else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17421             }
17422             break;
17423           }
17424           __Pyx_GOTREF(__pyx_t_7);
17425         }
17426         __Pyx_XDECREF(__pyx_v_allele);
17427         __pyx_v_allele = __pyx_t_7;
17428         __pyx_t_7 = 0;
17429         __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17430         __Pyx_GOTREF(__pyx_t_7);
17431         if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17432         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17433       }
17434       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17435       __pyx_t_22 = ((PyObject *)__pyx_t_2);
17436       __Pyx_INCREF(__pyx_t_22);
17437       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
17438       __Pyx_DECREF(__pyx_v_ref);
17439       __pyx_v_ref = __pyx_t_10;
17440       __pyx_t_10 = 0;
17441       __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
17442       __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
17443       __Pyx_GIVEREF(__pyx_t_22);
17444       __pyx_cur_scope->__pyx_v_alt = __pyx_t_22;
17445       __pyx_t_22 = 0;
17446     }
17447     __pyx_L89_break:;
17448     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17449     goto __pyx_L87;
17450   }
17451   __pyx_L87:;
17452
17453   /* "cvcf.pyx":795
17454  * 
17455  *         # left-align alleles, if a reference is available
17456  *         if self._leftalign and self._reference:             # <<<<<<<<<<<<<<
17457  *             while left < pos:
17458  *                 movable = True
17459  */
17460   __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___leftalign); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17461   __Pyx_GOTREF(__pyx_t_8);
17462   __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17463   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17464   if (__pyx_t_19) {
17465     __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___reference); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17466     __Pyx_GOTREF(__pyx_t_8);
17467     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17468     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17469     __pyx_t_14 = __pyx_t_5;
17470   } else {
17471     __pyx_t_14 = __pyx_t_19;
17472   }
17473   if (__pyx_t_14) {
17474
17475     /* "cvcf.pyx":796
17476  *         # left-align alleles, if a reference is available
17477  *         if self._leftalign and self._reference:
17478  *             while left < pos:             # <<<<<<<<<<<<<<
17479  *                 movable = True
17480  *                 for allele in alt:
17481  */
17482     while (1) {
17483       if (unlikely(!__pyx_v_left)) { __Pyx_RaiseUnboundLocalError("left"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
17484       __pyx_t_8 = PyObject_RichCompare(__pyx_v_left, __pyx_v_pos, Py_LT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17485       __Pyx_GOTREF(__pyx_t_8);
17486       __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17487       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17488       if (!__pyx_t_14) break;
17489
17490       /* "cvcf.pyx":797
17491  *         if self._leftalign and self._reference:
17492  *             while left < pos:
17493  *                 movable = True             # <<<<<<<<<<<<<<
17494  *                 for allele in alt:
17495  *                     if len(allele) > len(ref):
17496  */
17497       __pyx_v_movable = 1;
17498
17499       /* "cvcf.pyx":798
17500  *             while left < pos:
17501  *                 movable = True
17502  *                 for allele in alt:             # <<<<<<<<<<<<<<
17503  *                     if len(allele) > len(ref):
17504  *                         longest, shortest = allele, ref
17505  */
17506       if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
17507         __pyx_t_8 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
17508         __pyx_t_15 = NULL;
17509       } else {
17510         __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17511         __Pyx_GOTREF(__pyx_t_8);
17512         __pyx_t_15 = Py_TYPE(__pyx_t_8)->tp_iternext;
17513       }
17514       for (;;) {
17515         if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_8)) {
17516           if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
17517           __pyx_t_22 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_22); __pyx_t_4++;
17518         } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_8)) {
17519           if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
17520           __pyx_t_22 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_22); __pyx_t_4++;
17521         } else {
17522           __pyx_t_22 = __pyx_t_15(__pyx_t_8);
17523           if (unlikely(!__pyx_t_22)) {
17524             if (PyErr_Occurred()) {
17525               if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
17526               else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17527             }
17528             break;
17529           }
17530           __Pyx_GOTREF(__pyx_t_22);
17531         }
17532         __Pyx_XDECREF(__pyx_v_allele);
17533         __pyx_v_allele = __pyx_t_22;
17534         __pyx_t_22 = 0;
17535
17536         /* "cvcf.pyx":799
17537  *                 movable = True
17538  *                 for allele in alt:
17539  *                     if len(allele) > len(ref):             # <<<<<<<<<<<<<<
17540  *                         longest, shortest = allele, ref
17541  *                     else:
17542  */
17543         __pyx_t_3 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17544         __pyx_t_21 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17545         __pyx_t_14 = (__pyx_t_3 > __pyx_t_21);
17546         if (__pyx_t_14) {
17547
17548           /* "cvcf.pyx":800
17549  *                 for allele in alt:
17550  *                     if len(allele) > len(ref):
17551  *                         longest, shortest = allele, ref             # <<<<<<<<<<<<<<
17552  *                     else:
17553  *                         longest, shortest = ref, allele
17554  */
17555           __pyx_t_22 = __pyx_v_allele;
17556           __Pyx_INCREF(__pyx_t_22);
17557           __pyx_t_10 = __pyx_v_ref;
17558           __Pyx_INCREF(__pyx_t_10);
17559           __Pyx_XDECREF(__pyx_v_longest);
17560           __pyx_v_longest = __pyx_t_22;
17561           __pyx_t_22 = 0;
17562           __Pyx_XDECREF(__pyx_v_shortest);
17563           __pyx_v_shortest = __pyx_t_10;
17564           __pyx_t_10 = 0;
17565           goto __pyx_L98;
17566         }
17567         /*else*/ {
17568
17569           /* "cvcf.pyx":802
17570  *                         longest, shortest = allele, ref
17571  *                     else:
17572  *                         longest, shortest = ref, allele             # <<<<<<<<<<<<<<
17573  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
17574  *                         movable = False
17575  */
17576           __pyx_t_10 = __pyx_v_ref;
17577           __Pyx_INCREF(__pyx_t_10);
17578           __pyx_t_22 = __pyx_v_allele;
17579           __Pyx_INCREF(__pyx_t_22);
17580           __Pyx_XDECREF(__pyx_v_longest);
17581           __pyx_v_longest = __pyx_t_10;
17582           __pyx_t_10 = 0;
17583           __Pyx_XDECREF(__pyx_v_shortest);
17584           __pyx_v_shortest = __pyx_t_22;
17585           __pyx_t_22 = 0;
17586         }
17587         __pyx_L98:;
17588
17589         /* "cvcf.pyx":803
17590  *                     else:
17591  *                         longest, shortest = ref, allele
17592  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():             # <<<<<<<<<<<<<<
17593  *                         movable = False
17594  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
17595  */
17596         __pyx_t_21 = PyObject_Length(__pyx_v_longest); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17597         __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17598         __pyx_t_14 = (__pyx_t_21 == __pyx_t_3);
17599         if (!__pyx_t_14) {
17600           __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17601           __pyx_t_22 = __Pyx_PySequence_GetSlice(__pyx_v_longest, 0, __pyx_t_3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17602           __Pyx_GOTREF(__pyx_t_22);
17603           __pyx_t_10 = PyObject_GetAttr(__pyx_t_22, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17604           __Pyx_GOTREF(__pyx_t_10);
17605           __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17606           __pyx_t_22 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17607           __Pyx_GOTREF(__pyx_t_22);
17608           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17609           __pyx_t_10 = PyObject_GetAttr(__pyx_v_shortest, __pyx_n_s__upper); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17610           __Pyx_GOTREF(__pyx_t_10);
17611           __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17612           __Pyx_GOTREF(__pyx_t_2);
17613           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17614           __pyx_t_10 = PyObject_RichCompare(__pyx_t_22, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17615           __Pyx_GOTREF(__pyx_t_10);
17616           __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17617           __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17618           __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17619           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17620           __pyx_t_5 = __pyx_t_19;
17621         } else {
17622           __pyx_t_5 = __pyx_t_14;
17623         }
17624         if (__pyx_t_5) {
17625
17626           /* "cvcf.pyx":804
17627  *                         longest, shortest = ref, allele
17628  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
17629  *                         movable = False             # <<<<<<<<<<<<<<
17630  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
17631  *                         movable = False
17632  */
17633           __pyx_v_movable = 0;
17634           goto __pyx_L99;
17635         }
17636         __pyx_L99:;
17637
17638         /* "cvcf.pyx":805
17639  *                     if len(longest) == len(shortest) or longest[:len(shortest)].upper() != shortest.upper():
17640  *                         movable = False
17641  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():             # <<<<<<<<<<<<<<
17642  *                         movable = False
17643  *                 if not movable:
17644  */
17645         __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_longest, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17646         __Pyx_GOTREF(__pyx_t_10);
17647         __pyx_t_2 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__upper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17648         __Pyx_GOTREF(__pyx_t_2);
17649         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17650         __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17651         __Pyx_GOTREF(__pyx_t_10);
17652         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17653         __pyx_t_3 = PyObject_Length(__pyx_v_shortest); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17654         __pyx_t_21 = (__pyx_t_3 - 1);
17655         __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_longest, __pyx_t_21, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17656         __Pyx_GOTREF(__pyx_t_2);
17657         __pyx_t_22 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__upper); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17658         __Pyx_GOTREF(__pyx_t_22);
17659         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17660         __pyx_t_2 = PyObject_Call(__pyx_t_22, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17661         __Pyx_GOTREF(__pyx_t_2);
17662         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17663         __pyx_t_22 = PyObject_RichCompare(__pyx_t_10, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17664         __Pyx_GOTREF(__pyx_t_22);
17665         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17666         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17667         __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17668         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17669         if (__pyx_t_5) {
17670
17671           /* "cvcf.pyx":806
17672  *                         movable = False
17673  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
17674  *                         movable = False             # <<<<<<<<<<<<<<
17675  *                 if not movable:
17676  *                     break
17677  */
17678           __pyx_v_movable = 0;
17679           goto __pyx_L100;
17680         }
17681         __pyx_L100:;
17682       }
17683       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17684
17685       /* "cvcf.pyx":807
17686  *                     if longest[-1].upper() != longest[len(shortest)-1].upper():
17687  *                         movable = False
17688  *                 if not movable:             # <<<<<<<<<<<<<<
17689  *                     break
17690  *                 ref = ref[:-1]
17691  */
17692       __pyx_t_5 = (!__pyx_v_movable);
17693       if (__pyx_t_5) {
17694
17695         /* "cvcf.pyx":808
17696  *                         movable = False
17697  *                 if not movable:
17698  *                     break             # <<<<<<<<<<<<<<
17699  *                 ref = ref[:-1]
17700  *                 alt = [allele[:-1] for allele in alt]
17701  */
17702         goto __pyx_L95_break;
17703         goto __pyx_L101;
17704       }
17705       __pyx_L101:;
17706
17707       /* "cvcf.pyx":809
17708  *                 if not movable:
17709  *                     break
17710  *                 ref = ref[:-1]             # <<<<<<<<<<<<<<
17711  *                 alt = [allele[:-1] for allele in alt]
17712  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
17713  */
17714       __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_ref, 0, -1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17715       __Pyx_GOTREF(__pyx_t_8);
17716       __Pyx_DECREF(__pyx_v_ref);
17717       __pyx_v_ref = __pyx_t_8;
17718       __pyx_t_8 = 0;
17719
17720       /* "cvcf.pyx":810
17721  *                     break
17722  *                 ref = ref[:-1]
17723  *                 alt = [allele[:-1] for allele in alt]             # <<<<<<<<<<<<<<
17724  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
17725  *                     ref = faref_leftflank[pos-left-1] + ref
17726  */
17727       __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17728       __Pyx_GOTREF(__pyx_t_8);
17729       if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
17730         __pyx_t_22 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_22); __pyx_t_4 = 0;
17731         __pyx_t_15 = NULL;
17732       } else {
17733         __pyx_t_4 = -1; __pyx_t_22 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17734         __Pyx_GOTREF(__pyx_t_22);
17735         __pyx_t_15 = Py_TYPE(__pyx_t_22)->tp_iternext;
17736       }
17737       for (;;) {
17738         if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_22)) {
17739           if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_22)) break;
17740           __pyx_t_2 = PyList_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
17741         } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_22)) {
17742           if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_22)) break;
17743           __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
17744         } else {
17745           __pyx_t_2 = __pyx_t_15(__pyx_t_22);
17746           if (unlikely(!__pyx_t_2)) {
17747             if (PyErr_Occurred()) {
17748               if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
17749               else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17750             }
17751             break;
17752           }
17753           __Pyx_GOTREF(__pyx_t_2);
17754         }
17755         __Pyx_XDECREF(__pyx_v_allele);
17756         __pyx_v_allele = __pyx_t_2;
17757         __pyx_t_2 = 0;
17758         __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_allele, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17759         __Pyx_GOTREF(__pyx_t_2);
17760         if (unlikely(PyList_Append(__pyx_t_8, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17761         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17762       }
17763       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17764       __Pyx_INCREF(((PyObject *)__pyx_t_8));
17765       __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
17766       __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
17767       __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
17768       __pyx_cur_scope->__pyx_v_alt = ((PyObject *)__pyx_t_8);
17769       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
17770
17771       /* "cvcf.pyx":811
17772  *                 ref = ref[:-1]
17773  *                 alt = [allele[:-1] for allele in alt]
17774  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:             # <<<<<<<<<<<<<<
17775  *                     ref = faref_leftflank[pos-left-1] + ref
17776  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
17777  */
17778       __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17779       __Pyx_GOTREF(__pyx_t_8);
17780       if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
17781         __pyx_t_22 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_22); __pyx_t_4 = 0;
17782         __pyx_t_15 = NULL;
17783       } else {
17784         __pyx_t_4 = -1; __pyx_t_22 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17785         __Pyx_GOTREF(__pyx_t_22);
17786         __pyx_t_15 = Py_TYPE(__pyx_t_22)->tp_iternext;
17787       }
17788       for (;;) {
17789         if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_22)) {
17790           if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_22)) break;
17791           __pyx_t_2 = PyList_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
17792         } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_22)) {
17793           if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_22)) break;
17794           __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
17795         } else {
17796           __pyx_t_2 = __pyx_t_15(__pyx_t_22);
17797           if (unlikely(!__pyx_t_2)) {
17798             if (PyErr_Occurred()) {
17799               if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
17800               else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17801             }
17802             break;
17803           }
17804           __Pyx_GOTREF(__pyx_t_2);
17805         }
17806         __Pyx_XDECREF(__pyx_v_allele);
17807         __pyx_v_allele = __pyx_t_2;
17808         __pyx_t_2 = 0;
17809         __pyx_t_21 = PyObject_Length(__pyx_v_allele); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17810         __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17811         __Pyx_GOTREF(__pyx_t_2);
17812         if (unlikely(PyList_Append(__pyx_t_8, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17813         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17814       }
17815       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17816       __pyx_t_22 = PyTuple_New(1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17817       __Pyx_GOTREF(__pyx_t_22);
17818       __Pyx_INCREF(((PyObject *)__pyx_t_8));
17819       PyTuple_SET_ITEM(__pyx_t_22, 0, ((PyObject *)__pyx_t_8));
17820       __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
17821       __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
17822       __pyx_t_8 = PyObject_Call(__pyx_builtin_min, ((PyObject *)__pyx_t_22), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17823       __Pyx_GOTREF(__pyx_t_8);
17824       __Pyx_DECREF(((PyObject *)__pyx_t_22)); __pyx_t_22 = 0;
17825       __pyx_t_22 = PyObject_RichCompare(__pyx_t_8, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17826       __Pyx_GOTREF(__pyx_t_22);
17827       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17828       __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_22); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17829       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17830       if (!__pyx_t_5) {
17831         __pyx_t_4 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17832         __pyx_t_14 = (__pyx_t_4 == 0);
17833         __pyx_t_19 = __pyx_t_14;
17834       } else {
17835         __pyx_t_19 = __pyx_t_5;
17836       }
17837       if (__pyx_t_19) {
17838
17839         /* "cvcf.pyx":812
17840  *                 alt = [allele[:-1] for allele in alt]
17841  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
17842  *                     ref = faref_leftflank[pos-left-1] + ref             # <<<<<<<<<<<<<<
17843  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
17844  *                     pos -= 1
17845  */
17846         if (unlikely(!__pyx_v_faref_leftflank)) { __Pyx_RaiseUnboundLocalError("faref_leftflank"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
17847         __pyx_t_22 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17848         __Pyx_GOTREF(__pyx_t_22);
17849         __pyx_t_8 = PyNumber_Subtract(__pyx_t_22, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17850         __Pyx_GOTREF(__pyx_t_8);
17851         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17852         __pyx_t_22 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_8); if (!__pyx_t_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17853         __Pyx_GOTREF(__pyx_t_22);
17854         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17855         __pyx_t_8 = PyNumber_Add(__pyx_t_22, __pyx_v_ref); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17856         __Pyx_GOTREF(__pyx_t_8);
17857         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17858         __Pyx_DECREF(__pyx_v_ref);
17859         __pyx_v_ref = __pyx_t_8;
17860         __pyx_t_8 = 0;
17861
17862         /* "cvcf.pyx":813
17863  *                 if min([len(allele) for allele in alt]) == 0 or len(ref) == 0:
17864  *                     ref = faref_leftflank[pos-left-1] + ref
17865  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]             # <<<<<<<<<<<<<<
17866  *                     pos -= 1
17867  * 
17868  */
17869         __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17870         __Pyx_GOTREF(__pyx_t_8);
17871         if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_alt) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_alt)) {
17872           __pyx_t_22 = __pyx_cur_scope->__pyx_v_alt; __Pyx_INCREF(__pyx_t_22); __pyx_t_4 = 0;
17873           __pyx_t_15 = NULL;
17874         } else {
17875           __pyx_t_4 = -1; __pyx_t_22 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17876           __Pyx_GOTREF(__pyx_t_22);
17877           __pyx_t_15 = Py_TYPE(__pyx_t_22)->tp_iternext;
17878         }
17879         for (;;) {
17880           if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_22)) {
17881             if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_22)) break;
17882             __pyx_t_2 = PyList_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
17883           } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_22)) {
17884             if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_22)) break;
17885             __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
17886           } else {
17887             __pyx_t_2 = __pyx_t_15(__pyx_t_22);
17888             if (unlikely(!__pyx_t_2)) {
17889               if (PyErr_Occurred()) {
17890                 if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
17891                 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17892               }
17893               break;
17894             }
17895             __Pyx_GOTREF(__pyx_t_2);
17896           }
17897           __Pyx_XDECREF(__pyx_v_allele);
17898           __pyx_v_allele = __pyx_t_2;
17899           __pyx_t_2 = 0;
17900           __pyx_t_2 = PyNumber_Subtract(__pyx_v_pos, __pyx_v_left); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17901           __Pyx_GOTREF(__pyx_t_2);
17902           __pyx_t_10 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17903           __Pyx_GOTREF(__pyx_t_10);
17904           __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17905           __pyx_t_2 = PyObject_GetItem(__pyx_v_faref_leftflank, __pyx_t_10); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17906           __Pyx_GOTREF(__pyx_t_2);
17907           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17908           __pyx_t_10 = PyNumber_Add(__pyx_t_2, __pyx_v_allele); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17909           __Pyx_GOTREF(__pyx_t_10);
17910           __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17911           if (unlikely(PyList_Append(__pyx_t_8, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17912           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17913         }
17914         __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
17915         __Pyx_INCREF(((PyObject *)__pyx_t_8));
17916         __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_alt);
17917         __Pyx_DECREF(__pyx_cur_scope->__pyx_v_alt);
17918         __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
17919         __pyx_cur_scope->__pyx_v_alt = ((PyObject *)__pyx_t_8);
17920         __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
17921
17922         /* "cvcf.pyx":814
17923  *                     ref = faref_leftflank[pos-left-1] + ref
17924  *                     alt = [faref_leftflank[pos-left-1] + allele for allele in alt]
17925  *                     pos -= 1             # <<<<<<<<<<<<<<
17926  * 
17927  *         # parse sample columns
17928  */
17929         __pyx_t_8 = PyNumber_InPlaceSubtract(__pyx_v_pos, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17930         __Pyx_GOTREF(__pyx_t_8);
17931         __Pyx_DECREF(__pyx_v_pos);
17932         __pyx_v_pos = __pyx_t_8;
17933         __pyx_t_8 = 0;
17934         goto __pyx_L104;
17935       }
17936       __pyx_L104:;
17937     }
17938     __pyx_L95_break:;
17939     goto __pyx_L93;
17940   }
17941   __pyx_L93:;
17942
17943   /* "cvcf.pyx":817
17944  * 
17945  *         # parse sample columns
17946  *         samples = []             # <<<<<<<<<<<<<<
17947  *         for sample in cols[9:]:
17948  *             dict = {}
17949  */
17950   __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17951   __Pyx_GOTREF(__pyx_t_8);
17952   __pyx_v_samples = __pyx_t_8;
17953   __pyx_t_8 = 0;
17954
17955   /* "cvcf.pyx":818
17956  *         # parse sample columns
17957  *         samples = []
17958  *         for sample in cols[9:]:             # <<<<<<<<<<<<<<
17959  *             dict = {}
17960  *             values = sample.split(':')
17961  */
17962   __pyx_t_8 = __Pyx_PySequence_GetSlice(__pyx_v_cols, 9, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17963   __Pyx_GOTREF(__pyx_t_8);
17964   if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
17965     __pyx_t_22 = __pyx_t_8; __Pyx_INCREF(__pyx_t_22); __pyx_t_4 = 0;
17966     __pyx_t_15 = NULL;
17967   } else {
17968     __pyx_t_4 = -1; __pyx_t_22 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17969     __Pyx_GOTREF(__pyx_t_22);
17970     __pyx_t_15 = Py_TYPE(__pyx_t_22)->tp_iternext;
17971   }
17972   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17973   for (;;) {
17974     if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_22)) {
17975       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_22)) break;
17976       __pyx_t_8 = PyList_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
17977     } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_22)) {
17978       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_22)) break;
17979       __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_22, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
17980     } else {
17981       __pyx_t_8 = __pyx_t_15(__pyx_t_22);
17982       if (unlikely(!__pyx_t_8)) {
17983         if (PyErr_Occurred()) {
17984           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
17985           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17986         }
17987         break;
17988       }
17989       __Pyx_GOTREF(__pyx_t_8);
17990     }
17991     __Pyx_XDECREF(__pyx_v_sample);
17992     __pyx_v_sample = __pyx_t_8;
17993     __pyx_t_8 = 0;
17994
17995     /* "cvcf.pyx":819
17996  *         samples = []
17997  *         for sample in cols[9:]:
17998  *             dict = {}             # <<<<<<<<<<<<<<
17999  *             values = sample.split(':')
18000  *             if len(values) > len(format):
18001  */
18002     __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18003     __Pyx_GOTREF(((PyObject *)__pyx_t_8));
18004     __Pyx_XDECREF(((PyObject *)__pyx_v_dict));
18005     __pyx_v_dict = __pyx_t_8;
18006     __pyx_t_8 = 0;
18007
18008     /* "cvcf.pyx":820
18009  *         for sample in cols[9:]:
18010  *             dict = {}
18011  *             values = sample.split(':')             # <<<<<<<<<<<<<<
18012  *             if len(values) > len(format):
18013  *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
18014  */
18015     __pyx_t_8 = PyObject_GetAttr(__pyx_v_sample, __pyx_n_s__split); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18016     __Pyx_GOTREF(__pyx_t_8);
18017     __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_117), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18018     __Pyx_GOTREF(__pyx_t_10);
18019     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18020     __Pyx_XDECREF(__pyx_v_values);
18021     __pyx_v_values = __pyx_t_10;
18022     __pyx_t_10 = 0;
18023
18024     /* "cvcf.pyx":821
18025  *             dict = {}
18026  *             values = sample.split(':')
18027  *             if len(values) > len(format):             # <<<<<<<<<<<<<<
18028  *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
18029  *             for idx in range(len(format)):
18030  */
18031     __pyx_t_21 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18032     __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18033     __pyx_t_19 = (__pyx_t_21 > __pyx_t_3);
18034     if (__pyx_t_19) {
18035
18036       /* "cvcf.pyx":822
18037  *             values = sample.split(':')
18038  *             if len(values) > len(format):
18039  *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))             # <<<<<<<<<<<<<<
18040  *             for idx in range(len(format)):
18041  *                 expected = self.get_expected(format[idx], self._format, alt)
18042  */
18043       __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18044       __Pyx_GOTREF(__pyx_t_10);
18045       __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_18); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18046       __Pyx_GOTREF(__pyx_t_8);
18047       __pyx_t_3 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18048       __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18049       __Pyx_GOTREF(__pyx_t_2);
18050       __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18051       __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18052       __Pyx_GOTREF(__pyx_t_7);
18053       __pyx_t_24 = PyTuple_New(3); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18054       __Pyx_GOTREF(__pyx_t_24);
18055       PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_2);
18056       __Pyx_GIVEREF(__pyx_t_2);
18057       __Pyx_INCREF(__pyx_v_sample);
18058       PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_v_sample);
18059       __Pyx_GIVEREF(__pyx_v_sample);
18060       PyTuple_SET_ITEM(__pyx_t_24, 2, __pyx_t_7);
18061       __Pyx_GIVEREF(__pyx_t_7);
18062       __pyx_t_2 = 0;
18063       __pyx_t_7 = 0;
18064       __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_19), ((PyObject *)__pyx_t_24)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18065       __Pyx_GOTREF(((PyObject *)__pyx_t_7));
18066       __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
18067       __pyx_t_24 = PyTuple_New(3); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18068       __Pyx_GOTREF(__pyx_t_24);
18069       __Pyx_INCREF(__pyx_v_line);
18070       PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_line);
18071       __Pyx_GIVEREF(__pyx_v_line);
18072       PyTuple_SET_ITEM(__pyx_t_24, 1, __pyx_t_8);
18073       __Pyx_GIVEREF(__pyx_t_8);
18074       PyTuple_SET_ITEM(__pyx_t_24, 2, ((PyObject *)__pyx_t_7));
18075       __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
18076       __pyx_t_8 = 0;
18077       __pyx_t_7 = 0;
18078       __pyx_t_7 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18079       __Pyx_GOTREF(__pyx_t_7);
18080       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18081       __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
18082       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18083       goto __pyx_L111;
18084     }
18085     __pyx_L111:;
18086
18087     /* "cvcf.pyx":823
18088  *             if len(values) > len(format):
18089  *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
18090  *             for idx in range(len(format)):             # <<<<<<<<<<<<<<
18091  *                 expected = self.get_expected(format[idx], self._format, alt)
18092  *                 if idx < len(values): value = values[idx]
18093  */
18094     __pyx_t_3 = PyObject_Length(__pyx_v_format); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18095     __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18096     __Pyx_GOTREF(__pyx_t_7);
18097     __pyx_t_24 = PyTuple_New(1); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18098     __Pyx_GOTREF(__pyx_t_24);
18099     PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_7);
18100     __Pyx_GIVEREF(__pyx_t_7);
18101     __pyx_t_7 = 0;
18102     __pyx_t_7 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18103     __Pyx_GOTREF(__pyx_t_7);
18104     __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
18105     if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
18106       __pyx_t_24 = __pyx_t_7; __Pyx_INCREF(__pyx_t_24); __pyx_t_3 = 0;
18107       __pyx_t_26 = NULL;
18108     } else {
18109       __pyx_t_3 = -1; __pyx_t_24 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18110       __Pyx_GOTREF(__pyx_t_24);
18111       __pyx_t_26 = Py_TYPE(__pyx_t_24)->tp_iternext;
18112     }
18113     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18114     for (;;) {
18115       if (!__pyx_t_26 && PyList_CheckExact(__pyx_t_24)) {
18116         if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_24)) break;
18117         __pyx_t_7 = PyList_GET_ITEM(__pyx_t_24, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++;
18118       } else if (!__pyx_t_26 && PyTuple_CheckExact(__pyx_t_24)) {
18119         if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_24)) break;
18120         __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_24, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++;
18121       } else {
18122         __pyx_t_7 = __pyx_t_26(__pyx_t_24);
18123         if (unlikely(!__pyx_t_7)) {
18124           if (PyErr_Occurred()) {
18125             if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
18126             else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18127           }
18128           break;
18129         }
18130         __Pyx_GOTREF(__pyx_t_7);
18131       }
18132       __Pyx_XDECREF(__pyx_v_idx);
18133       __pyx_v_idx = __pyx_t_7;
18134       __pyx_t_7 = 0;
18135
18136       /* "cvcf.pyx":824
18137  *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
18138  *             for idx in range(len(format)):
18139  *                 expected = self.get_expected(format[idx], self._format, alt)             # <<<<<<<<<<<<<<
18140  *                 if idx < len(values): value = values[idx]
18141  *                 else:
18142  */
18143       __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__get_expected); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18144       __Pyx_GOTREF(__pyx_t_7);
18145       __pyx_t_10 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18146       __Pyx_GOTREF(__pyx_t_10);
18147       __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18148       __Pyx_GOTREF(__pyx_t_8);
18149       __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18150       __Pyx_GOTREF(__pyx_t_2);
18151       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10);
18152       __Pyx_GIVEREF(__pyx_t_10);
18153       PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
18154       __Pyx_GIVEREF(__pyx_t_8);
18155       __Pyx_INCREF(__pyx_cur_scope->__pyx_v_alt);
18156       PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_cur_scope->__pyx_v_alt);
18157       __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alt);
18158       __pyx_t_10 = 0;
18159       __pyx_t_8 = 0;
18160       __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18161       __Pyx_GOTREF(__pyx_t_8);
18162       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18163       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18164       __Pyx_XDECREF(__pyx_v_expected);
18165       __pyx_v_expected = __pyx_t_8;
18166       __pyx_t_8 = 0;
18167
18168       /* "cvcf.pyx":825
18169  *             for idx in range(len(format)):
18170  *                 expected = self.get_expected(format[idx], self._format, alt)
18171  *                 if idx < len(values): value = values[idx]             # <<<<<<<<<<<<<<
18172  *                 else:
18173  *                     if expected == -1: value = "."
18174  */
18175       __pyx_t_21 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18176       __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18177       __Pyx_GOTREF(__pyx_t_8);
18178       __pyx_t_2 = PyObject_RichCompare(__pyx_v_idx, __pyx_t_8, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18179       __Pyx_GOTREF(__pyx_t_2);
18180       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18181       __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18182       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18183       if (__pyx_t_19) {
18184         __pyx_t_2 = PyObject_GetItem(__pyx_v_values, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18185         __Pyx_GOTREF(__pyx_t_2);
18186         __Pyx_XDECREF(__pyx_v_value);
18187         __pyx_v_value = __pyx_t_2;
18188         __pyx_t_2 = 0;
18189         goto __pyx_L114;
18190       }
18191       /*else*/ {
18192
18193         /* "cvcf.pyx":827
18194  *                 if idx < len(values): value = values[idx]
18195  *                 else:
18196  *                     if expected == -1: value = "."             # <<<<<<<<<<<<<<
18197  *                     else: value = ",".join(["."]*expected)
18198  * 
18199  */
18200         __pyx_t_2 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18201         __Pyx_GOTREF(__pyx_t_2);
18202         __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18203         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18204         if (__pyx_t_19) {
18205           __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
18206           __Pyx_XDECREF(__pyx_v_value);
18207           __pyx_v_value = ((PyObject *)__pyx_kp_s_9);
18208           goto __pyx_L115;
18209         }
18210         /*else*/ {
18211
18212           /* "cvcf.pyx":828
18213  *                 else:
18214  *                     if expected == -1: value = "."
18215  *                     else: value = ",".join(["."]*expected)             # <<<<<<<<<<<<<<
18216  * 
18217  *                 dict[format[idx]] = self.parse_formatdata(format[idx],
18218  */
18219           __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18220           __Pyx_GOTREF(__pyx_t_2);
18221           __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18222           __Pyx_GOTREF(__pyx_t_8);
18223           __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
18224           PyList_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_kp_s_9));
18225           __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
18226           { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_8, __pyx_v_expected); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18227             __Pyx_GOTREF(__pyx_temp);
18228             __Pyx_DECREF(__pyx_t_8);
18229             __pyx_t_8 = __pyx_temp;
18230           }
18231           __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18232           __Pyx_GOTREF(__pyx_t_7);
18233           PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_8));
18234           __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
18235           __pyx_t_8 = 0;
18236           __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18237           __Pyx_GOTREF(__pyx_t_8);
18238           __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18239           __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
18240           __Pyx_XDECREF(__pyx_v_value);
18241           __pyx_v_value = __pyx_t_8;
18242           __pyx_t_8 = 0;
18243         }
18244         __pyx_L115:;
18245       }
18246       __pyx_L114:;
18247
18248       /* "cvcf.pyx":830
18249  *                     else: value = ",".join(["."]*expected)
18250  * 
18251  *                 dict[format[idx]] = self.parse_formatdata(format[idx],             # <<<<<<<<<<<<<<
18252  *                                                           value,
18253  *                                                           self._format,
18254  */
18255       __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_formatdata); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18256       __Pyx_GOTREF(__pyx_t_8);
18257       __pyx_t_7 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18258       __Pyx_GOTREF(__pyx_t_7);
18259
18260       /* "cvcf.pyx":832
18261  *                 dict[format[idx]] = self.parse_formatdata(format[idx],
18262  *                                                           value,
18263  *                                                           self._format,             # <<<<<<<<<<<<<<
18264  *                                                           line)
18265  *                 if expected != -1 and len(dict[format[idx]]) != expected:
18266  */
18267       __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18268       __Pyx_GOTREF(__pyx_t_2);
18269
18270       /* "cvcf.pyx":833
18271  *                                                           value,
18272  *                                                           self._format,
18273  *                                                           line)             # <<<<<<<<<<<<<<
18274  *                 if expected != -1 and len(dict[format[idx]]) != expected:
18275  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,
18276  */
18277       __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18278       __Pyx_GOTREF(__pyx_t_10);
18279       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
18280       __Pyx_GIVEREF(__pyx_t_7);
18281       __Pyx_INCREF(__pyx_v_value);
18282       PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_value);
18283       __Pyx_GIVEREF(__pyx_v_value);
18284       PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_2);
18285       __Pyx_GIVEREF(__pyx_t_2);
18286       __Pyx_INCREF(__pyx_v_line);
18287       PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_v_line);
18288       __Pyx_GIVEREF(__pyx_v_line);
18289       __pyx_t_7 = 0;
18290       __pyx_t_2 = 0;
18291       __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18292       __Pyx_GOTREF(__pyx_t_2);
18293       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18294       __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
18295
18296       /* "cvcf.pyx":830
18297  *                     else: value = ",".join(["."]*expected)
18298  * 
18299  *                 dict[format[idx]] = self.parse_formatdata(format[idx],             # <<<<<<<<<<<<<<
18300  *                                                           value,
18301  *                                                           self._format,
18302  */
18303       __pyx_t_10 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18304       __Pyx_GOTREF(__pyx_t_10);
18305       if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_10, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18306       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18307       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18308
18309       /* "cvcf.pyx":834
18310  *                                                           self._format,
18311  *                                                           line)
18312  *                 if expected != -1 and len(dict[format[idx]]) != expected:             # <<<<<<<<<<<<<<
18313  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,
18314  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))
18315  */
18316       __pyx_t_2 = PyObject_RichCompare(__pyx_v_expected, __pyx_int_neg_1, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18317       __Pyx_GOTREF(__pyx_t_2);
18318       __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18319       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18320       if (__pyx_t_19) {
18321         __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18322         __Pyx_GOTREF(__pyx_t_2);
18323         __pyx_t_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_2); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18324         __Pyx_GOTREF(__pyx_t_10);
18325         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18326         __pyx_t_21 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18327         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18328         __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18329         __Pyx_GOTREF(__pyx_t_10);
18330         __pyx_t_2 = PyObject_RichCompare(__pyx_t_10, __pyx_v_expected, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18331         __Pyx_GOTREF(__pyx_t_2);
18332         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18333         __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18334         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18335         __pyx_t_14 = __pyx_t_5;
18336       } else {
18337         __pyx_t_14 = __pyx_t_19;
18338       }
18339       if (__pyx_t_14) {
18340
18341         /* "cvcf.pyx":835
18342  *                                                           line)
18343  *                 if expected != -1 and len(dict[format[idx]]) != expected:
18344  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,             # <<<<<<<<<<<<<<
18345  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))
18346  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))
18347  */
18348         __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18349         __Pyx_GOTREF(__pyx_t_2);
18350         __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_20); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18351         __Pyx_GOTREF(__pyx_t_10);
18352
18353         /* "cvcf.pyx":836
18354  *                 if expected != -1 and len(dict[format[idx]]) != expected:
18355  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,
18356  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))             # <<<<<<<<<<<<<<
18357  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))
18358  *                     dict[format[idx]] = dict[format[idx]][:expected]
18359  */
18360         __pyx_t_8 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18361         __Pyx_GOTREF(__pyx_t_8);
18362         __pyx_t_7 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18363         __Pyx_GOTREF(__pyx_t_7);
18364         __pyx_t_23 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_7); if (!__pyx_t_23) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18365         __Pyx_GOTREF(__pyx_t_23);
18366         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18367         __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18368         __Pyx_GOTREF(__pyx_t_7);
18369         PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
18370         __Pyx_GIVEREF(__pyx_t_8);
18371         __Pyx_INCREF(__pyx_v_expected);
18372         PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_expected);
18373         __Pyx_GIVEREF(__pyx_v_expected);
18374         PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_23);
18375         __Pyx_GIVEREF(__pyx_t_23);
18376         __pyx_t_8 = 0;
18377         __pyx_t_23 = 0;
18378         __pyx_t_23 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18379         __Pyx_GOTREF(((PyObject *)__pyx_t_23));
18380         __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
18381         __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18382         __Pyx_GOTREF(__pyx_t_7);
18383         __Pyx_INCREF(__pyx_v_line);
18384         PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_line);
18385         __Pyx_GIVEREF(__pyx_v_line);
18386         PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_10);
18387         __Pyx_GIVEREF(__pyx_t_10);
18388         PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_t_23));
18389         __Pyx_GIVEREF(((PyObject *)__pyx_t_23));
18390         __pyx_t_10 = 0;
18391         __pyx_t_23 = 0;
18392         __pyx_t_23 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18393         __Pyx_GOTREF(__pyx_t_23);
18394         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18395         __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
18396         __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
18397
18398         /* "cvcf.pyx":837
18399  *                     self.error(line,self.BAD_NUMBER_OF_PARAMETERS,
18400  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))
18401  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))             # <<<<<<<<<<<<<<
18402  *                     dict[format[idx]] = dict[format[idx]][:expected]
18403  *             samples.append( dict )
18404  */
18405         __pyx_t_23 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_23) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18406         __Pyx_GOTREF(__pyx_t_23);
18407         __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_23); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18408         __Pyx_GOTREF(__pyx_t_7);
18409         __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
18410         __pyx_t_21 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18411         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18412         __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18413         __Pyx_GOTREF(__pyx_t_7);
18414         __pyx_t_23 = PyObject_RichCompare(__pyx_t_7, __pyx_v_expected, Py_LT); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18415         __Pyx_GOTREF(__pyx_t_23);
18416         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18417         __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18418         __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
18419         if (__pyx_t_14) {
18420           __pyx_t_23 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_23) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18421           __Pyx_GOTREF(__pyx_t_23);
18422           __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_23); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18423           __Pyx_GOTREF(__pyx_t_7);
18424           __pyx_t_2 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18425           __Pyx_GOTREF(__pyx_t_2);
18426           __pyx_t_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_2); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18427           __Pyx_GOTREF(__pyx_t_10);
18428           __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18429           __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18430           __Pyx_GOTREF(__pyx_t_2);
18431           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18432           __pyx_t_10 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18433           __Pyx_GOTREF(__pyx_t_10);
18434           __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_10); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18435           __Pyx_GOTREF(__pyx_t_8);
18436           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18437           __pyx_t_21 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18438           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18439           __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18440           __Pyx_GOTREF(__pyx_t_8);
18441           __pyx_t_10 = PyNumber_Subtract(__pyx_v_expected, __pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18442           __Pyx_GOTREF(__pyx_t_10);
18443           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18444           __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18445           __Pyx_GOTREF(__pyx_t_8);
18446           PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
18447           __Pyx_GIVEREF(__pyx_t_2);
18448           { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18449             __Pyx_GOTREF(__pyx_temp);
18450             __Pyx_DECREF(__pyx_t_8);
18451             __pyx_t_8 = __pyx_temp;
18452           }
18453           __pyx_t_2 = 0;
18454           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18455           __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_7, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18456           __Pyx_GOTREF(__pyx_t_10);
18457           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18458           __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
18459           if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_23, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18460           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18461           __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
18462           goto __pyx_L117;
18463         }
18464         __pyx_L117:;
18465
18466         /* "cvcf.pyx":838
18467  *                                "id=%s, expected %s parameters, got %s" % (format[idx],expected,dict[format[idx]]))
18468  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))
18469  *                     dict[format[idx]] = dict[format[idx]][:expected]             # <<<<<<<<<<<<<<
18470  *             samples.append( dict )
18471  * 
18472  */
18473         __pyx_t_23 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_23) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18474         __Pyx_GOTREF(__pyx_t_23);
18475         __pyx_t_10 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_dict), __pyx_t_23); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18476         __Pyx_GOTREF(__pyx_t_10);
18477         __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
18478         __pyx_t_21 = __Pyx_PyIndex_AsSsize_t(__pyx_v_expected); if (unlikely((__pyx_t_21 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18479         __pyx_t_23 = __Pyx_PySequence_GetSlice(__pyx_t_10, 0, __pyx_t_21); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18480         __Pyx_GOTREF(__pyx_t_23);
18481         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18482         __pyx_t_10 = PyObject_GetItem(__pyx_v_format, __pyx_v_idx); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18483         __Pyx_GOTREF(__pyx_t_10);
18484         if (PyDict_SetItem(((PyObject *)__pyx_v_dict), __pyx_t_10, __pyx_t_23) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18485         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18486         __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
18487         goto __pyx_L116;
18488       }
18489       __pyx_L116:;
18490     }
18491     __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
18492
18493     /* "cvcf.pyx":839
18494  *                     if len(dict[format[idx]] ) < expected: dict[format[idx]] += [dict[format[idx]][-1]]*(expected-len(dict[format[idx]]))
18495  *                     dict[format[idx]] = dict[format[idx]][:expected]
18496  *             samples.append( dict )             # <<<<<<<<<<<<<<
18497  * 
18498  *         # done
18499  */
18500     __pyx_t_25 = PyList_Append(__pyx_v_samples, ((PyObject *)__pyx_v_dict)); if (unlikely(__pyx_t_25 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18501   }
18502   __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
18503
18504   /* "cvcf.pyx":842
18505  * 
18506  *         # done
18507  *         d = {'chrom':chrom,             # <<<<<<<<<<<<<<
18508  *              'pos':pos,      # return 0-based position
18509  *              'id':id,
18510  */
18511   __pyx_t_22 = PyDict_New(); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18512   __Pyx_GOTREF(((PyObject *)__pyx_t_22));
18513   if (PyDict_SetItem(__pyx_t_22, ((PyObject *)__pyx_n_s__chrom), __pyx_v_chrom) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18514
18515   /* "cvcf.pyx":843
18516  *         # done
18517  *         d = {'chrom':chrom,
18518  *              'pos':pos,      # return 0-based position             # <<<<<<<<<<<<<<
18519  *              'id':id,
18520  *              'ref':ref,
18521  */
18522   if (PyDict_SetItem(__pyx_t_22, ((PyObject *)__pyx_n_s__pos), __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18523
18524   /* "cvcf.pyx":844
18525  *         d = {'chrom':chrom,
18526  *              'pos':pos,      # return 0-based position
18527  *              'id':id,             # <<<<<<<<<<<<<<
18528  *              'ref':ref,
18529  *              'alt':alt,
18530  */
18531   if (PyDict_SetItem(__pyx_t_22, ((PyObject *)__pyx_n_s__id), __pyx_v_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18532
18533   /* "cvcf.pyx":845
18534  *              'pos':pos,      # return 0-based position
18535  *              'id':id,
18536  *              'ref':ref,             # <<<<<<<<<<<<<<
18537  *              'alt':alt,
18538  *              'qual':qual,
18539  */
18540   if (PyDict_SetItem(__pyx_t_22, ((PyObject *)__pyx_n_s__ref), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18541
18542   /* "cvcf.pyx":846
18543  *              'id':id,
18544  *              'ref':ref,
18545  *              'alt':alt,             # <<<<<<<<<<<<<<
18546  *              'qual':qual,
18547  *              'filter':filter,
18548  */
18549   if (PyDict_SetItem(__pyx_t_22, ((PyObject *)__pyx_n_s__alt), __pyx_cur_scope->__pyx_v_alt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18550
18551   /* "cvcf.pyx":847
18552  *              'ref':ref,
18553  *              'alt':alt,
18554  *              'qual':qual,             # <<<<<<<<<<<<<<
18555  *              'filter':filter,
18556  *              'info':info,
18557  */
18558   __pyx_t_24 = PyFloat_FromDouble(__pyx_v_qual); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18559   __Pyx_GOTREF(__pyx_t_24);
18560   if (PyDict_SetItem(__pyx_t_22, ((PyObject *)__pyx_n_s__qual), __pyx_t_24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18561   __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
18562
18563   /* "cvcf.pyx":848
18564  *              'alt':alt,
18565  *              'qual':qual,
18566  *              'filter':filter,             # <<<<<<<<<<<<<<
18567  *              'info':info,
18568  *              'format':format}
18569  */
18570   if (PyDict_SetItem(__pyx_t_22, ((PyObject *)__pyx_n_s__filter), __pyx_v_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18571
18572   /* "cvcf.pyx":849
18573  *              'qual':qual,
18574  *              'filter':filter,
18575  *              'info':info,             # <<<<<<<<<<<<<<
18576  *              'format':format}
18577  *         for key,value in zip(self._samples,samples):
18578  */
18579   if (PyDict_SetItem(__pyx_t_22, ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_v_info)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18580
18581   /* "cvcf.pyx":850
18582  *              'filter':filter,
18583  *              'info':info,
18584  *              'format':format}             # <<<<<<<<<<<<<<
18585  *         for key,value in zip(self._samples,samples):
18586  *             d[key] = value
18587  */
18588   if (PyDict_SetItem(__pyx_t_22, ((PyObject *)__pyx_n_s__format), __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18589   __pyx_v_d = __pyx_t_22;
18590   __pyx_t_22 = 0;
18591
18592   /* "cvcf.pyx":851
18593  *              'info':info,
18594  *              'format':format}
18595  *         for key,value in zip(self._samples,samples):             # <<<<<<<<<<<<<<
18596  *             d[key] = value
18597  * 
18598  */
18599   __pyx_t_22 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18600   __Pyx_GOTREF(__pyx_t_22);
18601   __pyx_t_24 = PyTuple_New(2); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18602   __Pyx_GOTREF(__pyx_t_24);
18603   PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_22);
18604   __Pyx_GIVEREF(__pyx_t_22);
18605   __Pyx_INCREF(((PyObject *)__pyx_v_samples));
18606   PyTuple_SET_ITEM(__pyx_t_24, 1, ((PyObject *)__pyx_v_samples));
18607   __Pyx_GIVEREF(((PyObject *)__pyx_v_samples));
18608   __pyx_t_22 = 0;
18609   __pyx_t_22 = PyObject_Call(__pyx_builtin_zip, ((PyObject *)__pyx_t_24), NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18610   __Pyx_GOTREF(__pyx_t_22);
18611   __Pyx_DECREF(((PyObject *)__pyx_t_24)); __pyx_t_24 = 0;
18612   if (PyList_CheckExact(__pyx_t_22) || PyTuple_CheckExact(__pyx_t_22)) {
18613     __pyx_t_24 = __pyx_t_22; __Pyx_INCREF(__pyx_t_24); __pyx_t_4 = 0;
18614     __pyx_t_15 = NULL;
18615   } else {
18616     __pyx_t_4 = -1; __pyx_t_24 = PyObject_GetIter(__pyx_t_22); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18617     __Pyx_GOTREF(__pyx_t_24);
18618     __pyx_t_15 = Py_TYPE(__pyx_t_24)->tp_iternext;
18619   }
18620   __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
18621   for (;;) {
18622     if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_24)) {
18623       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_24)) break;
18624       __pyx_t_22 = PyList_GET_ITEM(__pyx_t_24, __pyx_t_4); __Pyx_INCREF(__pyx_t_22); __pyx_t_4++;
18625     } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_24)) {
18626       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_24)) break;
18627       __pyx_t_22 = PyTuple_GET_ITEM(__pyx_t_24, __pyx_t_4); __Pyx_INCREF(__pyx_t_22); __pyx_t_4++;
18628     } else {
18629       __pyx_t_22 = __pyx_t_15(__pyx_t_24);
18630       if (unlikely(!__pyx_t_22)) {
18631         if (PyErr_Occurred()) {
18632           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
18633           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18634         }
18635         break;
18636       }
18637       __Pyx_GOTREF(__pyx_t_22);
18638     }
18639     if ((likely(PyTuple_CheckExact(__pyx_t_22))) || (PyList_CheckExact(__pyx_t_22))) {
18640       PyObject* sequence = __pyx_t_22;
18641       if (likely(PyTuple_CheckExact(sequence))) {
18642         if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
18643           if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
18644           else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
18645           {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18646         }
18647         __pyx_t_23 = PyTuple_GET_ITEM(sequence, 0); 
18648         __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
18649       } else {
18650         if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
18651           if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
18652           else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
18653           {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18654         }
18655         __pyx_t_23 = PyList_GET_ITEM(sequence, 0); 
18656         __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
18657       }
18658       __Pyx_INCREF(__pyx_t_23);
18659       __Pyx_INCREF(__pyx_t_10);
18660       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
18661     } else {
18662       Py_ssize_t index = -1;
18663       __pyx_t_8 = PyObject_GetIter(__pyx_t_22); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18664       __Pyx_GOTREF(__pyx_t_8);
18665       __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
18666       __pyx_t_27 = Py_TYPE(__pyx_t_8)->tp_iternext;
18667       index = 0; __pyx_t_23 = __pyx_t_27(__pyx_t_8); if (unlikely(!__pyx_t_23)) goto __pyx_L120_unpacking_failed;
18668       __Pyx_GOTREF(__pyx_t_23);
18669       index = 1; __pyx_t_10 = __pyx_t_27(__pyx_t_8); if (unlikely(!__pyx_t_10)) goto __pyx_L120_unpacking_failed;
18670       __Pyx_GOTREF(__pyx_t_10);
18671       if (__Pyx_IternextUnpackEndCheck(__pyx_t_27(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18672       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18673       goto __pyx_L121_unpacking_done;
18674       __pyx_L120_unpacking_failed:;
18675       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18676       if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
18677       if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
18678       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18679       __pyx_L121_unpacking_done:;
18680     }
18681     __Pyx_XDECREF(__pyx_v_key);
18682     __pyx_v_key = __pyx_t_23;
18683     __pyx_t_23 = 0;
18684     __Pyx_XDECREF(__pyx_v_value);
18685     __pyx_v_value = __pyx_t_10;
18686     __pyx_t_10 = 0;
18687
18688     /* "cvcf.pyx":852
18689  *              'format':format}
18690  *         for key,value in zip(self._samples,samples):
18691  *             d[key] = value             # <<<<<<<<<<<<<<
18692  * 
18693  *         return d
18694  */
18695     if (PyDict_SetItem(((PyObject *)__pyx_v_d), __pyx_v_key, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18696   }
18697   __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
18698
18699   /* "cvcf.pyx":854
18700  *             d[key] = value
18701  * 
18702  *         return d             # <<<<<<<<<<<<<<
18703  * 
18704  * 
18705  */
18706   __Pyx_XDECREF(__pyx_r);
18707   __Pyx_INCREF(((PyObject *)__pyx_v_d));
18708   __pyx_r = ((PyObject *)__pyx_v_d);
18709   goto __pyx_L0;
18710
18711   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18712   goto __pyx_L0;
18713   __pyx_L1_error:;
18714   __Pyx_XDECREF(__pyx_t_1);
18715   __Pyx_XDECREF(__pyx_t_2);
18716   __Pyx_XDECREF(__pyx_t_6);
18717   __Pyx_XDECREF(__pyx_t_7);
18718   __Pyx_XDECREF(__pyx_t_8);
18719   __Pyx_XDECREF(__pyx_t_9);
18720   __Pyx_XDECREF(__pyx_t_10);
18721   __Pyx_XDECREF(__pyx_t_22);
18722   __Pyx_XDECREF(__pyx_t_23);
18723   __Pyx_XDECREF(__pyx_t_24);
18724   __Pyx_AddTraceback("cvcf.VCF.parse_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
18725   __pyx_r = NULL;
18726   __pyx_L0:;
18727   __Pyx_XDECREF(__pyx_v_cols);
18728   __Pyx_XDECREF(__pyx_v_chrom);
18729   __Pyx_XDECREF(__pyx_v_pos);
18730   __Pyx_XDECREF(__pyx_v_id);
18731   __Pyx_XDECREF(__pyx_v_ref);
18732   __Pyx_XDECREF(__pyx_v_c);
18733   __Pyx_XDECREF(__pyx_v_left);
18734   __Pyx_XDECREF(__pyx_v_faref_leftflank);
18735   __Pyx_XDECREF(__pyx_v_faref);
18736   __Pyx_XDECREF(__pyx_v_filter);
18737   __Pyx_XDECREF(__pyx_v_info);
18738   __Pyx_XDECREF(__pyx_v_blurp);
18739   __Pyx_XDECREF(__pyx_v_elts);
18740   __Pyx_XDECREF(__pyx_v_v);
18741   __Pyx_XDECREF(__pyx_v_format);
18742   __Pyx_XDECREF(__pyx_v_f);
18743   __Pyx_XDECREF(__pyx_v_newalts);
18744   __Pyx_XDECREF(__pyx_v_a);
18745   __Pyx_XDECREF(__pyx_v_l);
18746   __Pyx_XDECREF(__pyx_v_addns);
18747   __Pyx_XDECREF(__pyx_v_i);
18748   __Pyx_XDECREF(__pyx_v_na);
18749   __Pyx_XDECREF(__pyx_v_s);
18750   __Pyx_XDECREF(__pyx_v_addn);
18751   __Pyx_XDECREF(__pyx_v_allele);
18752   __Pyx_XDECREF(__pyx_v_longest);
18753   __Pyx_XDECREF(__pyx_v_shortest);
18754   __Pyx_XDECREF(__pyx_v_samples);
18755   __Pyx_XDECREF(__pyx_v_sample);
18756   __Pyx_XDECREF(__pyx_v_dict);
18757   __Pyx_XDECREF(__pyx_v_values);
18758   __Pyx_XDECREF(__pyx_v_idx);
18759   __Pyx_XDECREF(__pyx_v_expected);
18760   __Pyx_XDECREF(__pyx_v_value);
18761   __Pyx_XDECREF(__pyx_v_d);
18762   __Pyx_XDECREF(__pyx_v_key);
18763   __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
18764   __Pyx_XGIVEREF(__pyx_r);
18765   __Pyx_RefNannyFinishContext();
18766   return __pyx_r;
18767 }
18768
18769 /* Python wrapper */
18770 static PyObject *__pyx_pw_4cvcf_3VCF_35write_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18771 static PyMethodDef __pyx_mdef_4cvcf_3VCF_35write_data = {__Pyx_NAMESTR("write_data"), (PyCFunction)__pyx_pw_4cvcf_3VCF_35write_data, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
18772 static PyObject *__pyx_pw_4cvcf_3VCF_35write_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18773   PyObject *__pyx_v_self = 0;
18774   PyObject *__pyx_v_stream = 0;
18775   PyObject *__pyx_v_data = 0;
18776   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,&__pyx_n_s__data,0};
18777   PyObject *__pyx_r = 0;
18778   __Pyx_RefNannyDeclarations
18779   __Pyx_RefNannySetupContext("write_data (wrapper)", 0);
18780   __pyx_self = __pyx_self;
18781   {
18782     PyObject* values[3] = {0,0,0};
18783     if (unlikely(__pyx_kwds)) {
18784       Py_ssize_t kw_args;
18785       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18786       switch (pos_args) {
18787         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18788         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18789         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18790         case  0: break;
18791         default: goto __pyx_L5_argtuple_error;
18792       }
18793       kw_args = PyDict_Size(__pyx_kwds);
18794       switch (pos_args) {
18795         case  0:
18796         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
18797         if (likely(values[0])) kw_args--;
18798         else goto __pyx_L5_argtuple_error;
18799         case  1:
18800         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream);
18801         if (likely(values[1])) kw_args--;
18802         else {
18803           __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18804         }
18805         case  2:
18806         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data);
18807         if (likely(values[2])) kw_args--;
18808         else {
18809           __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18810         }
18811       }
18812       if (unlikely(kw_args > 0)) {
18813         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_data") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18814       }
18815     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
18816       goto __pyx_L5_argtuple_error;
18817     } else {
18818       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18819       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18820       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18821     }
18822     __pyx_v_self = values[0];
18823     __pyx_v_stream = values[1];
18824     __pyx_v_data = values[2];
18825   }
18826   goto __pyx_L4_argument_unpacking_done;
18827   __pyx_L5_argtuple_error:;
18828   __Pyx_RaiseArgtupleInvalid("write_data", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18829   __pyx_L3_error:;
18830   __Pyx_AddTraceback("cvcf.VCF.write_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
18831   __Pyx_RefNannyFinishContext();
18832   return NULL;
18833   __pyx_L4_argument_unpacking_done:;
18834   __pyx_r = __pyx_pf_4cvcf_3VCF_34write_data(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_data);
18835   __Pyx_RefNannyFinishContext();
18836   return __pyx_r;
18837 }
18838
18839 /* "cvcf.pyx":857
18840  * 
18841  * 
18842  *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
18843  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
18844  *         for k in required:
18845  */
18846
18847 static PyObject *__pyx_pf_4cvcf_3VCF_34write_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_data) {
18848   PyObject *__pyx_v_required = NULL;
18849   PyObject *__pyx_v_k = NULL;
18850   PyObject *__pyx_v_alt = NULL;
18851   PyObject *__pyx_v_filter = NULL;
18852   PyObject *__pyx_v_qual = NULL;
18853   PyObject *__pyx_v_output = NULL;
18854   PyObject *__pyx_v_s = NULL;
18855   PyObject *__pyx_r = NULL;
18856   __Pyx_RefNannyDeclarations
18857   PyObject *__pyx_t_1 = NULL;
18858   PyObject *__pyx_t_2 = NULL;
18859   PyObject *__pyx_t_3 = NULL;
18860   Py_ssize_t __pyx_t_4;
18861   PyObject *(*__pyx_t_5)(PyObject *);
18862   int __pyx_t_6;
18863   PyObject *__pyx_t_7 = NULL;
18864   PyObject *__pyx_t_8 = NULL;
18865   PyObject *__pyx_t_9 = NULL;
18866   PyObject *__pyx_t_10 = NULL;
18867   PyObject *__pyx_t_11 = NULL;
18868   PyObject *__pyx_t_12 = NULL;
18869   int __pyx_t_13;
18870   int __pyx_lineno = 0;
18871   const char *__pyx_filename = NULL;
18872   int __pyx_clineno = 0;
18873   __Pyx_RefNannySetupContext("write_data", 0);
18874
18875   /* "cvcf.pyx":858
18876  * 
18877  *     def write_data(self, stream, data):
18878  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples             # <<<<<<<<<<<<<<
18879  *         for k in required:
18880  *             if k not in data: raise ValueError("Required key %s not found in data" % str(k))
18881  */
18882   __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18883   __Pyx_GOTREF(__pyx_t_1);
18884   __Pyx_INCREF(((PyObject *)__pyx_n_s__chrom));
18885   PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__chrom));
18886   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chrom));
18887   __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
18888   PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__pos));
18889   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
18890   __Pyx_INCREF(((PyObject *)__pyx_n_s__id));
18891   PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__id));
18892   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__id));
18893   __Pyx_INCREF(((PyObject *)__pyx_n_s__ref));
18894   PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__ref));
18895   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ref));
18896   __Pyx_INCREF(((PyObject *)__pyx_n_s__alt));
18897   PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_s__alt));
18898   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__alt));
18899   __Pyx_INCREF(((PyObject *)__pyx_n_s__qual));
18900   PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_s__qual));
18901   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__qual));
18902   __Pyx_INCREF(((PyObject *)__pyx_n_s__filter));
18903   PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_s__filter));
18904   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__filter));
18905   __Pyx_INCREF(((PyObject *)__pyx_n_s__info));
18906   PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_s__info));
18907   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__info));
18908   __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
18909   PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_s__format));
18910   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
18911   __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18912   __Pyx_GOTREF(__pyx_t_2);
18913   __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_1), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18914   __Pyx_GOTREF(__pyx_t_3);
18915   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
18916   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18917   __pyx_v_required = __pyx_t_3;
18918   __pyx_t_3 = 0;
18919
18920   /* "cvcf.pyx":859
18921  *     def write_data(self, stream, data):
18922  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
18923  *         for k in required:             # <<<<<<<<<<<<<<
18924  *             if k not in data: raise ValueError("Required key %s not found in data" % str(k))
18925  *         if data['alt'] == []: alt = "."
18926  */
18927   if (PyList_CheckExact(__pyx_v_required) || PyTuple_CheckExact(__pyx_v_required)) {
18928     __pyx_t_3 = __pyx_v_required; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
18929     __pyx_t_5 = NULL;
18930   } else {
18931     __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_required); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18932     __Pyx_GOTREF(__pyx_t_3);
18933     __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
18934   }
18935   for (;;) {
18936     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
18937       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
18938       __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
18939     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
18940       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
18941       __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
18942     } else {
18943       __pyx_t_2 = __pyx_t_5(__pyx_t_3);
18944       if (unlikely(!__pyx_t_2)) {
18945         if (PyErr_Occurred()) {
18946           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
18947           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18948         }
18949         break;
18950       }
18951       __Pyx_GOTREF(__pyx_t_2);
18952     }
18953     __Pyx_XDECREF(__pyx_v_k);
18954     __pyx_v_k = __pyx_t_2;
18955     __pyx_t_2 = 0;
18956
18957     /* "cvcf.pyx":860
18958  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
18959  *         for k in required:
18960  *             if k not in data: raise ValueError("Required key %s not found in data" % str(k))             # <<<<<<<<<<<<<<
18961  *         if data['alt'] == []: alt = "."
18962  *         else: alt = ",".join(data['alt'])
18963  */
18964     __pyx_t_6 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_v_data, __pyx_v_k))); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18965     if (__pyx_t_6) {
18966       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18967       __Pyx_GOTREF(__pyx_t_2);
18968       __Pyx_INCREF(__pyx_v_k);
18969       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k);
18970       __Pyx_GIVEREF(__pyx_v_k);
18971       __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18972       __Pyx_GOTREF(__pyx_t_1);
18973       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18974       __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_118), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18975       __Pyx_GOTREF(((PyObject *)__pyx_t_2));
18976       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18977       __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18978       __Pyx_GOTREF(__pyx_t_1);
18979       PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
18980       __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
18981       __pyx_t_2 = 0;
18982       __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18983       __Pyx_GOTREF(__pyx_t_2);
18984       __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
18985       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18986       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18987       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18988       goto __pyx_L5;
18989     }
18990     __pyx_L5:;
18991   }
18992   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18993
18994   /* "cvcf.pyx":861
18995  *         for k in required:
18996  *             if k not in data: raise ValueError("Required key %s not found in data" % str(k))
18997  *         if data['alt'] == []: alt = "."             # <<<<<<<<<<<<<<
18998  *         else: alt = ",".join(data['alt'])
18999  *         if data['filter'] == None: filter = "."
19000  */
19001   __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__alt)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19002   __Pyx_GOTREF(__pyx_t_3);
19003   __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19004   __Pyx_GOTREF(__pyx_t_2);
19005   __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_t_2), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19006   __Pyx_GOTREF(__pyx_t_1);
19007   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19008   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
19009   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19010   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19011   if (__pyx_t_6) {
19012     __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
19013     __pyx_v_alt = ((PyObject *)__pyx_kp_s_9);
19014     goto __pyx_L6;
19015   }
19016   /*else*/ {
19017
19018     /* "cvcf.pyx":862
19019  *             if k not in data: raise ValueError("Required key %s not found in data" % str(k))
19020  *         if data['alt'] == []: alt = "."
19021  *         else: alt = ",".join(data['alt'])             # <<<<<<<<<<<<<<
19022  *         if data['filter'] == None: filter = "."
19023  *         elif data['filter'] == []:
19024  */
19025     __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_2), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19026     __Pyx_GOTREF(__pyx_t_1);
19027     __pyx_t_2 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__alt)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19028     __Pyx_GOTREF(__pyx_t_2);
19029     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19030     __Pyx_GOTREF(__pyx_t_3);
19031     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
19032     __Pyx_GIVEREF(__pyx_t_2);
19033     __pyx_t_2 = 0;
19034     __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19035     __Pyx_GOTREF(__pyx_t_2);
19036     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19037     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
19038     __pyx_v_alt = __pyx_t_2;
19039     __pyx_t_2 = 0;
19040   }
19041   __pyx_L6:;
19042
19043   /* "cvcf.pyx":863
19044  *         if data['alt'] == []: alt = "."
19045  *         else: alt = ",".join(data['alt'])
19046  *         if data['filter'] == None: filter = "."             # <<<<<<<<<<<<<<
19047  *         elif data['filter'] == []:
19048  *             if self._version == 33: filter = "0"
19049  */
19050   __pyx_t_2 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__filter)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19051   __Pyx_GOTREF(__pyx_t_2);
19052   __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, Py_None, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19053   __Pyx_GOTREF(__pyx_t_3);
19054   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19055   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19056   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19057   if (__pyx_t_6) {
19058     __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
19059     __pyx_v_filter = ((PyObject *)__pyx_kp_s_9);
19060     goto __pyx_L7;
19061   }
19062
19063   /* "cvcf.pyx":864
19064  *         else: alt = ",".join(data['alt'])
19065  *         if data['filter'] == None: filter = "."
19066  *         elif data['filter'] == []:             # <<<<<<<<<<<<<<
19067  *             if self._version == 33: filter = "0"
19068  *             else: filter = "PASS"
19069  */
19070   __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__filter)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19071   __Pyx_GOTREF(__pyx_t_3);
19072   __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19073   __Pyx_GOTREF(__pyx_t_2);
19074   __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_t_2), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19075   __Pyx_GOTREF(__pyx_t_1);
19076   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19077   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
19078   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19079   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19080   if (__pyx_t_6) {
19081
19082     /* "cvcf.pyx":865
19083  *         if data['filter'] == None: filter = "."
19084  *         elif data['filter'] == []:
19085  *             if self._version == 33: filter = "0"             # <<<<<<<<<<<<<<
19086  *             else: filter = "PASS"
19087  *         else: filter = ';'.join(data['filter'])
19088  */
19089     __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19090     __Pyx_GOTREF(__pyx_t_1);
19091     __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_33, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19092     __Pyx_GOTREF(__pyx_t_2);
19093     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19094     __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19095     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19096     if (__pyx_t_6) {
19097       __Pyx_INCREF(((PyObject *)__pyx_kp_s__0));
19098       __pyx_v_filter = ((PyObject *)__pyx_kp_s__0);
19099       goto __pyx_L8;
19100     }
19101     /*else*/ {
19102
19103       /* "cvcf.pyx":866
19104  *         elif data['filter'] == []:
19105  *             if self._version == 33: filter = "0"
19106  *             else: filter = "PASS"             # <<<<<<<<<<<<<<
19107  *         else: filter = ';'.join(data['filter'])
19108  *         if data['qual'] == -1: qual = "."
19109  */
19110       __Pyx_INCREF(((PyObject *)__pyx_n_s__PASS));
19111       __pyx_v_filter = ((PyObject *)__pyx_n_s__PASS);
19112     }
19113     __pyx_L8:;
19114     goto __pyx_L7;
19115   }
19116   /*else*/ {
19117
19118     /* "cvcf.pyx":867
19119  *             if self._version == 33: filter = "0"
19120  *             else: filter = "PASS"
19121  *         else: filter = ';'.join(data['filter'])             # <<<<<<<<<<<<<<
19122  *         if data['qual'] == -1: qual = "."
19123  *         else: qual = str(data['qual'])
19124  */
19125     __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_11), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19126     __Pyx_GOTREF(__pyx_t_2);
19127     __pyx_t_1 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__filter)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19128     __Pyx_GOTREF(__pyx_t_1);
19129     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19130     __Pyx_GOTREF(__pyx_t_3);
19131     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
19132     __Pyx_GIVEREF(__pyx_t_1);
19133     __pyx_t_1 = 0;
19134     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19135     __Pyx_GOTREF(__pyx_t_1);
19136     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19137     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
19138     __pyx_v_filter = __pyx_t_1;
19139     __pyx_t_1 = 0;
19140   }
19141   __pyx_L7:;
19142
19143   /* "cvcf.pyx":868
19144  *             else: filter = "PASS"
19145  *         else: filter = ';'.join(data['filter'])
19146  *         if data['qual'] == -1: qual = "."             # <<<<<<<<<<<<<<
19147  *         else: qual = str(data['qual'])
19148  * 
19149  */
19150   __pyx_t_1 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__qual)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19151   __Pyx_GOTREF(__pyx_t_1);
19152   __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19153   __Pyx_GOTREF(__pyx_t_3);
19154   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19155   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19156   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19157   if (__pyx_t_6) {
19158     __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
19159     __pyx_v_qual = ((PyObject *)__pyx_kp_s_9);
19160     goto __pyx_L9;
19161   }
19162   /*else*/ {
19163
19164     /* "cvcf.pyx":869
19165  *         else: filter = ';'.join(data['filter'])
19166  *         if data['qual'] == -1: qual = "."
19167  *         else: qual = str(data['qual'])             # <<<<<<<<<<<<<<
19168  * 
19169  *         output = [data['chrom'],
19170  */
19171     __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__qual)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19172     __Pyx_GOTREF(__pyx_t_3);
19173     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19174     __Pyx_GOTREF(__pyx_t_1);
19175     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
19176     __Pyx_GIVEREF(__pyx_t_3);
19177     __pyx_t_3 = 0;
19178     __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19179     __Pyx_GOTREF(__pyx_t_3);
19180     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
19181     __pyx_v_qual = __pyx_t_3;
19182     __pyx_t_3 = 0;
19183   }
19184   __pyx_L9:;
19185
19186   /* "cvcf.pyx":871
19187  *         else: qual = str(data['qual'])
19188  * 
19189  *         output = [data['chrom'],             # <<<<<<<<<<<<<<
19190  *                   str(data['pos']+1),   # change to 1-based position
19191  *                   data['id'],
19192  */
19193   __pyx_t_3 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__chrom)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19194   __Pyx_GOTREF(__pyx_t_3);
19195
19196   /* "cvcf.pyx":872
19197  * 
19198  *         output = [data['chrom'],
19199  *                   str(data['pos']+1),   # change to 1-based position             # <<<<<<<<<<<<<<
19200  *                   data['id'],
19201  *                   data['ref'],
19202  */
19203   __pyx_t_1 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__pos)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19204   __Pyx_GOTREF(__pyx_t_1);
19205   __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19206   __Pyx_GOTREF(__pyx_t_2);
19207   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19208   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19209   __Pyx_GOTREF(__pyx_t_1);
19210   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
19211   __Pyx_GIVEREF(__pyx_t_2);
19212   __pyx_t_2 = 0;
19213   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19214   __Pyx_GOTREF(__pyx_t_2);
19215   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
19216
19217   /* "cvcf.pyx":873
19218  *         output = [data['chrom'],
19219  *                   str(data['pos']+1),   # change to 1-based position
19220  *                   data['id'],             # <<<<<<<<<<<<<<
19221  *                   data['ref'],
19222  *                   alt,
19223  */
19224   __pyx_t_1 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__id)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19225   __Pyx_GOTREF(__pyx_t_1);
19226
19227   /* "cvcf.pyx":874
19228  *                   str(data['pos']+1),   # change to 1-based position
19229  *                   data['id'],
19230  *                   data['ref'],             # <<<<<<<<<<<<<<
19231  *                   alt,
19232  *                   qual,
19233  */
19234   __pyx_t_7 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__ref)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19235   __Pyx_GOTREF(__pyx_t_7);
19236
19237   /* "cvcf.pyx":878
19238  *                   qual,
19239  *                   filter,
19240  *                   self.format_formatdata( data['info'], self._info, separator=";" ),             # <<<<<<<<<<<<<<
19241  *                   self.format_formatdata( data['format'], self._format, value=False ) ]
19242  * 
19243  */
19244   __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format_formatdata); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19245   __Pyx_GOTREF(__pyx_t_8);
19246   __pyx_t_9 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__info)); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19247   __Pyx_GOTREF(__pyx_t_9);
19248   __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19249   __Pyx_GOTREF(__pyx_t_10);
19250   __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19251   __Pyx_GOTREF(__pyx_t_11);
19252   PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
19253   __Pyx_GIVEREF(__pyx_t_9);
19254   PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10);
19255   __Pyx_GIVEREF(__pyx_t_10);
19256   __pyx_t_9 = 0;
19257   __pyx_t_10 = 0;
19258   __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19259   __Pyx_GOTREF(((PyObject *)__pyx_t_10));
19260   if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__separator), ((PyObject *)__pyx_kp_s_11)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19261   __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19262   __Pyx_GOTREF(__pyx_t_9);
19263   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19264   __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
19265   __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
19266
19267   /* "cvcf.pyx":879
19268  *                   filter,
19269  *                   self.format_formatdata( data['info'], self._info, separator=";" ),
19270  *                   self.format_formatdata( data['format'], self._format, value=False ) ]             # <<<<<<<<<<<<<<
19271  * 
19272  *         for s in self._samples:
19273  */
19274   __pyx_t_10 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format_formatdata); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19275   __Pyx_GOTREF(__pyx_t_10);
19276   __pyx_t_11 = PyObject_GetItem(__pyx_v_data, ((PyObject *)__pyx_n_s__format)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19277   __Pyx_GOTREF(__pyx_t_11);
19278   __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19279   __Pyx_GOTREF(__pyx_t_8);
19280   __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19281   __Pyx_GOTREF(__pyx_t_12);
19282   PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
19283   __Pyx_GIVEREF(__pyx_t_11);
19284   PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8);
19285   __Pyx_GIVEREF(__pyx_t_8);
19286   __pyx_t_11 = 0;
19287   __pyx_t_8 = 0;
19288   __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19289   __Pyx_GOTREF(((PyObject *)__pyx_t_8));
19290   __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19291   __Pyx_GOTREF(__pyx_t_11);
19292   if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__value), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19293   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19294   __pyx_t_11 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_12), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19295   __Pyx_GOTREF(__pyx_t_11);
19296   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
19297   __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
19298   __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
19299   __pyx_t_8 = PyList_New(9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19300   __Pyx_GOTREF(__pyx_t_8);
19301   PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
19302   __Pyx_GIVEREF(__pyx_t_3);
19303   PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
19304   __Pyx_GIVEREF(__pyx_t_2);
19305   PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_1);
19306   __Pyx_GIVEREF(__pyx_t_1);
19307   PyList_SET_ITEM(__pyx_t_8, 3, __pyx_t_7);
19308   __Pyx_GIVEREF(__pyx_t_7);
19309   __Pyx_INCREF(__pyx_v_alt);
19310   PyList_SET_ITEM(__pyx_t_8, 4, __pyx_v_alt);
19311   __Pyx_GIVEREF(__pyx_v_alt);
19312   __Pyx_INCREF(__pyx_v_qual);
19313   PyList_SET_ITEM(__pyx_t_8, 5, __pyx_v_qual);
19314   __Pyx_GIVEREF(__pyx_v_qual);
19315   __Pyx_INCREF(__pyx_v_filter);
19316   PyList_SET_ITEM(__pyx_t_8, 6, __pyx_v_filter);
19317   __Pyx_GIVEREF(__pyx_v_filter);
19318   PyList_SET_ITEM(__pyx_t_8, 7, __pyx_t_9);
19319   __Pyx_GIVEREF(__pyx_t_9);
19320   PyList_SET_ITEM(__pyx_t_8, 8, __pyx_t_11);
19321   __Pyx_GIVEREF(__pyx_t_11);
19322   __pyx_t_3 = 0;
19323   __pyx_t_2 = 0;
19324   __pyx_t_1 = 0;
19325   __pyx_t_7 = 0;
19326   __pyx_t_9 = 0;
19327   __pyx_t_11 = 0;
19328   __pyx_v_output = __pyx_t_8;
19329   __pyx_t_8 = 0;
19330
19331   /* "cvcf.pyx":881
19332  *                   self.format_formatdata( data['format'], self._format, value=False ) ]
19333  * 
19334  *         for s in self._samples:             # <<<<<<<<<<<<<<
19335  *             output.append( self.format_formatdata( data[s], self._format, key=False ) )
19336  * 
19337  */
19338   __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19339   __Pyx_GOTREF(__pyx_t_8);
19340   if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
19341     __pyx_t_11 = __pyx_t_8; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0;
19342     __pyx_t_5 = NULL;
19343   } else {
19344     __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19345     __Pyx_GOTREF(__pyx_t_11);
19346     __pyx_t_5 = Py_TYPE(__pyx_t_11)->tp_iternext;
19347   }
19348   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19349   for (;;) {
19350     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_11)) {
19351       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break;
19352       __pyx_t_8 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
19353     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_11)) {
19354       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
19355       __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++;
19356     } else {
19357       __pyx_t_8 = __pyx_t_5(__pyx_t_11);
19358       if (unlikely(!__pyx_t_8)) {
19359         if (PyErr_Occurred()) {
19360           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
19361           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19362         }
19363         break;
19364       }
19365       __Pyx_GOTREF(__pyx_t_8);
19366     }
19367     __Pyx_XDECREF(__pyx_v_s);
19368     __pyx_v_s = __pyx_t_8;
19369     __pyx_t_8 = 0;
19370
19371     /* "cvcf.pyx":882
19372  * 
19373  *         for s in self._samples:
19374  *             output.append( self.format_formatdata( data[s], self._format, key=False ) )             # <<<<<<<<<<<<<<
19375  * 
19376  *         stream.write( "\t".join(output) + "\n" )
19377  */
19378     __pyx_t_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__format_formatdata); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19379     __Pyx_GOTREF(__pyx_t_8);
19380     __pyx_t_9 = PyObject_GetItem(__pyx_v_data, __pyx_v_s); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19381     __Pyx_GOTREF(__pyx_t_9);
19382     __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19383     __Pyx_GOTREF(__pyx_t_7);
19384     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19385     __Pyx_GOTREF(__pyx_t_1);
19386     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
19387     __Pyx_GIVEREF(__pyx_t_9);
19388     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
19389     __Pyx_GIVEREF(__pyx_t_7);
19390     __pyx_t_9 = 0;
19391     __pyx_t_7 = 0;
19392     __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19393     __Pyx_GOTREF(((PyObject *)__pyx_t_7));
19394     __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19395     __Pyx_GOTREF(__pyx_t_9);
19396     if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__key), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19397     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19398     __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19399     __Pyx_GOTREF(__pyx_t_9);
19400     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19401     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
19402     __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
19403     __pyx_t_13 = PyList_Append(__pyx_v_output, __pyx_t_9); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19404     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19405   }
19406   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19407
19408   /* "cvcf.pyx":884
19409  *             output.append( self.format_formatdata( data[s], self._format, key=False ) )
19410  * 
19411  *         stream.write( "\t".join(output) + "\n" )             # <<<<<<<<<<<<<<
19412  * 
19413  *     def _parse_header(self, stream):
19414  */
19415   __pyx_t_11 = PyObject_GetAttr(__pyx_v_stream, __pyx_n_s__write); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19416   __Pyx_GOTREF(__pyx_t_11);
19417   __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_88), __pyx_n_s__join); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19418   __Pyx_GOTREF(__pyx_t_9);
19419   __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19420   __Pyx_GOTREF(__pyx_t_7);
19421   __Pyx_INCREF(((PyObject *)__pyx_v_output));
19422   PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_output));
19423   __Pyx_GIVEREF(((PyObject *)__pyx_v_output));
19424   __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19425   __Pyx_GOTREF(__pyx_t_1);
19426   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19427   __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
19428   __pyx_t_7 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_s_94)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19429   __Pyx_GOTREF(__pyx_t_7);
19430   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19431   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19432   __Pyx_GOTREF(__pyx_t_1);
19433   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
19434   __Pyx_GIVEREF(__pyx_t_7);
19435   __pyx_t_7 = 0;
19436   __pyx_t_7 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19437   __Pyx_GOTREF(__pyx_t_7);
19438   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19439   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
19440   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19441
19442   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19443   goto __pyx_L0;
19444   __pyx_L1_error:;
19445   __Pyx_XDECREF(__pyx_t_1);
19446   __Pyx_XDECREF(__pyx_t_2);
19447   __Pyx_XDECREF(__pyx_t_3);
19448   __Pyx_XDECREF(__pyx_t_7);
19449   __Pyx_XDECREF(__pyx_t_8);
19450   __Pyx_XDECREF(__pyx_t_9);
19451   __Pyx_XDECREF(__pyx_t_10);
19452   __Pyx_XDECREF(__pyx_t_11);
19453   __Pyx_XDECREF(__pyx_t_12);
19454   __Pyx_AddTraceback("cvcf.VCF.write_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
19455   __pyx_r = NULL;
19456   __pyx_L0:;
19457   __Pyx_XDECREF(__pyx_v_required);
19458   __Pyx_XDECREF(__pyx_v_k);
19459   __Pyx_XDECREF(__pyx_v_alt);
19460   __Pyx_XDECREF(__pyx_v_filter);
19461   __Pyx_XDECREF(__pyx_v_qual);
19462   __Pyx_XDECREF(__pyx_v_output);
19463   __Pyx_XDECREF(__pyx_v_s);
19464   __Pyx_XGIVEREF(__pyx_r);
19465   __Pyx_RefNannyFinishContext();
19466   return __pyx_r;
19467 }
19468
19469 /* Python wrapper */
19470 static PyObject *__pyx_pw_4cvcf_3VCF_37_parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19471 static PyMethodDef __pyx_mdef_4cvcf_3VCF_37_parse_header = {__Pyx_NAMESTR("_parse_header"), (PyCFunction)__pyx_pw_4cvcf_3VCF_37_parse_header, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
19472 static PyObject *__pyx_pw_4cvcf_3VCF_37_parse_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19473   PyObject *__pyx_v_self = 0;
19474   PyObject *__pyx_v_stream = 0;
19475   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
19476   PyObject *__pyx_r = 0;
19477   __Pyx_RefNannyDeclarations
19478   __Pyx_RefNannySetupContext("_parse_header (wrapper)", 0);
19479   __pyx_self = __pyx_self;
19480   {
19481     PyObject* values[2] = {0,0};
19482     if (unlikely(__pyx_kwds)) {
19483       Py_ssize_t kw_args;
19484       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19485       switch (pos_args) {
19486         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19487         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19488         case  0: break;
19489         default: goto __pyx_L5_argtuple_error;
19490       }
19491       kw_args = PyDict_Size(__pyx_kwds);
19492       switch (pos_args) {
19493         case  0:
19494         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
19495         if (likely(values[0])) kw_args--;
19496         else goto __pyx_L5_argtuple_error;
19497         case  1:
19498         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream);
19499         if (likely(values[1])) kw_args--;
19500         else {
19501           __Pyx_RaiseArgtupleInvalid("_parse_header", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19502         }
19503       }
19504       if (unlikely(kw_args > 0)) {
19505         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_header") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19506       }
19507     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
19508       goto __pyx_L5_argtuple_error;
19509     } else {
19510       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19511       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19512     }
19513     __pyx_v_self = values[0];
19514     __pyx_v_stream = values[1];
19515   }
19516   goto __pyx_L4_argument_unpacking_done;
19517   __pyx_L5_argtuple_error:;
19518   __Pyx_RaiseArgtupleInvalid("_parse_header", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19519   __pyx_L3_error:;
19520   __Pyx_AddTraceback("cvcf.VCF._parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
19521   __Pyx_RefNannyFinishContext();
19522   return NULL;
19523   __pyx_L4_argument_unpacking_done:;
19524   __pyx_r = __pyx_pf_4cvcf_3VCF_36_parse_header(__pyx_self, __pyx_v_self, __pyx_v_stream);
19525   __Pyx_RefNannyFinishContext();
19526   return __pyx_r;
19527 }
19528
19529 /* "cvcf.pyx":886
19530  *         stream.write( "\t".join(output) + "\n" )
19531  * 
19532  *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
19533  *         self._lineno = 0
19534  *         for line in stream:
19535  */
19536
19537 static PyObject *__pyx_pf_4cvcf_3VCF_36_parse_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
19538   PyObject *__pyx_v_line = NULL;
19539   PyObject *__pyx_r = NULL;
19540   __Pyx_RefNannyDeclarations
19541   PyObject *__pyx_t_1 = NULL;
19542   Py_ssize_t __pyx_t_2;
19543   PyObject *(*__pyx_t_3)(PyObject *);
19544   PyObject *__pyx_t_4 = NULL;
19545   PyObject *__pyx_t_5 = NULL;
19546   int __pyx_t_6;
19547   PyObject *__pyx_t_7 = NULL;
19548   int __pyx_lineno = 0;
19549   const char *__pyx_filename = NULL;
19550   int __pyx_clineno = 0;
19551   __Pyx_RefNannySetupContext("_parse_header", 0);
19552
19553   /* "cvcf.pyx":887
19554  * 
19555  *     def _parse_header(self, stream):
19556  *         self._lineno = 0             # <<<<<<<<<<<<<<
19557  *         for line in stream:
19558  *             self._lineno += 1
19559  */
19560   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___lineno, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19561
19562   /* "cvcf.pyx":888
19563  *     def _parse_header(self, stream):
19564  *         self._lineno = 0
19565  *         for line in stream:             # <<<<<<<<<<<<<<
19566  *             self._lineno += 1
19567  *             if line.startswith('##'):
19568  */
19569   if (PyList_CheckExact(__pyx_v_stream) || PyTuple_CheckExact(__pyx_v_stream)) {
19570     __pyx_t_1 = __pyx_v_stream; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
19571     __pyx_t_3 = NULL;
19572   } else {
19573     __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_stream); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19574     __Pyx_GOTREF(__pyx_t_1);
19575     __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
19576   }
19577   for (;;) {
19578     if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
19579       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
19580       __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
19581     } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
19582       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
19583       __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
19584     } else {
19585       __pyx_t_4 = __pyx_t_3(__pyx_t_1);
19586       if (unlikely(!__pyx_t_4)) {
19587         if (PyErr_Occurred()) {
19588           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
19589           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19590         }
19591         break;
19592       }
19593       __Pyx_GOTREF(__pyx_t_4);
19594     }
19595     __Pyx_XDECREF(__pyx_v_line);
19596     __pyx_v_line = __pyx_t_4;
19597     __pyx_t_4 = 0;
19598
19599     /* "cvcf.pyx":889
19600  *         self._lineno = 0
19601  *         for line in stream:
19602  *             self._lineno += 1             # <<<<<<<<<<<<<<
19603  *             if line.startswith('##'):
19604  *                 self.parse_header( line.strip() )
19605  */
19606     __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___lineno); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19607     __Pyx_GOTREF(__pyx_t_4);
19608     __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19609     __Pyx_GOTREF(__pyx_t_5);
19610     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19611     if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___lineno, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19612     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19613
19614     /* "cvcf.pyx":890
19615  *         for line in stream:
19616  *             self._lineno += 1
19617  *             if line.startswith('##'):             # <<<<<<<<<<<<<<
19618  *                 self.parse_header( line.strip() )
19619  *             elif line.startswith('#'):
19620  */
19621     __pyx_t_5 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19622     __Pyx_GOTREF(__pyx_t_5);
19623     __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_119), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19624     __Pyx_GOTREF(__pyx_t_4);
19625     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19626     __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19627     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19628     if (__pyx_t_6) {
19629
19630       /* "cvcf.pyx":891
19631  *             self._lineno += 1
19632  *             if line.startswith('##'):
19633  *                 self.parse_header( line.strip() )             # <<<<<<<<<<<<<<
19634  *             elif line.startswith('#'):
19635  *                 self.parse_heading( line.strip() )
19636  */
19637       __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_header); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19638       __Pyx_GOTREF(__pyx_t_4);
19639       __pyx_t_5 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19640       __Pyx_GOTREF(__pyx_t_5);
19641       __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19642       __Pyx_GOTREF(__pyx_t_7);
19643       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19644       __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19645       __Pyx_GOTREF(__pyx_t_5);
19646       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
19647       __Pyx_GIVEREF(__pyx_t_7);
19648       __pyx_t_7 = 0;
19649       __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19650       __Pyx_GOTREF(__pyx_t_7);
19651       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19652       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
19653       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19654       goto __pyx_L5;
19655     }
19656
19657     /* "cvcf.pyx":892
19658  *             if line.startswith('##'):
19659  *                 self.parse_header( line.strip() )
19660  *             elif line.startswith('#'):             # <<<<<<<<<<<<<<
19661  *                 self.parse_heading( line.strip() )
19662  *                 self.enter_default_format()
19663  */
19664     __pyx_t_7 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19665     __Pyx_GOTREF(__pyx_t_7);
19666     __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_120), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19667     __Pyx_GOTREF(__pyx_t_5);
19668     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19669     __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19670     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19671     if (__pyx_t_6) {
19672
19673       /* "cvcf.pyx":893
19674  *                 self.parse_header( line.strip() )
19675  *             elif line.startswith('#'):
19676  *                 self.parse_heading( line.strip() )             # <<<<<<<<<<<<<<
19677  *                 self.enter_default_format()
19678  *             else:
19679  */
19680       __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__parse_heading); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19681       __Pyx_GOTREF(__pyx_t_5);
19682       __pyx_t_7 = PyObject_GetAttr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19683       __Pyx_GOTREF(__pyx_t_7);
19684       __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 = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19685       __Pyx_GOTREF(__pyx_t_4);
19686       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19687       __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19688       __Pyx_GOTREF(__pyx_t_7);
19689       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
19690       __Pyx_GIVEREF(__pyx_t_4);
19691       __pyx_t_4 = 0;
19692       __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19693       __Pyx_GOTREF(__pyx_t_4);
19694       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19695       __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
19696       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19697
19698       /* "cvcf.pyx":894
19699  *             elif line.startswith('#'):
19700  *                 self.parse_heading( line.strip() )
19701  *                 self.enter_default_format()             # <<<<<<<<<<<<<<
19702  *             else:
19703  *                 break
19704  */
19705       __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_121); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19706       __Pyx_GOTREF(__pyx_t_4);
19707       __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19708       __Pyx_GOTREF(__pyx_t_7);
19709       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19710       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19711       goto __pyx_L5;
19712     }
19713     /*else*/ {
19714
19715       /* "cvcf.pyx":896
19716  *                 self.enter_default_format()
19717  *             else:
19718  *                 break             # <<<<<<<<<<<<<<
19719  *         return line
19720  * 
19721  */
19722       goto __pyx_L4_break;
19723     }
19724     __pyx_L5:;
19725   }
19726   __pyx_L4_break:;
19727   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19728
19729   /* "cvcf.pyx":897
19730  *             else:
19731  *                 break
19732  *         return line             # <<<<<<<<<<<<<<
19733  * 
19734  *     def _parse(self, line, stream):
19735  */
19736   __Pyx_XDECREF(__pyx_r);
19737   if (unlikely(!__pyx_v_line)) { __Pyx_RaiseUnboundLocalError("line"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
19738   __Pyx_INCREF(__pyx_v_line);
19739   __pyx_r = __pyx_v_line;
19740   goto __pyx_L0;
19741
19742   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19743   goto __pyx_L0;
19744   __pyx_L1_error:;
19745   __Pyx_XDECREF(__pyx_t_1);
19746   __Pyx_XDECREF(__pyx_t_4);
19747   __Pyx_XDECREF(__pyx_t_5);
19748   __Pyx_XDECREF(__pyx_t_7);
19749   __Pyx_AddTraceback("cvcf.VCF._parse_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
19750   __pyx_r = NULL;
19751   __pyx_L0:;
19752   __Pyx_XDECREF(__pyx_v_line);
19753   __Pyx_XGIVEREF(__pyx_r);
19754   __Pyx_RefNannyFinishContext();
19755   return __pyx_r;
19756 }
19757 static PyObject *__pyx_gb_4cvcf_3VCF_40generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
19758
19759 /* Python wrapper */
19760 static PyObject *__pyx_pw_4cvcf_3VCF_39_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19761 static PyMethodDef __pyx_mdef_4cvcf_3VCF_39_parse = {__Pyx_NAMESTR("_parse"), (PyCFunction)__pyx_pw_4cvcf_3VCF_39_parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
19762 static PyObject *__pyx_pw_4cvcf_3VCF_39_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19763   PyObject *__pyx_v_self = 0;
19764   PyObject *__pyx_v_line = 0;
19765   PyObject *__pyx_v_stream = 0;
19766   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__line,&__pyx_n_s__stream,0};
19767   PyObject *__pyx_r = 0;
19768   __Pyx_RefNannyDeclarations
19769   __Pyx_RefNannySetupContext("_parse (wrapper)", 0);
19770   __pyx_self = __pyx_self;
19771   {
19772     PyObject* values[3] = {0,0,0};
19773     if (unlikely(__pyx_kwds)) {
19774       Py_ssize_t kw_args;
19775       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19776       switch (pos_args) {
19777         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19778         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19779         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19780         case  0: break;
19781         default: goto __pyx_L5_argtuple_error;
19782       }
19783       kw_args = PyDict_Size(__pyx_kwds);
19784       switch (pos_args) {
19785         case  0:
19786         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
19787         if (likely(values[0])) kw_args--;
19788         else goto __pyx_L5_argtuple_error;
19789         case  1:
19790         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line);
19791         if (likely(values[1])) kw_args--;
19792         else {
19793           __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19794         }
19795         case  2:
19796         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream);
19797         if (likely(values[2])) kw_args--;
19798         else {
19799           __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19800         }
19801       }
19802       if (unlikely(kw_args > 0)) {
19803         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19804       }
19805     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
19806       goto __pyx_L5_argtuple_error;
19807     } else {
19808       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19809       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19810       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19811     }
19812     __pyx_v_self = values[0];
19813     __pyx_v_line = values[1];
19814     __pyx_v_stream = values[2];
19815   }
19816   goto __pyx_L4_argument_unpacking_done;
19817   __pyx_L5_argtuple_error:;
19818   __Pyx_RaiseArgtupleInvalid("_parse", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19819   __pyx_L3_error:;
19820   __Pyx_AddTraceback("cvcf.VCF._parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
19821   __Pyx_RefNannyFinishContext();
19822   return NULL;
19823   __pyx_L4_argument_unpacking_done:;
19824   __pyx_r = __pyx_pf_4cvcf_3VCF_38_parse(__pyx_self, __pyx_v_self, __pyx_v_line, __pyx_v_stream);
19825   __Pyx_RefNannyFinishContext();
19826   return __pyx_r;
19827 }
19828
19829 /* "cvcf.pyx":899
19830  *         return line
19831  * 
19832  *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
19833  *         # deal with files with header only
19834  *         if line.startswith("##"): return
19835  */
19836
19837 static PyObject *__pyx_pf_4cvcf_3VCF_38_parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_stream) {
19838   struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *__pyx_cur_scope;
19839   PyObject *__pyx_r = NULL;
19840   __Pyx_RefNannyDeclarations
19841   int __pyx_lineno = 0;
19842   const char *__pyx_filename = NULL;
19843   int __pyx_clineno = 0;
19844   __Pyx_RefNannySetupContext("_parse", 0);
19845   __pyx_cur_scope = (struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *)__pyx_ptype_4cvcf___pyx_scope_struct_2__parse->tp_new(__pyx_ptype_4cvcf___pyx_scope_struct_2__parse, __pyx_empty_tuple, NULL);
19846   if (unlikely(!__pyx_cur_scope)) {
19847     __Pyx_RefNannyFinishContext();
19848     return NULL;
19849   }
19850   __Pyx_GOTREF(__pyx_cur_scope);
19851   __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
19852   __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
19853   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
19854   __pyx_cur_scope->__pyx_v_line = __pyx_v_line;
19855   __Pyx_INCREF(__pyx_cur_scope->__pyx_v_line);
19856   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_line);
19857   __pyx_cur_scope->__pyx_v_stream = __pyx_v_stream;
19858   __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stream);
19859   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stream);
19860   {
19861     __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cvcf_3VCF_40generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19862     __Pyx_DECREF(__pyx_cur_scope);
19863     __Pyx_RefNannyFinishContext();
19864     return (PyObject *) gen;
19865   }
19866
19867   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19868   goto __pyx_L0;
19869   __pyx_L1_error:;
19870   __Pyx_AddTraceback("cvcf.VCF._parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
19871   __pyx_r = NULL;
19872   __pyx_L0:;
19873   __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
19874   __Pyx_XGIVEREF(__pyx_r);
19875   __Pyx_RefNannyFinishContext();
19876   return __pyx_r;
19877 }
19878
19879 static PyObject *__pyx_gb_4cvcf_3VCF_40generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
19880 {
19881   struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *__pyx_cur_scope = ((struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *)__pyx_generator->closure);
19882   PyObject *__pyx_r = NULL;
19883   PyObject *__pyx_t_1 = NULL;
19884   PyObject *__pyx_t_2 = NULL;
19885   int __pyx_t_3;
19886   Py_ssize_t __pyx_t_4;
19887   PyObject *__pyx_t_5 = NULL;
19888   PyObject *(*__pyx_t_6)(PyObject *);
19889   PyObject *__pyx_t_7 = NULL;
19890   int __pyx_t_8;
19891   int __pyx_t_9;
19892   __Pyx_RefNannyDeclarations
19893   __Pyx_RefNannySetupContext("None", 0);
19894   switch (__pyx_generator->resume_label) {
19895     case 0: goto __pyx_L3_first_run;
19896     case 1: goto __pyx_L7_resume_from_yield;
19897     case 2: goto __pyx_L12_resume_from_yield;
19898     default: /* CPython raises the right error here */
19899     __Pyx_RefNannyFinishContext();
19900     return NULL;
19901   }
19902   __pyx_L3_first_run:;
19903   if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19904
19905   /* "cvcf.pyx":901
19906  *     def _parse(self, line, stream):
19907  *         # deal with files with header only
19908  *         if line.startswith("##"): return             # <<<<<<<<<<<<<<
19909  *         if len(line.strip()) > 0:
19910  *             d = self.parse_data( line.strip() )
19911  */
19912   __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s__startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19913   __Pyx_GOTREF(__pyx_t_1);
19914   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_122), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19915   __Pyx_GOTREF(__pyx_t_2);
19916   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19917   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19918   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19919   if (__pyx_t_3) {
19920     __Pyx_XDECREF(__pyx_r);
19921     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19922     goto __pyx_L0;
19923     goto __pyx_L4;
19924   }
19925   __pyx_L4:;
19926
19927   /* "cvcf.pyx":902
19928  *         # deal with files with header only
19929  *         if line.startswith("##"): return
19930  *         if len(line.strip()) > 0:             # <<<<<<<<<<<<<<
19931  *             d = self.parse_data( line.strip() )
19932  *             if d: yield d
19933  */
19934   __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19935   __Pyx_GOTREF(__pyx_t_2);
19936   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19937   __Pyx_GOTREF(__pyx_t_1);
19938   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19939   __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19940   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19941   __pyx_t_3 = (__pyx_t_4 > 0);
19942   if (__pyx_t_3) {
19943
19944     /* "cvcf.pyx":903
19945  *         if line.startswith("##"): return
19946  *         if len(line.strip()) > 0:
19947  *             d = self.parse_data( line.strip() )             # <<<<<<<<<<<<<<
19948  *             if d: yield d
19949  *         for line in stream:
19950  */
19951     __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__parse_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19952     __Pyx_GOTREF(__pyx_t_1);
19953     __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19954     __Pyx_GOTREF(__pyx_t_2);
19955     __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19956     __Pyx_GOTREF(__pyx_t_5);
19957     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19958     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19959     __Pyx_GOTREF(__pyx_t_2);
19960     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
19961     __Pyx_GIVEREF(__pyx_t_5);
19962     __pyx_t_5 = 0;
19963     __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19964     __Pyx_GOTREF(__pyx_t_5);
19965     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19966     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
19967     __Pyx_GIVEREF(__pyx_t_5);
19968     __pyx_cur_scope->__pyx_v_d = __pyx_t_5;
19969     __pyx_t_5 = 0;
19970
19971     /* "cvcf.pyx":904
19972  *         if len(line.strip()) > 0:
19973  *             d = self.parse_data( line.strip() )
19974  *             if d: yield d             # <<<<<<<<<<<<<<
19975  *         for line in stream:
19976  *             self._lineno += 1
19977  */
19978     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_d); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19979     if (__pyx_t_3) {
19980       __Pyx_INCREF(__pyx_cur_scope->__pyx_v_d);
19981       __pyx_r = __pyx_cur_scope->__pyx_v_d;
19982       __Pyx_XGIVEREF(__pyx_r);
19983       __Pyx_RefNannyFinishContext();
19984       /* return from generator, yielding value */
19985       __pyx_generator->resume_label = 1;
19986       return __pyx_r;
19987       __pyx_L7_resume_from_yield:;
19988       if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19989       goto __pyx_L6;
19990     }
19991     __pyx_L6:;
19992     goto __pyx_L5;
19993   }
19994   __pyx_L5:;
19995
19996   /* "cvcf.pyx":905
19997  *             d = self.parse_data( line.strip() )
19998  *             if d: yield d
19999  *         for line in stream:             # <<<<<<<<<<<<<<
20000  *             self._lineno += 1
20001  *             if self._lines and self._lineno > self._lines: raise StopIteration
20002  */
20003   if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_stream) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_stream)) {
20004     __pyx_t_5 = __pyx_cur_scope->__pyx_v_stream; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = 0;
20005     __pyx_t_6 = NULL;
20006   } else {
20007     __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_stream); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20008     __Pyx_GOTREF(__pyx_t_5);
20009     __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
20010   }
20011   for (;;) {
20012     if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_5)) {
20013       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
20014       __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
20015     } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_5)) {
20016       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
20017       __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
20018     } else {
20019       __pyx_t_2 = __pyx_t_6(__pyx_t_5);
20020       if (unlikely(!__pyx_t_2)) {
20021         if (PyErr_Occurred()) {
20022           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
20023           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20024         }
20025         break;
20026       }
20027       __Pyx_GOTREF(__pyx_t_2);
20028     }
20029     __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_line);
20030     __Pyx_DECREF(__pyx_cur_scope->__pyx_v_line);
20031     __Pyx_GIVEREF(__pyx_t_2);
20032     __pyx_cur_scope->__pyx_v_line = __pyx_t_2;
20033     __pyx_t_2 = 0;
20034
20035     /* "cvcf.pyx":906
20036  *             if d: yield d
20037  *         for line in stream:
20038  *             self._lineno += 1             # <<<<<<<<<<<<<<
20039  *             if self._lines and self._lineno > self._lines: raise StopIteration
20040  *             d = self.parse_data( line.strip() )
20041  */
20042     __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___lineno); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20043     __Pyx_GOTREF(__pyx_t_2);
20044     __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20045     __Pyx_GOTREF(__pyx_t_1);
20046     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20047     if (PyObject_SetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___lineno, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20048     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20049
20050     /* "cvcf.pyx":907
20051  *         for line in stream:
20052  *             self._lineno += 1
20053  *             if self._lines and self._lineno > self._lines: raise StopIteration             # <<<<<<<<<<<<<<
20054  *             d = self.parse_data( line.strip() )
20055  *             if d: yield d
20056  */
20057     __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20058     __Pyx_GOTREF(__pyx_t_1);
20059     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20060     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20061     if (__pyx_t_3) {
20062       __pyx_t_1 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___lineno); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20063       __Pyx_GOTREF(__pyx_t_1);
20064       __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s___lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20065       __Pyx_GOTREF(__pyx_t_2);
20066       __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20067       __Pyx_GOTREF(__pyx_t_7);
20068       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20069       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20070       __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20071       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20072       __pyx_t_9 = __pyx_t_8;
20073     } else {
20074       __pyx_t_9 = __pyx_t_3;
20075     }
20076     if (__pyx_t_9) {
20077       __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
20078       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20079       goto __pyx_L10;
20080     }
20081     __pyx_L10:;
20082
20083     /* "cvcf.pyx":908
20084  *             self._lineno += 1
20085  *             if self._lines and self._lineno > self._lines: raise StopIteration
20086  *             d = self.parse_data( line.strip() )             # <<<<<<<<<<<<<<
20087  *             if d: yield d
20088  * 
20089  */
20090     __pyx_t_7 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s__parse_data); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20091     __Pyx_GOTREF(__pyx_t_7);
20092     __pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20093     __Pyx_GOTREF(__pyx_t_2);
20094     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20095     __Pyx_GOTREF(__pyx_t_1);
20096     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20097     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20098     __Pyx_GOTREF(__pyx_t_2);
20099     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
20100     __Pyx_GIVEREF(__pyx_t_1);
20101     __pyx_t_1 = 0;
20102     __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20103     __Pyx_GOTREF(__pyx_t_1);
20104     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20105     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
20106     __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_d);
20107     __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_d);
20108     __Pyx_GIVEREF(__pyx_t_1);
20109     __pyx_cur_scope->__pyx_v_d = __pyx_t_1;
20110     __pyx_t_1 = 0;
20111
20112     /* "cvcf.pyx":909
20113  *             if self._lines and self._lineno > self._lines: raise StopIteration
20114  *             d = self.parse_data( line.strip() )
20115  *             if d: yield d             # <<<<<<<<<<<<<<
20116  * 
20117  *     ######################################################################################################
20118  */
20119     __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_d); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20120     if (__pyx_t_9) {
20121       __Pyx_INCREF(__pyx_cur_scope->__pyx_v_d);
20122       __pyx_r = __pyx_cur_scope->__pyx_v_d;
20123       __pyx_cur_scope->__pyx_t_0 = __pyx_t_4;
20124       __Pyx_XGIVEREF(__pyx_t_5);
20125       __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
20126       __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
20127       __Pyx_XGIVEREF(__pyx_r);
20128       __Pyx_RefNannyFinishContext();
20129       /* return from generator, yielding value */
20130       __pyx_generator->resume_label = 2;
20131       return __pyx_r;
20132       __pyx_L12_resume_from_yield:;
20133       __pyx_t_4 = __pyx_cur_scope->__pyx_t_0;
20134       __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
20135       __pyx_cur_scope->__pyx_t_1 = 0;
20136       __Pyx_XGOTREF(__pyx_t_5);
20137       __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
20138       if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20139       goto __pyx_L11;
20140     }
20141     __pyx_L11:;
20142   }
20143   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20144   PyErr_SetNone(PyExc_StopIteration);
20145   goto __pyx_L0;
20146   __pyx_L1_error:;
20147   __Pyx_XDECREF(__pyx_t_1);
20148   __Pyx_XDECREF(__pyx_t_2);
20149   __Pyx_XDECREF(__pyx_t_5);
20150   __Pyx_XDECREF(__pyx_t_7);
20151   __Pyx_AddTraceback("_parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
20152   __pyx_L0:;
20153   __Pyx_XDECREF(__pyx_r);
20154   __pyx_generator->resume_label = -1;
20155   __Pyx_RefNannyFinishContext();
20156   return NULL;
20157 }
20158
20159 /* Python wrapper */
20160 static PyObject *__pyx_pw_4cvcf_3VCF_42getsamples(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
20161 static char __pyx_doc_4cvcf_3VCF_41getsamples[] = " List of samples in VCF file ";
20162 static PyMethodDef __pyx_mdef_4cvcf_3VCF_42getsamples = {__Pyx_NAMESTR("getsamples"), (PyCFunction)__pyx_pw_4cvcf_3VCF_42getsamples, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_41getsamples)};
20163 static PyObject *__pyx_pw_4cvcf_3VCF_42getsamples(PyObject *__pyx_self, PyObject *__pyx_v_self) {
20164   PyObject *__pyx_r = 0;
20165   __Pyx_RefNannyDeclarations
20166   __Pyx_RefNannySetupContext("getsamples (wrapper)", 0);
20167   __pyx_self = __pyx_self;
20168   __pyx_r = __pyx_pf_4cvcf_3VCF_41getsamples(__pyx_self, ((PyObject *)__pyx_v_self));
20169   __Pyx_RefNannyFinishContext();
20170   return __pyx_r;
20171 }
20172
20173 /* "cvcf.pyx":917
20174  *     ######################################################################################################
20175  * 
20176  *     def getsamples(self):             # <<<<<<<<<<<<<<
20177  *         """ List of samples in VCF file """
20178  *         return self._samples
20179  */
20180
20181 static PyObject *__pyx_pf_4cvcf_3VCF_41getsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
20182   PyObject *__pyx_r = NULL;
20183   __Pyx_RefNannyDeclarations
20184   PyObject *__pyx_t_1 = NULL;
20185   int __pyx_lineno = 0;
20186   const char *__pyx_filename = NULL;
20187   int __pyx_clineno = 0;
20188   __Pyx_RefNannySetupContext("getsamples", 0);
20189
20190   /* "cvcf.pyx":919
20191  *     def getsamples(self):
20192  *         """ List of samples in VCF file """
20193  *         return self._samples             # <<<<<<<<<<<<<<
20194  * 
20195  *     def setsamples(self,samples):
20196  */
20197   __Pyx_XDECREF(__pyx_r);
20198   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20199   __Pyx_GOTREF(__pyx_t_1);
20200   __pyx_r = __pyx_t_1;
20201   __pyx_t_1 = 0;
20202   goto __pyx_L0;
20203
20204   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20205   goto __pyx_L0;
20206   __pyx_L1_error:;
20207   __Pyx_XDECREF(__pyx_t_1);
20208   __Pyx_AddTraceback("cvcf.VCF.getsamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
20209   __pyx_r = NULL;
20210   __pyx_L0:;
20211   __Pyx_XGIVEREF(__pyx_r);
20212   __Pyx_RefNannyFinishContext();
20213   return __pyx_r;
20214 }
20215
20216 /* Python wrapper */
20217 static PyObject *__pyx_pw_4cvcf_3VCF_44setsamples(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20218 static char __pyx_doc_4cvcf_3VCF_43setsamples[] = " List of samples in VCF file ";
20219 static PyMethodDef __pyx_mdef_4cvcf_3VCF_44setsamples = {__Pyx_NAMESTR("setsamples"), (PyCFunction)__pyx_pw_4cvcf_3VCF_44setsamples, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_43setsamples)};
20220 static PyObject *__pyx_pw_4cvcf_3VCF_44setsamples(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20221   PyObject *__pyx_v_self = 0;
20222   PyObject *__pyx_v_samples = 0;
20223   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__samples,0};
20224   PyObject *__pyx_r = 0;
20225   __Pyx_RefNannyDeclarations
20226   __Pyx_RefNannySetupContext("setsamples (wrapper)", 0);
20227   __pyx_self = __pyx_self;
20228   {
20229     PyObject* values[2] = {0,0};
20230     if (unlikely(__pyx_kwds)) {
20231       Py_ssize_t kw_args;
20232       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20233       switch (pos_args) {
20234         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20235         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20236         case  0: break;
20237         default: goto __pyx_L5_argtuple_error;
20238       }
20239       kw_args = PyDict_Size(__pyx_kwds);
20240       switch (pos_args) {
20241         case  0:
20242         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
20243         if (likely(values[0])) kw_args--;
20244         else goto __pyx_L5_argtuple_error;
20245         case  1:
20246         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples);
20247         if (likely(values[1])) kw_args--;
20248         else {
20249           __Pyx_RaiseArgtupleInvalid("setsamples", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20250         }
20251       }
20252       if (unlikely(kw_args > 0)) {
20253         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setsamples") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20254       }
20255     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20256       goto __pyx_L5_argtuple_error;
20257     } else {
20258       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20259       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20260     }
20261     __pyx_v_self = values[0];
20262     __pyx_v_samples = values[1];
20263   }
20264   goto __pyx_L4_argument_unpacking_done;
20265   __pyx_L5_argtuple_error:;
20266   __Pyx_RaiseArgtupleInvalid("setsamples", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20267   __pyx_L3_error:;
20268   __Pyx_AddTraceback("cvcf.VCF.setsamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
20269   __Pyx_RefNannyFinishContext();
20270   return NULL;
20271   __pyx_L4_argument_unpacking_done:;
20272   __pyx_r = __pyx_pf_4cvcf_3VCF_43setsamples(__pyx_self, __pyx_v_self, __pyx_v_samples);
20273   __Pyx_RefNannyFinishContext();
20274   return __pyx_r;
20275 }
20276
20277 /* "cvcf.pyx":921
20278  *         return self._samples
20279  * 
20280  *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
20281  *         """ List of samples in VCF file """
20282  *         self._samples = samples
20283  */
20284
20285 static PyObject *__pyx_pf_4cvcf_3VCF_43setsamples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_samples) {
20286   PyObject *__pyx_r = NULL;
20287   __Pyx_RefNannyDeclarations
20288   int __pyx_lineno = 0;
20289   const char *__pyx_filename = NULL;
20290   int __pyx_clineno = 0;
20291   __Pyx_RefNannySetupContext("setsamples", 0);
20292
20293   /* "cvcf.pyx":923
20294  *     def setsamples(self,samples):
20295  *         """ List of samples in VCF file """
20296  *         self._samples = samples             # <<<<<<<<<<<<<<
20297  * 
20298  *     def getheader(self):
20299  */
20300   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___samples, __pyx_v_samples) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20301
20302   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20303   goto __pyx_L0;
20304   __pyx_L1_error:;
20305   __Pyx_AddTraceback("cvcf.VCF.setsamples", __pyx_clineno, __pyx_lineno, __pyx_filename);
20306   __pyx_r = NULL;
20307   __pyx_L0:;
20308   __Pyx_XGIVEREF(__pyx_r);
20309   __Pyx_RefNannyFinishContext();
20310   return __pyx_r;
20311 }
20312
20313 /* Python wrapper */
20314 static PyObject *__pyx_pw_4cvcf_3VCF_46getheader(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
20315 static char __pyx_doc_4cvcf_3VCF_45getheader[] = " List of header key-value pairs (strings) ";
20316 static PyMethodDef __pyx_mdef_4cvcf_3VCF_46getheader = {__Pyx_NAMESTR("getheader"), (PyCFunction)__pyx_pw_4cvcf_3VCF_46getheader, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_45getheader)};
20317 static PyObject *__pyx_pw_4cvcf_3VCF_46getheader(PyObject *__pyx_self, PyObject *__pyx_v_self) {
20318   PyObject *__pyx_r = 0;
20319   __Pyx_RefNannyDeclarations
20320   __Pyx_RefNannySetupContext("getheader (wrapper)", 0);
20321   __pyx_self = __pyx_self;
20322   __pyx_r = __pyx_pf_4cvcf_3VCF_45getheader(__pyx_self, ((PyObject *)__pyx_v_self));
20323   __Pyx_RefNannyFinishContext();
20324   return __pyx_r;
20325 }
20326
20327 /* "cvcf.pyx":925
20328  *         self._samples = samples
20329  * 
20330  *     def getheader(self):             # <<<<<<<<<<<<<<
20331  *         """ List of header key-value pairs (strings) """
20332  *         return self._header
20333  */
20334
20335 static PyObject *__pyx_pf_4cvcf_3VCF_45getheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
20336   PyObject *__pyx_r = NULL;
20337   __Pyx_RefNannyDeclarations
20338   PyObject *__pyx_t_1 = NULL;
20339   int __pyx_lineno = 0;
20340   const char *__pyx_filename = NULL;
20341   int __pyx_clineno = 0;
20342   __Pyx_RefNannySetupContext("getheader", 0);
20343
20344   /* "cvcf.pyx":927
20345  *     def getheader(self):
20346  *         """ List of header key-value pairs (strings) """
20347  *         return self._header             # <<<<<<<<<<<<<<
20348  * 
20349  *     def setheader(self,header):
20350  */
20351   __Pyx_XDECREF(__pyx_r);
20352   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20353   __Pyx_GOTREF(__pyx_t_1);
20354   __pyx_r = __pyx_t_1;
20355   __pyx_t_1 = 0;
20356   goto __pyx_L0;
20357
20358   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20359   goto __pyx_L0;
20360   __pyx_L1_error:;
20361   __Pyx_XDECREF(__pyx_t_1);
20362   __Pyx_AddTraceback("cvcf.VCF.getheader", __pyx_clineno, __pyx_lineno, __pyx_filename);
20363   __pyx_r = NULL;
20364   __pyx_L0:;
20365   __Pyx_XGIVEREF(__pyx_r);
20366   __Pyx_RefNannyFinishContext();
20367   return __pyx_r;
20368 }
20369
20370 /* Python wrapper */
20371 static PyObject *__pyx_pw_4cvcf_3VCF_48setheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20372 static char __pyx_doc_4cvcf_3VCF_47setheader[] = " List of header key-value pairs (strings) ";
20373 static PyMethodDef __pyx_mdef_4cvcf_3VCF_48setheader = {__Pyx_NAMESTR("setheader"), (PyCFunction)__pyx_pw_4cvcf_3VCF_48setheader, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_47setheader)};
20374 static PyObject *__pyx_pw_4cvcf_3VCF_48setheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20375   PyObject *__pyx_v_self = 0;
20376   PyObject *__pyx_v_header = 0;
20377   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__header,0};
20378   PyObject *__pyx_r = 0;
20379   __Pyx_RefNannyDeclarations
20380   __Pyx_RefNannySetupContext("setheader (wrapper)", 0);
20381   __pyx_self = __pyx_self;
20382   {
20383     PyObject* values[2] = {0,0};
20384     if (unlikely(__pyx_kwds)) {
20385       Py_ssize_t kw_args;
20386       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20387       switch (pos_args) {
20388         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20389         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20390         case  0: break;
20391         default: goto __pyx_L5_argtuple_error;
20392       }
20393       kw_args = PyDict_Size(__pyx_kwds);
20394       switch (pos_args) {
20395         case  0:
20396         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
20397         if (likely(values[0])) kw_args--;
20398         else goto __pyx_L5_argtuple_error;
20399         case  1:
20400         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__header);
20401         if (likely(values[1])) kw_args--;
20402         else {
20403           __Pyx_RaiseArgtupleInvalid("setheader", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20404         }
20405       }
20406       if (unlikely(kw_args > 0)) {
20407         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setheader") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20408       }
20409     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20410       goto __pyx_L5_argtuple_error;
20411     } else {
20412       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20413       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20414     }
20415     __pyx_v_self = values[0];
20416     __pyx_v_header = values[1];
20417   }
20418   goto __pyx_L4_argument_unpacking_done;
20419   __pyx_L5_argtuple_error:;
20420   __Pyx_RaiseArgtupleInvalid("setheader", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20421   __pyx_L3_error:;
20422   __Pyx_AddTraceback("cvcf.VCF.setheader", __pyx_clineno, __pyx_lineno, __pyx_filename);
20423   __Pyx_RefNannyFinishContext();
20424   return NULL;
20425   __pyx_L4_argument_unpacking_done:;
20426   __pyx_r = __pyx_pf_4cvcf_3VCF_47setheader(__pyx_self, __pyx_v_self, __pyx_v_header);
20427   __Pyx_RefNannyFinishContext();
20428   return __pyx_r;
20429 }
20430
20431 /* "cvcf.pyx":929
20432  *         return self._header
20433  * 
20434  *     def setheader(self,header):             # <<<<<<<<<<<<<<
20435  *         """ List of header key-value pairs (strings) """
20436  *         self._header = header
20437  */
20438
20439 static PyObject *__pyx_pf_4cvcf_3VCF_47setheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_header) {
20440   PyObject *__pyx_r = NULL;
20441   __Pyx_RefNannyDeclarations
20442   int __pyx_lineno = 0;
20443   const char *__pyx_filename = NULL;
20444   int __pyx_clineno = 0;
20445   __Pyx_RefNannySetupContext("setheader", 0);
20446
20447   /* "cvcf.pyx":931
20448  *     def setheader(self,header):
20449  *         """ List of header key-value pairs (strings) """
20450  *         self._header = header             # <<<<<<<<<<<<<<
20451  * 
20452  *     def getinfo(self):
20453  */
20454   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___header, __pyx_v_header) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20455
20456   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20457   goto __pyx_L0;
20458   __pyx_L1_error:;
20459   __Pyx_AddTraceback("cvcf.VCF.setheader", __pyx_clineno, __pyx_lineno, __pyx_filename);
20460   __pyx_r = NULL;
20461   __pyx_L0:;
20462   __Pyx_XGIVEREF(__pyx_r);
20463   __Pyx_RefNannyFinishContext();
20464   return __pyx_r;
20465 }
20466
20467 /* Python wrapper */
20468 static PyObject *__pyx_pw_4cvcf_3VCF_50getinfo(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
20469 static char __pyx_doc_4cvcf_3VCF_49getinfo[] = " Dictionary of ##INFO tags, as VCF.FORMAT values ";
20470 static PyMethodDef __pyx_mdef_4cvcf_3VCF_50getinfo = {__Pyx_NAMESTR("getinfo"), (PyCFunction)__pyx_pw_4cvcf_3VCF_50getinfo, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_49getinfo)};
20471 static PyObject *__pyx_pw_4cvcf_3VCF_50getinfo(PyObject *__pyx_self, PyObject *__pyx_v_self) {
20472   PyObject *__pyx_r = 0;
20473   __Pyx_RefNannyDeclarations
20474   __Pyx_RefNannySetupContext("getinfo (wrapper)", 0);
20475   __pyx_self = __pyx_self;
20476   __pyx_r = __pyx_pf_4cvcf_3VCF_49getinfo(__pyx_self, ((PyObject *)__pyx_v_self));
20477   __Pyx_RefNannyFinishContext();
20478   return __pyx_r;
20479 }
20480
20481 /* "cvcf.pyx":933
20482  *         self._header = header
20483  * 
20484  *     def getinfo(self):             # <<<<<<<<<<<<<<
20485  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
20486  *         return self._info
20487  */
20488
20489 static PyObject *__pyx_pf_4cvcf_3VCF_49getinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
20490   PyObject *__pyx_r = NULL;
20491   __Pyx_RefNannyDeclarations
20492   PyObject *__pyx_t_1 = NULL;
20493   int __pyx_lineno = 0;
20494   const char *__pyx_filename = NULL;
20495   int __pyx_clineno = 0;
20496   __Pyx_RefNannySetupContext("getinfo", 0);
20497
20498   /* "cvcf.pyx":935
20499  *     def getinfo(self):
20500  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
20501  *         return self._info             # <<<<<<<<<<<<<<
20502  * 
20503  *     def setinfo(self,info):
20504  */
20505   __Pyx_XDECREF(__pyx_r);
20506   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20507   __Pyx_GOTREF(__pyx_t_1);
20508   __pyx_r = __pyx_t_1;
20509   __pyx_t_1 = 0;
20510   goto __pyx_L0;
20511
20512   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20513   goto __pyx_L0;
20514   __pyx_L1_error:;
20515   __Pyx_XDECREF(__pyx_t_1);
20516   __Pyx_AddTraceback("cvcf.VCF.getinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
20517   __pyx_r = NULL;
20518   __pyx_L0:;
20519   __Pyx_XGIVEREF(__pyx_r);
20520   __Pyx_RefNannyFinishContext();
20521   return __pyx_r;
20522 }
20523
20524 /* Python wrapper */
20525 static PyObject *__pyx_pw_4cvcf_3VCF_52setinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20526 static char __pyx_doc_4cvcf_3VCF_51setinfo[] = " Dictionary of ##INFO tags, as VCF.FORMAT values ";
20527 static PyMethodDef __pyx_mdef_4cvcf_3VCF_52setinfo = {__Pyx_NAMESTR("setinfo"), (PyCFunction)__pyx_pw_4cvcf_3VCF_52setinfo, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_51setinfo)};
20528 static PyObject *__pyx_pw_4cvcf_3VCF_52setinfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20529   PyObject *__pyx_v_self = 0;
20530   PyObject *__pyx_v_info = 0;
20531   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__info,0};
20532   PyObject *__pyx_r = 0;
20533   __Pyx_RefNannyDeclarations
20534   __Pyx_RefNannySetupContext("setinfo (wrapper)", 0);
20535   __pyx_self = __pyx_self;
20536   {
20537     PyObject* values[2] = {0,0};
20538     if (unlikely(__pyx_kwds)) {
20539       Py_ssize_t kw_args;
20540       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20541       switch (pos_args) {
20542         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20543         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20544         case  0: break;
20545         default: goto __pyx_L5_argtuple_error;
20546       }
20547       kw_args = PyDict_Size(__pyx_kwds);
20548       switch (pos_args) {
20549         case  0:
20550         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
20551         if (likely(values[0])) kw_args--;
20552         else goto __pyx_L5_argtuple_error;
20553         case  1:
20554         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__info);
20555         if (likely(values[1])) kw_args--;
20556         else {
20557           __Pyx_RaiseArgtupleInvalid("setinfo", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20558         }
20559       }
20560       if (unlikely(kw_args > 0)) {
20561         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setinfo") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20562       }
20563     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20564       goto __pyx_L5_argtuple_error;
20565     } else {
20566       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20567       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20568     }
20569     __pyx_v_self = values[0];
20570     __pyx_v_info = values[1];
20571   }
20572   goto __pyx_L4_argument_unpacking_done;
20573   __pyx_L5_argtuple_error:;
20574   __Pyx_RaiseArgtupleInvalid("setinfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20575   __pyx_L3_error:;
20576   __Pyx_AddTraceback("cvcf.VCF.setinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
20577   __Pyx_RefNannyFinishContext();
20578   return NULL;
20579   __pyx_L4_argument_unpacking_done:;
20580   __pyx_r = __pyx_pf_4cvcf_3VCF_51setinfo(__pyx_self, __pyx_v_self, __pyx_v_info);
20581   __Pyx_RefNannyFinishContext();
20582   return __pyx_r;
20583 }
20584
20585 /* "cvcf.pyx":937
20586  *         return self._info
20587  * 
20588  *     def setinfo(self,info):             # <<<<<<<<<<<<<<
20589  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
20590  *         self._info = info
20591  */
20592
20593 static PyObject *__pyx_pf_4cvcf_3VCF_51setinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_info) {
20594   PyObject *__pyx_r = NULL;
20595   __Pyx_RefNannyDeclarations
20596   int __pyx_lineno = 0;
20597   const char *__pyx_filename = NULL;
20598   int __pyx_clineno = 0;
20599   __Pyx_RefNannySetupContext("setinfo", 0);
20600
20601   /* "cvcf.pyx":939
20602  *     def setinfo(self,info):
20603  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
20604  *         self._info = info             # <<<<<<<<<<<<<<
20605  * 
20606  *     def getformat(self):
20607  */
20608   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___info, __pyx_v_info) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20609
20610   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20611   goto __pyx_L0;
20612   __pyx_L1_error:;
20613   __Pyx_AddTraceback("cvcf.VCF.setinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
20614   __pyx_r = NULL;
20615   __pyx_L0:;
20616   __Pyx_XGIVEREF(__pyx_r);
20617   __Pyx_RefNannyFinishContext();
20618   return __pyx_r;
20619 }
20620
20621 /* Python wrapper */
20622 static PyObject *__pyx_pw_4cvcf_3VCF_54getformat(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
20623 static char __pyx_doc_4cvcf_3VCF_53getformat[] = " Dictionary of ##FORMAT tags, as VCF.FORMAT values ";
20624 static PyMethodDef __pyx_mdef_4cvcf_3VCF_54getformat = {__Pyx_NAMESTR("getformat"), (PyCFunction)__pyx_pw_4cvcf_3VCF_54getformat, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_53getformat)};
20625 static PyObject *__pyx_pw_4cvcf_3VCF_54getformat(PyObject *__pyx_self, PyObject *__pyx_v_self) {
20626   PyObject *__pyx_r = 0;
20627   __Pyx_RefNannyDeclarations
20628   __Pyx_RefNannySetupContext("getformat (wrapper)", 0);
20629   __pyx_self = __pyx_self;
20630   __pyx_r = __pyx_pf_4cvcf_3VCF_53getformat(__pyx_self, ((PyObject *)__pyx_v_self));
20631   __Pyx_RefNannyFinishContext();
20632   return __pyx_r;
20633 }
20634
20635 /* "cvcf.pyx":941
20636  *         self._info = info
20637  * 
20638  *     def getformat(self):             # <<<<<<<<<<<<<<
20639  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
20640  *         return self._format
20641  */
20642
20643 static PyObject *__pyx_pf_4cvcf_3VCF_53getformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
20644   PyObject *__pyx_r = NULL;
20645   __Pyx_RefNannyDeclarations
20646   PyObject *__pyx_t_1 = NULL;
20647   int __pyx_lineno = 0;
20648   const char *__pyx_filename = NULL;
20649   int __pyx_clineno = 0;
20650   __Pyx_RefNannySetupContext("getformat", 0);
20651
20652   /* "cvcf.pyx":943
20653  *     def getformat(self):
20654  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
20655  *         return self._format             # <<<<<<<<<<<<<<
20656  * 
20657  *     def setformat(self,format):
20658  */
20659   __Pyx_XDECREF(__pyx_r);
20660   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20661   __Pyx_GOTREF(__pyx_t_1);
20662   __pyx_r = __pyx_t_1;
20663   __pyx_t_1 = 0;
20664   goto __pyx_L0;
20665
20666   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20667   goto __pyx_L0;
20668   __pyx_L1_error:;
20669   __Pyx_XDECREF(__pyx_t_1);
20670   __Pyx_AddTraceback("cvcf.VCF.getformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
20671   __pyx_r = NULL;
20672   __pyx_L0:;
20673   __Pyx_XGIVEREF(__pyx_r);
20674   __Pyx_RefNannyFinishContext();
20675   return __pyx_r;
20676 }
20677
20678 /* Python wrapper */
20679 static PyObject *__pyx_pw_4cvcf_3VCF_56setformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20680 static char __pyx_doc_4cvcf_3VCF_55setformat[] = " Dictionary of ##FORMAT tags, as VCF.FORMAT values ";
20681 static PyMethodDef __pyx_mdef_4cvcf_3VCF_56setformat = {__Pyx_NAMESTR("setformat"), (PyCFunction)__pyx_pw_4cvcf_3VCF_56setformat, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_55setformat)};
20682 static PyObject *__pyx_pw_4cvcf_3VCF_56setformat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20683   PyObject *__pyx_v_self = 0;
20684   PyObject *__pyx_v_format = 0;
20685   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__format,0};
20686   PyObject *__pyx_r = 0;
20687   __Pyx_RefNannyDeclarations
20688   __Pyx_RefNannySetupContext("setformat (wrapper)", 0);
20689   __pyx_self = __pyx_self;
20690   {
20691     PyObject* values[2] = {0,0};
20692     if (unlikely(__pyx_kwds)) {
20693       Py_ssize_t kw_args;
20694       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20695       switch (pos_args) {
20696         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20697         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20698         case  0: break;
20699         default: goto __pyx_L5_argtuple_error;
20700       }
20701       kw_args = PyDict_Size(__pyx_kwds);
20702       switch (pos_args) {
20703         case  0:
20704         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
20705         if (likely(values[0])) kw_args--;
20706         else goto __pyx_L5_argtuple_error;
20707         case  1:
20708         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format);
20709         if (likely(values[1])) kw_args--;
20710         else {
20711           __Pyx_RaiseArgtupleInvalid("setformat", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20712         }
20713       }
20714       if (unlikely(kw_args > 0)) {
20715         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setformat") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20716       }
20717     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20718       goto __pyx_L5_argtuple_error;
20719     } else {
20720       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20721       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20722     }
20723     __pyx_v_self = values[0];
20724     __pyx_v_format = values[1];
20725   }
20726   goto __pyx_L4_argument_unpacking_done;
20727   __pyx_L5_argtuple_error:;
20728   __Pyx_RaiseArgtupleInvalid("setformat", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20729   __pyx_L3_error:;
20730   __Pyx_AddTraceback("cvcf.VCF.setformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
20731   __Pyx_RefNannyFinishContext();
20732   return NULL;
20733   __pyx_L4_argument_unpacking_done:;
20734   __pyx_r = __pyx_pf_4cvcf_3VCF_55setformat(__pyx_self, __pyx_v_self, __pyx_v_format);
20735   __Pyx_RefNannyFinishContext();
20736   return __pyx_r;
20737 }
20738
20739 /* "cvcf.pyx":945
20740  *         return self._format
20741  * 
20742  *     def setformat(self,format):             # <<<<<<<<<<<<<<
20743  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
20744  *         self._format = format
20745  */
20746
20747 static PyObject *__pyx_pf_4cvcf_3VCF_55setformat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_format) {
20748   PyObject *__pyx_r = NULL;
20749   __Pyx_RefNannyDeclarations
20750   int __pyx_lineno = 0;
20751   const char *__pyx_filename = NULL;
20752   int __pyx_clineno = 0;
20753   __Pyx_RefNannySetupContext("setformat", 0);
20754
20755   /* "cvcf.pyx":947
20756  *     def setformat(self,format):
20757  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
20758  *         self._format = format             # <<<<<<<<<<<<<<
20759  * 
20760  *     def getfilter(self):
20761  */
20762   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___format, __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20763
20764   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20765   goto __pyx_L0;
20766   __pyx_L1_error:;
20767   __Pyx_AddTraceback("cvcf.VCF.setformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
20768   __pyx_r = NULL;
20769   __pyx_L0:;
20770   __Pyx_XGIVEREF(__pyx_r);
20771   __Pyx_RefNannyFinishContext();
20772   return __pyx_r;
20773 }
20774
20775 /* Python wrapper */
20776 static PyObject *__pyx_pw_4cvcf_3VCF_58getfilter(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
20777 static char __pyx_doc_4cvcf_3VCF_57getfilter[] = " Dictionary of ##FILTER tags, as VCF.FORMAT values ";
20778 static PyMethodDef __pyx_mdef_4cvcf_3VCF_58getfilter = {__Pyx_NAMESTR("getfilter"), (PyCFunction)__pyx_pw_4cvcf_3VCF_58getfilter, METH_O, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_57getfilter)};
20779 static PyObject *__pyx_pw_4cvcf_3VCF_58getfilter(PyObject *__pyx_self, PyObject *__pyx_v_self) {
20780   PyObject *__pyx_r = 0;
20781   __Pyx_RefNannyDeclarations
20782   __Pyx_RefNannySetupContext("getfilter (wrapper)", 0);
20783   __pyx_self = __pyx_self;
20784   __pyx_r = __pyx_pf_4cvcf_3VCF_57getfilter(__pyx_self, ((PyObject *)__pyx_v_self));
20785   __Pyx_RefNannyFinishContext();
20786   return __pyx_r;
20787 }
20788
20789 /* "cvcf.pyx":949
20790  *         self._format = format
20791  * 
20792  *     def getfilter(self):             # <<<<<<<<<<<<<<
20793  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
20794  *         return self._filter
20795  */
20796
20797 static PyObject *__pyx_pf_4cvcf_3VCF_57getfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
20798   PyObject *__pyx_r = NULL;
20799   __Pyx_RefNannyDeclarations
20800   PyObject *__pyx_t_1 = NULL;
20801   int __pyx_lineno = 0;
20802   const char *__pyx_filename = NULL;
20803   int __pyx_clineno = 0;
20804   __Pyx_RefNannySetupContext("getfilter", 0);
20805
20806   /* "cvcf.pyx":951
20807  *     def getfilter(self):
20808  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
20809  *         return self._filter             # <<<<<<<<<<<<<<
20810  * 
20811  *     def setfilter(self,filter):
20812  */
20813   __Pyx_XDECREF(__pyx_r);
20814   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___filter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20815   __Pyx_GOTREF(__pyx_t_1);
20816   __pyx_r = __pyx_t_1;
20817   __pyx_t_1 = 0;
20818   goto __pyx_L0;
20819
20820   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20821   goto __pyx_L0;
20822   __pyx_L1_error:;
20823   __Pyx_XDECREF(__pyx_t_1);
20824   __Pyx_AddTraceback("cvcf.VCF.getfilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
20825   __pyx_r = NULL;
20826   __pyx_L0:;
20827   __Pyx_XGIVEREF(__pyx_r);
20828   __Pyx_RefNannyFinishContext();
20829   return __pyx_r;
20830 }
20831
20832 /* Python wrapper */
20833 static PyObject *__pyx_pw_4cvcf_3VCF_60setfilter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20834 static char __pyx_doc_4cvcf_3VCF_59setfilter[] = " Dictionary of ##FILTER tags, as VCF.FORMAT values ";
20835 static PyMethodDef __pyx_mdef_4cvcf_3VCF_60setfilter = {__Pyx_NAMESTR("setfilter"), (PyCFunction)__pyx_pw_4cvcf_3VCF_60setfilter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_59setfilter)};
20836 static PyObject *__pyx_pw_4cvcf_3VCF_60setfilter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20837   PyObject *__pyx_v_self = 0;
20838   PyObject *__pyx_v_filter = 0;
20839   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__filter,0};
20840   PyObject *__pyx_r = 0;
20841   __Pyx_RefNannyDeclarations
20842   __Pyx_RefNannySetupContext("setfilter (wrapper)", 0);
20843   __pyx_self = __pyx_self;
20844   {
20845     PyObject* values[2] = {0,0};
20846     if (unlikely(__pyx_kwds)) {
20847       Py_ssize_t kw_args;
20848       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20849       switch (pos_args) {
20850         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20851         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20852         case  0: break;
20853         default: goto __pyx_L5_argtuple_error;
20854       }
20855       kw_args = PyDict_Size(__pyx_kwds);
20856       switch (pos_args) {
20857         case  0:
20858         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
20859         if (likely(values[0])) kw_args--;
20860         else goto __pyx_L5_argtuple_error;
20861         case  1:
20862         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filter);
20863         if (likely(values[1])) kw_args--;
20864         else {
20865           __Pyx_RaiseArgtupleInvalid("setfilter", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20866         }
20867       }
20868       if (unlikely(kw_args > 0)) {
20869         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setfilter") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20870       }
20871     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20872       goto __pyx_L5_argtuple_error;
20873     } else {
20874       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20875       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20876     }
20877     __pyx_v_self = values[0];
20878     __pyx_v_filter = values[1];
20879   }
20880   goto __pyx_L4_argument_unpacking_done;
20881   __pyx_L5_argtuple_error:;
20882   __Pyx_RaiseArgtupleInvalid("setfilter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20883   __pyx_L3_error:;
20884   __Pyx_AddTraceback("cvcf.VCF.setfilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
20885   __Pyx_RefNannyFinishContext();
20886   return NULL;
20887   __pyx_L4_argument_unpacking_done:;
20888   __pyx_r = __pyx_pf_4cvcf_3VCF_59setfilter(__pyx_self, __pyx_v_self, __pyx_v_filter);
20889   __Pyx_RefNannyFinishContext();
20890   return __pyx_r;
20891 }
20892
20893 /* "cvcf.pyx":953
20894  *         return self._filter
20895  * 
20896  *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
20897  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
20898  *         self._filter = filter
20899  */
20900
20901 static PyObject *__pyx_pf_4cvcf_3VCF_59setfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filter) {
20902   PyObject *__pyx_r = NULL;
20903   __Pyx_RefNannyDeclarations
20904   int __pyx_lineno = 0;
20905   const char *__pyx_filename = NULL;
20906   int __pyx_clineno = 0;
20907   __Pyx_RefNannySetupContext("setfilter", 0);
20908
20909   /* "cvcf.pyx":955
20910  *     def setfilter(self,filter):
20911  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
20912  *         self._filter = filter             # <<<<<<<<<<<<<<
20913  * 
20914  *     def setversion(self, version):
20915  */
20916   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___filter, __pyx_v_filter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20917
20918   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20919   goto __pyx_L0;
20920   __pyx_L1_error:;
20921   __Pyx_AddTraceback("cvcf.VCF.setfilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
20922   __pyx_r = NULL;
20923   __pyx_L0:;
20924   __Pyx_XGIVEREF(__pyx_r);
20925   __Pyx_RefNannyFinishContext();
20926   return __pyx_r;
20927 }
20928
20929 /* Python wrapper */
20930 static PyObject *__pyx_pw_4cvcf_3VCF_62setversion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20931 static PyMethodDef __pyx_mdef_4cvcf_3VCF_62setversion = {__Pyx_NAMESTR("setversion"), (PyCFunction)__pyx_pw_4cvcf_3VCF_62setversion, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
20932 static PyObject *__pyx_pw_4cvcf_3VCF_62setversion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20933   PyObject *__pyx_v_self = 0;
20934   PyObject *__pyx_v_version = 0;
20935   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__version,0};
20936   PyObject *__pyx_r = 0;
20937   __Pyx_RefNannyDeclarations
20938   __Pyx_RefNannySetupContext("setversion (wrapper)", 0);
20939   __pyx_self = __pyx_self;
20940   {
20941     PyObject* values[2] = {0,0};
20942     if (unlikely(__pyx_kwds)) {
20943       Py_ssize_t kw_args;
20944       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20945       switch (pos_args) {
20946         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20947         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20948         case  0: break;
20949         default: goto __pyx_L5_argtuple_error;
20950       }
20951       kw_args = PyDict_Size(__pyx_kwds);
20952       switch (pos_args) {
20953         case  0:
20954         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
20955         if (likely(values[0])) kw_args--;
20956         else goto __pyx_L5_argtuple_error;
20957         case  1:
20958         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__version);
20959         if (likely(values[1])) kw_args--;
20960         else {
20961           __Pyx_RaiseArgtupleInvalid("setversion", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20962         }
20963       }
20964       if (unlikely(kw_args > 0)) {
20965         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setversion") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20966       }
20967     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20968       goto __pyx_L5_argtuple_error;
20969     } else {
20970       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20971       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20972     }
20973     __pyx_v_self = values[0];
20974     __pyx_v_version = values[1];
20975   }
20976   goto __pyx_L4_argument_unpacking_done;
20977   __pyx_L5_argtuple_error:;
20978   __Pyx_RaiseArgtupleInvalid("setversion", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20979   __pyx_L3_error:;
20980   __Pyx_AddTraceback("cvcf.VCF.setversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
20981   __Pyx_RefNannyFinishContext();
20982   return NULL;
20983   __pyx_L4_argument_unpacking_done:;
20984   __pyx_r = __pyx_pf_4cvcf_3VCF_61setversion(__pyx_self, __pyx_v_self, __pyx_v_version);
20985   __Pyx_RefNannyFinishContext();
20986   return __pyx_r;
20987 }
20988
20989 /* "cvcf.pyx":957
20990  *         self._filter = filter
20991  * 
20992  *     def setversion(self, version):             # <<<<<<<<<<<<<<
20993  *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")
20994  *         self._version = version
20995  */
20996
20997 static PyObject *__pyx_pf_4cvcf_3VCF_61setversion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_version) {
20998   PyObject *__pyx_r = NULL;
20999   __Pyx_RefNannyDeclarations
21000   PyObject *__pyx_t_1 = NULL;
21001   int __pyx_t_2;
21002   int __pyx_t_3;
21003   int __pyx_t_4;
21004   int __pyx_lineno = 0;
21005   const char *__pyx_filename = NULL;
21006   int __pyx_clineno = 0;
21007   __Pyx_RefNannySetupContext("setversion", 0);
21008
21009   /* "cvcf.pyx":958
21010  * 
21011  *     def setversion(self, version):
21012  *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")             # <<<<<<<<<<<<<<
21013  *         self._version = version
21014  * 
21015  */
21016   __pyx_t_1 = PyObject_RichCompare(__pyx_v_version, __pyx_int_33, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21017   __Pyx_GOTREF(__pyx_t_1);
21018   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21019   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21020   if (__pyx_t_2) {
21021     __pyx_t_1 = PyObject_RichCompare(__pyx_v_version, __pyx_int_40, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21022     __Pyx_GOTREF(__pyx_t_1);
21023     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21024     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21025     __pyx_t_4 = __pyx_t_3;
21026   } else {
21027     __pyx_t_4 = __pyx_t_2;
21028   }
21029   if (__pyx_t_4) {
21030     __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_124), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21031     __Pyx_GOTREF(__pyx_t_1);
21032     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
21033     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21034     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21035     goto __pyx_L3;
21036   }
21037   __pyx_L3:;
21038
21039   /* "cvcf.pyx":959
21040  *     def setversion(self, version):
21041  *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")
21042  *         self._version = version             # <<<<<<<<<<<<<<
21043  * 
21044  *     def setregions(self, regions):
21045  */
21046   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___version, __pyx_v_version) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21047
21048   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21049   goto __pyx_L0;
21050   __pyx_L1_error:;
21051   __Pyx_XDECREF(__pyx_t_1);
21052   __Pyx_AddTraceback("cvcf.VCF.setversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
21053   __pyx_r = NULL;
21054   __pyx_L0:;
21055   __Pyx_XGIVEREF(__pyx_r);
21056   __Pyx_RefNannyFinishContext();
21057   return __pyx_r;
21058 }
21059
21060 /* Python wrapper */
21061 static PyObject *__pyx_pw_4cvcf_3VCF_64setregions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21062 static PyMethodDef __pyx_mdef_4cvcf_3VCF_64setregions = {__Pyx_NAMESTR("setregions"), (PyCFunction)__pyx_pw_4cvcf_3VCF_64setregions, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
21063 static PyObject *__pyx_pw_4cvcf_3VCF_64setregions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21064   PyObject *__pyx_v_self = 0;
21065   PyObject *__pyx_v_regions = 0;
21066   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__regions,0};
21067   PyObject *__pyx_r = 0;
21068   __Pyx_RefNannyDeclarations
21069   __Pyx_RefNannySetupContext("setregions (wrapper)", 0);
21070   __pyx_self = __pyx_self;
21071   {
21072     PyObject* values[2] = {0,0};
21073     if (unlikely(__pyx_kwds)) {
21074       Py_ssize_t kw_args;
21075       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21076       switch (pos_args) {
21077         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21078         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21079         case  0: break;
21080         default: goto __pyx_L5_argtuple_error;
21081       }
21082       kw_args = PyDict_Size(__pyx_kwds);
21083       switch (pos_args) {
21084         case  0:
21085         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
21086         if (likely(values[0])) kw_args--;
21087         else goto __pyx_L5_argtuple_error;
21088         case  1:
21089         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__regions);
21090         if (likely(values[1])) kw_args--;
21091         else {
21092           __Pyx_RaiseArgtupleInvalid("setregions", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21093         }
21094       }
21095       if (unlikely(kw_args > 0)) {
21096         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setregions") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21097       }
21098     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
21099       goto __pyx_L5_argtuple_error;
21100     } else {
21101       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21102       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21103     }
21104     __pyx_v_self = values[0];
21105     __pyx_v_regions = values[1];
21106   }
21107   goto __pyx_L4_argument_unpacking_done;
21108   __pyx_L5_argtuple_error:;
21109   __Pyx_RaiseArgtupleInvalid("setregions", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21110   __pyx_L3_error:;
21111   __Pyx_AddTraceback("cvcf.VCF.setregions", __pyx_clineno, __pyx_lineno, __pyx_filename);
21112   __Pyx_RefNannyFinishContext();
21113   return NULL;
21114   __pyx_L4_argument_unpacking_done:;
21115   __pyx_r = __pyx_pf_4cvcf_3VCF_63setregions(__pyx_self, __pyx_v_self, __pyx_v_regions);
21116   __Pyx_RefNannyFinishContext();
21117   return __pyx_r;
21118 }
21119
21120 /* "cvcf.pyx":961
21121  *         self._version = version
21122  * 
21123  *     def setregions(self, regions):             # <<<<<<<<<<<<<<
21124  *         self._regions = regions
21125  * 
21126  */
21127
21128 static PyObject *__pyx_pf_4cvcf_3VCF_63setregions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_regions) {
21129   PyObject *__pyx_r = NULL;
21130   __Pyx_RefNannyDeclarations
21131   int __pyx_lineno = 0;
21132   const char *__pyx_filename = NULL;
21133   int __pyx_clineno = 0;
21134   __Pyx_RefNannySetupContext("setregions", 0);
21135
21136   /* "cvcf.pyx":962
21137  * 
21138  *     def setregions(self, regions):
21139  *         self._regions = regions             # <<<<<<<<<<<<<<
21140  * 
21141  *     def setreference(self, ref):
21142  */
21143   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___regions, __pyx_v_regions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21144
21145   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21146   goto __pyx_L0;
21147   __pyx_L1_error:;
21148   __Pyx_AddTraceback("cvcf.VCF.setregions", __pyx_clineno, __pyx_lineno, __pyx_filename);
21149   __pyx_r = NULL;
21150   __pyx_L0:;
21151   __Pyx_XGIVEREF(__pyx_r);
21152   __Pyx_RefNannyFinishContext();
21153   return __pyx_r;
21154 }
21155
21156 /* Python wrapper */
21157 static PyObject *__pyx_pw_4cvcf_3VCF_66setreference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21158 static char __pyx_doc_4cvcf_3VCF_65setreference[] = " Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile ";
21159 static PyMethodDef __pyx_mdef_4cvcf_3VCF_66setreference = {__Pyx_NAMESTR("setreference"), (PyCFunction)__pyx_pw_4cvcf_3VCF_66setreference, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_65setreference)};
21160 static PyObject *__pyx_pw_4cvcf_3VCF_66setreference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21161   PyObject *__pyx_v_self = 0;
21162   PyObject *__pyx_v_ref = 0;
21163   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__ref,0};
21164   PyObject *__pyx_r = 0;
21165   __Pyx_RefNannyDeclarations
21166   __Pyx_RefNannySetupContext("setreference (wrapper)", 0);
21167   __pyx_self = __pyx_self;
21168   {
21169     PyObject* values[2] = {0,0};
21170     if (unlikely(__pyx_kwds)) {
21171       Py_ssize_t kw_args;
21172       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21173       switch (pos_args) {
21174         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21175         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21176         case  0: break;
21177         default: goto __pyx_L5_argtuple_error;
21178       }
21179       kw_args = PyDict_Size(__pyx_kwds);
21180       switch (pos_args) {
21181         case  0:
21182         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
21183         if (likely(values[0])) kw_args--;
21184         else goto __pyx_L5_argtuple_error;
21185         case  1:
21186         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref);
21187         if (likely(values[1])) kw_args--;
21188         else {
21189           __Pyx_RaiseArgtupleInvalid("setreference", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21190         }
21191       }
21192       if (unlikely(kw_args > 0)) {
21193         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setreference") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21194       }
21195     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
21196       goto __pyx_L5_argtuple_error;
21197     } else {
21198       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21199       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21200     }
21201     __pyx_v_self = values[0];
21202     __pyx_v_ref = values[1];
21203   }
21204   goto __pyx_L4_argument_unpacking_done;
21205   __pyx_L5_argtuple_error:;
21206   __Pyx_RaiseArgtupleInvalid("setreference", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21207   __pyx_L3_error:;
21208   __Pyx_AddTraceback("cvcf.VCF.setreference", __pyx_clineno, __pyx_lineno, __pyx_filename);
21209   __Pyx_RefNannyFinishContext();
21210   return NULL;
21211   __pyx_L4_argument_unpacking_done:;
21212   __pyx_r = __pyx_pf_4cvcf_3VCF_65setreference(__pyx_self, __pyx_v_self, __pyx_v_ref);
21213   __Pyx_RefNannyFinishContext();
21214   return __pyx_r;
21215 }
21216
21217 /* "cvcf.pyx":964
21218  *         self._regions = regions
21219  * 
21220  *     def setreference(self, ref):             # <<<<<<<<<<<<<<
21221  *         """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """
21222  *         self._reference = ref
21223  */
21224
21225 static PyObject *__pyx_pf_4cvcf_3VCF_65setreference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ref) {
21226   PyObject *__pyx_r = NULL;
21227   __Pyx_RefNannyDeclarations
21228   int __pyx_lineno = 0;
21229   const char *__pyx_filename = NULL;
21230   int __pyx_clineno = 0;
21231   __Pyx_RefNannySetupContext("setreference", 0);
21232
21233   /* "cvcf.pyx":966
21234  *     def setreference(self, ref):
21235  *         """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """
21236  *         self._reference = ref             # <<<<<<<<<<<<<<
21237  * 
21238  *     def ignoreerror(self, errorstring):
21239  */
21240   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s___reference, __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21241
21242   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21243   goto __pyx_L0;
21244   __pyx_L1_error:;
21245   __Pyx_AddTraceback("cvcf.VCF.setreference", __pyx_clineno, __pyx_lineno, __pyx_filename);
21246   __pyx_r = NULL;
21247   __pyx_L0:;
21248   __Pyx_XGIVEREF(__pyx_r);
21249   __Pyx_RefNannyFinishContext();
21250   return __pyx_r;
21251 }
21252
21253 /* Python wrapper */
21254 static PyObject *__pyx_pw_4cvcf_3VCF_68ignoreerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21255 static PyMethodDef __pyx_mdef_4cvcf_3VCF_68ignoreerror = {__Pyx_NAMESTR("ignoreerror"), (PyCFunction)__pyx_pw_4cvcf_3VCF_68ignoreerror, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
21256 static PyObject *__pyx_pw_4cvcf_3VCF_68ignoreerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21257   PyObject *__pyx_v_self = 0;
21258   PyObject *__pyx_v_errorstring = 0;
21259   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__errorstring,0};
21260   PyObject *__pyx_r = 0;
21261   __Pyx_RefNannyDeclarations
21262   __Pyx_RefNannySetupContext("ignoreerror (wrapper)", 0);
21263   __pyx_self = __pyx_self;
21264   {
21265     PyObject* values[2] = {0,0};
21266     if (unlikely(__pyx_kwds)) {
21267       Py_ssize_t kw_args;
21268       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21269       switch (pos_args) {
21270         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21271         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21272         case  0: break;
21273         default: goto __pyx_L5_argtuple_error;
21274       }
21275       kw_args = PyDict_Size(__pyx_kwds);
21276       switch (pos_args) {
21277         case  0:
21278         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
21279         if (likely(values[0])) kw_args--;
21280         else goto __pyx_L5_argtuple_error;
21281         case  1:
21282         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__errorstring);
21283         if (likely(values[1])) kw_args--;
21284         else {
21285           __Pyx_RaiseArgtupleInvalid("ignoreerror", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21286         }
21287       }
21288       if (unlikely(kw_args > 0)) {
21289         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ignoreerror") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21290       }
21291     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
21292       goto __pyx_L5_argtuple_error;
21293     } else {
21294       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21295       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21296     }
21297     __pyx_v_self = values[0];
21298     __pyx_v_errorstring = values[1];
21299   }
21300   goto __pyx_L4_argument_unpacking_done;
21301   __pyx_L5_argtuple_error:;
21302   __Pyx_RaiseArgtupleInvalid("ignoreerror", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21303   __pyx_L3_error:;
21304   __Pyx_AddTraceback("cvcf.VCF.ignoreerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
21305   __Pyx_RefNannyFinishContext();
21306   return NULL;
21307   __pyx_L4_argument_unpacking_done:;
21308   __pyx_r = __pyx_pf_4cvcf_3VCF_67ignoreerror(__pyx_self, __pyx_v_self, __pyx_v_errorstring);
21309   __Pyx_RefNannyFinishContext();
21310   return __pyx_r;
21311 }
21312
21313 /* "cvcf.pyx":968
21314  *         self._reference = ref
21315  * 
21316  *     def ignoreerror(self, errorstring):             # <<<<<<<<<<<<<<
21317  *         try:             self._ignored_errors.add(self.__dict__[errorstring])
21318  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
21319  */
21320
21321 static PyObject *__pyx_pf_4cvcf_3VCF_67ignoreerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring) {
21322   PyObject *__pyx_r = NULL;
21323   __Pyx_RefNannyDeclarations
21324   PyObject *__pyx_t_1 = NULL;
21325   PyObject *__pyx_t_2 = NULL;
21326   PyObject *__pyx_t_3 = NULL;
21327   PyObject *__pyx_t_4 = NULL;
21328   PyObject *__pyx_t_5 = NULL;
21329   PyObject *__pyx_t_6 = NULL;
21330   int __pyx_t_7;
21331   PyObject *__pyx_t_8 = NULL;
21332   PyObject *__pyx_t_9 = NULL;
21333   int __pyx_lineno = 0;
21334   const char *__pyx_filename = NULL;
21335   int __pyx_clineno = 0;
21336   __Pyx_RefNannySetupContext("ignoreerror", 0);
21337
21338   /* "cvcf.pyx":969
21339  * 
21340  *     def ignoreerror(self, errorstring):
21341  *         try:             self._ignored_errors.add(self.__dict__[errorstring])             # <<<<<<<<<<<<<<
21342  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
21343  * 
21344  */
21345   {
21346     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
21347     __Pyx_XGOTREF(__pyx_t_1);
21348     __Pyx_XGOTREF(__pyx_t_2);
21349     __Pyx_XGOTREF(__pyx_t_3);
21350     /*try:*/ {
21351       __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___ignored_errors); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21352       __Pyx_GOTREF(__pyx_t_4);
21353       __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__add); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21354       __Pyx_GOTREF(__pyx_t_5);
21355       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21356       __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____dict__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21357       __Pyx_GOTREF(__pyx_t_4);
21358       __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_errorstring); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21359       __Pyx_GOTREF(__pyx_t_6);
21360       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21361       __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21362       __Pyx_GOTREF(__pyx_t_4);
21363       PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
21364       __Pyx_GIVEREF(__pyx_t_6);
21365       __pyx_t_6 = 0;
21366       __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21367       __Pyx_GOTREF(__pyx_t_6);
21368       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21369       __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
21370       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21371     }
21372     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21373     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21374     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21375     goto __pyx_L10_try_end;
21376     __pyx_L3_error:;
21377     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
21378     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21379     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21380
21381     /* "cvcf.pyx":970
21382  *     def ignoreerror(self, errorstring):
21383  *         try:             self._ignored_errors.add(self.__dict__[errorstring])
21384  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)             # <<<<<<<<<<<<<<
21385  * 
21386  *     def warnerror(self, errorstring):
21387  */
21388     __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
21389     if (__pyx_t_7) {
21390       __Pyx_AddTraceback("cvcf.VCF.ignoreerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
21391       if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21392       __Pyx_GOTREF(__pyx_t_6);
21393       __Pyx_GOTREF(__pyx_t_4);
21394       __Pyx_GOTREF(__pyx_t_5);
21395       __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_125), __pyx_v_errorstring); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21396       __Pyx_GOTREF(((PyObject *)__pyx_t_8));
21397       __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21398       __Pyx_GOTREF(__pyx_t_9);
21399       PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
21400       __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
21401       __pyx_t_8 = 0;
21402       __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21403       __Pyx_GOTREF(__pyx_t_8);
21404       __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
21405       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
21406       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21407       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21408       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21409       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21410       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21411       goto __pyx_L4_exception_handled;
21412     }
21413     __pyx_L5_except_error:;
21414     __Pyx_XGIVEREF(__pyx_t_1);
21415     __Pyx_XGIVEREF(__pyx_t_2);
21416     __Pyx_XGIVEREF(__pyx_t_3);
21417     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
21418     goto __pyx_L1_error;
21419     __pyx_L4_exception_handled:;
21420     __Pyx_XGIVEREF(__pyx_t_1);
21421     __Pyx_XGIVEREF(__pyx_t_2);
21422     __Pyx_XGIVEREF(__pyx_t_3);
21423     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
21424     __pyx_L10_try_end:;
21425   }
21426
21427   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21428   goto __pyx_L0;
21429   __pyx_L1_error:;
21430   __Pyx_XDECREF(__pyx_t_4);
21431   __Pyx_XDECREF(__pyx_t_5);
21432   __Pyx_XDECREF(__pyx_t_6);
21433   __Pyx_XDECREF(__pyx_t_8);
21434   __Pyx_XDECREF(__pyx_t_9);
21435   __Pyx_AddTraceback("cvcf.VCF.ignoreerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
21436   __pyx_r = NULL;
21437   __pyx_L0:;
21438   __Pyx_XGIVEREF(__pyx_r);
21439   __Pyx_RefNannyFinishContext();
21440   return __pyx_r;
21441 }
21442
21443 /* Python wrapper */
21444 static PyObject *__pyx_pw_4cvcf_3VCF_70warnerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21445 static PyMethodDef __pyx_mdef_4cvcf_3VCF_70warnerror = {__Pyx_NAMESTR("warnerror"), (PyCFunction)__pyx_pw_4cvcf_3VCF_70warnerror, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
21446 static PyObject *__pyx_pw_4cvcf_3VCF_70warnerror(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21447   PyObject *__pyx_v_self = 0;
21448   PyObject *__pyx_v_errorstring = 0;
21449   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__errorstring,0};
21450   PyObject *__pyx_r = 0;
21451   __Pyx_RefNannyDeclarations
21452   __Pyx_RefNannySetupContext("warnerror (wrapper)", 0);
21453   __pyx_self = __pyx_self;
21454   {
21455     PyObject* values[2] = {0,0};
21456     if (unlikely(__pyx_kwds)) {
21457       Py_ssize_t kw_args;
21458       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21459       switch (pos_args) {
21460         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21461         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21462         case  0: break;
21463         default: goto __pyx_L5_argtuple_error;
21464       }
21465       kw_args = PyDict_Size(__pyx_kwds);
21466       switch (pos_args) {
21467         case  0:
21468         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
21469         if (likely(values[0])) kw_args--;
21470         else goto __pyx_L5_argtuple_error;
21471         case  1:
21472         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__errorstring);
21473         if (likely(values[1])) kw_args--;
21474         else {
21475           __Pyx_RaiseArgtupleInvalid("warnerror", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21476         }
21477       }
21478       if (unlikely(kw_args > 0)) {
21479         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "warnerror") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21480       }
21481     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
21482       goto __pyx_L5_argtuple_error;
21483     } else {
21484       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21485       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21486     }
21487     __pyx_v_self = values[0];
21488     __pyx_v_errorstring = values[1];
21489   }
21490   goto __pyx_L4_argument_unpacking_done;
21491   __pyx_L5_argtuple_error:;
21492   __Pyx_RaiseArgtupleInvalid("warnerror", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21493   __pyx_L3_error:;
21494   __Pyx_AddTraceback("cvcf.VCF.warnerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
21495   __Pyx_RefNannyFinishContext();
21496   return NULL;
21497   __pyx_L4_argument_unpacking_done:;
21498   __pyx_r = __pyx_pf_4cvcf_3VCF_69warnerror(__pyx_self, __pyx_v_self, __pyx_v_errorstring);
21499   __Pyx_RefNannyFinishContext();
21500   return __pyx_r;
21501 }
21502
21503 /* "cvcf.pyx":972
21504  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
21505  * 
21506  *     def warnerror(self, errorstring):             # <<<<<<<<<<<<<<
21507  *         try:             self._warn_errors.add(self.__dict__[errorstring])
21508  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
21509  */
21510
21511 static PyObject *__pyx_pf_4cvcf_3VCF_69warnerror(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errorstring) {
21512   PyObject *__pyx_r = NULL;
21513   __Pyx_RefNannyDeclarations
21514   PyObject *__pyx_t_1 = NULL;
21515   PyObject *__pyx_t_2 = NULL;
21516   PyObject *__pyx_t_3 = NULL;
21517   PyObject *__pyx_t_4 = NULL;
21518   PyObject *__pyx_t_5 = NULL;
21519   PyObject *__pyx_t_6 = NULL;
21520   int __pyx_t_7;
21521   PyObject *__pyx_t_8 = NULL;
21522   PyObject *__pyx_t_9 = NULL;
21523   int __pyx_lineno = 0;
21524   const char *__pyx_filename = NULL;
21525   int __pyx_clineno = 0;
21526   __Pyx_RefNannySetupContext("warnerror", 0);
21527
21528   /* "cvcf.pyx":973
21529  * 
21530  *     def warnerror(self, errorstring):
21531  *         try:             self._warn_errors.add(self.__dict__[errorstring])             # <<<<<<<<<<<<<<
21532  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
21533  * 
21534  */
21535   {
21536     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
21537     __Pyx_XGOTREF(__pyx_t_1);
21538     __Pyx_XGOTREF(__pyx_t_2);
21539     __Pyx_XGOTREF(__pyx_t_3);
21540     /*try:*/ {
21541       __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___warn_errors); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21542       __Pyx_GOTREF(__pyx_t_4);
21543       __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__add); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21544       __Pyx_GOTREF(__pyx_t_5);
21545       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21546       __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____dict__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21547       __Pyx_GOTREF(__pyx_t_4);
21548       __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_errorstring); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21549       __Pyx_GOTREF(__pyx_t_6);
21550       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21551       __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21552       __Pyx_GOTREF(__pyx_t_4);
21553       PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
21554       __Pyx_GIVEREF(__pyx_t_6);
21555       __pyx_t_6 = 0;
21556       __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21557       __Pyx_GOTREF(__pyx_t_6);
21558       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21559       __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
21560       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21561     }
21562     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21563     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21564     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21565     goto __pyx_L10_try_end;
21566     __pyx_L3_error:;
21567     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
21568     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21569     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21570
21571     /* "cvcf.pyx":974
21572  *     def warnerror(self, errorstring):
21573  *         try:             self._warn_errors.add(self.__dict__[errorstring])
21574  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)             # <<<<<<<<<<<<<<
21575  * 
21576  *     def parse(self, stream):
21577  */
21578     __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
21579     if (__pyx_t_7) {
21580       __Pyx_AddTraceback("cvcf.VCF.warnerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
21581       if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21582       __Pyx_GOTREF(__pyx_t_6);
21583       __Pyx_GOTREF(__pyx_t_4);
21584       __Pyx_GOTREF(__pyx_t_5);
21585       __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_125), __pyx_v_errorstring); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21586       __Pyx_GOTREF(((PyObject *)__pyx_t_8));
21587       __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21588       __Pyx_GOTREF(__pyx_t_9);
21589       PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
21590       __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
21591       __pyx_t_8 = 0;
21592       __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21593       __Pyx_GOTREF(__pyx_t_8);
21594       __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
21595       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
21596       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21597       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
21598       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21599       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21600       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21601       goto __pyx_L4_exception_handled;
21602     }
21603     __pyx_L5_except_error:;
21604     __Pyx_XGIVEREF(__pyx_t_1);
21605     __Pyx_XGIVEREF(__pyx_t_2);
21606     __Pyx_XGIVEREF(__pyx_t_3);
21607     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
21608     goto __pyx_L1_error;
21609     __pyx_L4_exception_handled:;
21610     __Pyx_XGIVEREF(__pyx_t_1);
21611     __Pyx_XGIVEREF(__pyx_t_2);
21612     __Pyx_XGIVEREF(__pyx_t_3);
21613     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
21614     __pyx_L10_try_end:;
21615   }
21616
21617   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21618   goto __pyx_L0;
21619   __pyx_L1_error:;
21620   __Pyx_XDECREF(__pyx_t_4);
21621   __Pyx_XDECREF(__pyx_t_5);
21622   __Pyx_XDECREF(__pyx_t_6);
21623   __Pyx_XDECREF(__pyx_t_8);
21624   __Pyx_XDECREF(__pyx_t_9);
21625   __Pyx_AddTraceback("cvcf.VCF.warnerror", __pyx_clineno, __pyx_lineno, __pyx_filename);
21626   __pyx_r = NULL;
21627   __pyx_L0:;
21628   __Pyx_XGIVEREF(__pyx_r);
21629   __Pyx_RefNannyFinishContext();
21630   return __pyx_r;
21631 }
21632
21633 /* Python wrapper */
21634 static PyObject *__pyx_pw_4cvcf_3VCF_72parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21635 static char __pyx_doc_4cvcf_3VCF_71parse[] = " Parse a stream of VCF-formatted lines.  Initializes class instance and return generator ";
21636 static PyMethodDef __pyx_mdef_4cvcf_3VCF_72parse = {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pw_4cvcf_3VCF_72parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_71parse)};
21637 static PyObject *__pyx_pw_4cvcf_3VCF_72parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21638   PyObject *__pyx_v_self = 0;
21639   PyObject *__pyx_v_stream = 0;
21640   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
21641   PyObject *__pyx_r = 0;
21642   __Pyx_RefNannyDeclarations
21643   __Pyx_RefNannySetupContext("parse (wrapper)", 0);
21644   __pyx_self = __pyx_self;
21645   {
21646     PyObject* values[2] = {0,0};
21647     if (unlikely(__pyx_kwds)) {
21648       Py_ssize_t kw_args;
21649       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21650       switch (pos_args) {
21651         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21652         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21653         case  0: break;
21654         default: goto __pyx_L5_argtuple_error;
21655       }
21656       kw_args = PyDict_Size(__pyx_kwds);
21657       switch (pos_args) {
21658         case  0:
21659         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
21660         if (likely(values[0])) kw_args--;
21661         else goto __pyx_L5_argtuple_error;
21662         case  1:
21663         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream);
21664         if (likely(values[1])) kw_args--;
21665         else {
21666           __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21667         }
21668       }
21669       if (unlikely(kw_args > 0)) {
21670         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21671       }
21672     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
21673       goto __pyx_L5_argtuple_error;
21674     } else {
21675       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21676       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21677     }
21678     __pyx_v_self = values[0];
21679     __pyx_v_stream = values[1];
21680   }
21681   goto __pyx_L4_argument_unpacking_done;
21682   __pyx_L5_argtuple_error:;
21683   __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21684   __pyx_L3_error:;
21685   __Pyx_AddTraceback("cvcf.VCF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
21686   __Pyx_RefNannyFinishContext();
21687   return NULL;
21688   __pyx_L4_argument_unpacking_done:;
21689   __pyx_r = __pyx_pf_4cvcf_3VCF_71parse(__pyx_self, __pyx_v_self, __pyx_v_stream);
21690   __Pyx_RefNannyFinishContext();
21691   return __pyx_r;
21692 }
21693
21694 /* "cvcf.pyx":976
21695  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
21696  * 
21697  *     def parse(self, stream):             # <<<<<<<<<<<<<<
21698  *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
21699  *         last_line = self._parse_header(stream)
21700  */
21701
21702 static PyObject *__pyx_pf_4cvcf_3VCF_71parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
21703   PyObject *__pyx_v_last_line = NULL;
21704   PyObject *__pyx_r = NULL;
21705   __Pyx_RefNannyDeclarations
21706   PyObject *__pyx_t_1 = NULL;
21707   PyObject *__pyx_t_2 = NULL;
21708   PyObject *__pyx_t_3 = NULL;
21709   int __pyx_lineno = 0;
21710   const char *__pyx_filename = NULL;
21711   int __pyx_clineno = 0;
21712   __Pyx_RefNannySetupContext("parse", 0);
21713
21714   /* "cvcf.pyx":978
21715  *     def parse(self, stream):
21716  *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
21717  *         last_line = self._parse_header(stream)             # <<<<<<<<<<<<<<
21718  *         # now return a generator that does the actual work.  In this way the pre-processing is done
21719  *         # before the first piece of data is yielded
21720  */
21721   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parse_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21722   __Pyx_GOTREF(__pyx_t_1);
21723   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21724   __Pyx_GOTREF(__pyx_t_2);
21725   __Pyx_INCREF(__pyx_v_stream);
21726   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
21727   __Pyx_GIVEREF(__pyx_v_stream);
21728   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21729   __Pyx_GOTREF(__pyx_t_3);
21730   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21731   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
21732   __pyx_v_last_line = __pyx_t_3;
21733   __pyx_t_3 = 0;
21734
21735   /* "cvcf.pyx":981
21736  *         # now return a generator that does the actual work.  In this way the pre-processing is done
21737  *         # before the first piece of data is yielded
21738  *         return self._parse(last_line, stream)             # <<<<<<<<<<<<<<
21739  * 
21740  *     def write(self, stream, datagenerator):
21741  */
21742   __Pyx_XDECREF(__pyx_r);
21743   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parse); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21744   __Pyx_GOTREF(__pyx_t_3);
21745   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21746   __Pyx_GOTREF(__pyx_t_2);
21747   __Pyx_INCREF(__pyx_v_last_line);
21748   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_last_line);
21749   __Pyx_GIVEREF(__pyx_v_last_line);
21750   __Pyx_INCREF(__pyx_v_stream);
21751   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_stream);
21752   __Pyx_GIVEREF(__pyx_v_stream);
21753   __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21754   __Pyx_GOTREF(__pyx_t_1);
21755   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21756   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
21757   __pyx_r = __pyx_t_1;
21758   __pyx_t_1 = 0;
21759   goto __pyx_L0;
21760
21761   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21762   goto __pyx_L0;
21763   __pyx_L1_error:;
21764   __Pyx_XDECREF(__pyx_t_1);
21765   __Pyx_XDECREF(__pyx_t_2);
21766   __Pyx_XDECREF(__pyx_t_3);
21767   __Pyx_AddTraceback("cvcf.VCF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
21768   __pyx_r = NULL;
21769   __pyx_L0:;
21770   __Pyx_XDECREF(__pyx_v_last_line);
21771   __Pyx_XGIVEREF(__pyx_r);
21772   __Pyx_RefNannyFinishContext();
21773   return __pyx_r;
21774 }
21775
21776 /* Python wrapper */
21777 static PyObject *__pyx_pw_4cvcf_3VCF_74write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21778 static char __pyx_doc_4cvcf_3VCF_73write[] = " Writes a VCF file to a stream, using a data generator (or list) ";
21779 static PyMethodDef __pyx_mdef_4cvcf_3VCF_74write = {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_4cvcf_3VCF_74write, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_73write)};
21780 static PyObject *__pyx_pw_4cvcf_3VCF_74write(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21781   PyObject *__pyx_v_self = 0;
21782   PyObject *__pyx_v_stream = 0;
21783   PyObject *__pyx_v_datagenerator = 0;
21784   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,&__pyx_n_s__datagenerator,0};
21785   PyObject *__pyx_r = 0;
21786   __Pyx_RefNannyDeclarations
21787   __Pyx_RefNannySetupContext("write (wrapper)", 0);
21788   __pyx_self = __pyx_self;
21789   {
21790     PyObject* values[3] = {0,0,0};
21791     if (unlikely(__pyx_kwds)) {
21792       Py_ssize_t kw_args;
21793       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21794       switch (pos_args) {
21795         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21796         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21797         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21798         case  0: break;
21799         default: goto __pyx_L5_argtuple_error;
21800       }
21801       kw_args = PyDict_Size(__pyx_kwds);
21802       switch (pos_args) {
21803         case  0:
21804         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
21805         if (likely(values[0])) kw_args--;
21806         else goto __pyx_L5_argtuple_error;
21807         case  1:
21808         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream);
21809         if (likely(values[1])) kw_args--;
21810         else {
21811           __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21812         }
21813         case  2:
21814         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__datagenerator);
21815         if (likely(values[2])) kw_args--;
21816         else {
21817           __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21818         }
21819       }
21820       if (unlikely(kw_args > 0)) {
21821         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21822       }
21823     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
21824       goto __pyx_L5_argtuple_error;
21825     } else {
21826       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21827       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21828       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21829     }
21830     __pyx_v_self = values[0];
21831     __pyx_v_stream = values[1];
21832     __pyx_v_datagenerator = values[2];
21833   }
21834   goto __pyx_L4_argument_unpacking_done;
21835   __pyx_L5_argtuple_error:;
21836   __Pyx_RaiseArgtupleInvalid("write", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21837   __pyx_L3_error:;
21838   __Pyx_AddTraceback("cvcf.VCF.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
21839   __Pyx_RefNannyFinishContext();
21840   return NULL;
21841   __pyx_L4_argument_unpacking_done:;
21842   __pyx_r = __pyx_pf_4cvcf_3VCF_73write(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_datagenerator);
21843   __Pyx_RefNannyFinishContext();
21844   return __pyx_r;
21845 }
21846
21847 /* "cvcf.pyx":983
21848  *         return self._parse(last_line, stream)
21849  * 
21850  *     def write(self, stream, datagenerator):             # <<<<<<<<<<<<<<
21851  *         """ Writes a VCF file to a stream, using a data generator (or list) """
21852  *         self.write_header(stream)
21853  */
21854
21855 static PyObject *__pyx_pf_4cvcf_3VCF_73write(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_datagenerator) {
21856   PyObject *__pyx_v_data = NULL;
21857   PyObject *__pyx_r = NULL;
21858   __Pyx_RefNannyDeclarations
21859   PyObject *__pyx_t_1 = NULL;
21860   PyObject *__pyx_t_2 = NULL;
21861   PyObject *__pyx_t_3 = NULL;
21862   Py_ssize_t __pyx_t_4;
21863   PyObject *(*__pyx_t_5)(PyObject *);
21864   PyObject *__pyx_t_6 = NULL;
21865   int __pyx_lineno = 0;
21866   const char *__pyx_filename = NULL;
21867   int __pyx_clineno = 0;
21868   __Pyx_RefNannySetupContext("write", 0);
21869
21870   /* "cvcf.pyx":985
21871  *     def write(self, stream, datagenerator):
21872  *         """ Writes a VCF file to a stream, using a data generator (or list) """
21873  *         self.write_header(stream)             # <<<<<<<<<<<<<<
21874  *         self.write_heading(stream)
21875  *         for data in datagenerator: self.write_data(stream,data)
21876  */
21877   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21878   __Pyx_GOTREF(__pyx_t_1);
21879   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21880   __Pyx_GOTREF(__pyx_t_2);
21881   __Pyx_INCREF(__pyx_v_stream);
21882   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
21883   __Pyx_GIVEREF(__pyx_v_stream);
21884   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21885   __Pyx_GOTREF(__pyx_t_3);
21886   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21887   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
21888   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21889
21890   /* "cvcf.pyx":986
21891  *         """ Writes a VCF file to a stream, using a data generator (or list) """
21892  *         self.write_header(stream)
21893  *         self.write_heading(stream)             # <<<<<<<<<<<<<<
21894  *         for data in datagenerator: self.write_data(stream,data)
21895  * 
21896  */
21897   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_heading); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21898   __Pyx_GOTREF(__pyx_t_3);
21899   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21900   __Pyx_GOTREF(__pyx_t_2);
21901   __Pyx_INCREF(__pyx_v_stream);
21902   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
21903   __Pyx_GIVEREF(__pyx_v_stream);
21904   __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21905   __Pyx_GOTREF(__pyx_t_1);
21906   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21907   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
21908   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21909
21910   /* "cvcf.pyx":987
21911  *         self.write_header(stream)
21912  *         self.write_heading(stream)
21913  *         for data in datagenerator: self.write_data(stream,data)             # <<<<<<<<<<<<<<
21914  * 
21915  *     def writeheader(self, stream):
21916  */
21917   if (PyList_CheckExact(__pyx_v_datagenerator) || PyTuple_CheckExact(__pyx_v_datagenerator)) {
21918     __pyx_t_1 = __pyx_v_datagenerator; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
21919     __pyx_t_5 = NULL;
21920   } else {
21921     __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_datagenerator); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21922     __Pyx_GOTREF(__pyx_t_1);
21923     __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
21924   }
21925   for (;;) {
21926     if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
21927       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
21928       __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
21929     } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
21930       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
21931       __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
21932     } else {
21933       __pyx_t_2 = __pyx_t_5(__pyx_t_1);
21934       if (unlikely(!__pyx_t_2)) {
21935         if (PyErr_Occurred()) {
21936           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
21937           else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21938         }
21939         break;
21940       }
21941       __Pyx_GOTREF(__pyx_t_2);
21942     }
21943     __Pyx_XDECREF(__pyx_v_data);
21944     __pyx_v_data = __pyx_t_2;
21945     __pyx_t_2 = 0;
21946     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21947     __Pyx_GOTREF(__pyx_t_2);
21948     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21949     __Pyx_GOTREF(__pyx_t_3);
21950     __Pyx_INCREF(__pyx_v_stream);
21951     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_stream);
21952     __Pyx_GIVEREF(__pyx_v_stream);
21953     __Pyx_INCREF(__pyx_v_data);
21954     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_data);
21955     __Pyx_GIVEREF(__pyx_v_data);
21956     __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21957     __Pyx_GOTREF(__pyx_t_6);
21958     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21959     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
21960     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21961   }
21962   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21963
21964   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21965   goto __pyx_L0;
21966   __pyx_L1_error:;
21967   __Pyx_XDECREF(__pyx_t_1);
21968   __Pyx_XDECREF(__pyx_t_2);
21969   __Pyx_XDECREF(__pyx_t_3);
21970   __Pyx_XDECREF(__pyx_t_6);
21971   __Pyx_AddTraceback("cvcf.VCF.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
21972   __pyx_r = NULL;
21973   __pyx_L0:;
21974   __Pyx_XDECREF(__pyx_v_data);
21975   __Pyx_XGIVEREF(__pyx_r);
21976   __Pyx_RefNannyFinishContext();
21977   return __pyx_r;
21978 }
21979
21980 /* Python wrapper */
21981 static PyObject *__pyx_pw_4cvcf_3VCF_76writeheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21982 static char __pyx_doc_4cvcf_3VCF_75writeheader[] = " Writes a VCF header ";
21983 static PyMethodDef __pyx_mdef_4cvcf_3VCF_76writeheader = {__Pyx_NAMESTR("writeheader"), (PyCFunction)__pyx_pw_4cvcf_3VCF_76writeheader, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_75writeheader)};
21984 static PyObject *__pyx_pw_4cvcf_3VCF_76writeheader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21985   PyObject *__pyx_v_self = 0;
21986   PyObject *__pyx_v_stream = 0;
21987   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__stream,0};
21988   PyObject *__pyx_r = 0;
21989   __Pyx_RefNannyDeclarations
21990   __Pyx_RefNannySetupContext("writeheader (wrapper)", 0);
21991   __pyx_self = __pyx_self;
21992   {
21993     PyObject* values[2] = {0,0};
21994     if (unlikely(__pyx_kwds)) {
21995       Py_ssize_t kw_args;
21996       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21997       switch (pos_args) {
21998         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21999         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22000         case  0: break;
22001         default: goto __pyx_L5_argtuple_error;
22002       }
22003       kw_args = PyDict_Size(__pyx_kwds);
22004       switch (pos_args) {
22005         case  0:
22006         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
22007         if (likely(values[0])) kw_args--;
22008         else goto __pyx_L5_argtuple_error;
22009         case  1:
22010         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream);
22011         if (likely(values[1])) kw_args--;
22012         else {
22013           __Pyx_RaiseArgtupleInvalid("writeheader", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22014         }
22015       }
22016       if (unlikely(kw_args > 0)) {
22017         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeheader") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22018       }
22019     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
22020       goto __pyx_L5_argtuple_error;
22021     } else {
22022       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22023       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22024     }
22025     __pyx_v_self = values[0];
22026     __pyx_v_stream = values[1];
22027   }
22028   goto __pyx_L4_argument_unpacking_done;
22029   __pyx_L5_argtuple_error:;
22030   __Pyx_RaiseArgtupleInvalid("writeheader", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22031   __pyx_L3_error:;
22032   __Pyx_AddTraceback("cvcf.VCF.writeheader", __pyx_clineno, __pyx_lineno, __pyx_filename);
22033   __Pyx_RefNannyFinishContext();
22034   return NULL;
22035   __pyx_L4_argument_unpacking_done:;
22036   __pyx_r = __pyx_pf_4cvcf_3VCF_75writeheader(__pyx_self, __pyx_v_self, __pyx_v_stream);
22037   __Pyx_RefNannyFinishContext();
22038   return __pyx_r;
22039 }
22040
22041 /* "cvcf.pyx":989
22042  *         for data in datagenerator: self.write_data(stream,data)
22043  * 
22044  *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
22045  *         """ Writes a VCF header """
22046  *         self.write_header(stream)
22047  */
22048
22049 static PyObject *__pyx_pf_4cvcf_3VCF_75writeheader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream) {
22050   PyObject *__pyx_r = NULL;
22051   __Pyx_RefNannyDeclarations
22052   PyObject *__pyx_t_1 = NULL;
22053   PyObject *__pyx_t_2 = NULL;
22054   PyObject *__pyx_t_3 = NULL;
22055   int __pyx_lineno = 0;
22056   const char *__pyx_filename = NULL;
22057   int __pyx_clineno = 0;
22058   __Pyx_RefNannySetupContext("writeheader", 0);
22059
22060   /* "cvcf.pyx":991
22061  *     def writeheader(self, stream):
22062  *         """ Writes a VCF header """
22063  *         self.write_header(stream)             # <<<<<<<<<<<<<<
22064  *         self.write_heading(stream)
22065  * 
22066  */
22067   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22068   __Pyx_GOTREF(__pyx_t_1);
22069   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22070   __Pyx_GOTREF(__pyx_t_2);
22071   __Pyx_INCREF(__pyx_v_stream);
22072   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
22073   __Pyx_GIVEREF(__pyx_v_stream);
22074   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22075   __Pyx_GOTREF(__pyx_t_3);
22076   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22077   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
22078   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22079
22080   /* "cvcf.pyx":992
22081  *         """ Writes a VCF header """
22082  *         self.write_header(stream)
22083  *         self.write_heading(stream)             # <<<<<<<<<<<<<<
22084  * 
22085  *     def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2):
22086  */
22087   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__write_heading); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22088   __Pyx_GOTREF(__pyx_t_3);
22089   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22090   __Pyx_GOTREF(__pyx_t_2);
22091   __Pyx_INCREF(__pyx_v_stream);
22092   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stream);
22093   __Pyx_GIVEREF(__pyx_v_stream);
22094   __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22095   __Pyx_GOTREF(__pyx_t_1);
22096   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22097   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
22098   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22099
22100   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22101   goto __pyx_L0;
22102   __pyx_L1_error:;
22103   __Pyx_XDECREF(__pyx_t_1);
22104   __Pyx_XDECREF(__pyx_t_2);
22105   __Pyx_XDECREF(__pyx_t_3);
22106   __Pyx_AddTraceback("cvcf.VCF.writeheader", __pyx_clineno, __pyx_lineno, __pyx_filename);
22107   __pyx_r = NULL;
22108   __pyx_L0:;
22109   __Pyx_XGIVEREF(__pyx_r);
22110   __Pyx_RefNannyFinishContext();
22111   return __pyx_r;
22112 }
22113
22114 /* Python wrapper */
22115 static PyObject *__pyx_pw_4cvcf_3VCF_78compare_calls(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22116 static char __pyx_doc_4cvcf_3VCF_77compare_calls[] = " Utility function: compares two calls for equality ";
22117 static PyMethodDef __pyx_mdef_4cvcf_3VCF_78compare_calls = {__Pyx_NAMESTR("compare_calls"), (PyCFunction)__pyx_pw_4cvcf_3VCF_78compare_calls, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_77compare_calls)};
22118 static PyObject *__pyx_pw_4cvcf_3VCF_78compare_calls(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22119   CYTHON_UNUSED PyObject *__pyx_v_self = 0;
22120   PyObject *__pyx_v_pos1 = 0;
22121   PyObject *__pyx_v_ref1 = 0;
22122   PyObject *__pyx_v_alt1 = 0;
22123   PyObject *__pyx_v_pos2 = 0;
22124   PyObject *__pyx_v_ref2 = 0;
22125   PyObject *__pyx_v_alt2 = 0;
22126   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__pos1,&__pyx_n_s__ref1,&__pyx_n_s__alt1,&__pyx_n_s__pos2,&__pyx_n_s__ref2,&__pyx_n_s__alt2,0};
22127   PyObject *__pyx_r = 0;
22128   __Pyx_RefNannyDeclarations
22129   __Pyx_RefNannySetupContext("compare_calls (wrapper)", 0);
22130   __pyx_self = __pyx_self;
22131   {
22132     PyObject* values[7] = {0,0,0,0,0,0,0};
22133     if (unlikely(__pyx_kwds)) {
22134       Py_ssize_t kw_args;
22135       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22136       switch (pos_args) {
22137         case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
22138         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
22139         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
22140         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
22141         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22142         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22143         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22144         case  0: break;
22145         default: goto __pyx_L5_argtuple_error;
22146       }
22147       kw_args = PyDict_Size(__pyx_kwds);
22148       switch (pos_args) {
22149         case  0:
22150         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
22151         if (likely(values[0])) kw_args--;
22152         else goto __pyx_L5_argtuple_error;
22153         case  1:
22154         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos1);
22155         if (likely(values[1])) kw_args--;
22156         else {
22157           __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22158         }
22159         case  2:
22160         values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref1);
22161         if (likely(values[2])) kw_args--;
22162         else {
22163           __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22164         }
22165         case  3:
22166         values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alt1);
22167         if (likely(values[3])) kw_args--;
22168         else {
22169           __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22170         }
22171         case  4:
22172         values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos2);
22173         if (likely(values[4])) kw_args--;
22174         else {
22175           __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22176         }
22177         case  5:
22178         values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref2);
22179         if (likely(values[5])) kw_args--;
22180         else {
22181           __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22182         }
22183         case  6:
22184         values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alt2);
22185         if (likely(values[6])) kw_args--;
22186         else {
22187           __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22188         }
22189       }
22190       if (unlikely(kw_args > 0)) {
22191         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare_calls") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22192       }
22193     } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
22194       goto __pyx_L5_argtuple_error;
22195     } else {
22196       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22197       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22198       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22199       values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
22200       values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
22201       values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
22202       values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
22203     }
22204     __pyx_v_self = values[0];
22205     __pyx_v_pos1 = values[1];
22206     __pyx_v_ref1 = values[2];
22207     __pyx_v_alt1 = values[3];
22208     __pyx_v_pos2 = values[4];
22209     __pyx_v_ref2 = values[5];
22210     __pyx_v_alt2 = values[6];
22211   }
22212   goto __pyx_L4_argument_unpacking_done;
22213   __pyx_L5_argtuple_error:;
22214   __Pyx_RaiseArgtupleInvalid("compare_calls", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22215   __pyx_L3_error:;
22216   __Pyx_AddTraceback("cvcf.VCF.compare_calls", __pyx_clineno, __pyx_lineno, __pyx_filename);
22217   __Pyx_RefNannyFinishContext();
22218   return NULL;
22219   __pyx_L4_argument_unpacking_done:;
22220   __pyx_r = __pyx_pf_4cvcf_3VCF_77compare_calls(__pyx_self, __pyx_v_self, __pyx_v_pos1, __pyx_v_ref1, __pyx_v_alt1, __pyx_v_pos2, __pyx_v_ref2, __pyx_v_alt2);
22221   __Pyx_RefNannyFinishContext();
22222   return __pyx_r;
22223 }
22224
22225 /* "cvcf.pyx":994
22226  *         self.write_heading(stream)
22227  * 
22228  *     def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2):             # <<<<<<<<<<<<<<
22229  *         """ Utility function: compares two calls for equality """
22230  *         # a variant should always be assigned to a unique position, one base before
22231  */
22232
22233 static PyObject *__pyx_pf_4cvcf_3VCF_77compare_calls(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_pos1, PyObject *__pyx_v_ref1, PyObject *__pyx_v_alt1, PyObject *__pyx_v_pos2, PyObject *__pyx_v_ref2, PyObject *__pyx_v_alt2) {
22234   PyObject *__pyx_r = NULL;
22235   __Pyx_RefNannyDeclarations
22236   PyObject *__pyx_t_1 = NULL;
22237   int __pyx_t_2;
22238   Py_ssize_t __pyx_t_3;
22239   int __pyx_t_4;
22240   PyObject *__pyx_t_5 = NULL;
22241   PyObject *__pyx_t_6 = NULL;
22242   int __pyx_t_7;
22243   int __pyx_t_8;
22244   int __pyx_lineno = 0;
22245   const char *__pyx_filename = NULL;
22246   int __pyx_clineno = 0;
22247   __Pyx_RefNannySetupContext("compare_calls", 0);
22248   __Pyx_INCREF(__pyx_v_ref1);
22249   __Pyx_INCREF(__pyx_v_alt1);
22250   __Pyx_INCREF(__pyx_v_ref2);
22251   __Pyx_INCREF(__pyx_v_alt2);
22252
22253   /* "cvcf.pyx":999
22254  *         # the leftmost position of the alignment gap.  If this rule is implemented
22255  *         # correctly, the two positions must be equal for the calls to be identical.
22256  *         if pos1 != pos2: return False             # <<<<<<<<<<<<<<
22257  *         # from both calls, trim rightmost bases when identical.  Do this safely, i.e.
22258  *         # only when the reference bases are not Ns
22259  */
22260   __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos1, __pyx_v_pos2, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22261   __Pyx_GOTREF(__pyx_t_1);
22262   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22263   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22264   if (__pyx_t_2) {
22265     __Pyx_XDECREF(__pyx_r);
22266     __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22267     __Pyx_GOTREF(__pyx_t_1);
22268     __pyx_r = __pyx_t_1;
22269     __pyx_t_1 = 0;
22270     goto __pyx_L0;
22271     goto __pyx_L3;
22272   }
22273   __pyx_L3:;
22274
22275   /* "cvcf.pyx":1002
22276  *         # from both calls, trim rightmost bases when identical.  Do this safely, i.e.
22277  *         # only when the reference bases are not Ns
22278  *         while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]:             # <<<<<<<<<<<<<<
22279  *             ref1 = ref1[:-1]
22280  *             alt1 = alt1[:-1]
22281  */
22282   while (1) {
22283     __pyx_t_3 = PyObject_Length(__pyx_v_ref1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22284     __pyx_t_2 = (__pyx_t_3 > 0);
22285     if (__pyx_t_2) {
22286       __pyx_t_3 = PyObject_Length(__pyx_v_alt1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22287       __pyx_t_4 = (__pyx_t_3 > 0);
22288       if (__pyx_t_4) {
22289         __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ref1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22290         __Pyx_GOTREF(__pyx_t_1);
22291         __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_alt1, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22292         __Pyx_GOTREF(__pyx_t_5);
22293         __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22294         __Pyx_GOTREF(__pyx_t_6);
22295         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22296         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22297         __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22298         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22299         __pyx_t_8 = __pyx_t_7;
22300       } else {
22301         __pyx_t_8 = __pyx_t_4;
22302       }
22303       __pyx_t_4 = __pyx_t_8;
22304     } else {
22305       __pyx_t_4 = __pyx_t_2;
22306     }
22307     if (!__pyx_t_4) break;
22308
22309     /* "cvcf.pyx":1003
22310  *         # only when the reference bases are not Ns
22311  *         while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]:
22312  *             ref1 = ref1[:-1]             # <<<<<<<<<<<<<<
22313  *             alt1 = alt1[:-1]
22314  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:
22315  */
22316     __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_ref1, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22317     __Pyx_GOTREF(__pyx_t_6);
22318     __Pyx_DECREF(__pyx_v_ref1);
22319     __pyx_v_ref1 = __pyx_t_6;
22320     __pyx_t_6 = 0;
22321
22322     /* "cvcf.pyx":1004
22323  *         while len(ref1)>0 and len(alt1)>0 and ref1[-1] == alt1[-1]:
22324  *             ref1 = ref1[:-1]
22325  *             alt1 = alt1[:-1]             # <<<<<<<<<<<<<<
22326  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:
22327  *             ref2 = ref2[:-1]
22328  */
22329     __pyx_t_6 = __Pyx_PySequence_GetSlice(__pyx_v_alt1, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22330     __Pyx_GOTREF(__pyx_t_6);
22331     __Pyx_DECREF(__pyx_v_alt1);
22332     __pyx_v_alt1 = __pyx_t_6;
22333     __pyx_t_6 = 0;
22334   }
22335
22336   /* "cvcf.pyx":1005
22337  *             ref1 = ref1[:-1]
22338  *             alt1 = alt1[:-1]
22339  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:             # <<<<<<<<<<<<<<
22340  *             ref2 = ref2[:-1]
22341  *             alt2 = alt2[:-1]
22342  */
22343   while (1) {
22344     __pyx_t_3 = PyObject_Length(__pyx_v_ref2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22345     __pyx_t_4 = (__pyx_t_3 > 0);
22346     if (__pyx_t_4) {
22347       __pyx_t_3 = PyObject_Length(__pyx_v_alt2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22348       __pyx_t_2 = (__pyx_t_3 > 0);
22349       if (__pyx_t_2) {
22350         __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_ref2, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22351         __Pyx_GOTREF(__pyx_t_6);
22352         __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_alt2, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22353         __Pyx_GOTREF(__pyx_t_5);
22354         __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22355         __Pyx_GOTREF(__pyx_t_1);
22356         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22357         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22358         __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22359         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22360         __pyx_t_7 = __pyx_t_8;
22361       } else {
22362         __pyx_t_7 = __pyx_t_2;
22363       }
22364       __pyx_t_2 = __pyx_t_7;
22365     } else {
22366       __pyx_t_2 = __pyx_t_4;
22367     }
22368     if (!__pyx_t_2) break;
22369
22370     /* "cvcf.pyx":1006
22371  *             alt1 = alt1[:-1]
22372  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:
22373  *             ref2 = ref2[:-1]             # <<<<<<<<<<<<<<
22374  *             alt2 = alt2[:-1]
22375  *         # now, the alternative alleles must be identical
22376  */
22377     __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_ref2, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22378     __Pyx_GOTREF(__pyx_t_1);
22379     __Pyx_DECREF(__pyx_v_ref2);
22380     __pyx_v_ref2 = __pyx_t_1;
22381     __pyx_t_1 = 0;
22382
22383     /* "cvcf.pyx":1007
22384  *         while len(ref2)>0 and len(alt2)>0 and ref2[-1] == alt2[-1]:
22385  *             ref2 = ref2[:-1]
22386  *             alt2 = alt2[:-1]             # <<<<<<<<<<<<<<
22387  *         # now, the alternative alleles must be identical
22388  *         return alt1 == alt2
22389  */
22390     __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_alt2, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22391     __Pyx_GOTREF(__pyx_t_1);
22392     __Pyx_DECREF(__pyx_v_alt2);
22393     __pyx_v_alt2 = __pyx_t_1;
22394     __pyx_t_1 = 0;
22395   }
22396
22397   /* "cvcf.pyx":1009
22398  *             alt2 = alt2[:-1]
22399  *         # now, the alternative alleles must be identical
22400  *         return alt1 == alt2             # <<<<<<<<<<<<<<
22401  * 
22402  * ###########################################################################################################
22403  */
22404   __Pyx_XDECREF(__pyx_r);
22405   __pyx_t_1 = PyObject_RichCompare(__pyx_v_alt1, __pyx_v_alt2, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22406   __Pyx_GOTREF(__pyx_t_1);
22407   __pyx_r = __pyx_t_1;
22408   __pyx_t_1 = 0;
22409   goto __pyx_L0;
22410
22411   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22412   goto __pyx_L0;
22413   __pyx_L1_error:;
22414   __Pyx_XDECREF(__pyx_t_1);
22415   __Pyx_XDECREF(__pyx_t_5);
22416   __Pyx_XDECREF(__pyx_t_6);
22417   __Pyx_AddTraceback("cvcf.VCF.compare_calls", __pyx_clineno, __pyx_lineno, __pyx_filename);
22418   __pyx_r = NULL;
22419   __pyx_L0:;
22420   __Pyx_XDECREF(__pyx_v_ref1);
22421   __Pyx_XDECREF(__pyx_v_alt1);
22422   __Pyx_XDECREF(__pyx_v_ref2);
22423   __Pyx_XDECREF(__pyx_v_alt2);
22424   __Pyx_XGIVEREF(__pyx_r);
22425   __Pyx_RefNannyFinishContext();
22426   return __pyx_r;
22427 }
22428
22429 /* Python wrapper */
22430 static PyObject *__pyx_pw_4cvcf_3VCF_80connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22431 static char __pyx_doc_4cvcf_3VCF_79connect[] = "connect to tabix file.";
22432 static PyMethodDef __pyx_mdef_4cvcf_3VCF_80connect = {__Pyx_NAMESTR("connect"), (PyCFunction)__pyx_pw_4cvcf_3VCF_80connect, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_79connect)};
22433 static PyObject *__pyx_pw_4cvcf_3VCF_80connect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22434   PyObject *__pyx_v_self = 0;
22435   PyObject *__pyx_v_filename = 0;
22436   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__filename,0};
22437   PyObject *__pyx_r = 0;
22438   __Pyx_RefNannyDeclarations
22439   __Pyx_RefNannySetupContext("connect (wrapper)", 0);
22440   __pyx_self = __pyx_self;
22441   {
22442     PyObject* values[2] = {0,0};
22443     if (unlikely(__pyx_kwds)) {
22444       Py_ssize_t kw_args;
22445       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22446       switch (pos_args) {
22447         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22448         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22449         case  0: break;
22450         default: goto __pyx_L5_argtuple_error;
22451       }
22452       kw_args = PyDict_Size(__pyx_kwds);
22453       switch (pos_args) {
22454         case  0:
22455         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
22456         if (likely(values[0])) kw_args--;
22457         else goto __pyx_L5_argtuple_error;
22458         case  1:
22459         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename);
22460         if (likely(values[1])) kw_args--;
22461         else {
22462           __Pyx_RaiseArgtupleInvalid("connect", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22463         }
22464       }
22465       if (unlikely(kw_args > 0)) {
22466         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22467       }
22468     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
22469       goto __pyx_L5_argtuple_error;
22470     } else {
22471       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22472       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22473     }
22474     __pyx_v_self = values[0];
22475     __pyx_v_filename = values[1];
22476   }
22477   goto __pyx_L4_argument_unpacking_done;
22478   __pyx_L5_argtuple_error:;
22479   __Pyx_RaiseArgtupleInvalid("connect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22480   __pyx_L3_error:;
22481   __Pyx_AddTraceback("cvcf.VCF.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
22482   __Pyx_RefNannyFinishContext();
22483   return NULL;
22484   __pyx_L4_argument_unpacking_done:;
22485   __pyx_r = __pyx_pf_4cvcf_3VCF_79connect(__pyx_self, __pyx_v_self, __pyx_v_filename);
22486   __Pyx_RefNannyFinishContext();
22487   return __pyx_r;
22488 }
22489
22490 /* "cvcf.pyx":1016
22491  * ###########################################################################################################
22492  * 
22493  *     def connect( self, filename ):             # <<<<<<<<<<<<<<
22494  *         '''connect to tabix file.'''
22495  *         self.tabixfile = pysam.Tabixfile( filename )
22496  */
22497
22498 static PyObject *__pyx_pf_4cvcf_3VCF_79connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
22499   PyObject *__pyx_r = NULL;
22500   __Pyx_RefNannyDeclarations
22501   PyObject *__pyx_t_1 = NULL;
22502   PyObject *__pyx_t_2 = NULL;
22503   PyObject *__pyx_t_3 = NULL;
22504   int __pyx_lineno = 0;
22505   const char *__pyx_filename = NULL;
22506   int __pyx_clineno = 0;
22507   __Pyx_RefNannySetupContext("connect", 0);
22508
22509   /* "cvcf.pyx":1018
22510  *     def connect( self, filename ):
22511  *         '''connect to tabix file.'''
22512  *         self.tabixfile = pysam.Tabixfile( filename )             # <<<<<<<<<<<<<<
22513  *         self._parse_header(self.tabixfile.header)
22514  * 
22515  */
22516   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__pysam); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22517   __Pyx_GOTREF(__pyx_t_1);
22518   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__Tabixfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22519   __Pyx_GOTREF(__pyx_t_2);
22520   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22521   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22522   __Pyx_GOTREF(__pyx_t_1);
22523   __Pyx_INCREF(__pyx_v_filename);
22524   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
22525   __Pyx_GIVEREF(__pyx_v_filename);
22526   __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22527   __Pyx_GOTREF(__pyx_t_3);
22528   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22529   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
22530   if (PyObject_SetAttr(__pyx_v_self, __pyx_n_s__tabixfile, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22531   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22532
22533   /* "cvcf.pyx":1019
22534  *         '''connect to tabix file.'''
22535  *         self.tabixfile = pysam.Tabixfile( filename )
22536  *         self._parse_header(self.tabixfile.header)             # <<<<<<<<<<<<<<
22537  * 
22538  *     def fetch(self,
22539  */
22540   __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___parse_header); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22541   __Pyx_GOTREF(__pyx_t_3);
22542   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tabixfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22543   __Pyx_GOTREF(__pyx_t_1);
22544   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__header); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22545   __Pyx_GOTREF(__pyx_t_2);
22546   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22547   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22548   __Pyx_GOTREF(__pyx_t_1);
22549   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
22550   __Pyx_GIVEREF(__pyx_t_2);
22551   __pyx_t_2 = 0;
22552   __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22553   __Pyx_GOTREF(__pyx_t_2);
22554   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22555   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
22556   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22557
22558   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22559   goto __pyx_L0;
22560   __pyx_L1_error:;
22561   __Pyx_XDECREF(__pyx_t_1);
22562   __Pyx_XDECREF(__pyx_t_2);
22563   __Pyx_XDECREF(__pyx_t_3);
22564   __Pyx_AddTraceback("cvcf.VCF.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
22565   __pyx_r = NULL;
22566   __pyx_L0:;
22567   __Pyx_XGIVEREF(__pyx_r);
22568   __Pyx_RefNannyFinishContext();
22569   return __pyx_r;
22570 }
22571
22572 /* Python wrapper */
22573 static PyObject *__pyx_pw_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22574 static char __pyx_doc_4cvcf_3VCF_81fetch[] = " Parse a stream of VCF-formatted lines.  Initializes class instance and return generator ";
22575 static PyMethodDef __pyx_mdef_4cvcf_3VCF_82fetch = {__Pyx_NAMESTR("fetch"), (PyCFunction)__pyx_pw_4cvcf_3VCF_82fetch, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_81fetch)};
22576 static PyObject *__pyx_pw_4cvcf_3VCF_82fetch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22577   PyObject *__pyx_v_self = 0;
22578   PyObject *__pyx_v_reference = 0;
22579   PyObject *__pyx_v_start = 0;
22580   PyObject *__pyx_v_end = 0;
22581   PyObject *__pyx_v_region = 0;
22582   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__reference,&__pyx_n_s__start,&__pyx_n_s__end,&__pyx_n_s__region,0};
22583   PyObject *__pyx_r = 0;
22584   __Pyx_RefNannyDeclarations
22585   __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
22586   __pyx_self = __pyx_self;
22587   {
22588     PyObject* values[5] = {0,0,0,0,0};
22589
22590     /* "cvcf.pyx":1022
22591  * 
22592  *     def fetch(self,
22593  *               reference = None,             # <<<<<<<<<<<<<<
22594  *               start = None,
22595  *               end = None,
22596  */
22597     values[1] = ((PyObject *)((PyObject *)Py_None));
22598
22599     /* "cvcf.pyx":1023
22600  *     def fetch(self,
22601  *               reference = None,
22602  *               start = None,             # <<<<<<<<<<<<<<
22603  *               end = None,
22604  *               region = None ):
22605  */
22606     values[2] = ((PyObject *)((PyObject *)Py_None));
22607
22608     /* "cvcf.pyx":1024
22609  *               reference = None,
22610  *               start = None,
22611  *               end = None,             # <<<<<<<<<<<<<<
22612  *               region = None ):
22613  *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
22614  */
22615     values[3] = ((PyObject *)((PyObject *)Py_None));
22616
22617     /* "cvcf.pyx":1025
22618  *               start = None,
22619  *               end = None,
22620  *               region = None ):             # <<<<<<<<<<<<<<
22621  *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
22622  * 
22623  */
22624     values[4] = ((PyObject *)((PyObject *)Py_None));
22625     if (unlikely(__pyx_kwds)) {
22626       Py_ssize_t kw_args;
22627       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22628       switch (pos_args) {
22629         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
22630         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
22631         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22632         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22633         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22634         case  0: break;
22635         default: goto __pyx_L5_argtuple_error;
22636       }
22637       kw_args = PyDict_Size(__pyx_kwds);
22638       switch (pos_args) {
22639         case  0:
22640         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
22641         if (likely(values[0])) kw_args--;
22642         else goto __pyx_L5_argtuple_error;
22643         case  1:
22644         if (kw_args > 0) {
22645           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reference);
22646           if (value) { values[1] = value; kw_args--; }
22647         }
22648         case  2:
22649         if (kw_args > 0) {
22650           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
22651           if (value) { values[2] = value; kw_args--; }
22652         }
22653         case  3:
22654         if (kw_args > 0) {
22655           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
22656           if (value) { values[3] = value; kw_args--; }
22657         }
22658         case  4:
22659         if (kw_args > 0) {
22660           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__region);
22661           if (value) { values[4] = value; kw_args--; }
22662         }
22663       }
22664       if (unlikely(kw_args > 0)) {
22665         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fetch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22666       }
22667     } else {
22668       switch (PyTuple_GET_SIZE(__pyx_args)) {
22669         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
22670         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
22671         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22672         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22673         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22674         break;
22675         default: goto __pyx_L5_argtuple_error;
22676       }
22677     }
22678     __pyx_v_self = values[0];
22679     __pyx_v_reference = values[1];
22680     __pyx_v_start = values[2];
22681     __pyx_v_end = values[3];
22682     __pyx_v_region = values[4];
22683   }
22684   goto __pyx_L4_argument_unpacking_done;
22685   __pyx_L5_argtuple_error:;
22686   __Pyx_RaiseArgtupleInvalid("fetch", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22687   __pyx_L3_error:;
22688   __Pyx_AddTraceback("cvcf.VCF.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
22689   __Pyx_RefNannyFinishContext();
22690   return NULL;
22691   __pyx_L4_argument_unpacking_done:;
22692   __pyx_r = __pyx_pf_4cvcf_3VCF_81fetch(__pyx_self, __pyx_v_self, __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region);
22693   __Pyx_RefNannyFinishContext();
22694   return __pyx_r;
22695 }
22696
22697 /* "cvcf.pyx":1021
22698  *         self._parse_header(self.tabixfile.header)
22699  * 
22700  *     def fetch(self,             # <<<<<<<<<<<<<<
22701  *               reference = None,
22702  *               start = None,
22703  */
22704
22705 static PyObject *__pyx_pf_4cvcf_3VCF_81fetch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region) {
22706   PyObject *__pyx_r = NULL;
22707   __Pyx_RefNannyDeclarations
22708   PyObject *__pyx_t_1 = NULL;
22709   PyObject *__pyx_t_2 = NULL;
22710   PyObject *__pyx_t_3 = NULL;
22711   PyObject *__pyx_t_4 = NULL;
22712   PyObject *__pyx_t_5 = NULL;
22713   int __pyx_lineno = 0;
22714   const char *__pyx_filename = NULL;
22715   int __pyx_clineno = 0;
22716   __Pyx_RefNannySetupContext("fetch", 0);
22717
22718   /* "cvcf.pyx":1028
22719  *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
22720  * 
22721  *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )             # <<<<<<<<<<<<<<
22722  * 
22723  *     def validate( self, record ):
22724  */
22725   __Pyx_XDECREF(__pyx_r);
22726   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__tabixfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22727   __Pyx_GOTREF(__pyx_t_1);
22728   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__fetch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22729   __Pyx_GOTREF(__pyx_t_2);
22730   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22731   __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22732   __Pyx_GOTREF(__pyx_t_1);
22733   __Pyx_INCREF(__pyx_v_reference);
22734   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference);
22735   __Pyx_GIVEREF(__pyx_v_reference);
22736   __Pyx_INCREF(__pyx_v_start);
22737   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
22738   __Pyx_GIVEREF(__pyx_v_start);
22739   __Pyx_INCREF(__pyx_v_end);
22740   PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_end);
22741   __Pyx_GIVEREF(__pyx_v_end);
22742   __Pyx_INCREF(__pyx_v_region);
22743   PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_region);
22744   __Pyx_GIVEREF(__pyx_v_region);
22745   __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22746   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
22747   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22748   __Pyx_GOTREF(__pyx_t_4);
22749   __Pyx_INCREF(__pyx_v_self);
22750   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self);
22751   __Pyx_GIVEREF(__pyx_v_self);
22752   __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cvcf_asVCFRecord)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22753   __Pyx_GOTREF(__pyx_t_5);
22754   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
22755   if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__parser), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22756   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22757   __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22758   __Pyx_GOTREF(__pyx_t_5);
22759   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22760   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
22761   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
22762   __pyx_r = __pyx_t_5;
22763   __pyx_t_5 = 0;
22764   goto __pyx_L0;
22765
22766   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22767   goto __pyx_L0;
22768   __pyx_L1_error:;
22769   __Pyx_XDECREF(__pyx_t_1);
22770   __Pyx_XDECREF(__pyx_t_2);
22771   __Pyx_XDECREF(__pyx_t_3);
22772   __Pyx_XDECREF(__pyx_t_4);
22773   __Pyx_XDECREF(__pyx_t_5);
22774   __Pyx_AddTraceback("cvcf.VCF.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
22775   __pyx_r = NULL;
22776   __pyx_L0:;
22777   __Pyx_XGIVEREF(__pyx_r);
22778   __Pyx_RefNannyFinishContext();
22779   return __pyx_r;
22780 }
22781
22782 /* Python wrapper */
22783 static PyObject *__pyx_pw_4cvcf_3VCF_84validate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22784 static char __pyx_doc_4cvcf_3VCF_83validate[] = "validate vcf record.\n\n        returns a validated record.\n        ";
22785 static PyMethodDef __pyx_mdef_4cvcf_3VCF_84validate = {__Pyx_NAMESTR("validate"), (PyCFunction)__pyx_pw_4cvcf_3VCF_84validate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_3VCF_83validate)};
22786 static PyObject *__pyx_pw_4cvcf_3VCF_84validate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22787   CYTHON_UNUSED PyObject *__pyx_v_self = 0;
22788   CYTHON_UNUSED PyObject *__pyx_v_record = 0;
22789   static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__record,0};
22790   PyObject *__pyx_r = 0;
22791   __Pyx_RefNannyDeclarations
22792   __Pyx_RefNannySetupContext("validate (wrapper)", 0);
22793   __pyx_self = __pyx_self;
22794   {
22795     PyObject* values[2] = {0,0};
22796     if (unlikely(__pyx_kwds)) {
22797       Py_ssize_t kw_args;
22798       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22799       switch (pos_args) {
22800         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22801         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22802         case  0: break;
22803         default: goto __pyx_L5_argtuple_error;
22804       }
22805       kw_args = PyDict_Size(__pyx_kwds);
22806       switch (pos_args) {
22807         case  0:
22808         values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
22809         if (likely(values[0])) kw_args--;
22810         else goto __pyx_L5_argtuple_error;
22811         case  1:
22812         values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__record);
22813         if (likely(values[1])) kw_args--;
22814         else {
22815           __Pyx_RaiseArgtupleInvalid("validate", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22816         }
22817       }
22818       if (unlikely(kw_args > 0)) {
22819         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "validate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22820       }
22821     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
22822       goto __pyx_L5_argtuple_error;
22823     } else {
22824       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22825       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22826     }
22827     __pyx_v_self = values[0];
22828     __pyx_v_record = values[1];
22829   }
22830   goto __pyx_L4_argument_unpacking_done;
22831   __pyx_L5_argtuple_error:;
22832   __Pyx_RaiseArgtupleInvalid("validate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
22833   __pyx_L3_error:;
22834   __Pyx_AddTraceback("cvcf.VCF.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
22835   __Pyx_RefNannyFinishContext();
22836   return NULL;
22837   __pyx_L4_argument_unpacking_done:;
22838   __pyx_r = __pyx_pf_4cvcf_3VCF_83validate(__pyx_self, __pyx_v_self, __pyx_v_record);
22839   __Pyx_RefNannyFinishContext();
22840   return __pyx_r;
22841 }
22842
22843 /* "cvcf.pyx":1030
22844  *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
22845  * 
22846  *     def validate( self, record ):             # <<<<<<<<<<<<<<
22847  *         '''validate vcf record.
22848  * 
22849  */
22850
22851 static PyObject *__pyx_pf_4cvcf_3VCF_83validate(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_record) {
22852   PyObject *__pyx_r = NULL;
22853   __Pyx_RefNannyDeclarations
22854   PyObject *__pyx_t_1 = NULL;
22855   int __pyx_lineno = 0;
22856   const char *__pyx_filename = NULL;
22857   int __pyx_clineno = 0;
22858   __Pyx_RefNannySetupContext("validate", 0);
22859
22860   /* "cvcf.pyx":1036
22861  *         '''
22862  * 
22863  *         raise NotImplementedError( "needs to be checked" )             # <<<<<<<<<<<<<<
22864  * 
22865  *         chrom, pos = record.chrom, record.pos
22866  */
22867   __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_127), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22868   __Pyx_GOTREF(__pyx_t_1);
22869   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
22870   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22871   {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22872
22873   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22874   goto __pyx_L0;
22875   __pyx_L1_error:;
22876   __Pyx_XDECREF(__pyx_t_1);
22877   __Pyx_AddTraceback("cvcf.VCF.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
22878   __pyx_r = NULL;
22879   __pyx_L0:;
22880   __Pyx_XGIVEREF(__pyx_r);
22881   __Pyx_RefNannyFinishContext();
22882   return __pyx_r;
22883 }
22884 static struct __pyx_vtabstruct_4cvcf_VCFRecord __pyx_vtable_4cvcf_VCFRecord;
22885
22886 static PyObject *__pyx_tp_new_4cvcf_VCFRecord(PyTypeObject *t, PyObject *a, PyObject *k) {
22887   struct __pyx_obj_4cvcf_VCFRecord *p;
22888   PyObject *o = __pyx_ptype_10TabProxies_TupleProxy->tp_new(t, a, k);
22889   if (!o) return 0;
22890   p = ((struct __pyx_obj_4cvcf_VCFRecord *)o);
22891   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_4cvcf_VCFRecord;
22892   p->vcf = Py_None; Py_INCREF(Py_None);
22893   if (__pyx_pw_4cvcf_9VCFRecord_3__cinit__(o, a, k) < 0) {
22894     Py_DECREF(o); o = 0;
22895   }
22896   return o;
22897 }
22898
22899 static void __pyx_tp_dealloc_4cvcf_VCFRecord(PyObject *o) {
22900   struct __pyx_obj_4cvcf_VCFRecord *p = (struct __pyx_obj_4cvcf_VCFRecord *)o;
22901   Py_XDECREF(p->vcf);
22902   __pyx_ptype_10TabProxies_TupleProxy->tp_dealloc(o);
22903 }
22904
22905 static int __pyx_tp_traverse_4cvcf_VCFRecord(PyObject *o, visitproc v, void *a) {
22906   int e;
22907   struct __pyx_obj_4cvcf_VCFRecord *p = (struct __pyx_obj_4cvcf_VCFRecord *)o;
22908   if (__pyx_ptype_10TabProxies_TupleProxy->tp_traverse) {
22909     e = __pyx_ptype_10TabProxies_TupleProxy->tp_traverse(o, v, a); if (e) return e;
22910   }
22911   if (p->vcf) {
22912     e = (*v)(p->vcf, a); if (e) return e;
22913   }
22914   return 0;
22915 }
22916
22917 static int __pyx_tp_clear_4cvcf_VCFRecord(PyObject *o) {
22918   struct __pyx_obj_4cvcf_VCFRecord *p = (struct __pyx_obj_4cvcf_VCFRecord *)o;
22919   PyObject* tmp;
22920   if (__pyx_ptype_10TabProxies_TupleProxy->tp_clear) {
22921     __pyx_ptype_10TabProxies_TupleProxy->tp_clear(o);
22922   }
22923   tmp = ((PyObject*)p->vcf);
22924   p->vcf = Py_None; Py_INCREF(Py_None);
22925   Py_XDECREF(tmp);
22926   return 0;
22927 }
22928 static PyObject *__pyx_sq_item_4cvcf_VCFRecord(PyObject *o, Py_ssize_t i) {
22929   PyObject *r;
22930   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
22931   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
22932   Py_DECREF(x);
22933   return r;
22934 }
22935
22936 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_contig(PyObject *o, void *x) {
22937   return __pyx_pw_4cvcf_9VCFRecord_6contig_1__get__(o);
22938 }
22939
22940 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_pos(PyObject *o, void *x) {
22941   return __pyx_pw_4cvcf_9VCFRecord_3pos_1__get__(o);
22942 }
22943
22944 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_id(PyObject *o, void *x) {
22945   return __pyx_pw_4cvcf_9VCFRecord_2id_1__get__(o);
22946 }
22947
22948 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_ref(PyObject *o, void *x) {
22949   return __pyx_pw_4cvcf_9VCFRecord_3ref_1__get__(o);
22950 }
22951
22952 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_alt(PyObject *o, void *x) {
22953   return __pyx_pw_4cvcf_9VCFRecord_3alt_1__get__(o);
22954 }
22955
22956 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_qual(PyObject *o, void *x) {
22957   return __pyx_pw_4cvcf_9VCFRecord_4qual_1__get__(o);
22958 }
22959
22960 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_filter(PyObject *o, void *x) {
22961   return __pyx_pw_4cvcf_9VCFRecord_6filter_1__get__(o);
22962 }
22963
22964 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_info(PyObject *o, void *x) {
22965   return __pyx_pw_4cvcf_9VCFRecord_4info_1__get__(o);
22966 }
22967
22968 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_format(PyObject *o, void *x) {
22969   return __pyx_pw_4cvcf_9VCFRecord_6format_1__get__(o);
22970 }
22971
22972 static PyObject *__pyx_getprop_4cvcf_9VCFRecord_samples(PyObject *o, void *x) {
22973   return __pyx_pw_4cvcf_9VCFRecord_7samples_1__get__(o);
22974 }
22975
22976 static PyMethodDef __pyx_methods_4cvcf_VCFRecord[] = {
22977   {__Pyx_NAMESTR("error"), (PyCFunction)__pyx_pw_4cvcf_9VCFRecord_5error, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cvcf_9VCFRecord_4error)},
22978   {0, 0, 0, 0}
22979 };
22980
22981 static struct PyGetSetDef __pyx_getsets_4cvcf_VCFRecord[] = {
22982   {(char *)"contig", __pyx_getprop_4cvcf_9VCFRecord_contig, 0, 0, 0},
22983   {(char *)"pos", __pyx_getprop_4cvcf_9VCFRecord_pos, 0, 0, 0},
22984   {(char *)"id", __pyx_getprop_4cvcf_9VCFRecord_id, 0, 0, 0},
22985   {(char *)"ref", __pyx_getprop_4cvcf_9VCFRecord_ref, 0, 0, 0},
22986   {(char *)"alt", __pyx_getprop_4cvcf_9VCFRecord_alt, 0, 0, 0},
22987   {(char *)"qual", __pyx_getprop_4cvcf_9VCFRecord_qual, 0, 0, 0},
22988   {(char *)"filter", __pyx_getprop_4cvcf_9VCFRecord_filter, 0, 0, 0},
22989   {(char *)"info", __pyx_getprop_4cvcf_9VCFRecord_info, 0, 0, 0},
22990   {(char *)"format", __pyx_getprop_4cvcf_9VCFRecord_format, 0, 0, 0},
22991   {(char *)"samples", __pyx_getprop_4cvcf_9VCFRecord_samples, 0, 0, 0},
22992   {0, 0, 0, 0, 0}
22993 };
22994
22995 static PyNumberMethods __pyx_tp_as_number_VCFRecord = {
22996   0, /*nb_add*/
22997   0, /*nb_subtract*/
22998   0, /*nb_multiply*/
22999   #if PY_MAJOR_VERSION < 3
23000   0, /*nb_divide*/
23001   #endif
23002   0, /*nb_remainder*/
23003   0, /*nb_divmod*/
23004   0, /*nb_power*/
23005   0, /*nb_negative*/
23006   0, /*nb_positive*/
23007   0, /*nb_absolute*/
23008   0, /*nb_nonzero*/
23009   0, /*nb_invert*/
23010   0, /*nb_lshift*/
23011   0, /*nb_rshift*/
23012   0, /*nb_and*/
23013   0, /*nb_xor*/
23014   0, /*nb_or*/
23015   #if PY_MAJOR_VERSION < 3
23016   0, /*nb_coerce*/
23017   #endif
23018   0, /*nb_int*/
23019   #if PY_MAJOR_VERSION < 3
23020   0, /*nb_long*/
23021   #else
23022   0, /*reserved*/
23023   #endif
23024   0, /*nb_float*/
23025   #if PY_MAJOR_VERSION < 3
23026   0, /*nb_oct*/
23027   #endif
23028   #if PY_MAJOR_VERSION < 3
23029   0, /*nb_hex*/
23030   #endif
23031   0, /*nb_inplace_add*/
23032   0, /*nb_inplace_subtract*/
23033   0, /*nb_inplace_multiply*/
23034   #if PY_MAJOR_VERSION < 3
23035   0, /*nb_inplace_divide*/
23036   #endif
23037   0, /*nb_inplace_remainder*/
23038   0, /*nb_inplace_power*/
23039   0, /*nb_inplace_lshift*/
23040   0, /*nb_inplace_rshift*/
23041   0, /*nb_inplace_and*/
23042   0, /*nb_inplace_xor*/
23043   0, /*nb_inplace_or*/
23044   0, /*nb_floor_divide*/
23045   0, /*nb_true_divide*/
23046   0, /*nb_inplace_floor_divide*/
23047   0, /*nb_inplace_true_divide*/
23048   #if PY_VERSION_HEX >= 0x02050000
23049   0, /*nb_index*/
23050   #endif
23051 };
23052
23053 static PySequenceMethods __pyx_tp_as_sequence_VCFRecord = {
23054   __pyx_pw_4cvcf_9VCFRecord_7__len__, /*sq_length*/
23055   0, /*sq_concat*/
23056   0, /*sq_repeat*/
23057   __pyx_sq_item_4cvcf_VCFRecord, /*sq_item*/
23058   0, /*sq_slice*/
23059   0, /*sq_ass_item*/
23060   0, /*sq_ass_slice*/
23061   0, /*sq_contains*/
23062   0, /*sq_inplace_concat*/
23063   0, /*sq_inplace_repeat*/
23064 };
23065
23066 static PyMappingMethods __pyx_tp_as_mapping_VCFRecord = {
23067   __pyx_pw_4cvcf_9VCFRecord_7__len__, /*mp_length*/
23068   __pyx_pw_4cvcf_9VCFRecord_9__getitem__, /*mp_subscript*/
23069   0, /*mp_ass_subscript*/
23070 };
23071
23072 static PyBufferProcs __pyx_tp_as_buffer_VCFRecord = {
23073   #if PY_MAJOR_VERSION < 3
23074   0, /*bf_getreadbuffer*/
23075   #endif
23076   #if PY_MAJOR_VERSION < 3
23077   0, /*bf_getwritebuffer*/
23078   #endif
23079   #if PY_MAJOR_VERSION < 3
23080   0, /*bf_getsegcount*/
23081   #endif
23082   #if PY_MAJOR_VERSION < 3
23083   0, /*bf_getcharbuffer*/
23084   #endif
23085   #if PY_VERSION_HEX >= 0x02060000
23086   0, /*bf_getbuffer*/
23087   #endif
23088   #if PY_VERSION_HEX >= 0x02060000
23089   0, /*bf_releasebuffer*/
23090   #endif
23091 };
23092
23093 static PyTypeObject __pyx_type_4cvcf_VCFRecord = {
23094   PyVarObject_HEAD_INIT(0, 0)
23095   __Pyx_NAMESTR("cvcf.VCFRecord"), /*tp_name*/
23096   sizeof(struct __pyx_obj_4cvcf_VCFRecord), /*tp_basicsize*/
23097   0, /*tp_itemsize*/
23098   __pyx_tp_dealloc_4cvcf_VCFRecord, /*tp_dealloc*/
23099   0, /*tp_print*/
23100   0, /*tp_getattr*/
23101   0, /*tp_setattr*/
23102   #if PY_MAJOR_VERSION < 3
23103   0, /*tp_compare*/
23104   #else
23105   0, /*reserved*/
23106   #endif
23107   0, /*tp_repr*/
23108   &__pyx_tp_as_number_VCFRecord, /*tp_as_number*/
23109   &__pyx_tp_as_sequence_VCFRecord, /*tp_as_sequence*/
23110   &__pyx_tp_as_mapping_VCFRecord, /*tp_as_mapping*/
23111   0, /*tp_hash*/
23112   0, /*tp_call*/
23113   0, /*tp_str*/
23114   0, /*tp_getattro*/
23115   0, /*tp_setattro*/
23116   &__pyx_tp_as_buffer_VCFRecord, /*tp_as_buffer*/
23117   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
23118   __Pyx_DOCSTR("vcf record.\n\n    initialized from data and vcf meta \n    "), /*tp_doc*/
23119   __pyx_tp_traverse_4cvcf_VCFRecord, /*tp_traverse*/
23120   __pyx_tp_clear_4cvcf_VCFRecord, /*tp_clear*/
23121   0, /*tp_richcompare*/
23122   0, /*tp_weaklistoffset*/
23123   0, /*tp_iter*/
23124   0, /*tp_iternext*/
23125   __pyx_methods_4cvcf_VCFRecord, /*tp_methods*/
23126   0, /*tp_members*/
23127   __pyx_getsets_4cvcf_VCFRecord, /*tp_getset*/
23128   0, /*tp_base*/
23129   0, /*tp_dict*/
23130   0, /*tp_descr_get*/
23131   0, /*tp_descr_set*/
23132   0, /*tp_dictoffset*/
23133   __pyx_pw_4cvcf_9VCFRecord_1__init__, /*tp_init*/
23134   0, /*tp_alloc*/
23135   __pyx_tp_new_4cvcf_VCFRecord, /*tp_new*/
23136   0, /*tp_free*/
23137   0, /*tp_is_gc*/
23138   0, /*tp_bases*/
23139   0, /*tp_mro*/
23140   0, /*tp_cache*/
23141   0, /*tp_subclasses*/
23142   0, /*tp_weaklist*/
23143   0, /*tp_del*/
23144   #if PY_VERSION_HEX >= 0x02060000
23145   0, /*tp_version_tag*/
23146   #endif
23147 };
23148
23149 static PyObject *__pyx_tp_new_4cvcf_asVCFRecord(PyTypeObject *t, PyObject *a, PyObject *k) {
23150   struct __pyx_obj_4cvcf_asVCFRecord *p;
23151   PyObject *o = __pyx_ptype_6ctabix_Parser->tp_new(t, a, k);
23152   if (!o) return 0;
23153   p = ((struct __pyx_obj_4cvcf_asVCFRecord *)o);
23154   p->vcffile = Py_None; Py_INCREF(Py_None);
23155   return o;
23156 }
23157
23158 static void __pyx_tp_dealloc_4cvcf_asVCFRecord(PyObject *o) {
23159   struct __pyx_obj_4cvcf_asVCFRecord *p = (struct __pyx_obj_4cvcf_asVCFRecord *)o;
23160   Py_XDECREF(p->vcffile);
23161   __pyx_ptype_6ctabix_Parser->tp_dealloc(o);
23162 }
23163
23164 static int __pyx_tp_traverse_4cvcf_asVCFRecord(PyObject *o, visitproc v, void *a) {
23165   int e;
23166   struct __pyx_obj_4cvcf_asVCFRecord *p = (struct __pyx_obj_4cvcf_asVCFRecord *)o;
23167   if (__pyx_ptype_6ctabix_Parser->tp_traverse) {
23168     e = __pyx_ptype_6ctabix_Parser->tp_traverse(o, v, a); if (e) return e;
23169   }
23170   if (p->vcffile) {
23171     e = (*v)(p->vcffile, a); if (e) return e;
23172   }
23173   return 0;
23174 }
23175
23176 static int __pyx_tp_clear_4cvcf_asVCFRecord(PyObject *o) {
23177   struct __pyx_obj_4cvcf_asVCFRecord *p = (struct __pyx_obj_4cvcf_asVCFRecord *)o;
23178   PyObject* tmp;
23179   if (__pyx_ptype_6ctabix_Parser->tp_clear) {
23180     __pyx_ptype_6ctabix_Parser->tp_clear(o);
23181   }
23182   tmp = ((PyObject*)p->vcffile);
23183   p->vcffile = Py_None; Py_INCREF(Py_None);
23184   Py_XDECREF(tmp);
23185   return 0;
23186 }
23187
23188 static PyMethodDef __pyx_methods_4cvcf_asVCFRecord[] = {
23189   {0, 0, 0, 0}
23190 };
23191
23192 static PyNumberMethods __pyx_tp_as_number_asVCFRecord = {
23193   0, /*nb_add*/
23194   0, /*nb_subtract*/
23195   0, /*nb_multiply*/
23196   #if PY_MAJOR_VERSION < 3
23197   0, /*nb_divide*/
23198   #endif
23199   0, /*nb_remainder*/
23200   0, /*nb_divmod*/
23201   0, /*nb_power*/
23202   0, /*nb_negative*/
23203   0, /*nb_positive*/
23204   0, /*nb_absolute*/
23205   0, /*nb_nonzero*/
23206   0, /*nb_invert*/
23207   0, /*nb_lshift*/
23208   0, /*nb_rshift*/
23209   0, /*nb_and*/
23210   0, /*nb_xor*/
23211   0, /*nb_or*/
23212   #if PY_MAJOR_VERSION < 3
23213   0, /*nb_coerce*/
23214   #endif
23215   0, /*nb_int*/
23216   #if PY_MAJOR_VERSION < 3
23217   0, /*nb_long*/
23218   #else
23219   0, /*reserved*/
23220   #endif
23221   0, /*nb_float*/
23222   #if PY_MAJOR_VERSION < 3
23223   0, /*nb_oct*/
23224   #endif
23225   #if PY_MAJOR_VERSION < 3
23226   0, /*nb_hex*/
23227   #endif
23228   0, /*nb_inplace_add*/
23229   0, /*nb_inplace_subtract*/
23230   0, /*nb_inplace_multiply*/
23231   #if PY_MAJOR_VERSION < 3
23232   0, /*nb_inplace_divide*/
23233   #endif
23234   0, /*nb_inplace_remainder*/
23235   0, /*nb_inplace_power*/
23236   0, /*nb_inplace_lshift*/
23237   0, /*nb_inplace_rshift*/
23238   0, /*nb_inplace_and*/
23239   0, /*nb_inplace_xor*/
23240   0, /*nb_inplace_or*/
23241   0, /*nb_floor_divide*/
23242   0, /*nb_true_divide*/
23243   0, /*nb_inplace_floor_divide*/
23244   0, /*nb_inplace_true_divide*/
23245   #if PY_VERSION_HEX >= 0x02050000
23246   0, /*nb_index*/
23247   #endif
23248 };
23249
23250 static PySequenceMethods __pyx_tp_as_sequence_asVCFRecord = {
23251   0, /*sq_length*/
23252   0, /*sq_concat*/
23253   0, /*sq_repeat*/
23254   0, /*sq_item*/
23255   0, /*sq_slice*/
23256   0, /*sq_ass_item*/
23257   0, /*sq_ass_slice*/
23258   0, /*sq_contains*/
23259   0, /*sq_inplace_concat*/
23260   0, /*sq_inplace_repeat*/
23261 };
23262
23263 static PyMappingMethods __pyx_tp_as_mapping_asVCFRecord = {
23264   0, /*mp_length*/
23265   0, /*mp_subscript*/
23266   0, /*mp_ass_subscript*/
23267 };
23268
23269 static PyBufferProcs __pyx_tp_as_buffer_asVCFRecord = {
23270   #if PY_MAJOR_VERSION < 3
23271   0, /*bf_getreadbuffer*/
23272   #endif
23273   #if PY_MAJOR_VERSION < 3
23274   0, /*bf_getwritebuffer*/
23275   #endif
23276   #if PY_MAJOR_VERSION < 3
23277   0, /*bf_getsegcount*/
23278   #endif
23279   #if PY_MAJOR_VERSION < 3
23280   0, /*bf_getcharbuffer*/
23281   #endif
23282   #if PY_VERSION_HEX >= 0x02060000
23283   0, /*bf_getbuffer*/
23284   #endif
23285   #if PY_VERSION_HEX >= 0x02060000
23286   0, /*bf_releasebuffer*/
23287   #endif
23288 };
23289
23290 static PyTypeObject __pyx_type_4cvcf_asVCFRecord = {
23291   PyVarObject_HEAD_INIT(0, 0)
23292   __Pyx_NAMESTR("cvcf.asVCFRecord"), /*tp_name*/
23293   sizeof(struct __pyx_obj_4cvcf_asVCFRecord), /*tp_basicsize*/
23294   0, /*tp_itemsize*/
23295   __pyx_tp_dealloc_4cvcf_asVCFRecord, /*tp_dealloc*/
23296   0, /*tp_print*/
23297   0, /*tp_getattr*/
23298   0, /*tp_setattr*/
23299   #if PY_MAJOR_VERSION < 3
23300   0, /*tp_compare*/
23301   #else
23302   0, /*reserved*/
23303   #endif
23304   0, /*tp_repr*/
23305   &__pyx_tp_as_number_asVCFRecord, /*tp_as_number*/
23306   &__pyx_tp_as_sequence_asVCFRecord, /*tp_as_sequence*/
23307   &__pyx_tp_as_mapping_asVCFRecord, /*tp_as_mapping*/
23308   0, /*tp_hash*/
23309   __pyx_pw_4cvcf_11asVCFRecord_3__call__, /*tp_call*/
23310   0, /*tp_str*/
23311   0, /*tp_getattro*/
23312   0, /*tp_setattro*/
23313   &__pyx_tp_as_buffer_asVCFRecord, /*tp_as_buffer*/
23314   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
23315   __Pyx_DOCSTR("converts a :term:`tabix row` into a VCF record."), /*tp_doc*/
23316   __pyx_tp_traverse_4cvcf_asVCFRecord, /*tp_traverse*/
23317   __pyx_tp_clear_4cvcf_asVCFRecord, /*tp_clear*/
23318   0, /*tp_richcompare*/
23319   0, /*tp_weaklistoffset*/
23320   0, /*tp_iter*/
23321   0, /*tp_iternext*/
23322   __pyx_methods_4cvcf_asVCFRecord, /*tp_methods*/
23323   0, /*tp_members*/
23324   0, /*tp_getset*/
23325   0, /*tp_base*/
23326   0, /*tp_dict*/
23327   0, /*tp_descr_get*/
23328   0, /*tp_descr_set*/
23329   0, /*tp_dictoffset*/
23330   __pyx_pw_4cvcf_11asVCFRecord_1__init__, /*tp_init*/
23331   0, /*tp_alloc*/
23332   __pyx_tp_new_4cvcf_asVCFRecord, /*tp_new*/
23333   0, /*tp_free*/
23334   0, /*tp_is_gc*/
23335   0, /*tp_bases*/
23336   0, /*tp_mro*/
23337   0, /*tp_cache*/
23338   0, /*tp_subclasses*/
23339   0, /*tp_weaklist*/
23340   0, /*tp_del*/
23341   #if PY_VERSION_HEX >= 0x02060000
23342   0, /*tp_version_tag*/
23343   #endif
23344 };
23345
23346 static PyObject *__pyx_tp_new_4cvcf___pyx_scope_struct__parse_data(PyTypeObject *t, PyObject *a, PyObject *k) {
23347   struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *p;
23348   PyObject *o = (*t->tp_alloc)(t, 0);
23349   if (!o) return 0;
23350   p = ((struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *)o);
23351   p->__pyx_v_alt = 0;
23352   return o;
23353 }
23354
23355 static void __pyx_tp_dealloc_4cvcf___pyx_scope_struct__parse_data(PyObject *o) {
23356   struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *p = (struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *)o;
23357   Py_XDECREF(p->__pyx_v_alt);
23358   (*Py_TYPE(o)->tp_free)(o);
23359 }
23360
23361 static int __pyx_tp_traverse_4cvcf___pyx_scope_struct__parse_data(PyObject *o, visitproc v, void *a) {
23362   int e;
23363   struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *p = (struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *)o;
23364   if (p->__pyx_v_alt) {
23365     e = (*v)(p->__pyx_v_alt, a); if (e) return e;
23366   }
23367   return 0;
23368 }
23369
23370 static int __pyx_tp_clear_4cvcf___pyx_scope_struct__parse_data(PyObject *o) {
23371   struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *p = (struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *)o;
23372   PyObject* tmp;
23373   tmp = ((PyObject*)p->__pyx_v_alt);
23374   p->__pyx_v_alt = Py_None; Py_INCREF(Py_None);
23375   Py_XDECREF(tmp);
23376   return 0;
23377 }
23378
23379 static PyMethodDef __pyx_methods_4cvcf___pyx_scope_struct__parse_data[] = {
23380   {0, 0, 0, 0}
23381 };
23382
23383 static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct__parse_data = {
23384   0, /*nb_add*/
23385   0, /*nb_subtract*/
23386   0, /*nb_multiply*/
23387   #if PY_MAJOR_VERSION < 3
23388   0, /*nb_divide*/
23389   #endif
23390   0, /*nb_remainder*/
23391   0, /*nb_divmod*/
23392   0, /*nb_power*/
23393   0, /*nb_negative*/
23394   0, /*nb_positive*/
23395   0, /*nb_absolute*/
23396   0, /*nb_nonzero*/
23397   0, /*nb_invert*/
23398   0, /*nb_lshift*/
23399   0, /*nb_rshift*/
23400   0, /*nb_and*/
23401   0, /*nb_xor*/
23402   0, /*nb_or*/
23403   #if PY_MAJOR_VERSION < 3
23404   0, /*nb_coerce*/
23405   #endif
23406   0, /*nb_int*/
23407   #if PY_MAJOR_VERSION < 3
23408   0, /*nb_long*/
23409   #else
23410   0, /*reserved*/
23411   #endif
23412   0, /*nb_float*/
23413   #if PY_MAJOR_VERSION < 3
23414   0, /*nb_oct*/
23415   #endif
23416   #if PY_MAJOR_VERSION < 3
23417   0, /*nb_hex*/
23418   #endif
23419   0, /*nb_inplace_add*/
23420   0, /*nb_inplace_subtract*/
23421   0, /*nb_inplace_multiply*/
23422   #if PY_MAJOR_VERSION < 3
23423   0, /*nb_inplace_divide*/
23424   #endif
23425   0, /*nb_inplace_remainder*/
23426   0, /*nb_inplace_power*/
23427   0, /*nb_inplace_lshift*/
23428   0, /*nb_inplace_rshift*/
23429   0, /*nb_inplace_and*/
23430   0, /*nb_inplace_xor*/
23431   0, /*nb_inplace_or*/
23432   0, /*nb_floor_divide*/
23433   0, /*nb_true_divide*/
23434   0, /*nb_inplace_floor_divide*/
23435   0, /*nb_inplace_true_divide*/
23436   #if PY_VERSION_HEX >= 0x02050000
23437   0, /*nb_index*/
23438   #endif
23439 };
23440
23441 static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct__parse_data = {
23442   0, /*sq_length*/
23443   0, /*sq_concat*/
23444   0, /*sq_repeat*/
23445   0, /*sq_item*/
23446   0, /*sq_slice*/
23447   0, /*sq_ass_item*/
23448   0, /*sq_ass_slice*/
23449   0, /*sq_contains*/
23450   0, /*sq_inplace_concat*/
23451   0, /*sq_inplace_repeat*/
23452 };
23453
23454 static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct__parse_data = {
23455   0, /*mp_length*/
23456   0, /*mp_subscript*/
23457   0, /*mp_ass_subscript*/
23458 };
23459
23460 static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct__parse_data = {
23461   #if PY_MAJOR_VERSION < 3
23462   0, /*bf_getreadbuffer*/
23463   #endif
23464   #if PY_MAJOR_VERSION < 3
23465   0, /*bf_getwritebuffer*/
23466   #endif
23467   #if PY_MAJOR_VERSION < 3
23468   0, /*bf_getsegcount*/
23469   #endif
23470   #if PY_MAJOR_VERSION < 3
23471   0, /*bf_getcharbuffer*/
23472   #endif
23473   #if PY_VERSION_HEX >= 0x02060000
23474   0, /*bf_getbuffer*/
23475   #endif
23476   #if PY_VERSION_HEX >= 0x02060000
23477   0, /*bf_releasebuffer*/
23478   #endif
23479 };
23480
23481 static PyTypeObject __pyx_type_4cvcf___pyx_scope_struct__parse_data = {
23482   PyVarObject_HEAD_INIT(0, 0)
23483   __Pyx_NAMESTR("cvcf.__pyx_scope_struct__parse_data"), /*tp_name*/
23484   sizeof(struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data), /*tp_basicsize*/
23485   0, /*tp_itemsize*/
23486   __pyx_tp_dealloc_4cvcf___pyx_scope_struct__parse_data, /*tp_dealloc*/
23487   0, /*tp_print*/
23488   0, /*tp_getattr*/
23489   0, /*tp_setattr*/
23490   #if PY_MAJOR_VERSION < 3
23491   0, /*tp_compare*/
23492   #else
23493   0, /*reserved*/
23494   #endif
23495   0, /*tp_repr*/
23496   &__pyx_tp_as_number___pyx_scope_struct__parse_data, /*tp_as_number*/
23497   &__pyx_tp_as_sequence___pyx_scope_struct__parse_data, /*tp_as_sequence*/
23498   &__pyx_tp_as_mapping___pyx_scope_struct__parse_data, /*tp_as_mapping*/
23499   0, /*tp_hash*/
23500   0, /*tp_call*/
23501   0, /*tp_str*/
23502   0, /*tp_getattro*/
23503   0, /*tp_setattro*/
23504   &__pyx_tp_as_buffer___pyx_scope_struct__parse_data, /*tp_as_buffer*/
23505   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
23506   0, /*tp_doc*/
23507   __pyx_tp_traverse_4cvcf___pyx_scope_struct__parse_data, /*tp_traverse*/
23508   __pyx_tp_clear_4cvcf___pyx_scope_struct__parse_data, /*tp_clear*/
23509   0, /*tp_richcompare*/
23510   0, /*tp_weaklistoffset*/
23511   0, /*tp_iter*/
23512   0, /*tp_iternext*/
23513   __pyx_methods_4cvcf___pyx_scope_struct__parse_data, /*tp_methods*/
23514   0, /*tp_members*/
23515   0, /*tp_getset*/
23516   0, /*tp_base*/
23517   0, /*tp_dict*/
23518   0, /*tp_descr_get*/
23519   0, /*tp_descr_set*/
23520   0, /*tp_dictoffset*/
23521   0, /*tp_init*/
23522   0, /*tp_alloc*/
23523   __pyx_tp_new_4cvcf___pyx_scope_struct__parse_data, /*tp_new*/
23524   0, /*tp_free*/
23525   0, /*tp_is_gc*/
23526   0, /*tp_bases*/
23527   0, /*tp_mro*/
23528   0, /*tp_cache*/
23529   0, /*tp_subclasses*/
23530   0, /*tp_weaklist*/
23531   0, /*tp_del*/
23532   #if PY_VERSION_HEX >= 0x02060000
23533   0, /*tp_version_tag*/
23534   #endif
23535 };
23536
23537 static PyObject *__pyx_tp_new_4cvcf___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k) {
23538   struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *p;
23539   PyObject *o = (*t->tp_alloc)(t, 0);
23540   if (!o) return 0;
23541   p = ((struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *)o);
23542   p->__pyx_outer_scope = 0;
23543   p->__pyx_v_allele = 0;
23544   p->__pyx_t_0 = 0;
23545   return o;
23546 }
23547
23548 static void __pyx_tp_dealloc_4cvcf___pyx_scope_struct_1_genexpr(PyObject *o) {
23549   struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *)o;
23550   Py_XDECREF(((PyObject *)p->__pyx_outer_scope));
23551   Py_XDECREF(p->__pyx_v_allele);
23552   Py_XDECREF(p->__pyx_t_0);
23553   (*Py_TYPE(o)->tp_free)(o);
23554 }
23555
23556 static int __pyx_tp_traverse_4cvcf___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
23557   int e;
23558   struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *)o;
23559   if (p->__pyx_outer_scope) {
23560     e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
23561   }
23562   if (p->__pyx_v_allele) {
23563     e = (*v)(p->__pyx_v_allele, a); if (e) return e;
23564   }
23565   if (p->__pyx_t_0) {
23566     e = (*v)(p->__pyx_t_0, a); if (e) return e;
23567   }
23568   return 0;
23569 }
23570
23571 static int __pyx_tp_clear_4cvcf___pyx_scope_struct_1_genexpr(PyObject *o) {
23572   struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr *)o;
23573   PyObject* tmp;
23574   tmp = ((PyObject*)p->__pyx_outer_scope);
23575   p->__pyx_outer_scope = ((struct __pyx_obj_4cvcf___pyx_scope_struct__parse_data *)Py_None); Py_INCREF(Py_None);
23576   Py_XDECREF(tmp);
23577   tmp = ((PyObject*)p->__pyx_v_allele);
23578   p->__pyx_v_allele = Py_None; Py_INCREF(Py_None);
23579   Py_XDECREF(tmp);
23580   tmp = ((PyObject*)p->__pyx_t_0);
23581   p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
23582   Py_XDECREF(tmp);
23583   return 0;
23584 }
23585
23586 static PyMethodDef __pyx_methods_4cvcf___pyx_scope_struct_1_genexpr[] = {
23587   {0, 0, 0, 0}
23588 };
23589
23590 static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_1_genexpr = {
23591   0, /*nb_add*/
23592   0, /*nb_subtract*/
23593   0, /*nb_multiply*/
23594   #if PY_MAJOR_VERSION < 3
23595   0, /*nb_divide*/
23596   #endif
23597   0, /*nb_remainder*/
23598   0, /*nb_divmod*/
23599   0, /*nb_power*/
23600   0, /*nb_negative*/
23601   0, /*nb_positive*/
23602   0, /*nb_absolute*/
23603   0, /*nb_nonzero*/
23604   0, /*nb_invert*/
23605   0, /*nb_lshift*/
23606   0, /*nb_rshift*/
23607   0, /*nb_and*/
23608   0, /*nb_xor*/
23609   0, /*nb_or*/
23610   #if PY_MAJOR_VERSION < 3
23611   0, /*nb_coerce*/
23612   #endif
23613   0, /*nb_int*/
23614   #if PY_MAJOR_VERSION < 3
23615   0, /*nb_long*/
23616   #else
23617   0, /*reserved*/
23618   #endif
23619   0, /*nb_float*/
23620   #if PY_MAJOR_VERSION < 3
23621   0, /*nb_oct*/
23622   #endif
23623   #if PY_MAJOR_VERSION < 3
23624   0, /*nb_hex*/
23625   #endif
23626   0, /*nb_inplace_add*/
23627   0, /*nb_inplace_subtract*/
23628   0, /*nb_inplace_multiply*/
23629   #if PY_MAJOR_VERSION < 3
23630   0, /*nb_inplace_divide*/
23631   #endif
23632   0, /*nb_inplace_remainder*/
23633   0, /*nb_inplace_power*/
23634   0, /*nb_inplace_lshift*/
23635   0, /*nb_inplace_rshift*/
23636   0, /*nb_inplace_and*/
23637   0, /*nb_inplace_xor*/
23638   0, /*nb_inplace_or*/
23639   0, /*nb_floor_divide*/
23640   0, /*nb_true_divide*/
23641   0, /*nb_inplace_floor_divide*/
23642   0, /*nb_inplace_true_divide*/
23643   #if PY_VERSION_HEX >= 0x02050000
23644   0, /*nb_index*/
23645   #endif
23646 };
23647
23648 static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_1_genexpr = {
23649   0, /*sq_length*/
23650   0, /*sq_concat*/
23651   0, /*sq_repeat*/
23652   0, /*sq_item*/
23653   0, /*sq_slice*/
23654   0, /*sq_ass_item*/
23655   0, /*sq_ass_slice*/
23656   0, /*sq_contains*/
23657   0, /*sq_inplace_concat*/
23658   0, /*sq_inplace_repeat*/
23659 };
23660
23661 static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_1_genexpr = {
23662   0, /*mp_length*/
23663   0, /*mp_subscript*/
23664   0, /*mp_ass_subscript*/
23665 };
23666
23667 static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_1_genexpr = {
23668   #if PY_MAJOR_VERSION < 3
23669   0, /*bf_getreadbuffer*/
23670   #endif
23671   #if PY_MAJOR_VERSION < 3
23672   0, /*bf_getwritebuffer*/
23673   #endif
23674   #if PY_MAJOR_VERSION < 3
23675   0, /*bf_getsegcount*/
23676   #endif
23677   #if PY_MAJOR_VERSION < 3
23678   0, /*bf_getcharbuffer*/
23679   #endif
23680   #if PY_VERSION_HEX >= 0x02060000
23681   0, /*bf_getbuffer*/
23682   #endif
23683   #if PY_VERSION_HEX >= 0x02060000
23684   0, /*bf_releasebuffer*/
23685   #endif
23686 };
23687
23688 static PyTypeObject __pyx_type_4cvcf___pyx_scope_struct_1_genexpr = {
23689   PyVarObject_HEAD_INIT(0, 0)
23690   __Pyx_NAMESTR("cvcf.__pyx_scope_struct_1_genexpr"), /*tp_name*/
23691   sizeof(struct __pyx_obj_4cvcf___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
23692   0, /*tp_itemsize*/
23693   __pyx_tp_dealloc_4cvcf___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
23694   0, /*tp_print*/
23695   0, /*tp_getattr*/
23696   0, /*tp_setattr*/
23697   #if PY_MAJOR_VERSION < 3
23698   0, /*tp_compare*/
23699   #else
23700   0, /*reserved*/
23701   #endif
23702   0, /*tp_repr*/
23703   &__pyx_tp_as_number___pyx_scope_struct_1_genexpr, /*tp_as_number*/
23704   &__pyx_tp_as_sequence___pyx_scope_struct_1_genexpr, /*tp_as_sequence*/
23705   &__pyx_tp_as_mapping___pyx_scope_struct_1_genexpr, /*tp_as_mapping*/
23706   0, /*tp_hash*/
23707   0, /*tp_call*/
23708   0, /*tp_str*/
23709   0, /*tp_getattro*/
23710   0, /*tp_setattro*/
23711   &__pyx_tp_as_buffer___pyx_scope_struct_1_genexpr, /*tp_as_buffer*/
23712   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
23713   0, /*tp_doc*/
23714   __pyx_tp_traverse_4cvcf___pyx_scope_struct_1_genexpr, /*tp_traverse*/
23715   __pyx_tp_clear_4cvcf___pyx_scope_struct_1_genexpr, /*tp_clear*/
23716   0, /*tp_richcompare*/
23717   0, /*tp_weaklistoffset*/
23718   0, /*tp_iter*/
23719   0, /*tp_iternext*/
23720   __pyx_methods_4cvcf___pyx_scope_struct_1_genexpr, /*tp_methods*/
23721   0, /*tp_members*/
23722   0, /*tp_getset*/
23723   0, /*tp_base*/
23724   0, /*tp_dict*/
23725   0, /*tp_descr_get*/
23726   0, /*tp_descr_set*/
23727   0, /*tp_dictoffset*/
23728   0, /*tp_init*/
23729   0, /*tp_alloc*/
23730   __pyx_tp_new_4cvcf___pyx_scope_struct_1_genexpr, /*tp_new*/
23731   0, /*tp_free*/
23732   0, /*tp_is_gc*/
23733   0, /*tp_bases*/
23734   0, /*tp_mro*/
23735   0, /*tp_cache*/
23736   0, /*tp_subclasses*/
23737   0, /*tp_weaklist*/
23738   0, /*tp_del*/
23739   #if PY_VERSION_HEX >= 0x02060000
23740   0, /*tp_version_tag*/
23741   #endif
23742 };
23743
23744 static PyObject *__pyx_tp_new_4cvcf___pyx_scope_struct_2__parse(PyTypeObject *t, PyObject *a, PyObject *k) {
23745   struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *p;
23746   PyObject *o = (*t->tp_alloc)(t, 0);
23747   if (!o) return 0;
23748   p = ((struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *)o);
23749   p->__pyx_v_d = 0;
23750   p->__pyx_v_line = 0;
23751   p->__pyx_v_self = 0;
23752   p->__pyx_v_stream = 0;
23753   p->__pyx_t_1 = 0;
23754   return o;
23755 }
23756
23757 static void __pyx_tp_dealloc_4cvcf___pyx_scope_struct_2__parse(PyObject *o) {
23758   struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *p = (struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *)o;
23759   Py_XDECREF(p->__pyx_v_d);
23760   Py_XDECREF(p->__pyx_v_line);
23761   Py_XDECREF(p->__pyx_v_self);
23762   Py_XDECREF(p->__pyx_v_stream);
23763   Py_XDECREF(p->__pyx_t_1);
23764   (*Py_TYPE(o)->tp_free)(o);
23765 }
23766
23767 static int __pyx_tp_traverse_4cvcf___pyx_scope_struct_2__parse(PyObject *o, visitproc v, void *a) {
23768   int e;
23769   struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *p = (struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *)o;
23770   if (p->__pyx_v_d) {
23771     e = (*v)(p->__pyx_v_d, a); if (e) return e;
23772   }
23773   if (p->__pyx_v_line) {
23774     e = (*v)(p->__pyx_v_line, a); if (e) return e;
23775   }
23776   if (p->__pyx_v_self) {
23777     e = (*v)(p->__pyx_v_self, a); if (e) return e;
23778   }
23779   if (p->__pyx_v_stream) {
23780     e = (*v)(p->__pyx_v_stream, a); if (e) return e;
23781   }
23782   if (p->__pyx_t_1) {
23783     e = (*v)(p->__pyx_t_1, a); if (e) return e;
23784   }
23785   return 0;
23786 }
23787
23788 static int __pyx_tp_clear_4cvcf___pyx_scope_struct_2__parse(PyObject *o) {
23789   struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *p = (struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse *)o;
23790   PyObject* tmp;
23791   tmp = ((PyObject*)p->__pyx_v_d);
23792   p->__pyx_v_d = Py_None; Py_INCREF(Py_None);
23793   Py_XDECREF(tmp);
23794   tmp = ((PyObject*)p->__pyx_v_line);
23795   p->__pyx_v_line = Py_None; Py_INCREF(Py_None);
23796   Py_XDECREF(tmp);
23797   tmp = ((PyObject*)p->__pyx_v_self);
23798   p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
23799   Py_XDECREF(tmp);
23800   tmp = ((PyObject*)p->__pyx_v_stream);
23801   p->__pyx_v_stream = Py_None; Py_INCREF(Py_None);
23802   Py_XDECREF(tmp);
23803   tmp = ((PyObject*)p->__pyx_t_1);
23804   p->__pyx_t_1 = Py_None; Py_INCREF(Py_None);
23805   Py_XDECREF(tmp);
23806   return 0;
23807 }
23808
23809 static PyMethodDef __pyx_methods_4cvcf___pyx_scope_struct_2__parse[] = {
23810   {0, 0, 0, 0}
23811 };
23812
23813 static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_2__parse = {
23814   0, /*nb_add*/
23815   0, /*nb_subtract*/
23816   0, /*nb_multiply*/
23817   #if PY_MAJOR_VERSION < 3
23818   0, /*nb_divide*/
23819   #endif
23820   0, /*nb_remainder*/
23821   0, /*nb_divmod*/
23822   0, /*nb_power*/
23823   0, /*nb_negative*/
23824   0, /*nb_positive*/
23825   0, /*nb_absolute*/
23826   0, /*nb_nonzero*/
23827   0, /*nb_invert*/
23828   0, /*nb_lshift*/
23829   0, /*nb_rshift*/
23830   0, /*nb_and*/
23831   0, /*nb_xor*/
23832   0, /*nb_or*/
23833   #if PY_MAJOR_VERSION < 3
23834   0, /*nb_coerce*/
23835   #endif
23836   0, /*nb_int*/
23837   #if PY_MAJOR_VERSION < 3
23838   0, /*nb_long*/
23839   #else
23840   0, /*reserved*/
23841   #endif
23842   0, /*nb_float*/
23843   #if PY_MAJOR_VERSION < 3
23844   0, /*nb_oct*/
23845   #endif
23846   #if PY_MAJOR_VERSION < 3
23847   0, /*nb_hex*/
23848   #endif
23849   0, /*nb_inplace_add*/
23850   0, /*nb_inplace_subtract*/
23851   0, /*nb_inplace_multiply*/
23852   #if PY_MAJOR_VERSION < 3
23853   0, /*nb_inplace_divide*/
23854   #endif
23855   0, /*nb_inplace_remainder*/
23856   0, /*nb_inplace_power*/
23857   0, /*nb_inplace_lshift*/
23858   0, /*nb_inplace_rshift*/
23859   0, /*nb_inplace_and*/
23860   0, /*nb_inplace_xor*/
23861   0, /*nb_inplace_or*/
23862   0, /*nb_floor_divide*/
23863   0, /*nb_true_divide*/
23864   0, /*nb_inplace_floor_divide*/
23865   0, /*nb_inplace_true_divide*/
23866   #if PY_VERSION_HEX >= 0x02050000
23867   0, /*nb_index*/
23868   #endif
23869 };
23870
23871 static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_2__parse = {
23872   0, /*sq_length*/
23873   0, /*sq_concat*/
23874   0, /*sq_repeat*/
23875   0, /*sq_item*/
23876   0, /*sq_slice*/
23877   0, /*sq_ass_item*/
23878   0, /*sq_ass_slice*/
23879   0, /*sq_contains*/
23880   0, /*sq_inplace_concat*/
23881   0, /*sq_inplace_repeat*/
23882 };
23883
23884 static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_2__parse = {
23885   0, /*mp_length*/
23886   0, /*mp_subscript*/
23887   0, /*mp_ass_subscript*/
23888 };
23889
23890 static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_2__parse = {
23891   #if PY_MAJOR_VERSION < 3
23892   0, /*bf_getreadbuffer*/
23893   #endif
23894   #if PY_MAJOR_VERSION < 3
23895   0, /*bf_getwritebuffer*/
23896   #endif
23897   #if PY_MAJOR_VERSION < 3
23898   0, /*bf_getsegcount*/
23899   #endif
23900   #if PY_MAJOR_VERSION < 3
23901   0, /*bf_getcharbuffer*/
23902   #endif
23903   #if PY_VERSION_HEX >= 0x02060000
23904   0, /*bf_getbuffer*/
23905   #endif
23906   #if PY_VERSION_HEX >= 0x02060000
23907   0, /*bf_releasebuffer*/
23908   #endif
23909 };
23910
23911 static PyTypeObject __pyx_type_4cvcf___pyx_scope_struct_2__parse = {
23912   PyVarObject_HEAD_INIT(0, 0)
23913   __Pyx_NAMESTR("cvcf.__pyx_scope_struct_2__parse"), /*tp_name*/
23914   sizeof(struct __pyx_obj_4cvcf___pyx_scope_struct_2__parse), /*tp_basicsize*/
23915   0, /*tp_itemsize*/
23916   __pyx_tp_dealloc_4cvcf___pyx_scope_struct_2__parse, /*tp_dealloc*/
23917   0, /*tp_print*/
23918   0, /*tp_getattr*/
23919   0, /*tp_setattr*/
23920   #if PY_MAJOR_VERSION < 3
23921   0, /*tp_compare*/
23922   #else
23923   0, /*reserved*/
23924   #endif
23925   0, /*tp_repr*/
23926   &__pyx_tp_as_number___pyx_scope_struct_2__parse, /*tp_as_number*/
23927   &__pyx_tp_as_sequence___pyx_scope_struct_2__parse, /*tp_as_sequence*/
23928   &__pyx_tp_as_mapping___pyx_scope_struct_2__parse, /*tp_as_mapping*/
23929   0, /*tp_hash*/
23930   0, /*tp_call*/
23931   0, /*tp_str*/
23932   0, /*tp_getattro*/
23933   0, /*tp_setattro*/
23934   &__pyx_tp_as_buffer___pyx_scope_struct_2__parse, /*tp_as_buffer*/
23935   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
23936   0, /*tp_doc*/
23937   __pyx_tp_traverse_4cvcf___pyx_scope_struct_2__parse, /*tp_traverse*/
23938   __pyx_tp_clear_4cvcf___pyx_scope_struct_2__parse, /*tp_clear*/
23939   0, /*tp_richcompare*/
23940   0, /*tp_weaklistoffset*/
23941   0, /*tp_iter*/
23942   0, /*tp_iternext*/
23943   __pyx_methods_4cvcf___pyx_scope_struct_2__parse, /*tp_methods*/
23944   0, /*tp_members*/
23945   0, /*tp_getset*/
23946   0, /*tp_base*/
23947   0, /*tp_dict*/
23948   0, /*tp_descr_get*/
23949   0, /*tp_descr_set*/
23950   0, /*tp_dictoffset*/
23951   0, /*tp_init*/
23952   0, /*tp_alloc*/
23953   __pyx_tp_new_4cvcf___pyx_scope_struct_2__parse, /*tp_new*/
23954   0, /*tp_free*/
23955   0, /*tp_is_gc*/
23956   0, /*tp_bases*/
23957   0, /*tp_mro*/
23958   0, /*tp_cache*/
23959   0, /*tp_subclasses*/
23960   0, /*tp_weaklist*/
23961   0, /*tp_del*/
23962   #if PY_VERSION_HEX >= 0x02060000
23963   0, /*tp_version_tag*/
23964   #endif
23965 };
23966
23967 static PyMethodDef __pyx_methods[] = {
23968   {0, 0, 0, 0}
23969 };
23970
23971 #if PY_MAJOR_VERSION >= 3
23972 static struct PyModuleDef __pyx_moduledef = {
23973     PyModuleDef_HEAD_INIT,
23974     __Pyx_NAMESTR("cvcf"),
23975     0, /* m_doc */
23976     -1, /* m_size */
23977     __pyx_methods /* m_methods */,
23978     NULL, /* m_reload */
23979     NULL, /* m_traverse */
23980     NULL, /* m_clear */
23981     NULL /* m_free */
23982 };
23983 #endif
23984
23985 static __Pyx_StringTabEntry __pyx_string_tab[] = {
23986   {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
23987   {&__pyx_n_s_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 1, 1},
23988   {&__pyx_n_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 1},
23989   {&__pyx_n_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 1},
23990   {&__pyx_n_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 1},
23991   {&__pyx_kp_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 0},
23992   {&__pyx_kp_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 0},
23993   {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
23994   {&__pyx_n_s_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 1, 1},
23995   {&__pyx_kp_s_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 0, 1, 0},
23996   {&__pyx_n_s_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 1, 1},
23997   {&__pyx_kp_s_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 1, 0},
23998   {&__pyx_n_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 1},
23999   {&__pyx_kp_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 0},
24000   {&__pyx_kp_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 0},
24001   {&__pyx_kp_s_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 1, 0},
24002   {&__pyx_kp_s_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 1, 0},
24003   {&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 0},
24004   {&__pyx_kp_s_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 1, 0},
24005   {&__pyx_kp_s_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 1, 0},
24006   {&__pyx_kp_s_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 1, 0},
24007   {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
24008   {&__pyx_kp_s_140, __pyx_k_140, sizeof(__pyx_k_140), 0, 0, 1, 0},
24009   {&__pyx_kp_s_141, __pyx_k_141, sizeof(__pyx_k_141), 0, 0, 1, 0},
24010   {&__pyx_kp_s_142, __pyx_k_142, sizeof(__pyx_k_142), 0, 0, 1, 0},
24011   {&__pyx_kp_s_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 1, 0},
24012   {&__pyx_kp_s_144, __pyx_k_144, sizeof(__pyx_k_144), 0, 0, 1, 0},
24013   {&__pyx_kp_s_145, __pyx_k_145, sizeof(__pyx_k_145), 0, 0, 1, 0},
24014   {&__pyx_kp_s_146, __pyx_k_146, sizeof(__pyx_k_146), 0, 0, 1, 0},
24015   {&__pyx_kp_s_147, __pyx_k_147, sizeof(__pyx_k_147), 0, 0, 1, 0},
24016   {&__pyx_kp_s_148, __pyx_k_148, sizeof(__pyx_k_148), 0, 0, 1, 0},
24017   {&__pyx_kp_s_149, __pyx_k_149, sizeof(__pyx_k_149), 0, 0, 1, 0},
24018   {&__pyx_kp_s_150, __pyx_k_150, sizeof(__pyx_k_150), 0, 0, 1, 0},
24019   {&__pyx_kp_s_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 1, 0},
24020   {&__pyx_kp_s_152, __pyx_k_152, sizeof(__pyx_k_152), 0, 0, 1, 0},
24021   {&__pyx_kp_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 0},
24022   {&__pyx_kp_s_154, __pyx_k_154, sizeof(__pyx_k_154), 0, 0, 1, 0},
24023   {&__pyx_kp_s_155, __pyx_k_155, sizeof(__pyx_k_155), 0, 0, 1, 0},
24024   {&__pyx_kp_s_156, __pyx_k_156, sizeof(__pyx_k_156), 0, 0, 1, 0},
24025   {&__pyx_kp_s_157, __pyx_k_157, sizeof(__pyx_k_157), 0, 0, 1, 0},
24026   {&__pyx_kp_s_158, __pyx_k_158, sizeof(__pyx_k_158), 0, 0, 1, 0},
24027   {&__pyx_kp_s_159, __pyx_k_159, sizeof(__pyx_k_159), 0, 0, 1, 0},
24028   {&__pyx_kp_s_160, __pyx_k_160, sizeof(__pyx_k_160), 0, 0, 1, 0},
24029   {&__pyx_kp_s_161, __pyx_k_161, sizeof(__pyx_k_161), 0, 0, 1, 0},
24030   {&__pyx_kp_s_162, __pyx_k_162, sizeof(__pyx_k_162), 0, 0, 1, 0},
24031   {&__pyx_kp_s_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 0, 1, 0},
24032   {&__pyx_kp_s_164, __pyx_k_164, sizeof(__pyx_k_164), 0, 0, 1, 0},
24033   {&__pyx_kp_s_165, __pyx_k_165, sizeof(__pyx_k_165), 0, 0, 1, 0},
24034   {&__pyx_kp_s_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 1, 0},
24035   {&__pyx_kp_s_167, __pyx_k_167, sizeof(__pyx_k_167), 0, 0, 1, 0},
24036   {&__pyx_kp_s_168, __pyx_k_168, sizeof(__pyx_k_168), 0, 0, 1, 0},
24037   {&__pyx_kp_s_169, __pyx_k_169, sizeof(__pyx_k_169), 0, 0, 1, 0},
24038   {&__pyx_kp_s_170, __pyx_k_170, sizeof(__pyx_k_170), 0, 0, 1, 0},
24039   {&__pyx_kp_s_171, __pyx_k_171, sizeof(__pyx_k_171), 0, 0, 1, 0},
24040   {&__pyx_kp_s_172, __pyx_k_172, sizeof(__pyx_k_172), 0, 0, 1, 0},
24041   {&__pyx_n_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 1},
24042   {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
24043   {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
24044   {&__pyx_n_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 1},
24045   {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
24046   {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
24047   {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
24048   {&__pyx_n_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 1},
24049   {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
24050   {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
24051   {&__pyx_n_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 1},
24052   {&__pyx_n_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 1},
24053   {&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
24054   {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
24055   {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
24056   {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0},
24057   {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0},
24058   {&__pyx_n_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 1},
24059   {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0},
24060   {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0},
24061   {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0},
24062   {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0},
24063   {&__pyx_n_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 1},
24064   {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0},
24065   {&__pyx_kp_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 0},
24066   {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
24067   {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
24068   {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0},
24069   {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0},
24070   {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0},
24071   {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
24072   {&__pyx_kp_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 0},
24073   {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0},
24074   {&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 0},
24075   {&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0},
24076   {&__pyx_kp_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 0},
24077   {&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0},
24078   {&__pyx_kp_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 0},
24079   {&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 0},
24080   {&__pyx_kp_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 0},
24081   {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0},
24082   {&__pyx_kp_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 0},
24083   {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
24084   {&__pyx_kp_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 0},
24085   {&__pyx_kp_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 0},
24086   {&__pyx_n_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 1},
24087   {&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0},
24088   {&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0},
24089   {&__pyx_kp_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 0},
24090   {&__pyx_kp_s_88, __pyx_k_88, sizeof(__pyx_k_88), 0, 0, 1, 0},
24091   {&__pyx_kp_b_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 0, 0},
24092   {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
24093   {&__pyx_n_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 1},
24094   {&__pyx_kp_s_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 1, 0},
24095   {&__pyx_kp_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 0},
24096   {&__pyx_n_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 1},
24097   {&__pyx_kp_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 0},
24098   {&__pyx_kp_s_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 0, 1, 0},
24099   {&__pyx_n_s_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 0, 1, 1},
24100   {&__pyx_kp_b__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 0, 0},
24101   {&__pyx_kp_s__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 1, 0},
24102   {&__pyx_n_s__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1},
24103   {&__pyx_n_s__ACGTN, __pyx_k__ACGTN, sizeof(__pyx_k__ACGTN), 0, 0, 1, 1},
24104   {&__pyx_n_s__ALT, __pyx_k__ALT, sizeof(__pyx_k__ALT), 0, 0, 1, 1},
24105   {&__pyx_n_s__BAD_GENOTYPE, __pyx_k__BAD_GENOTYPE, sizeof(__pyx_k__BAD_GENOTYPE), 0, 0, 1, 1},
24106   {&__pyx_n_s__CHROM, __pyx_k__CHROM, sizeof(__pyx_k__CHROM), 0, 0, 1, 1},
24107   {&__pyx_n_s__Character, __pyx_k__Character, sizeof(__pyx_k__Character), 0, 0, 1, 1},
24108   {&__pyx_n_s__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 1, 1},
24109   {&__pyx_n_s__DP, __pyx_k__DP, sizeof(__pyx_k__DP), 0, 0, 1, 1},
24110   {&__pyx_n_s__Description, __pyx_k__Description, sizeof(__pyx_k__Description), 0, 0, 1, 1},
24111   {&__pyx_n_s__EC, __pyx_k__EC, sizeof(__pyx_k__EC), 0, 0, 1, 1},
24112   {&__pyx_n_s__ERROR_INFO_STRING, __pyx_k__ERROR_INFO_STRING, sizeof(__pyx_k__ERROR_INFO_STRING), 0, 0, 1, 1},
24113   {&__pyx_n_s__ERROR_TRAILING_DATA, __pyx_k__ERROR_TRAILING_DATA, sizeof(__pyx_k__ERROR_TRAILING_DATA), 0, 0, 1, 1},
24114   {&__pyx_n_s__ERROR_UNKNOWN_KEY, __pyx_k__ERROR_UNKNOWN_KEY, sizeof(__pyx_k__ERROR_UNKNOWN_KEY), 0, 0, 1, 1},
24115   {&__pyx_n_s__Error, __pyx_k__Error, sizeof(__pyx_k__Error), 0, 0, 1, 1},
24116   {&__pyx_n_s__FILTER, __pyx_k__FILTER, sizeof(__pyx_k__FILTER), 0, 0, 1, 1},
24117   {&__pyx_n_s__FILTER_NOT_DEFINED, __pyx_k__FILTER_NOT_DEFINED, sizeof(__pyx_k__FILTER_NOT_DEFINED), 0, 0, 1, 1},
24118   {&__pyx_n_s__FORMAT, __pyx_k__FORMAT, sizeof(__pyx_k__FORMAT), 0, 0, 1, 1},
24119   {&__pyx_n_s__FORMAT_NOT_DEFINED, __pyx_k__FORMAT_NOT_DEFINED, sizeof(__pyx_k__FORMAT_NOT_DEFINED), 0, 0, 1, 1},
24120   {&__pyx_n_s__FT, __pyx_k__FT, sizeof(__pyx_k__FT), 0, 0, 1, 1},
24121   {&__pyx_n_s__Flag, __pyx_k__Flag, sizeof(__pyx_k__Flag), 0, 0, 1, 1},
24122   {&__pyx_n_s__Float, __pyx_k__Float, sizeof(__pyx_k__Float), 0, 0, 1, 1},
24123   {&__pyx_n_s__G, __pyx_k__G, sizeof(__pyx_k__G), 0, 0, 1, 1},
24124   {&__pyx_n_s__GL, __pyx_k__GL, sizeof(__pyx_k__GL), 0, 0, 1, 1},
24125   {&__pyx_n_s__GLE, __pyx_k__GLE, sizeof(__pyx_k__GLE), 0, 0, 1, 1},
24126   {&__pyx_n_s__GP, __pyx_k__GP, sizeof(__pyx_k__GP), 0, 0, 1, 1},
24127   {&__pyx_n_s__GQ, __pyx_k__GQ, sizeof(__pyx_k__GQ), 0, 0, 1, 1},
24128   {&__pyx_n_s__GT, __pyx_k__GT, sizeof(__pyx_k__GT), 0, 0, 1, 1},
24129   {&__pyx_n_s__GTdata, __pyx_k__GTdata, sizeof(__pyx_k__GTdata), 0, 0, 1, 1},
24130   {&__pyx_n_s__GTstring, __pyx_k__GTstring, sizeof(__pyx_k__GTstring), 0, 0, 1, 1},
24131   {&__pyx_n_s__Genotype, __pyx_k__Genotype, sizeof(__pyx_k__Genotype), 0, 0, 1, 1},
24132   {&__pyx_n_s__HQ, __pyx_k__HQ, sizeof(__pyx_k__HQ), 0, 0, 1, 1},
24133   {&__pyx_n_s__I, __pyx_k__I, sizeof(__pyx_k__I), 0, 0, 1, 1},
24134   {&__pyx_n_s__ID, __pyx_k__ID, sizeof(__pyx_k__ID), 0, 0, 1, 1},
24135   {&__pyx_n_s__INFO, __pyx_k__INFO, sizeof(__pyx_k__INFO), 0, 0, 1, 1},
24136   {&__pyx_n_s__Integer, __pyx_k__Integer, sizeof(__pyx_k__Integer), 0, 0, 1, 1},
24137   {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
24138   {&__pyx_n_s__MISSING_REF, __pyx_k__MISSING_REF, sizeof(__pyx_k__MISSING_REF), 0, 0, 1, 1},
24139   {&__pyx_n_s__MQ, __pyx_k__MQ, sizeof(__pyx_k__MQ), 0, 0, 1, 1},
24140   {&__pyx_n_s__N, __pyx_k__N, sizeof(__pyx_k__N), 0, 0, 1, 1},
24141   {&__pyx_n_s__NT_ALLELES, __pyx_k__NT_ALLELES, sizeof(__pyx_k__NT_ALLELES), 0, 0, 1, 1},
24142   {&__pyx_n_s__NT_GENOTYPES, __pyx_k__NT_GENOTYPES, sizeof(__pyx_k__NT_GENOTYPES), 0, 0, 1, 1},
24143   {&__pyx_n_s__NT_NR_ALLELES, __pyx_k__NT_NR_ALLELES, sizeof(__pyx_k__NT_NR_ALLELES), 0, 0, 1, 1},
24144   {&__pyx_n_s__NT_NUMBER, __pyx_k__NT_NUMBER, sizeof(__pyx_k__NT_NUMBER), 0, 0, 1, 1},
24145   {&__pyx_n_s__NT_PHASED_GENOTYPES, __pyx_k__NT_PHASED_GENOTYPES, sizeof(__pyx_k__NT_PHASED_GENOTYPES), 0, 0, 1, 1},
24146   {&__pyx_n_s__NT_UNKNOWN, __pyx_k__NT_UNKNOWN, sizeof(__pyx_k__NT_UNKNOWN), 0, 0, 1, 1},
24147   {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1},
24148   {&__pyx_n_s__Number, __pyx_k__Number, sizeof(__pyx_k__Number), 0, 0, 1, 1},
24149   {&__pyx_n_b__PASS, __pyx_k__PASS, sizeof(__pyx_k__PASS), 0, 0, 0, 1},
24150   {&__pyx_n_s__PASS, __pyx_k__PASS, sizeof(__pyx_k__PASS), 0, 0, 1, 1},
24151   {&__pyx_n_s__PL, __pyx_k__PL, sizeof(__pyx_k__PL), 0, 0, 1, 1},
24152   {&__pyx_n_s__POS, __pyx_k__POS, sizeof(__pyx_k__POS), 0, 0, 1, 1},
24153   {&__pyx_n_s__POS_NOT_NUMERICAL, __pyx_k__POS_NOT_NUMERICAL, sizeof(__pyx_k__POS_NOT_NUMERICAL), 0, 0, 1, 1},
24154   {&__pyx_n_s__POS_NOT_POSITIVE, __pyx_k__POS_NOT_POSITIVE, sizeof(__pyx_k__POS_NOT_POSITIVE), 0, 0, 1, 1},
24155   {&__pyx_n_s__PQ, __pyx_k__PQ, sizeof(__pyx_k__PQ), 0, 0, 1, 1},
24156   {&__pyx_n_s__PS, __pyx_k__PS, sizeof(__pyx_k__PS), 0, 0, 1, 1},
24157   {&__pyx_n_s__QUAL, __pyx_k__QUAL, sizeof(__pyx_k__QUAL), 0, 0, 1, 1},
24158   {&__pyx_n_s__QUAL_NOT_NUMERICAL, __pyx_k__QUAL_NOT_NUMERICAL, sizeof(__pyx_k__QUAL_NOT_NUMERICAL), 0, 0, 1, 1},
24159   {&__pyx_n_s__REF, __pyx_k__REF, sizeof(__pyx_k__REF), 0, 0, 1, 1},
24160   {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
24161   {&__pyx_n_s__String, __pyx_k__String, sizeof(__pyx_k__String), 0, 0, 1, 1},
24162   {&__pyx_n_s__Tabixfile, __pyx_k__Tabixfile, sizeof(__pyx_k__Tabixfile), 0, 0, 1, 1},
24163   {&__pyx_n_s__Type, __pyx_k__Type, sizeof(__pyx_k__Type), 0, 0, 1, 1},
24164   {&__pyx_n_s__UNKNOWN_CHAR_IN_REF, __pyx_k__UNKNOWN_CHAR_IN_REF, sizeof(__pyx_k__UNKNOWN_CHAR_IN_REF), 0, 0, 1, 1},
24165   {&__pyx_n_s__V33_BAD_ALLELE, __pyx_k__V33_BAD_ALLELE, sizeof(__pyx_k__V33_BAD_ALLELE), 0, 0, 1, 1},
24166   {&__pyx_n_s__V33_BAD_REF, __pyx_k__V33_BAD_REF, sizeof(__pyx_k__V33_BAD_REF), 0, 0, 1, 1},
24167   {&__pyx_n_s__V40_BAD_ALLELE, __pyx_k__V40_BAD_ALLELE, sizeof(__pyx_k__V40_BAD_ALLELE), 0, 0, 1, 1},
24168   {&__pyx_n_s__VCF, __pyx_k__VCF, sizeof(__pyx_k__VCF), 0, 0, 1, 1},
24169   {&__pyx_n_s__VCFRecord, __pyx_k__VCFRecord, sizeof(__pyx_k__VCFRecord), 0, 0, 1, 1},
24170   {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
24171   {&__pyx_n_s__WRONG_REF, __pyx_k__WRONG_REF, sizeof(__pyx_k__WRONG_REF), 0, 0, 1, 1},
24172   {&__pyx_n_s__Warning, __pyx_k__Warning, sizeof(__pyx_k__Warning), 0, 0, 1, 1},
24173   {&__pyx_n_s__ZERO_LENGTH_ALLELE, __pyx_k__ZERO_LENGTH_ALLELE, sizeof(__pyx_k__ZERO_LENGTH_ALLELE), 0, 0, 1, 1},
24174   {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1},
24175   {&__pyx_n_s____dict__, __pyx_k____dict__, sizeof(__pyx_k____dict__), 0, 0, 1, 1},
24176   {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1},
24177   {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
24178   {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
24179   {&__pyx_n_s___add_definition, __pyx_k___add_definition, sizeof(__pyx_k___add_definition), 0, 0, 1, 1},
24180   {&__pyx_n_s___copy, __pyx_k___copy, sizeof(__pyx_k___copy), 0, 0, 1, 1},
24181   {&__pyx_n_s___errors, __pyx_k___errors, sizeof(__pyx_k___errors), 0, 0, 1, 1},
24182   {&__pyx_n_s___filter, __pyx_k___filter, sizeof(__pyx_k___filter), 0, 0, 1, 1},
24183   {&__pyx_n_s___format, __pyx_k___format, sizeof(__pyx_k___format), 0, 0, 1, 1},
24184   {&__pyx_n_s___header, __pyx_k___header, sizeof(__pyx_k___header), 0, 0, 1, 1},
24185   {&__pyx_n_s___ignored_errors, __pyx_k___ignored_errors, sizeof(__pyx_k___ignored_errors), 0, 0, 1, 1},
24186   {&__pyx_n_s___info, __pyx_k___info, sizeof(__pyx_k___info), 0, 0, 1, 1},
24187   {&__pyx_n_s___leftalign, __pyx_k___leftalign, sizeof(__pyx_k___leftalign), 0, 0, 1, 1},
24188   {&__pyx_n_s___line, __pyx_k___line, sizeof(__pyx_k___line), 0, 0, 1, 1},
24189   {&__pyx_n_s___lineno, __pyx_k___lineno, sizeof(__pyx_k___lineno), 0, 0, 1, 1},
24190   {&__pyx_n_s___lines, __pyx_k___lines, sizeof(__pyx_k___lines), 0, 0, 1, 1},
24191   {&__pyx_n_s___parse, __pyx_k___parse, sizeof(__pyx_k___parse), 0, 0, 1, 1},
24192   {&__pyx_n_s___parse_header, __pyx_k___parse_header, sizeof(__pyx_k___parse_header), 0, 0, 1, 1},
24193   {&__pyx_n_s___reference, __pyx_k___reference, sizeof(__pyx_k___reference), 0, 0, 1, 1},
24194   {&__pyx_n_s___regions, __pyx_k___regions, sizeof(__pyx_k___regions), 0, 0, 1, 1},
24195   {&__pyx_n_s___required, __pyx_k___required, sizeof(__pyx_k___required), 0, 0, 1, 1},
24196   {&__pyx_n_s___sample2column, __pyx_k___sample2column, sizeof(__pyx_k___sample2column), 0, 0, 1, 1},
24197   {&__pyx_n_s___samples, __pyx_k___samples, sizeof(__pyx_k___samples), 0, 0, 1, 1},
24198   {&__pyx_n_s___version, __pyx_k___version, sizeof(__pyx_k___version), 0, 0, 1, 1},
24199   {&__pyx_n_s___warn_errors, __pyx_k___warn_errors, sizeof(__pyx_k___warn_errors), 0, 0, 1, 1},
24200   {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
24201   {&__pyx_n_s__add, __pyx_k__add, sizeof(__pyx_k__add), 0, 0, 1, 1},
24202   {&__pyx_n_s__addn, __pyx_k__addn, sizeof(__pyx_k__addn), 0, 0, 1, 1},
24203   {&__pyx_n_s__addns, __pyx_k__addns, sizeof(__pyx_k__addns), 0, 0, 1, 1},
24204   {&__pyx_n_s__allele, __pyx_k__allele, sizeof(__pyx_k__allele), 0, 0, 1, 1},
24205   {&__pyx_n_s__alleleRegEx, __pyx_k__alleleRegEx, sizeof(__pyx_k__alleleRegEx), 0, 0, 1, 1},
24206   {&__pyx_n_s__alt, __pyx_k__alt, sizeof(__pyx_k__alt), 0, 0, 1, 1},
24207   {&__pyx_n_s__alt1, __pyx_k__alt1, sizeof(__pyx_k__alt1), 0, 0, 1, 1},
24208   {&__pyx_n_s__alt2, __pyx_k__alt2, sizeof(__pyx_k__alt2), 0, 0, 1, 1},
24209   {&__pyx_n_s__bisect, __pyx_k__bisect, sizeof(__pyx_k__bisect), 0, 0, 1, 1},
24210   {&__pyx_n_s__blurp, __pyx_k__blurp, sizeof(__pyx_k__blurp), 0, 0, 1, 1},
24211   {&__pyx_n_s__buffer, __pyx_k__buffer, sizeof(__pyx_k__buffer), 0, 0, 1, 1},
24212   {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1},
24213   {&__pyx_n_s__chrom, __pyx_k__chrom, sizeof(__pyx_k__chrom), 0, 0, 1, 1},
24214   {&__pyx_n_s__collections, __pyx_k__collections, sizeof(__pyx_k__collections), 0, 0, 1, 1},
24215   {&__pyx_n_s__cols, __pyx_k__cols, sizeof(__pyx_k__cols), 0, 0, 1, 1},
24216   {&__pyx_n_s__compare_calls, __pyx_k__compare_calls, sizeof(__pyx_k__compare_calls), 0, 0, 1, 1},
24217   {&__pyx_n_s__compile, __pyx_k__compile, sizeof(__pyx_k__compile), 0, 0, 1, 1},
24218   {&__pyx_n_s__connect, __pyx_k__connect, sizeof(__pyx_k__connect), 0, 0, 1, 1},
24219   {&__pyx_n_s__convertGT, __pyx_k__convertGT, sizeof(__pyx_k__convertGT), 0, 0, 1, 1},
24220   {&__pyx_n_s__convertGTback, __pyx_k__convertGTback, sizeof(__pyx_k__convertGTback), 0, 0, 1, 1},
24221   {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
24222   {&__pyx_n_s__cvcf, __pyx_k__cvcf, sizeof(__pyx_k__cvcf), 0, 0, 1, 1},
24223   {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1},
24224   {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
24225   {&__pyx_n_s__datagenerator, __pyx_k__datagenerator, sizeof(__pyx_k__datagenerator), 0, 0, 1, 1},
24226   {&__pyx_n_s__deepcopy, __pyx_k__deepcopy, sizeof(__pyx_k__deepcopy), 0, 0, 1, 1},
24227   {&__pyx_n_s__defaultdict, __pyx_k__defaultdict, sizeof(__pyx_k__defaultdict), 0, 0, 1, 1},
24228   {&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 0, 0, 1, 1},
24229   {&__pyx_n_s__description, __pyx_k__description, sizeof(__pyx_k__description), 0, 0, 1, 1},
24230   {&__pyx_n_s__dict, __pyx_k__dict, sizeof(__pyx_k__dict), 0, 0, 1, 1},
24231   {&__pyx_n_s__elts, __pyx_k__elts, sizeof(__pyx_k__elts), 0, 0, 1, 1},
24232   {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
24233   {&__pyx_n_s__endswith, __pyx_k__endswith, sizeof(__pyx_k__endswith), 0, 0, 1, 1},
24234   {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1},
24235   {&__pyx_n_s__err, __pyx_k__err, sizeof(__pyx_k__err), 0, 0, 1, 1},
24236   {&__pyx_n_s__error, __pyx_k__error, sizeof(__pyx_k__error), 0, 0, 1, 1},
24237   {&__pyx_n_s__errorlabel, __pyx_k__errorlabel, sizeof(__pyx_k__errorlabel), 0, 0, 1, 1},
24238   {&__pyx_n_s__errorstring, __pyx_k__errorstring, sizeof(__pyx_k__errorstring), 0, 0, 1, 1},
24239   {&__pyx_n_s__errwarn, __pyx_k__errwarn, sizeof(__pyx_k__errwarn), 0, 0, 1, 1},
24240   {&__pyx_n_s__expected, __pyx_k__expected, sizeof(__pyx_k__expected), 0, 0, 1, 1},
24241   {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1},
24242   {&__pyx_n_s__fa, __pyx_k__fa, sizeof(__pyx_k__fa), 0, 0, 1, 1},
24243   {&__pyx_n_s__faref, __pyx_k__faref, sizeof(__pyx_k__faref), 0, 0, 1, 1},
24244   {&__pyx_n_s__faref_leftflank, __pyx_k__faref_leftflank, sizeof(__pyx_k__faref_leftflank), 0, 0, 1, 1},
24245   {&__pyx_n_s__fetch, __pyx_k__fetch, sizeof(__pyx_k__fetch), 0, 0, 1, 1},
24246   {&__pyx_n_s__fileformat, __pyx_k__fileformat, sizeof(__pyx_k__fileformat), 0, 0, 1, 1},
24247   {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
24248   {&__pyx_n_s__filter, __pyx_k__filter, sizeof(__pyx_k__filter), 0, 0, 1, 1},
24249   {&__pyx_n_s__find, __pyx_k__find, sizeof(__pyx_k__find), 0, 0, 1, 1},
24250   {&__pyx_n_s__first, __pyx_k__first, sizeof(__pyx_k__first), 0, 0, 1, 1},
24251   {&__pyx_n_s__fmt, __pyx_k__fmt, sizeof(__pyx_k__fmt), 0, 0, 1, 1},
24252   {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
24253   {&__pyx_n_s__format_format, __pyx_k__format_format, sizeof(__pyx_k__format_format), 0, 0, 1, 1},
24254   {&__pyx_n_s__format_formatdata, __pyx_k__format_formatdata, sizeof(__pyx_k__format_formatdata), 0, 0, 1, 1},
24255   {&__pyx_n_s__formatdict, __pyx_k__formatdict, sizeof(__pyx_k__formatdict), 0, 0, 1, 1},
24256   {&__pyx_n_s__genexpr, __pyx_k__genexpr, sizeof(__pyx_k__genexpr), 0, 0, 1, 1},
24257   {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1},
24258   {&__pyx_n_s__get_expected, __pyx_k__get_expected, sizeof(__pyx_k__get_expected), 0, 0, 1, 1},
24259   {&__pyx_n_s__get_sequence, __pyx_k__get_sequence, sizeof(__pyx_k__get_sequence), 0, 0, 1, 1},
24260   {&__pyx_n_s__getfilter, __pyx_k__getfilter, sizeof(__pyx_k__getfilter), 0, 0, 1, 1},
24261   {&__pyx_n_s__getformat, __pyx_k__getformat, sizeof(__pyx_k__getformat), 0, 0, 1, 1},
24262   {&__pyx_n_s__getheader, __pyx_k__getheader, sizeof(__pyx_k__getheader), 0, 0, 1, 1},
24263   {&__pyx_n_s__getinfo, __pyx_k__getinfo, sizeof(__pyx_k__getinfo), 0, 0, 1, 1},
24264   {&__pyx_n_s__getsamples, __pyx_k__getsamples, sizeof(__pyx_k__getsamples), 0, 0, 1, 1},
24265   {&__pyx_n_s__gts, __pyx_k__gts, sizeof(__pyx_k__gts), 0, 0, 1, 1},
24266   {&__pyx_n_s__gtsRegEx, __pyx_k__gtsRegEx, sizeof(__pyx_k__gtsRegEx), 0, 0, 1, 1},
24267   {&__pyx_n_s__have_deletions, __pyx_k__have_deletions, sizeof(__pyx_k__have_deletions), 0, 0, 1, 1},
24268   {&__pyx_n_s__header, __pyx_k__header, sizeof(__pyx_k__header), 0, 0, 1, 1},
24269   {&__pyx_n_s__headings, __pyx_k__headings, sizeof(__pyx_k__headings), 0, 0, 1, 1},
24270   {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1},
24271   {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
24272   {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 0, 0, 1, 1},
24273   {&__pyx_n_s__ielts, __pyx_k__ielts, sizeof(__pyx_k__ielts), 0, 0, 1, 1},
24274   {&__pyx_n_s__ignoreerror, __pyx_k__ignoreerror, sizeof(__pyx_k__ignoreerror), 0, 0, 1, 1},
24275   {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1},
24276   {&__pyx_n_s__inregion, __pyx_k__inregion, sizeof(__pyx_k__inregion), 0, 0, 1, 1},
24277   {&__pyx_n_s__itemgetter, __pyx_k__itemgetter, sizeof(__pyx_k__itemgetter), 0, 0, 1, 1},
24278   {&__pyx_n_s__itervalues, __pyx_k__itervalues, sizeof(__pyx_k__itervalues), 0, 0, 1, 1},
24279   {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
24280   {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1},
24281   {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1},
24282   {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1},
24283   {&__pyx_n_s__l, __pyx_k__l, sizeof(__pyx_k__l), 0, 0, 1, 1},
24284   {&__pyx_n_s__label, __pyx_k__label, sizeof(__pyx_k__label), 0, 0, 1, 1},
24285   {&__pyx_n_s__last, __pyx_k__last, sizeof(__pyx_k__last), 0, 0, 1, 1},
24286   {&__pyx_n_s__last_line, __pyx_k__last_line, sizeof(__pyx_k__last_line), 0, 0, 1, 1},
24287   {&__pyx_n_s__left, __pyx_k__left, sizeof(__pyx_k__left), 0, 0, 1, 1},
24288   {&__pyx_n_s__leftalign, __pyx_k__leftalign, sizeof(__pyx_k__leftalign), 0, 0, 1, 1},
24289   {&__pyx_n_s__len, __pyx_k__len, sizeof(__pyx_k__len), 0, 0, 1, 1},
24290   {&__pyx_n_s__line, __pyx_k__line, sizeof(__pyx_k__line), 0, 0, 1, 1},
24291   {&__pyx_n_s__lineparse, __pyx_k__lineparse, sizeof(__pyx_k__lineparse), 0, 0, 1, 1},
24292   {&__pyx_n_s__lines, __pyx_k__lines, sizeof(__pyx_k__lines), 0, 0, 1, 1},
24293   {&__pyx_n_s__longest, __pyx_k__longest, sizeof(__pyx_k__longest), 0, 0, 1, 1},
24294   {&__pyx_n_s__map, __pyx_k__map, sizeof(__pyx_k__map), 0, 0, 1, 1},
24295   {&__pyx_n_s__match, __pyx_k__match, sizeof(__pyx_k__match), 0, 0, 1, 1},
24296   {&__pyx_n_s__min, __pyx_k__min, sizeof(__pyx_k__min), 0, 0, 1, 1},
24297   {&__pyx_n_s__missing, __pyx_k__missing, sizeof(__pyx_k__missing), 0, 0, 1, 1},
24298   {&__pyx_n_s__missingvalue, __pyx_k__missingvalue, sizeof(__pyx_k__missingvalue), 0, 0, 1, 1},
24299   {&__pyx_n_s__movable, __pyx_k__movable, sizeof(__pyx_k__movable), 0, 0, 1, 1},
24300   {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
24301   {&__pyx_n_s__na, __pyx_k__na, sizeof(__pyx_k__na), 0, 0, 1, 1},
24302   {&__pyx_n_s__namedtuple, __pyx_k__namedtuple, sizeof(__pyx_k__namedtuple), 0, 0, 1, 1},
24303   {&__pyx_n_s__newalts, __pyx_k__newalts, sizeof(__pyx_k__newalts), 0, 0, 1, 1},
24304   {&__pyx_n_s__nmb, __pyx_k__nmb, sizeof(__pyx_k__nmb), 0, 0, 1, 1},
24305   {&__pyx_n_s__number, __pyx_k__number, sizeof(__pyx_k__number), 0, 0, 1, 1},
24306   {&__pyx_n_s__numbertype, __pyx_k__numbertype, sizeof(__pyx_k__numbertype), 0, 0, 1, 1},
24307   {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
24308   {&__pyx_n_s__operator, __pyx_k__operator, sizeof(__pyx_k__operator), 0, 0, 1, 1},
24309   {&__pyx_n_s__opt, __pyx_k__opt, sizeof(__pyx_k__opt), 0, 0, 1, 1},
24310   {&__pyx_n_s__output, __pyx_k__output, sizeof(__pyx_k__output), 0, 0, 1, 1},
24311   {&__pyx_n_s__parse, __pyx_k__parse, sizeof(__pyx_k__parse), 0, 0, 1, 1},
24312   {&__pyx_n_s__parse_data, __pyx_k__parse_data, sizeof(__pyx_k__parse_data), 0, 0, 1, 1},
24313   {&__pyx_n_s__parse_format, __pyx_k__parse_format, sizeof(__pyx_k__parse_format), 0, 0, 1, 1},
24314   {&__pyx_n_s__parse_formatdata, __pyx_k__parse_formatdata, sizeof(__pyx_k__parse_formatdata), 0, 0, 1, 1},
24315   {&__pyx_n_s__parse_header, __pyx_k__parse_header, sizeof(__pyx_k__parse_header), 0, 0, 1, 1},
24316   {&__pyx_n_s__parse_heading, __pyx_k__parse_heading, sizeof(__pyx_k__parse_heading), 0, 0, 1, 1},
24317   {&__pyx_n_s__parse_regions, __pyx_k__parse_regions, sizeof(__pyx_k__parse_regions), 0, 0, 1, 1},
24318   {&__pyx_n_s__parser, __pyx_k__parser, sizeof(__pyx_k__parser), 0, 0, 1, 1},
24319   {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
24320   {&__pyx_n_s__pos1, __pyx_k__pos1, sizeof(__pyx_k__pos1), 0, 0, 1, 1},
24321   {&__pyx_n_s__pos2, __pyx_k__pos2, sizeof(__pyx_k__pos2), 0, 0, 1, 1},
24322   {&__pyx_n_s__pysam, __pyx_k__pysam, sizeof(__pyx_k__pysam), 0, 0, 1, 1},
24323   {&__pyx_n_s__qual, __pyx_k__qual, sizeof(__pyx_k__qual), 0, 0, 1, 1},
24324   {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1},
24325   {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
24326   {&__pyx_n_s__re, __pyx_k__re, sizeof(__pyx_k__re), 0, 0, 1, 1},
24327   {&__pyx_n_s__record, __pyx_k__record, sizeof(__pyx_k__record), 0, 0, 1, 1},
24328   {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1},
24329   {&__pyx_n_s__ref1, __pyx_k__ref1, sizeof(__pyx_k__ref1), 0, 0, 1, 1},
24330   {&__pyx_n_s__ref2, __pyx_k__ref2, sizeof(__pyx_k__ref2), 0, 0, 1, 1},
24331   {&__pyx_n_s__reference, __pyx_k__reference, sizeof(__pyx_k__reference), 0, 0, 1, 1},
24332   {&__pyx_n_s__region, __pyx_k__region, sizeof(__pyx_k__region), 0, 0, 1, 1},
24333   {&__pyx_n_s__regions, __pyx_k__regions, sizeof(__pyx_k__regions), 0, 0, 1, 1},
24334   {&__pyx_n_s__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1},
24335   {&__pyx_n_s__required, __pyx_k__required, sizeof(__pyx_k__required), 0, 0, 1, 1},
24336   {&__pyx_n_s__rest, __pyx_k__rest, sizeof(__pyx_k__rest), 0, 0, 1, 1},
24337   {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1},
24338   {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
24339   {&__pyx_n_s__sample, __pyx_k__sample, sizeof(__pyx_k__sample), 0, 0, 1, 1},
24340   {&__pyx_n_s__samples, __pyx_k__samples, sizeof(__pyx_k__samples), 0, 0, 1, 1},
24341   {&__pyx_n_s__sdata, __pyx_k__sdata, sizeof(__pyx_k__sdata), 0, 0, 1, 1},
24342   {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1},
24343   {&__pyx_n_s__separator, __pyx_k__separator, sizeof(__pyx_k__separator), 0, 0, 1, 1},
24344   {&__pyx_n_s__sequence, __pyx_k__sequence, sizeof(__pyx_k__sequence), 0, 0, 1, 1},
24345   {&__pyx_n_s__setfilter, __pyx_k__setfilter, sizeof(__pyx_k__setfilter), 0, 0, 1, 1},
24346   {&__pyx_n_s__setformat, __pyx_k__setformat, sizeof(__pyx_k__setformat), 0, 0, 1, 1},
24347   {&__pyx_n_s__setheader, __pyx_k__setheader, sizeof(__pyx_k__setheader), 0, 0, 1, 1},
24348   {&__pyx_n_s__setinfo, __pyx_k__setinfo, sizeof(__pyx_k__setinfo), 0, 0, 1, 1},
24349   {&__pyx_n_s__setreference, __pyx_k__setreference, sizeof(__pyx_k__setreference), 0, 0, 1, 1},
24350   {&__pyx_n_s__setregions, __pyx_k__setregions, sizeof(__pyx_k__setregions), 0, 0, 1, 1},
24351   {&__pyx_n_s__setsamples, __pyx_k__setsamples, sizeof(__pyx_k__setsamples), 0, 0, 1, 1},
24352   {&__pyx_n_s__setversion, __pyx_k__setversion, sizeof(__pyx_k__setversion), 0, 0, 1, 1},
24353   {&__pyx_n_s__shortest, __pyx_k__shortest, sizeof(__pyx_k__shortest), 0, 0, 1, 1},
24354   {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
24355   {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
24356   {&__pyx_n_s__startswith, __pyx_k__startswith, sizeof(__pyx_k__startswith), 0, 0, 1, 1},
24357   {&__pyx_n_s__stream, __pyx_k__stream, sizeof(__pyx_k__stream), 0, 0, 1, 1},
24358   {&__pyx_n_s__string, __pyx_k__string, sizeof(__pyx_k__string), 0, 0, 1, 1},
24359   {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1},
24360   {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
24361   {&__pyx_n_s__t, __pyx_k__t, sizeof(__pyx_k__t), 0, 0, 1, 1},
24362   {&__pyx_n_s__tabixfile, __pyx_k__tabixfile, sizeof(__pyx_k__tabixfile), 0, 0, 1, 1},
24363   {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1},
24364   {&__pyx_n_s__upper, __pyx_k__upper, sizeof(__pyx_k__upper), 0, 0, 1, 1},
24365   {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1},
24366   {&__pyx_n_s__validate, __pyx_k__validate, sizeof(__pyx_k__validate), 0, 0, 1, 1},
24367   {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
24368   {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1},
24369   {&__pyx_n_s__var, __pyx_k__var, sizeof(__pyx_k__var), 0, 0, 1, 1},
24370   {&__pyx_n_s__vcf, __pyx_k__vcf, sizeof(__pyx_k__vcf), 0, 0, 1, 1},
24371   {&__pyx_n_s__vcffile, __pyx_k__vcffile, sizeof(__pyx_k__vcffile), 0, 0, 1, 1},
24372   {&__pyx_n_s__version, __pyx_k__version, sizeof(__pyx_k__version), 0, 0, 1, 1},
24373   {&__pyx_n_s__warnerror, __pyx_k__warnerror, sizeof(__pyx_k__warnerror), 0, 0, 1, 1},
24374   {&__pyx_n_s__write, __pyx_k__write, sizeof(__pyx_k__write), 0, 0, 1, 1},
24375   {&__pyx_n_s__write_data, __pyx_k__write_data, sizeof(__pyx_k__write_data), 0, 0, 1, 1},
24376   {&__pyx_n_s__write_header, __pyx_k__write_header, sizeof(__pyx_k__write_header), 0, 0, 1, 1},
24377   {&__pyx_n_s__write_heading, __pyx_k__write_heading, sizeof(__pyx_k__write_heading), 0, 0, 1, 1},
24378   {&__pyx_n_s__writeheader, __pyx_k__writeheader, sizeof(__pyx_k__writeheader), 0, 0, 1, 1},
24379   {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
24380   {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1},
24381   {&__pyx_n_s__zip, __pyx_k__zip, sizeof(__pyx_k__zip), 0, 0, 1, 1},
24382   {0, 0, 0, 0, 0, 0, 0}
24383 };
24384 static int __Pyx_InitCachedBuiltins(void) {
24385   __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24386   __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24387   __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24388   __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24389   __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24390   __pyx_builtin_min = __Pyx_GetName(__pyx_b, __pyx_n_s__min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24391   __pyx_builtin_zip = __Pyx_GetName(__pyx_b, __pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24392   __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24393   __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24394   __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24395   return 0;
24396   __pyx_L1_error:;
24397   return -1;
24398 }
24399
24400 static int __Pyx_InitCachedConstants(void) {
24401   __Pyx_RefNannyDeclarations
24402   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
24403
24404   /* "cvcf.pyx":70
24405  * def parse_regions( string ):
24406  *     result = []
24407  *     for r in string.split(','):             # <<<<<<<<<<<<<<
24408  *         elts = r.split(':')
24409  *         chrom, start, end = elts[0], 0, 3000000000
24410  */
24411   __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24412   __Pyx_GOTREF(__pyx_k_tuple_3);
24413   __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
24414   PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, ((PyObject *)__pyx_kp_s_2));
24415   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
24416   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3));
24417
24418   /* "cvcf.pyx":71
24419  *     result = []
24420  *     for r in string.split(','):
24421  *         elts = r.split(':')             # <<<<<<<<<<<<<<
24422  *         chrom, start, end = elts[0], 0, 3000000000
24423  *         if len(elts)==1: pass
24424  */
24425   __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24426   __Pyx_GOTREF(__pyx_k_tuple_5);
24427   __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
24428   PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_kp_s_4));
24429   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
24430   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));
24431
24432   /* "cvcf.pyx":76
24433  *         elif len(elts)==2:
24434  *             if len(elts[1])>0:
24435  *                 ielts = elts[1].split('-')             # <<<<<<<<<<<<<<
24436  *                 if len(ielts) != 2: ValueError("Don't understand region string '%s'" % r)
24437  *                 try:    start, end = int(ielts[0])-1, int(ielts[1])
24438  */
24439   __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24440   __Pyx_GOTREF(__pyx_k_tuple_7);
24441   __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
24442   PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_6));
24443   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
24444   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));
24445
24446   /* "cvcf.pyx":157
24447  *             alt = self.fields[4]
24448  *             if alt == ".": alt = []
24449  *             else: alt = alt.upper().split(',')             # <<<<<<<<<<<<<<
24450  *             return alt
24451  * 
24452  */
24453   __pyx_k_tuple_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24454   __Pyx_GOTREF(__pyx_k_tuple_10);
24455   __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
24456   PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_kp_s_2));
24457   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
24458   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));
24459
24460   /* "cvcf.pyx":173
24461  *             # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
24462  *             if f == b"." or f == b"PASS" or f == b"0": return []
24463  *             else: return f.split(';')             # <<<<<<<<<<<<<<
24464  * 
24465  *     property info:
24466  */
24467   __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24468   __Pyx_GOTREF(__pyx_k_tuple_12);
24469   __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
24470   PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_11));
24471   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
24472   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
24473
24474   /* "cvcf.pyx":181
24475  *             info = {}
24476  *             if col != b".":
24477  *                 for blurp in col.split(';'):             # <<<<<<<<<<<<<<
24478  *                     elts = blurp.split('=')
24479  *                     if len(elts) == 1: v = None
24480  */
24481   __pyx_k_tuple_13 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24482   __Pyx_GOTREF(__pyx_k_tuple_13);
24483   __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
24484   PyTuple_SET_ITEM(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_kp_s_11));
24485   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
24486   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
24487
24488   /* "cvcf.pyx":182
24489  *             if col != b".":
24490  *                 for blurp in col.split(';'):
24491  *                     elts = blurp.split('=')             # <<<<<<<<<<<<<<
24492  *                     if len(elts) == 1: v = None
24493  *                     elif len(elts) == 2: v = elts[1]
24494  */
24495   __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24496   __Pyx_GOTREF(__pyx_k_tuple_15);
24497   __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
24498   PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_kp_s_14));
24499   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
24500   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
24501
24502   /* "cvcf.pyx":191
24503  *     property format:
24504  *          def __get__(self):
24505  *              return self.fields[8].split(':')             # <<<<<<<<<<<<<<
24506  * 
24507  *     property samples:
24508  */
24509   __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24510   __Pyx_GOTREF(__pyx_k_tuple_16);
24511   __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
24512   PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_kp_s_4));
24513   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
24514   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
24515
24516   /* "cvcf.pyx":200
24517  * 
24518  *         # parse sample columns
24519  *         values = self.fields[self.vcf._sample2column[key]].split(':')             # <<<<<<<<<<<<<<
24520  *         alt = self.alt
24521  *         format = self.format
24522  */
24523   __pyx_k_tuple_17 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24524   __Pyx_GOTREF(__pyx_k_tuple_17);
24525   __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
24526   PyTuple_SET_ITEM(__pyx_k_tuple_17, 0, ((PyObject *)__pyx_kp_s_4));
24527   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
24528   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));
24529
24530   /* "cvcf.pyx":316
24531  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):
24532  *         # make error identifiers accessible by name
24533  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id             # <<<<<<<<<<<<<<
24534  *         if _copy != None:
24535  *             self._leftalign = _copy._leftalign
24536  */
24537   __pyx_k_tuple_22 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24538   __Pyx_GOTREF(__pyx_k_tuple_22);
24539   __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
24540   PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, ((PyObject *)__pyx_kp_s_4));
24541   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
24542   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));
24543
24544   /* "cvcf.pyx":337
24545  *     def error(self,line,error,opt=None):
24546  *         if error in self._ignored_errors: return
24547  *         errorlabel, errorstring = self._errors[error].split(':')             # <<<<<<<<<<<<<<
24548  *         if opt: errorstring = errorstring % opt
24549  *         errwarn = ["Error","Warning"][error in self._warn_errors]
24550  */
24551   __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24552   __Pyx_GOTREF(__pyx_k_tuple_23);
24553   __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
24554   PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_kp_s_4));
24555   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
24556   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
24557
24558   /* "cvcf.pyx":346
24559  *     def parse_format(self,line,format,filter=False):
24560  *         if self._version == 40:
24561  *             if not format.startswith('<'):             # <<<<<<<<<<<<<<
24562  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
24563  *                 format = "<"+format
24564  */
24565   __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24566   __Pyx_GOTREF(__pyx_k_tuple_26);
24567   __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
24568   PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_kp_s_25));
24569   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25));
24570   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));
24571
24572   /* "cvcf.pyx":349
24573  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
24574  *                 format = "<"+format
24575  *             if not format.endswith('>'):             # <<<<<<<<<<<<<<
24576  *                 self.error(line,self.V40_MISSING_ANGLE_BRACKETS)
24577  *                 format += ">"
24578  */
24579   __pyx_k_tuple_29 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24580   __Pyx_GOTREF(__pyx_k_tuple_29);
24581   __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
24582   PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_kp_s_28));
24583   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
24584   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));
24585
24586   /* "cvcf.pyx":356
24587  *         idx = 0
24588  *         while len(format.strip())>0:
24589  *             elts = format.strip().split(',')             # <<<<<<<<<<<<<<
24590  *             first, rest = elts[0], ','.join(elts[1:])
24591  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):
24592  */
24593   __pyx_k_tuple_30 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24594   __Pyx_GOTREF(__pyx_k_tuple_30);
24595   __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
24596   PyTuple_SET_ITEM(__pyx_k_tuple_30, 0, ((PyObject *)__pyx_kp_s_2));
24597   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
24598   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));
24599
24600   /* "cvcf.pyx":358
24601  *             elts = format.strip().split(',')
24602  *             first, rest = elts[0], ','.join(elts[1:])
24603  *             if first.find('=') == -1 or (first.find('"')>=0 and first.find('=') > first.find('"')):             # <<<<<<<<<<<<<<
24604  *                 if self._version == 40: self.error(line,self.V40_FORMAT_MUST_HAVE_NAMED_FIELDS)
24605  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
24606  */
24607   __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24608   __Pyx_GOTREF(__pyx_k_tuple_31);
24609   __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
24610   PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_kp_s_14));
24611   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
24612   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));
24613   __pyx_k_tuple_33 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24614   __Pyx_GOTREF(__pyx_k_tuple_33);
24615   __Pyx_INCREF(((PyObject *)__pyx_kp_s_32));
24616   PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_kp_s_32));
24617   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32));
24618   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
24619   __pyx_k_tuple_34 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24620   __Pyx_GOTREF(__pyx_k_tuple_34);
24621   __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
24622   PyTuple_SET_ITEM(__pyx_k_tuple_34, 0, ((PyObject *)__pyx_kp_s_14));
24623   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
24624   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));
24625   __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24626   __Pyx_GOTREF(__pyx_k_tuple_35);
24627   __Pyx_INCREF(((PyObject *)__pyx_kp_s_32));
24628   PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_32));
24629   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32));
24630   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));
24631
24632   /* "cvcf.pyx":362
24633  *                 if idx == 4: self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
24634  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
24635  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]             # <<<<<<<<<<<<<<
24636  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
24637  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
24638  */
24639   __pyx_k_tuple_42 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24640   __Pyx_GOTREF(__pyx_k_tuple_42);
24641   __Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
24642   PyTuple_SET_ITEM(__pyx_k_tuple_42, 0, ((PyObject *)__pyx_kp_s_38));
24643   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38));
24644   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));
24645   __pyx_k_tuple_43 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24646   __Pyx_GOTREF(__pyx_k_tuple_43);
24647   __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
24648   PyTuple_SET_ITEM(__pyx_k_tuple_43, 0, ((PyObject *)__pyx_kp_s_14));
24649   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
24650   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));
24651
24652   /* "cvcf.pyx":363
24653  *                 first = ["ID=","Number=","Type=","Description="][idx] + first
24654  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
24655  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]             # <<<<<<<<<<<<<<
24656  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
24657  *             elif first.startswith('Description='):
24658  */
24659   __pyx_k_tuple_44 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24660   __Pyx_GOTREF(__pyx_k_tuple_44);
24661   __Pyx_INCREF(((PyObject *)__pyx_kp_s_39));
24662   PyTuple_SET_ITEM(__pyx_k_tuple_44, 0, ((PyObject *)__pyx_kp_s_39));
24663   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39));
24664   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));
24665   __pyx_k_tuple_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24666   __Pyx_GOTREF(__pyx_k_tuple_45);
24667   __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
24668   PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_s_14));
24669   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
24670   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));
24671
24672   /* "cvcf.pyx":364
24673  *             if first.startswith('ID='):            data['id'] = first.split('=')[1]
24674  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
24675  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]             # <<<<<<<<<<<<<<
24676  *             elif first.startswith('Description='):
24677  *                 elts = format.split('"')
24678  */
24679   __pyx_k_tuple_46 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24680   __Pyx_GOTREF(__pyx_k_tuple_46);
24681   __Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
24682   PyTuple_SET_ITEM(__pyx_k_tuple_46, 0, ((PyObject *)__pyx_kp_s_40));
24683   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
24684   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46));
24685   __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24686   __Pyx_GOTREF(__pyx_k_tuple_47);
24687   __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
24688   PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_kp_s_14));
24689   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
24690   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
24691
24692   /* "cvcf.pyx":365
24693  *             elif first.startswith('Number='):      data['number'] = first.split('=')[1]
24694  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
24695  *             elif first.startswith('Description='):             # <<<<<<<<<<<<<<
24696  *                 elts = format.split('"')
24697  *                 if len(elts)<3:
24698  */
24699   __pyx_k_tuple_48 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24700   __Pyx_GOTREF(__pyx_k_tuple_48);
24701   __Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
24702   PyTuple_SET_ITEM(__pyx_k_tuple_48, 0, ((PyObject *)__pyx_kp_s_41));
24703   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
24704   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));
24705
24706   /* "cvcf.pyx":366
24707  *             elif first.startswith('Type='):        data['type'] = first.split('=')[1]
24708  *             elif first.startswith('Description='):
24709  *                 elts = format.split('"')             # <<<<<<<<<<<<<<
24710  *                 if len(elts)<3:
24711  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
24712  */
24713   __pyx_k_tuple_49 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24714   __Pyx_GOTREF(__pyx_k_tuple_49);
24715   __Pyx_INCREF(((PyObject *)__pyx_kp_s_32));
24716   PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_kp_s_32));
24717   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32));
24718   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));
24719
24720   /* "cvcf.pyx":369
24721  *                 if len(elts)<3:
24722  *                     self.error(line,self.FORMAT_MISSING_QUOTES)
24723  *                     elts = first.split('=') + [rest]             # <<<<<<<<<<<<<<
24724  *                 data['descr'] = elts[1]
24725  *                 rest = '"'.join(elts[2:])
24726  */
24727   __pyx_k_tuple_51 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24728   __Pyx_GOTREF(__pyx_k_tuple_51);
24729   __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
24730   PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, ((PyObject *)__pyx_kp_s_14));
24731   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
24732   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
24733
24734   /* "cvcf.pyx":372
24735  *                 data['descr'] = elts[1]
24736  *                 rest = '"'.join(elts[2:])
24737  *                 if rest.startswith(','): rest = rest[1:]             # <<<<<<<<<<<<<<
24738  *             else:
24739  *                 self.error(line,self.BADLY_FORMATTED_FORMAT_STRING)
24740  */
24741   __pyx_k_tuple_52 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24742   __Pyx_GOTREF(__pyx_k_tuple_52);
24743   __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
24744   PyTuple_SET_ITEM(__pyx_k_tuple_52, 0, ((PyObject *)__pyx_kp_s_2));
24745   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
24746   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));
24747
24748   /* "cvcf.pyx":492
24749  *         # snip off trailing missing data
24750  *         while len(output) > 1:
24751  *             last = output[-1].replace(',','').replace('.','')             # <<<<<<<<<<<<<<
24752  *             if len(last)>0: break
24753  *             output = output[:-1]
24754  */
24755   __pyx_k_tuple_62 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24756   __Pyx_GOTREF(__pyx_k_tuple_62);
24757   __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
24758   PyTuple_SET_ITEM(__pyx_k_tuple_62, 0, ((PyObject *)__pyx_kp_s_2));
24759   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
24760   __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
24761   PyTuple_SET_ITEM(__pyx_k_tuple_62, 1, ((PyObject *)__pyx_kp_s_1));
24762   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
24763   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62));
24764   __pyx_k_tuple_63 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24765   __Pyx_GOTREF(__pyx_k_tuple_63);
24766   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
24767   PyTuple_SET_ITEM(__pyx_k_tuple_63, 0, ((PyObject *)__pyx_kp_s_9));
24768   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
24769   __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
24770   PyTuple_SET_ITEM(__pyx_k_tuple_63, 1, ((PyObject *)__pyx_kp_s_1));
24771   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
24772   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
24773
24774   /* "cvcf.pyx":518
24775  * 
24776  *     def parse_header( self, line ):
24777  *         assert line.startswith('##')             # <<<<<<<<<<<<<<
24778  *         elts = line[2:].split('=')
24779  *         key = elts[0].strip()
24780  */
24781   __pyx_k_tuple_77 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24782   __Pyx_GOTREF(__pyx_k_tuple_77);
24783   __Pyx_INCREF(((PyObject *)__pyx_kp_s_76));
24784   PyTuple_SET_ITEM(__pyx_k_tuple_77, 0, ((PyObject *)__pyx_kp_s_76));
24785   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_76));
24786   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77));
24787
24788   /* "cvcf.pyx":519
24789  *     def parse_header( self, line ):
24790  *         assert line.startswith('##')
24791  *         elts = line[2:].split('=')             # <<<<<<<<<<<<<<
24792  *         key = elts[0].strip()
24793  *         value = '='.join(elts[1:]).strip()
24794  */
24795   __pyx_k_tuple_78 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24796   __Pyx_GOTREF(__pyx_k_tuple_78);
24797   __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
24798   PyTuple_SET_ITEM(__pyx_k_tuple_78, 0, ((PyObject *)__pyx_kp_s_14));
24799   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
24800   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78));
24801
24802   /* "cvcf.pyx":554
24803  * 
24804  *     def parse_heading( self, line ):
24805  *         assert line.startswith('#')             # <<<<<<<<<<<<<<
24806  *         assert not line.startswith('##')
24807  *         headings = line[1:].split('\t')
24808  */
24809   __pyx_k_tuple_86 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24810   __Pyx_GOTREF(__pyx_k_tuple_86);
24811   __Pyx_INCREF(((PyObject *)__pyx_kp_s_85));
24812   PyTuple_SET_ITEM(__pyx_k_tuple_86, 0, ((PyObject *)__pyx_kp_s_85));
24813   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_85));
24814   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));
24815
24816   /* "cvcf.pyx":555
24817  *     def parse_heading( self, line ):
24818  *         assert line.startswith('#')
24819  *         assert not line.startswith('##')             # <<<<<<<<<<<<<<
24820  *         headings = line[1:].split('\t')
24821  *         # test for 8, as FORMAT field might be missing
24822  */
24823   __pyx_k_tuple_87 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24824   __Pyx_GOTREF(__pyx_k_tuple_87);
24825   __Pyx_INCREF(((PyObject *)__pyx_kp_s_76));
24826   PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, ((PyObject *)__pyx_kp_s_76));
24827   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_76));
24828   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));
24829
24830   /* "cvcf.pyx":556
24831  *         assert line.startswith('#')
24832  *         assert not line.startswith('##')
24833  *         headings = line[1:].split('\t')             # <<<<<<<<<<<<<<
24834  *         # test for 8, as FORMAT field might be missing
24835  *         if len(headings)==1 and len(line[1:].split()) >= 8:
24836  */
24837   __pyx_k_tuple_89 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24838   __Pyx_GOTREF(__pyx_k_tuple_89);
24839   __Pyx_INCREF(((PyObject *)__pyx_kp_s_88));
24840   PyTuple_SET_ITEM(__pyx_k_tuple_89, 0, ((PyObject *)__pyx_kp_s_88));
24841   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_88));
24842   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));
24843
24844   /* "cvcf.pyx":608
24845  *             if value is not None: self.error(line,self.ERROR_FLAG_HAS_VALUE)
24846  *             return []
24847  *         values = value.split(',')             # <<<<<<<<<<<<<<
24848  *         # deal with trailing data in some early VCF files
24849  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
24850  */
24851   __pyx_k_tuple_97 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24852   __Pyx_GOTREF(__pyx_k_tuple_97);
24853   __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
24854   PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_kp_s_2));
24855   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
24856   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));
24857
24858   /* "cvcf.pyx":610
24859  *         values = value.split(',')
24860  *         # deal with trailing data in some early VCF files
24861  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:             # <<<<<<<<<<<<<<
24862  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
24863  *             values[-1] = values[-1].split(';')[0]
24864  */
24865   __pyx_k_tuple_98 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24866   __Pyx_GOTREF(__pyx_k_tuple_98);
24867   __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
24868   PyTuple_SET_ITEM(__pyx_k_tuple_98, 0, ((PyObject *)__pyx_kp_s_11));
24869   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
24870   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));
24871
24872   /* "cvcf.pyx":612
24873  *         if f.type in ["Float","Integer"] and len(values)>0 and values[-1].find(';') > -1:
24874  *             self.error(line,self.ERROR_TRAILING_DATA,values[-1])
24875  *             values[-1] = values[-1].split(';')[0]             # <<<<<<<<<<<<<<
24876  *         if f.type == "Integer":
24877  *             for idx,v in enumerate(values):
24878  */
24879   __pyx_k_tuple_99 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24880   __Pyx_GOTREF(__pyx_k_tuple_99);
24881   __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
24882   PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_kp_s_11));
24883   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
24884   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));
24885
24886   /* "cvcf.pyx":648
24887  * 
24888  *     def parse_data( self, line, lineparse=False ):
24889  *         cols = line.split('\t')             # <<<<<<<<<<<<<<
24890  *         if len(cols) != len(self._samples)+9:
24891  *             # gracefully deal with absent FORMAT column
24892  */
24893   __pyx_k_tuple_103 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24894   __Pyx_GOTREF(__pyx_k_tuple_103);
24895   __Pyx_INCREF(((PyObject *)__pyx_kp_s_88));
24896   PyTuple_SET_ITEM(__pyx_k_tuple_103, 0, ((PyObject *)__pyx_kp_s_88));
24897   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_88));
24898   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));
24899
24900   /* "cvcf.pyx":694
24901  *         # convert v3.3 to v4.0 alleles below
24902  *         if cols[4] == ".": alt = []
24903  *         else: alt = cols[4].upper().split(',')             # <<<<<<<<<<<<<<
24904  * 
24905  *         if cols[5] == ".": qual = -1
24906  */
24907   __pyx_k_tuple_107 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24908   __Pyx_GOTREF(__pyx_k_tuple_107);
24909   __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
24910   PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_kp_s_2));
24911   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
24912   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));
24913
24914   /* "cvcf.pyx":703
24915  *         # postpone checking that filters exist.  Encode missing filter or no filtering as empty list
24916  *         if cols[6] == "." or cols[6] == "PASS" or cols[6] == "0": filter = []
24917  *         else: filter = cols[6].split(';')             # <<<<<<<<<<<<<<
24918  * 
24919  *         # dictionary of keys, and list of values
24920  */
24921   __pyx_k_tuple_108 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24922   __Pyx_GOTREF(__pyx_k_tuple_108);
24923   __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
24924   PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_kp_s_11));
24925   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
24926   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
24927
24928   /* "cvcf.pyx":708
24929  *         info = {}
24930  *         if cols[7] != ".":
24931  *             for blurp in cols[7].split(';'):             # <<<<<<<<<<<<<<
24932  *                 elts = blurp.split('=')
24933  *                 if len(elts) == 1: v = None
24934  */
24935   __pyx_k_tuple_109 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24936   __Pyx_GOTREF(__pyx_k_tuple_109);
24937   __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
24938   PyTuple_SET_ITEM(__pyx_k_tuple_109, 0, ((PyObject *)__pyx_kp_s_11));
24939   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
24940   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
24941
24942   /* "cvcf.pyx":709
24943  *         if cols[7] != ".":
24944  *             for blurp in cols[7].split(';'):
24945  *                 elts = blurp.split('=')             # <<<<<<<<<<<<<<
24946  *                 if len(elts) == 1: v = None
24947  *                 elif len(elts) == 2: v = elts[1]
24948  */
24949   __pyx_k_tuple_110 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24950   __Pyx_GOTREF(__pyx_k_tuple_110);
24951   __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
24952   PyTuple_SET_ITEM(__pyx_k_tuple_110, 0, ((PyObject *)__pyx_kp_s_14));
24953   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
24954   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));
24955
24956   /* "cvcf.pyx":720
24957  *         # Gracefully deal with absent FORMAT column
24958  *         if cols[8] == "": format = []
24959  *         else: format = cols[8].split(':')             # <<<<<<<<<<<<<<
24960  * 
24961  *         # check: all filters are defined
24962  */
24963   __pyx_k_tuple_111 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24964   __Pyx_GOTREF(__pyx_k_tuple_111);
24965   __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
24966   PyTuple_SET_ITEM(__pyx_k_tuple_111, 0, ((PyObject *)__pyx_kp_s_4));
24967   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
24968   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));
24969
24970   /* "cvcf.pyx":738
24971  *             for a in alt:
24972  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
24973  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference             # <<<<<<<<<<<<<<
24974  *                 elif a.startswith('D'): # allow D<seq> and D<num>
24975  *                     have_deletions = True
24976  */
24977   __pyx_k_tuple_112 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24978   __Pyx_GOTREF(__pyx_k_tuple_112);
24979   __Pyx_INCREF(((PyObject *)__pyx_n_s__I));
24980   PyTuple_SET_ITEM(__pyx_k_tuple_112, 0, ((PyObject *)__pyx_n_s__I));
24981   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__I));
24982   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));
24983
24984   /* "cvcf.pyx":739
24985  *                 if len(a) == 1: a = a + ref[1:]                       # SNP; add trailing reference
24986  *                 elif a.startswith('I'): a = ref[0] + a[1:] + ref[1:]  # insertion just beyond pos; add first and trailing reference
24987  *                 elif a.startswith('D'): # allow D<seq> and D<num>             # <<<<<<<<<<<<<<
24988  *                     have_deletions = True
24989  *                     try:
24990  */
24991   __pyx_k_tuple_113 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
24992   __Pyx_GOTREF(__pyx_k_tuple_113);
24993   __Pyx_INCREF(((PyObject *)__pyx_n_s__D));
24994   PyTuple_SET_ITEM(__pyx_k_tuple_113, 0, ((PyObject *)__pyx_n_s__D));
24995   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__D));
24996   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));
24997
24998   /* "cvcf.pyx":820
24999  *         for sample in cols[9:]:
25000  *             dict = {}
25001  *             values = sample.split(':')             # <<<<<<<<<<<<<<
25002  *             if len(values) > len(format):
25003  *                 self.error(line,self.BAD_NUMBER_OF_VALUES,"(found %s values in element %s; expected %s)" % (len(values),sample,len(format)))
25004  */
25005   __pyx_k_tuple_117 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25006   __Pyx_GOTREF(__pyx_k_tuple_117);
25007   __Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
25008   PyTuple_SET_ITEM(__pyx_k_tuple_117, 0, ((PyObject *)__pyx_kp_s_4));
25009   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
25010   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));
25011
25012   /* "cvcf.pyx":890
25013  *         for line in stream:
25014  *             self._lineno += 1
25015  *             if line.startswith('##'):             # <<<<<<<<<<<<<<
25016  *                 self.parse_header( line.strip() )
25017  *             elif line.startswith('#'):
25018  */
25019   __pyx_k_tuple_119 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25020   __Pyx_GOTREF(__pyx_k_tuple_119);
25021   __Pyx_INCREF(((PyObject *)__pyx_kp_s_76));
25022   PyTuple_SET_ITEM(__pyx_k_tuple_119, 0, ((PyObject *)__pyx_kp_s_76));
25023   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_76));
25024   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_119));
25025
25026   /* "cvcf.pyx":892
25027  *             if line.startswith('##'):
25028  *                 self.parse_header( line.strip() )
25029  *             elif line.startswith('#'):             # <<<<<<<<<<<<<<
25030  *                 self.parse_heading( line.strip() )
25031  *                 self.enter_default_format()
25032  */
25033   __pyx_k_tuple_120 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25034   __Pyx_GOTREF(__pyx_k_tuple_120);
25035   __Pyx_INCREF(((PyObject *)__pyx_kp_s_85));
25036   PyTuple_SET_ITEM(__pyx_k_tuple_120, 0, ((PyObject *)__pyx_kp_s_85));
25037   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_85));
25038   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120));
25039
25040   /* "cvcf.pyx":901
25041  *     def _parse(self, line, stream):
25042  *         # deal with files with header only
25043  *         if line.startswith("##"): return             # <<<<<<<<<<<<<<
25044  *         if len(line.strip()) > 0:
25045  *             d = self.parse_data( line.strip() )
25046  */
25047   __pyx_k_tuple_122 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25048   __Pyx_GOTREF(__pyx_k_tuple_122);
25049   __Pyx_INCREF(((PyObject *)__pyx_kp_s_76));
25050   PyTuple_SET_ITEM(__pyx_k_tuple_122, 0, ((PyObject *)__pyx_kp_s_76));
25051   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_76));
25052   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));
25053
25054   /* "cvcf.pyx":958
25055  * 
25056  *     def setversion(self, version):
25057  *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")             # <<<<<<<<<<<<<<
25058  *         self._version = version
25059  * 
25060  */
25061   __pyx_k_tuple_124 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25062   __Pyx_GOTREF(__pyx_k_tuple_124);
25063   __Pyx_INCREF(((PyObject *)__pyx_kp_s_123));
25064   PyTuple_SET_ITEM(__pyx_k_tuple_124, 0, ((PyObject *)__pyx_kp_s_123));
25065   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_123));
25066   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));
25067
25068   /* "cvcf.pyx":1036
25069  *         '''
25070  * 
25071  *         raise NotImplementedError( "needs to be checked" )             # <<<<<<<<<<<<<<
25072  * 
25073  *         chrom, pos = record.chrom, record.pos
25074  */
25075   __pyx_k_tuple_127 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25076   __Pyx_GOTREF(__pyx_k_tuple_127);
25077   __Pyx_INCREF(((PyObject *)__pyx_kp_s_126));
25078   PyTuple_SET_ITEM(__pyx_k_tuple_127, 0, ((PyObject *)__pyx_kp_s_126));
25079   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_126));
25080   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
25081
25082   /* "cvcf.pyx":54
25083  * import pysam
25084  * 
25085  * gtsRegEx = re.compile("[|/\\\\]")             # <<<<<<<<<<<<<<
25086  * alleleRegEx = re.compile('^[ACGTN]+$')
25087  * 
25088  */
25089   __pyx_k_tuple_129 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25090   __Pyx_GOTREF(__pyx_k_tuple_129);
25091   __Pyx_INCREF(((PyObject *)__pyx_kp_s_128));
25092   PyTuple_SET_ITEM(__pyx_k_tuple_129, 0, ((PyObject *)__pyx_kp_s_128));
25093   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_128));
25094   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_129));
25095
25096   /* "cvcf.pyx":55
25097  * 
25098  * gtsRegEx = re.compile("[|/\\\\]")
25099  * alleleRegEx = re.compile('^[ACGTN]+$')             # <<<<<<<<<<<<<<
25100  * 
25101  * # Utility function.  Uses 0-based coordinates
25102  */
25103   __pyx_k_tuple_131 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25104   __Pyx_GOTREF(__pyx_k_tuple_131);
25105   __Pyx_INCREF(((PyObject *)__pyx_kp_s_130));
25106   PyTuple_SET_ITEM(__pyx_k_tuple_131, 0, ((PyObject *)__pyx_kp_s_130));
25107   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_130));
25108   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131));
25109
25110   /* "cvcf.pyx":58
25111  * 
25112  * # Utility function.  Uses 0-based coordinates
25113  * def get_sequence(chrom, start, end, fa):             # <<<<<<<<<<<<<<
25114  *     # obtain sequence from .fa file, without truncation
25115  *     if end<=start: return ""
25116  */
25117   __pyx_k_tuple_132 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25118   __Pyx_GOTREF(__pyx_k_tuple_132);
25119   __Pyx_INCREF(((PyObject *)__pyx_n_s__chrom));
25120   PyTuple_SET_ITEM(__pyx_k_tuple_132, 0, ((PyObject *)__pyx_n_s__chrom));
25121   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chrom));
25122   __Pyx_INCREF(((PyObject *)__pyx_n_s__start));
25123   PyTuple_SET_ITEM(__pyx_k_tuple_132, 1, ((PyObject *)__pyx_n_s__start));
25124   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__start));
25125   __Pyx_INCREF(((PyObject *)__pyx_n_s__end));
25126   PyTuple_SET_ITEM(__pyx_k_tuple_132, 2, ((PyObject *)__pyx_n_s__end));
25127   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__end));
25128   __Pyx_INCREF(((PyObject *)__pyx_n_s__fa));
25129   PyTuple_SET_ITEM(__pyx_k_tuple_132, 3, ((PyObject *)__pyx_n_s__fa));
25130   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fa));
25131   __Pyx_INCREF(((PyObject *)__pyx_n_s__sequence));
25132   PyTuple_SET_ITEM(__pyx_k_tuple_132, 4, ((PyObject *)__pyx_n_s__sequence));
25133   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sequence));
25134   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132));
25135   __pyx_k_codeobj_133 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__get_sequence, 58, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25136
25137   /* "cvcf.pyx":68
25138  * 
25139  * # Utility function.  Parses a region string
25140  * def parse_regions( string ):             # <<<<<<<<<<<<<<
25141  *     result = []
25142  *     for r in string.split(','):
25143  */
25144   __pyx_k_tuple_135 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25145   __Pyx_GOTREF(__pyx_k_tuple_135);
25146   __Pyx_INCREF(((PyObject *)__pyx_n_s__string));
25147   PyTuple_SET_ITEM(__pyx_k_tuple_135, 0, ((PyObject *)__pyx_n_s__string));
25148   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__string));
25149   __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
25150   PyTuple_SET_ITEM(__pyx_k_tuple_135, 1, ((PyObject *)__pyx_n_s__result));
25151   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
25152   __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
25153   PyTuple_SET_ITEM(__pyx_k_tuple_135, 2, ((PyObject *)__pyx_n_s__r));
25154   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
25155   __Pyx_INCREF(((PyObject *)__pyx_n_s__elts));
25156   PyTuple_SET_ITEM(__pyx_k_tuple_135, 3, ((PyObject *)__pyx_n_s__elts));
25157   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__elts));
25158   __Pyx_INCREF(((PyObject *)__pyx_n_s__chrom));
25159   PyTuple_SET_ITEM(__pyx_k_tuple_135, 4, ((PyObject *)__pyx_n_s__chrom));
25160   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chrom));
25161   __Pyx_INCREF(((PyObject *)__pyx_n_s__start));
25162   PyTuple_SET_ITEM(__pyx_k_tuple_135, 5, ((PyObject *)__pyx_n_s__start));
25163   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__start));
25164   __Pyx_INCREF(((PyObject *)__pyx_n_s__end));
25165   PyTuple_SET_ITEM(__pyx_k_tuple_135, 6, ((PyObject *)__pyx_n_s__end));
25166   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__end));
25167   __Pyx_INCREF(((PyObject *)__pyx_n_s__ielts));
25168   PyTuple_SET_ITEM(__pyx_k_tuple_135, 7, ((PyObject *)__pyx_n_s__ielts));
25169   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ielts));
25170   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));
25171   __pyx_k_codeobj_136 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_regions, 68, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25172
25173   /* "cvcf.pyx":86
25174  * 
25175  * 
25176  * FORMAT = namedtuple('FORMAT','id numbertype number type description missingvalue')             # <<<<<<<<<<<<<<
25177  * 
25178  * ###########################################################################################################
25179  */
25180   __pyx_k_tuple_138 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25181   __Pyx_GOTREF(__pyx_k_tuple_138);
25182   __Pyx_INCREF(((PyObject *)__pyx_n_s__FORMAT));
25183   PyTuple_SET_ITEM(__pyx_k_tuple_138, 0, ((PyObject *)__pyx_n_s__FORMAT));
25184   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FORMAT));
25185   __Pyx_INCREF(((PyObject *)__pyx_kp_s_137));
25186   PyTuple_SET_ITEM(__pyx_k_tuple_138, 1, ((PyObject *)__pyx_kp_s_137));
25187   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_137));
25188   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_138));
25189
25190   /* "cvcf.pyx":314
25191  *     _lines = None
25192  * 
25193  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):             # <<<<<<<<<<<<<<
25194  *         # make error identifiers accessible by name
25195  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
25196  */
25197   __pyx_k_tuple_173 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_173)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25198   __Pyx_GOTREF(__pyx_k_tuple_173);
25199   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25200   PyTuple_SET_ITEM(__pyx_k_tuple_173, 0, ((PyObject *)__pyx_n_s__self));
25201   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25202   __Pyx_INCREF(((PyObject *)__pyx_n_s___copy));
25203   PyTuple_SET_ITEM(__pyx_k_tuple_173, 1, ((PyObject *)__pyx_n_s___copy));
25204   __Pyx_GIVEREF(((PyObject *)__pyx_n_s___copy));
25205   __Pyx_INCREF(((PyObject *)__pyx_n_s__reference));
25206   PyTuple_SET_ITEM(__pyx_k_tuple_173, 2, ((PyObject *)__pyx_n_s__reference));
25207   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__reference));
25208   __Pyx_INCREF(((PyObject *)__pyx_n_s__regions));
25209   PyTuple_SET_ITEM(__pyx_k_tuple_173, 3, ((PyObject *)__pyx_n_s__regions));
25210   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__regions));
25211   __Pyx_INCREF(((PyObject *)__pyx_n_s__lines));
25212   PyTuple_SET_ITEM(__pyx_k_tuple_173, 4, ((PyObject *)__pyx_n_s__lines));
25213   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lines));
25214   __Pyx_INCREF(((PyObject *)__pyx_n_s__leftalign));
25215   PyTuple_SET_ITEM(__pyx_k_tuple_173, 5, ((PyObject *)__pyx_n_s__leftalign));
25216   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__leftalign));
25217   __Pyx_INCREF(((PyObject *)__pyx_n_s__id));
25218   PyTuple_SET_ITEM(__pyx_k_tuple_173, 6, ((PyObject *)__pyx_n_s__id));
25219   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__id));
25220   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_173));
25221   __pyx_k_codeobj_174 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s____init__, 314, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25222
25223   /* "cvcf.pyx":335
25224  *         self._lines = lines
25225  * 
25226  *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
25227  *         if error in self._ignored_errors: return
25228  *         errorlabel, errorstring = self._errors[error].split(':')
25229  */
25230   __pyx_k_tuple_175 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_175)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25231   __Pyx_GOTREF(__pyx_k_tuple_175);
25232   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25233   PyTuple_SET_ITEM(__pyx_k_tuple_175, 0, ((PyObject *)__pyx_n_s__self));
25234   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25235   __Pyx_INCREF(((PyObject *)__pyx_n_s__line));
25236   PyTuple_SET_ITEM(__pyx_k_tuple_175, 1, ((PyObject *)__pyx_n_s__line));
25237   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__line));
25238   __Pyx_INCREF(((PyObject *)__pyx_n_s__error));
25239   PyTuple_SET_ITEM(__pyx_k_tuple_175, 2, ((PyObject *)__pyx_n_s__error));
25240   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__error));
25241   __Pyx_INCREF(((PyObject *)__pyx_n_s__opt));
25242   PyTuple_SET_ITEM(__pyx_k_tuple_175, 3, ((PyObject *)__pyx_n_s__opt));
25243   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__opt));
25244   __Pyx_INCREF(((PyObject *)__pyx_n_s__errorlabel));
25245   PyTuple_SET_ITEM(__pyx_k_tuple_175, 4, ((PyObject *)__pyx_n_s__errorlabel));
25246   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__errorlabel));
25247   __Pyx_INCREF(((PyObject *)__pyx_n_s__errorstring));
25248   PyTuple_SET_ITEM(__pyx_k_tuple_175, 5, ((PyObject *)__pyx_n_s__errorstring));
25249   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__errorstring));
25250   __Pyx_INCREF(((PyObject *)__pyx_n_s__errwarn));
25251   PyTuple_SET_ITEM(__pyx_k_tuple_175, 6, ((PyObject *)__pyx_n_s__errwarn));
25252   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__errwarn));
25253   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_175));
25254   __pyx_k_codeobj_176 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__error, 335, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25255   __pyx_k_tuple_177 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_177)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25256   __Pyx_GOTREF(__pyx_k_tuple_177);
25257   __Pyx_INCREF(((PyObject *)Py_None));
25258   PyTuple_SET_ITEM(__pyx_k_tuple_177, 0, ((PyObject *)Py_None));
25259   __Pyx_GIVEREF(((PyObject *)Py_None));
25260   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_177));
25261
25262   /* "cvcf.pyx":344
25263  *         raise ValueError(errorstring)
25264  * 
25265  *     def parse_format(self,line,format,filter=False):             # <<<<<<<<<<<<<<
25266  *         if self._version == 40:
25267  *             if not format.startswith('<'):
25268  */
25269   __pyx_k_tuple_178 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25270   __Pyx_GOTREF(__pyx_k_tuple_178);
25271   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25272   PyTuple_SET_ITEM(__pyx_k_tuple_178, 0, ((PyObject *)__pyx_n_s__self));
25273   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25274   __Pyx_INCREF(((PyObject *)__pyx_n_s__line));
25275   PyTuple_SET_ITEM(__pyx_k_tuple_178, 1, ((PyObject *)__pyx_n_s__line));
25276   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__line));
25277   __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
25278   PyTuple_SET_ITEM(__pyx_k_tuple_178, 2, ((PyObject *)__pyx_n_s__format));
25279   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
25280   __Pyx_INCREF(((PyObject *)__pyx_n_s__filter));
25281   PyTuple_SET_ITEM(__pyx_k_tuple_178, 3, ((PyObject *)__pyx_n_s__filter));
25282   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__filter));
25283   __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
25284   PyTuple_SET_ITEM(__pyx_k_tuple_178, 4, ((PyObject *)__pyx_n_s__data));
25285   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
25286   __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
25287   PyTuple_SET_ITEM(__pyx_k_tuple_178, 5, ((PyObject *)__pyx_n_s__idx));
25288   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
25289   __Pyx_INCREF(((PyObject *)__pyx_n_s__elts));
25290   PyTuple_SET_ITEM(__pyx_k_tuple_178, 6, ((PyObject *)__pyx_n_s__elts));
25291   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__elts));
25292   __Pyx_INCREF(((PyObject *)__pyx_n_s__first));
25293   PyTuple_SET_ITEM(__pyx_k_tuple_178, 7, ((PyObject *)__pyx_n_s__first));
25294   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__first));
25295   __Pyx_INCREF(((PyObject *)__pyx_n_s__rest));
25296   PyTuple_SET_ITEM(__pyx_k_tuple_178, 8, ((PyObject *)__pyx_n_s__rest));
25297   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rest));
25298   __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
25299   PyTuple_SET_ITEM(__pyx_k_tuple_178, 9, ((PyObject *)__pyx_n_s__n));
25300   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
25301   __Pyx_INCREF(((PyObject *)__pyx_n_s__t));
25302   PyTuple_SET_ITEM(__pyx_k_tuple_178, 10, ((PyObject *)__pyx_n_s__t));
25303   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__t));
25304   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_178));
25305   __pyx_k_codeobj_179 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_format, 344, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25306
25307   /* "cvcf.pyx":416
25308  *         return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])
25309  * 
25310  *     def format_format( self, fmt, filter=False ):             # <<<<<<<<<<<<<<
25311  *         values = [('ID',fmt.id)]
25312  *         if fmt.number != None and not filter:
25313  */
25314   __pyx_k_tuple_180 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25315   __Pyx_GOTREF(__pyx_k_tuple_180);
25316   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25317   PyTuple_SET_ITEM(__pyx_k_tuple_180, 0, ((PyObject *)__pyx_n_s__self));
25318   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25319   __Pyx_INCREF(((PyObject *)__pyx_n_s__fmt));
25320   PyTuple_SET_ITEM(__pyx_k_tuple_180, 1, ((PyObject *)__pyx_n_s__fmt));
25321   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fmt));
25322   __Pyx_INCREF(((PyObject *)__pyx_n_s__filter));
25323   PyTuple_SET_ITEM(__pyx_k_tuple_180, 2, ((PyObject *)__pyx_n_s__filter));
25324   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__filter));
25325   __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
25326   PyTuple_SET_ITEM(__pyx_k_tuple_180, 3, ((PyObject *)__pyx_n_s__values));
25327   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
25328   __Pyx_INCREF(((PyObject *)__pyx_n_s__nmb));
25329   PyTuple_SET_ITEM(__pyx_k_tuple_180, 4, ((PyObject *)__pyx_n_s__nmb));
25330   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nmb));
25331   __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
25332   PyTuple_SET_ITEM(__pyx_k_tuple_180, 5, ((PyObject *)__pyx_n_s__format));
25333   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
25334   __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
25335   PyTuple_SET_ITEM(__pyx_k_tuple_180, 6, ((PyObject *)__pyx_n_s__k));
25336   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
25337   __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
25338   PyTuple_SET_ITEM(__pyx_k_tuple_180, 7, ((PyObject *)__pyx_n_s__v));
25339   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
25340   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_180));
25341   __pyx_k_codeobj_181 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__format_format, 416, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25342
25343   /* "cvcf.pyx":436
25344  *         return format
25345  * 
25346  *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
25347  *         fmt = formatdict[format]
25348  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
25349  */
25350   __pyx_k_tuple_182 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25351   __Pyx_GOTREF(__pyx_k_tuple_182);
25352   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25353   PyTuple_SET_ITEM(__pyx_k_tuple_182, 0, ((PyObject *)__pyx_n_s__self));
25354   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25355   __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
25356   PyTuple_SET_ITEM(__pyx_k_tuple_182, 1, ((PyObject *)__pyx_n_s__format));
25357   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
25358   __Pyx_INCREF(((PyObject *)__pyx_n_s__formatdict));
25359   PyTuple_SET_ITEM(__pyx_k_tuple_182, 2, ((PyObject *)__pyx_n_s__formatdict));
25360   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__formatdict));
25361   __Pyx_INCREF(((PyObject *)__pyx_n_s__alt));
25362   PyTuple_SET_ITEM(__pyx_k_tuple_182, 3, ((PyObject *)__pyx_n_s__alt));
25363   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__alt));
25364   __Pyx_INCREF(((PyObject *)__pyx_n_s__fmt));
25365   PyTuple_SET_ITEM(__pyx_k_tuple_182, 4, ((PyObject *)__pyx_n_s__fmt));
25366   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fmt));
25367   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_182));
25368   __pyx_k_codeobj_183 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__get_expected, 436, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25369
25370   /* "cvcf.pyx":447
25371  * 
25372  * 
25373  *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
25374  *         if key in formatdict: return
25375  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
25376  */
25377   __pyx_k_tuple_184 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25378   __Pyx_GOTREF(__pyx_k_tuple_184);
25379   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25380   PyTuple_SET_ITEM(__pyx_k_tuple_184, 0, ((PyObject *)__pyx_n_s__self));
25381   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25382   __Pyx_INCREF(((PyObject *)__pyx_n_s__formatdict));
25383   PyTuple_SET_ITEM(__pyx_k_tuple_184, 1, ((PyObject *)__pyx_n_s__formatdict));
25384   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__formatdict));
25385   __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
25386   PyTuple_SET_ITEM(__pyx_k_tuple_184, 2, ((PyObject *)__pyx_n_s__key));
25387   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
25388   __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
25389   PyTuple_SET_ITEM(__pyx_k_tuple_184, 3, ((PyObject *)__pyx_n_s__data));
25390   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
25391   __Pyx_INCREF(((PyObject *)__pyx_n_s__line));
25392   PyTuple_SET_ITEM(__pyx_k_tuple_184, 4, ((PyObject *)__pyx_n_s__line));
25393   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__line));
25394   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_184));
25395   __pyx_k_codeobj_185 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s___add_definition, 447, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25396
25397   /* "cvcf.pyx":464
25398  * 
25399  *     # todo: trim trailing missing values
25400  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):             # <<<<<<<<<<<<<<
25401  *         output, sdata = [], []
25402  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
25403  */
25404   __pyx_k_tuple_186 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25405   __Pyx_GOTREF(__pyx_k_tuple_186);
25406   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25407   PyTuple_SET_ITEM(__pyx_k_tuple_186, 0, ((PyObject *)__pyx_n_s__self));
25408   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25409   __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
25410   PyTuple_SET_ITEM(__pyx_k_tuple_186, 1, ((PyObject *)__pyx_n_s__data));
25411   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
25412   __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
25413   PyTuple_SET_ITEM(__pyx_k_tuple_186, 2, ((PyObject *)__pyx_n_s__format));
25414   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
25415   __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
25416   PyTuple_SET_ITEM(__pyx_k_tuple_186, 3, ((PyObject *)__pyx_n_s__key));
25417   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
25418   __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
25419   PyTuple_SET_ITEM(__pyx_k_tuple_186, 4, ((PyObject *)__pyx_n_s__value));
25420   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
25421   __Pyx_INCREF(((PyObject *)__pyx_n_s__separator));
25422   PyTuple_SET_ITEM(__pyx_k_tuple_186, 5, ((PyObject *)__pyx_n_s__separator));
25423   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__separator));
25424   __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
25425   PyTuple_SET_ITEM(__pyx_k_tuple_186, 6, ((PyObject *)__pyx_n_s__output));
25426   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
25427   __Pyx_INCREF(((PyObject *)__pyx_n_s__sdata));
25428   PyTuple_SET_ITEM(__pyx_k_tuple_186, 7, ((PyObject *)__pyx_n_s__sdata));
25429   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sdata));
25430   __Pyx_INCREF(((PyObject *)__pyx_n_s__d));
25431   PyTuple_SET_ITEM(__pyx_k_tuple_186, 8, ((PyObject *)__pyx_n_s__d));
25432   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d));
25433   __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
25434   PyTuple_SET_ITEM(__pyx_k_tuple_186, 9, ((PyObject *)__pyx_n_s__k));
25435   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
25436   __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
25437   PyTuple_SET_ITEM(__pyx_k_tuple_186, 10, ((PyObject *)__pyx_n_s__idx));
25438   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
25439   __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
25440   PyTuple_SET_ITEM(__pyx_k_tuple_186, 11, ((PyObject *)__pyx_n_s__v));
25441   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
25442   __Pyx_INCREF(((PyObject *)__pyx_n_s__last));
25443   PyTuple_SET_ITEM(__pyx_k_tuple_186, 12, ((PyObject *)__pyx_n_s__last));
25444   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__last));
25445   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186));
25446   __pyx_k_codeobj_187 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__format_formatdata, 464, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_187)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25447
25448   /* "cvcf.pyx":498
25449  * 
25450  * 
25451  *     def enter_default_format(self):             # <<<<<<<<<<<<<<
25452  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
25453  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
25454  */
25455   __pyx_k_tuple_188 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25456   __Pyx_GOTREF(__pyx_k_tuple_188);
25457   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25458   PyTuple_SET_ITEM(__pyx_k_tuple_188, 0, ((PyObject *)__pyx_n_s__self));
25459   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25460   __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
25461   PyTuple_SET_ITEM(__pyx_k_tuple_188, 1, ((PyObject *)__pyx_n_s__f));
25462   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
25463   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));
25464   __pyx_k_codeobj_189 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s_121, 498, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_189)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25465
25466   /* "cvcf.pyx":517
25467  *                 self._format[f.id] = f
25468  * 
25469  *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
25470  *         assert line.startswith('##')
25471  *         elts = line[2:].split('=')
25472  */
25473   __pyx_k_tuple_190 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25474   __Pyx_GOTREF(__pyx_k_tuple_190);
25475   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25476   PyTuple_SET_ITEM(__pyx_k_tuple_190, 0, ((PyObject *)__pyx_n_s__self));
25477   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25478   __Pyx_INCREF(((PyObject *)__pyx_n_s__line));
25479   PyTuple_SET_ITEM(__pyx_k_tuple_190, 1, ((PyObject *)__pyx_n_s__line));
25480   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__line));
25481   __Pyx_INCREF(((PyObject *)__pyx_n_s__elts));
25482   PyTuple_SET_ITEM(__pyx_k_tuple_190, 2, ((PyObject *)__pyx_n_s__elts));
25483   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__elts));
25484   __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
25485   PyTuple_SET_ITEM(__pyx_k_tuple_190, 3, ((PyObject *)__pyx_n_s__key));
25486   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
25487   __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
25488   PyTuple_SET_ITEM(__pyx_k_tuple_190, 4, ((PyObject *)__pyx_n_s__value));
25489   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
25490   __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
25491   PyTuple_SET_ITEM(__pyx_k_tuple_190, 5, ((PyObject *)__pyx_n_s__f));
25492   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
25493   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
25494   __pyx_k_codeobj_191 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_header, 517, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_191)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25495
25496   /* "cvcf.pyx":546
25497  * 
25498  * 
25499  *     def write_header( self, stream ):             # <<<<<<<<<<<<<<
25500  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))
25501  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
25502  */
25503   __pyx_k_tuple_192 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25504   __Pyx_GOTREF(__pyx_k_tuple_192);
25505   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25506   PyTuple_SET_ITEM(__pyx_k_tuple_192, 0, ((PyObject *)__pyx_n_s__self));
25507   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25508   __Pyx_INCREF(((PyObject *)__pyx_n_s__stream));
25509   PyTuple_SET_ITEM(__pyx_k_tuple_192, 1, ((PyObject *)__pyx_n_s__stream));
25510   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stream));
25511   __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
25512   PyTuple_SET_ITEM(__pyx_k_tuple_192, 2, ((PyObject *)__pyx_n_s__key));
25513   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
25514   __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
25515   PyTuple_SET_ITEM(__pyx_k_tuple_192, 3, ((PyObject *)__pyx_n_s__value));
25516   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
25517   __Pyx_INCREF(((PyObject *)__pyx_n_s__var));
25518   PyTuple_SET_ITEM(__pyx_k_tuple_192, 4, ((PyObject *)__pyx_n_s__var));
25519   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__var));
25520   __Pyx_INCREF(((PyObject *)__pyx_n_s__label));
25521   PyTuple_SET_ITEM(__pyx_k_tuple_192, 5, ((PyObject *)__pyx_n_s__label));
25522   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__label));
25523   __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
25524   PyTuple_SET_ITEM(__pyx_k_tuple_192, 6, ((PyObject *)__pyx_n_s__f));
25525   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
25526   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
25527   __pyx_k_codeobj_193 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__write_header, 546, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_193)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25528
25529   /* "cvcf.pyx":553
25530  * 
25531  * 
25532  *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
25533  *         assert line.startswith('#')
25534  *         assert not line.startswith('##')
25535  */
25536   __pyx_k_tuple_194 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25537   __Pyx_GOTREF(__pyx_k_tuple_194);
25538   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25539   PyTuple_SET_ITEM(__pyx_k_tuple_194, 0, ((PyObject *)__pyx_n_s__self));
25540   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25541   __Pyx_INCREF(((PyObject *)__pyx_n_s__line));
25542   PyTuple_SET_ITEM(__pyx_k_tuple_194, 1, ((PyObject *)__pyx_n_s__line));
25543   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__line));
25544   __Pyx_INCREF(((PyObject *)__pyx_n_s__headings));
25545   PyTuple_SET_ITEM(__pyx_k_tuple_194, 2, ((PyObject *)__pyx_n_s__headings));
25546   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__headings));
25547   __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
25548   PyTuple_SET_ITEM(__pyx_k_tuple_194, 3, ((PyObject *)__pyx_n_s__i));
25549   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
25550   __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
25551   PyTuple_SET_ITEM(__pyx_k_tuple_194, 4, ((PyObject *)__pyx_n_s__s));
25552   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
25553   __Pyx_INCREF(((PyObject *)__pyx_n_s__err));
25554   PyTuple_SET_ITEM(__pyx_k_tuple_194, 5, ((PyObject *)__pyx_n_s__err));
25555   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__err));
25556   __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
25557   PyTuple_SET_ITEM(__pyx_k_tuple_194, 6, ((PyObject *)__pyx_n_s__x));
25558   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
25559   __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
25560   PyTuple_SET_ITEM(__pyx_k_tuple_194, 7, ((PyObject *)__pyx_n_s__y));
25561   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y));
25562   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));
25563   __pyx_k_codeobj_195 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_heading, 553, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25564
25565   /* "cvcf.pyx":581
25566  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )
25567  * 
25568  *     def write_heading( self, stream ):             # <<<<<<<<<<<<<<
25569  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
25570  * 
25571  */
25572   __pyx_k_tuple_196 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_196)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25573   __Pyx_GOTREF(__pyx_k_tuple_196);
25574   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25575   PyTuple_SET_ITEM(__pyx_k_tuple_196, 0, ((PyObject *)__pyx_n_s__self));
25576   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25577   __Pyx_INCREF(((PyObject *)__pyx_n_s__stream));
25578   PyTuple_SET_ITEM(__pyx_k_tuple_196, 1, ((PyObject *)__pyx_n_s__stream));
25579   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stream));
25580   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_196));
25581   __pyx_k_codeobj_197 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__write_heading, 581, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_197)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25582
25583   /* "cvcf.pyx":584
25584  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
25585  * 
25586  *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
25587  *         if GTstring == ".": return ["."]
25588  *         try:
25589  */
25590   __pyx_k_tuple_198 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_198)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25591   __Pyx_GOTREF(__pyx_k_tuple_198);
25592   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25593   PyTuple_SET_ITEM(__pyx_k_tuple_198, 0, ((PyObject *)__pyx_n_s__self));
25594   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25595   __Pyx_INCREF(((PyObject *)__pyx_n_s__GTstring));
25596   PyTuple_SET_ITEM(__pyx_k_tuple_198, 1, ((PyObject *)__pyx_n_s__GTstring));
25597   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GTstring));
25598   __Pyx_INCREF(((PyObject *)__pyx_n_s__gts));
25599   PyTuple_SET_ITEM(__pyx_k_tuple_198, 2, ((PyObject *)__pyx_n_s__gts));
25600   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__gts));
25601   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_198));
25602   __pyx_k_codeobj_199 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__convertGT, 584, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_199)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25603
25604   /* "cvcf.pyx":596
25605  *             return [".","|","."]
25606  * 
25607  *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
25608  *         return ''.join(map(str,GTdata))
25609  * 
25610  */
25611   __pyx_k_tuple_200 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_200)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25612   __Pyx_GOTREF(__pyx_k_tuple_200);
25613   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25614   PyTuple_SET_ITEM(__pyx_k_tuple_200, 0, ((PyObject *)__pyx_n_s__self));
25615   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25616   __Pyx_INCREF(((PyObject *)__pyx_n_s__GTdata));
25617   PyTuple_SET_ITEM(__pyx_k_tuple_200, 1, ((PyObject *)__pyx_n_s__GTdata));
25618   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__GTdata));
25619   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_200));
25620   __pyx_k_codeobj_201 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__convertGTback, 596, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_201)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25621
25622   /* "cvcf.pyx":599
25623  *         return ''.join(map(str,GTdata))
25624  * 
25625  *     def parse_formatdata( self, key, value, formatdict, line ):             # <<<<<<<<<<<<<<
25626  *         # To do: check that the right number of values is present
25627  *         f = formatdict.get(key,None)
25628  */
25629   __pyx_k_tuple_202 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_202)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25630   __Pyx_GOTREF(__pyx_k_tuple_202);
25631   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25632   PyTuple_SET_ITEM(__pyx_k_tuple_202, 0, ((PyObject *)__pyx_n_s__self));
25633   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25634   __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
25635   PyTuple_SET_ITEM(__pyx_k_tuple_202, 1, ((PyObject *)__pyx_n_s__key));
25636   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
25637   __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
25638   PyTuple_SET_ITEM(__pyx_k_tuple_202, 2, ((PyObject *)__pyx_n_s__value));
25639   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
25640   __Pyx_INCREF(((PyObject *)__pyx_n_s__formatdict));
25641   PyTuple_SET_ITEM(__pyx_k_tuple_202, 3, ((PyObject *)__pyx_n_s__formatdict));
25642   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__formatdict));
25643   __Pyx_INCREF(((PyObject *)__pyx_n_s__line));
25644   PyTuple_SET_ITEM(__pyx_k_tuple_202, 4, ((PyObject *)__pyx_n_s__line));
25645   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__line));
25646   __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
25647   PyTuple_SET_ITEM(__pyx_k_tuple_202, 5, ((PyObject *)__pyx_n_s__f));
25648   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
25649   __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
25650   PyTuple_SET_ITEM(__pyx_k_tuple_202, 6, ((PyObject *)__pyx_n_s__values));
25651   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
25652   __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
25653   PyTuple_SET_ITEM(__pyx_k_tuple_202, 7, ((PyObject *)__pyx_n_s__idx));
25654   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
25655   __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
25656   PyTuple_SET_ITEM(__pyx_k_tuple_202, 8, ((PyObject *)__pyx_n_s__v));
25657   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
25658   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_202));
25659   __pyx_k_codeobj_203 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_formatdata, 599, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_203)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25660
25661   /* "cvcf.pyx":641
25662  *             self.error(line,self.ERROR_INFO_STRING)
25663  * 
25664  *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
25665  *         if not self._regions: return True
25666  *         for r in self._regions:
25667  */
25668   __pyx_k_tuple_204 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_204)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25669   __Pyx_GOTREF(__pyx_k_tuple_204);
25670   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25671   PyTuple_SET_ITEM(__pyx_k_tuple_204, 0, ((PyObject *)__pyx_n_s__self));
25672   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25673   __Pyx_INCREF(((PyObject *)__pyx_n_s__chrom));
25674   PyTuple_SET_ITEM(__pyx_k_tuple_204, 1, ((PyObject *)__pyx_n_s__chrom));
25675   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chrom));
25676   __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
25677   PyTuple_SET_ITEM(__pyx_k_tuple_204, 2, ((PyObject *)__pyx_n_s__pos));
25678   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
25679   __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
25680   PyTuple_SET_ITEM(__pyx_k_tuple_204, 3, ((PyObject *)__pyx_n_s__r));
25681   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
25682   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_204));
25683   __pyx_k_codeobj_205 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__inregion, 641, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_205)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25684
25685   /* "cvcf.pyx":647
25686  *         return False
25687  * 
25688  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
25689  *         cols = line.split('\t')
25690  *         if len(cols) != len(self._samples)+9:
25691  */
25692   __pyx_k_tuple_206 = PyTuple_New(45); if (unlikely(!__pyx_k_tuple_206)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25693   __Pyx_GOTREF(__pyx_k_tuple_206);
25694   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25695   PyTuple_SET_ITEM(__pyx_k_tuple_206, 0, ((PyObject *)__pyx_n_s__self));
25696   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25697   __Pyx_INCREF(((PyObject *)__pyx_n_s__line));
25698   PyTuple_SET_ITEM(__pyx_k_tuple_206, 1, ((PyObject *)__pyx_n_s__line));
25699   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__line));
25700   __Pyx_INCREF(((PyObject *)__pyx_n_s__lineparse));
25701   PyTuple_SET_ITEM(__pyx_k_tuple_206, 2, ((PyObject *)__pyx_n_s__lineparse));
25702   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lineparse));
25703   __Pyx_INCREF(((PyObject *)__pyx_n_s__cols));
25704   PyTuple_SET_ITEM(__pyx_k_tuple_206, 3, ((PyObject *)__pyx_n_s__cols));
25705   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cols));
25706   __Pyx_INCREF(((PyObject *)__pyx_n_s__chrom));
25707   PyTuple_SET_ITEM(__pyx_k_tuple_206, 4, ((PyObject *)__pyx_n_s__chrom));
25708   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chrom));
25709   __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
25710   PyTuple_SET_ITEM(__pyx_k_tuple_206, 5, ((PyObject *)__pyx_n_s__pos));
25711   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
25712   __Pyx_INCREF(((PyObject *)__pyx_n_s__id));
25713   PyTuple_SET_ITEM(__pyx_k_tuple_206, 6, ((PyObject *)__pyx_n_s__id));
25714   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__id));
25715   __Pyx_INCREF(((PyObject *)__pyx_n_s__ref));
25716   PyTuple_SET_ITEM(__pyx_k_tuple_206, 7, ((PyObject *)__pyx_n_s__ref));
25717   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ref));
25718   __Pyx_INCREF(((PyObject *)__pyx_n_s__c));
25719   PyTuple_SET_ITEM(__pyx_k_tuple_206, 8, ((PyObject *)__pyx_n_s__c));
25720   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c));
25721   __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
25722   PyTuple_SET_ITEM(__pyx_k_tuple_206, 9, ((PyObject *)__pyx_n_s__left));
25723   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
25724   __Pyx_INCREF(((PyObject *)__pyx_n_s__faref_leftflank));
25725   PyTuple_SET_ITEM(__pyx_k_tuple_206, 10, ((PyObject *)__pyx_n_s__faref_leftflank));
25726   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__faref_leftflank));
25727   __Pyx_INCREF(((PyObject *)__pyx_n_s__faref));
25728   PyTuple_SET_ITEM(__pyx_k_tuple_206, 11, ((PyObject *)__pyx_n_s__faref));
25729   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__faref));
25730   __Pyx_INCREF(((PyObject *)__pyx_n_s__alt));
25731   PyTuple_SET_ITEM(__pyx_k_tuple_206, 12, ((PyObject *)__pyx_n_s__alt));
25732   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__alt));
25733   __Pyx_INCREF(((PyObject *)__pyx_n_s__qual));
25734   PyTuple_SET_ITEM(__pyx_k_tuple_206, 13, ((PyObject *)__pyx_n_s__qual));
25735   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__qual));
25736   __Pyx_INCREF(((PyObject *)__pyx_n_s__filter));
25737   PyTuple_SET_ITEM(__pyx_k_tuple_206, 14, ((PyObject *)__pyx_n_s__filter));
25738   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__filter));
25739   __Pyx_INCREF(((PyObject *)__pyx_n_s__info));
25740   PyTuple_SET_ITEM(__pyx_k_tuple_206, 15, ((PyObject *)__pyx_n_s__info));
25741   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__info));
25742   __Pyx_INCREF(((PyObject *)__pyx_n_s__blurp));
25743   PyTuple_SET_ITEM(__pyx_k_tuple_206, 16, ((PyObject *)__pyx_n_s__blurp));
25744   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__blurp));
25745   __Pyx_INCREF(((PyObject *)__pyx_n_s__elts));
25746   PyTuple_SET_ITEM(__pyx_k_tuple_206, 17, ((PyObject *)__pyx_n_s__elts));
25747   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__elts));
25748   __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
25749   PyTuple_SET_ITEM(__pyx_k_tuple_206, 18, ((PyObject *)__pyx_n_s__v));
25750   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
25751   __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
25752   PyTuple_SET_ITEM(__pyx_k_tuple_206, 19, ((PyObject *)__pyx_n_s__format));
25753   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
25754   __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
25755   PyTuple_SET_ITEM(__pyx_k_tuple_206, 20, ((PyObject *)__pyx_n_s__f));
25756   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
25757   __Pyx_INCREF(((PyObject *)__pyx_n_s__newalts));
25758   PyTuple_SET_ITEM(__pyx_k_tuple_206, 21, ((PyObject *)__pyx_n_s__newalts));
25759   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newalts));
25760   __Pyx_INCREF(((PyObject *)__pyx_n_s__have_deletions));
25761   PyTuple_SET_ITEM(__pyx_k_tuple_206, 22, ((PyObject *)__pyx_n_s__have_deletions));
25762   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__have_deletions));
25763   __Pyx_INCREF(((PyObject *)__pyx_n_s__a));
25764   PyTuple_SET_ITEM(__pyx_k_tuple_206, 23, ((PyObject *)__pyx_n_s__a));
25765   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a));
25766   __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
25767   PyTuple_SET_ITEM(__pyx_k_tuple_206, 24, ((PyObject *)__pyx_n_s__l));
25768   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
25769   __Pyx_INCREF(((PyObject *)__pyx_n_s__addns));
25770   PyTuple_SET_ITEM(__pyx_k_tuple_206, 25, ((PyObject *)__pyx_n_s__addns));
25771   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__addns));
25772   __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
25773   PyTuple_SET_ITEM(__pyx_k_tuple_206, 26, ((PyObject *)__pyx_n_s__i));
25774   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
25775   __Pyx_INCREF(((PyObject *)__pyx_n_s__na));
25776   PyTuple_SET_ITEM(__pyx_k_tuple_206, 27, ((PyObject *)__pyx_n_s__na));
25777   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__na));
25778   __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
25779   PyTuple_SET_ITEM(__pyx_k_tuple_206, 28, ((PyObject *)__pyx_n_s__s));
25780   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
25781   __Pyx_INCREF(((PyObject *)__pyx_n_s__addn));
25782   PyTuple_SET_ITEM(__pyx_k_tuple_206, 29, ((PyObject *)__pyx_n_s__addn));
25783   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__addn));
25784   __Pyx_INCREF(((PyObject *)__pyx_n_s__allele));
25785   PyTuple_SET_ITEM(__pyx_k_tuple_206, 30, ((PyObject *)__pyx_n_s__allele));
25786   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__allele));
25787   __Pyx_INCREF(((PyObject *)__pyx_n_s__movable));
25788   PyTuple_SET_ITEM(__pyx_k_tuple_206, 31, ((PyObject *)__pyx_n_s__movable));
25789   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__movable));
25790   __Pyx_INCREF(((PyObject *)__pyx_n_s__longest));
25791   PyTuple_SET_ITEM(__pyx_k_tuple_206, 32, ((PyObject *)__pyx_n_s__longest));
25792   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__longest));
25793   __Pyx_INCREF(((PyObject *)__pyx_n_s__shortest));
25794   PyTuple_SET_ITEM(__pyx_k_tuple_206, 33, ((PyObject *)__pyx_n_s__shortest));
25795   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__shortest));
25796   __Pyx_INCREF(((PyObject *)__pyx_n_s__samples));
25797   PyTuple_SET_ITEM(__pyx_k_tuple_206, 34, ((PyObject *)__pyx_n_s__samples));
25798   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__samples));
25799   __Pyx_INCREF(((PyObject *)__pyx_n_s__sample));
25800   PyTuple_SET_ITEM(__pyx_k_tuple_206, 35, ((PyObject *)__pyx_n_s__sample));
25801   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sample));
25802   __Pyx_INCREF(((PyObject *)__pyx_n_s__dict));
25803   PyTuple_SET_ITEM(__pyx_k_tuple_206, 36, ((PyObject *)__pyx_n_s__dict));
25804   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dict));
25805   __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
25806   PyTuple_SET_ITEM(__pyx_k_tuple_206, 37, ((PyObject *)__pyx_n_s__values));
25807   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
25808   __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
25809   PyTuple_SET_ITEM(__pyx_k_tuple_206, 38, ((PyObject *)__pyx_n_s__idx));
25810   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
25811   __Pyx_INCREF(((PyObject *)__pyx_n_s__expected));
25812   PyTuple_SET_ITEM(__pyx_k_tuple_206, 39, ((PyObject *)__pyx_n_s__expected));
25813   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__expected));
25814   __Pyx_INCREF(((PyObject *)__pyx_n_s__value));
25815   PyTuple_SET_ITEM(__pyx_k_tuple_206, 40, ((PyObject *)__pyx_n_s__value));
25816   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__value));
25817   __Pyx_INCREF(((PyObject *)__pyx_n_s__d));
25818   PyTuple_SET_ITEM(__pyx_k_tuple_206, 41, ((PyObject *)__pyx_n_s__d));
25819   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d));
25820   __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
25821   PyTuple_SET_ITEM(__pyx_k_tuple_206, 42, ((PyObject *)__pyx_n_s__key));
25822   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
25823   __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
25824   PyTuple_SET_ITEM(__pyx_k_tuple_206, 43, ((PyObject *)__pyx_n_s__genexpr));
25825   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
25826   __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
25827   PyTuple_SET_ITEM(__pyx_k_tuple_206, 44, ((PyObject *)__pyx_n_s__genexpr));
25828   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
25829   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_206));
25830   __pyx_k_codeobj_207 = (PyObject*)__Pyx_PyCode_New(3, 0, 45, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse_data, 647, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_207)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25831
25832   /* "cvcf.pyx":857
25833  * 
25834  * 
25835  *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
25836  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
25837  *         for k in required:
25838  */
25839   __pyx_k_tuple_208 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_208)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25840   __Pyx_GOTREF(__pyx_k_tuple_208);
25841   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25842   PyTuple_SET_ITEM(__pyx_k_tuple_208, 0, ((PyObject *)__pyx_n_s__self));
25843   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25844   __Pyx_INCREF(((PyObject *)__pyx_n_s__stream));
25845   PyTuple_SET_ITEM(__pyx_k_tuple_208, 1, ((PyObject *)__pyx_n_s__stream));
25846   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stream));
25847   __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
25848   PyTuple_SET_ITEM(__pyx_k_tuple_208, 2, ((PyObject *)__pyx_n_s__data));
25849   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
25850   __Pyx_INCREF(((PyObject *)__pyx_n_s__required));
25851   PyTuple_SET_ITEM(__pyx_k_tuple_208, 3, ((PyObject *)__pyx_n_s__required));
25852   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__required));
25853   __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
25854   PyTuple_SET_ITEM(__pyx_k_tuple_208, 4, ((PyObject *)__pyx_n_s__k));
25855   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
25856   __Pyx_INCREF(((PyObject *)__pyx_n_s__alt));
25857   PyTuple_SET_ITEM(__pyx_k_tuple_208, 5, ((PyObject *)__pyx_n_s__alt));
25858   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__alt));
25859   __Pyx_INCREF(((PyObject *)__pyx_n_s__filter));
25860   PyTuple_SET_ITEM(__pyx_k_tuple_208, 6, ((PyObject *)__pyx_n_s__filter));
25861   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__filter));
25862   __Pyx_INCREF(((PyObject *)__pyx_n_s__qual));
25863   PyTuple_SET_ITEM(__pyx_k_tuple_208, 7, ((PyObject *)__pyx_n_s__qual));
25864   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__qual));
25865   __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
25866   PyTuple_SET_ITEM(__pyx_k_tuple_208, 8, ((PyObject *)__pyx_n_s__output));
25867   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
25868   __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
25869   PyTuple_SET_ITEM(__pyx_k_tuple_208, 9, ((PyObject *)__pyx_n_s__s));
25870   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
25871   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_208));
25872   __pyx_k_codeobj_209 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__write_data, 857, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_209)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25873
25874   /* "cvcf.pyx":886
25875  *         stream.write( "\t".join(output) + "\n" )
25876  * 
25877  *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
25878  *         self._lineno = 0
25879  *         for line in stream:
25880  */
25881   __pyx_k_tuple_210 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_210)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25882   __Pyx_GOTREF(__pyx_k_tuple_210);
25883   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25884   PyTuple_SET_ITEM(__pyx_k_tuple_210, 0, ((PyObject *)__pyx_n_s__self));
25885   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25886   __Pyx_INCREF(((PyObject *)__pyx_n_s__stream));
25887   PyTuple_SET_ITEM(__pyx_k_tuple_210, 1, ((PyObject *)__pyx_n_s__stream));
25888   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stream));
25889   __Pyx_INCREF(((PyObject *)__pyx_n_s__line));
25890   PyTuple_SET_ITEM(__pyx_k_tuple_210, 2, ((PyObject *)__pyx_n_s__line));
25891   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__line));
25892   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_210));
25893   __pyx_k_codeobj_211 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s___parse_header, 886, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_211)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25894
25895   /* "cvcf.pyx":899
25896  *         return line
25897  * 
25898  *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
25899  *         # deal with files with header only
25900  *         if line.startswith("##"): return
25901  */
25902   __pyx_k_tuple_212 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25903   __Pyx_GOTREF(__pyx_k_tuple_212);
25904   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25905   PyTuple_SET_ITEM(__pyx_k_tuple_212, 0, ((PyObject *)__pyx_n_s__self));
25906   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25907   __Pyx_INCREF(((PyObject *)__pyx_n_s__line));
25908   PyTuple_SET_ITEM(__pyx_k_tuple_212, 1, ((PyObject *)__pyx_n_s__line));
25909   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__line));
25910   __Pyx_INCREF(((PyObject *)__pyx_n_s__stream));
25911   PyTuple_SET_ITEM(__pyx_k_tuple_212, 2, ((PyObject *)__pyx_n_s__stream));
25912   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stream));
25913   __Pyx_INCREF(((PyObject *)__pyx_n_s__d));
25914   PyTuple_SET_ITEM(__pyx_k_tuple_212, 3, ((PyObject *)__pyx_n_s__d));
25915   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d));
25916   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_212));
25917   __pyx_k_codeobj_213 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s___parse, 899, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25918
25919   /* "cvcf.pyx":917
25920  *     ######################################################################################################
25921  * 
25922  *     def getsamples(self):             # <<<<<<<<<<<<<<
25923  *         """ List of samples in VCF file """
25924  *         return self._samples
25925  */
25926   __pyx_k_tuple_214 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_214)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25927   __Pyx_GOTREF(__pyx_k_tuple_214);
25928   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25929   PyTuple_SET_ITEM(__pyx_k_tuple_214, 0, ((PyObject *)__pyx_n_s__self));
25930   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25931   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_214));
25932   __pyx_k_codeobj_215 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getsamples, 917, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_215)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25933
25934   /* "cvcf.pyx":921
25935  *         return self._samples
25936  * 
25937  *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
25938  *         """ List of samples in VCF file """
25939  *         self._samples = samples
25940  */
25941   __pyx_k_tuple_216 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_216)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25942   __Pyx_GOTREF(__pyx_k_tuple_216);
25943   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25944   PyTuple_SET_ITEM(__pyx_k_tuple_216, 0, ((PyObject *)__pyx_n_s__self));
25945   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25946   __Pyx_INCREF(((PyObject *)__pyx_n_s__samples));
25947   PyTuple_SET_ITEM(__pyx_k_tuple_216, 1, ((PyObject *)__pyx_n_s__samples));
25948   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__samples));
25949   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_216));
25950   __pyx_k_codeobj_217 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setsamples, 921, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_217)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25951
25952   /* "cvcf.pyx":925
25953  *         self._samples = samples
25954  * 
25955  *     def getheader(self):             # <<<<<<<<<<<<<<
25956  *         """ List of header key-value pairs (strings) """
25957  *         return self._header
25958  */
25959   __pyx_k_tuple_218 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_218)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25960   __Pyx_GOTREF(__pyx_k_tuple_218);
25961   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25962   PyTuple_SET_ITEM(__pyx_k_tuple_218, 0, ((PyObject *)__pyx_n_s__self));
25963   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25964   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_218));
25965   __pyx_k_codeobj_219 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getheader, 925, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_219)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25966
25967   /* "cvcf.pyx":929
25968  *         return self._header
25969  * 
25970  *     def setheader(self,header):             # <<<<<<<<<<<<<<
25971  *         """ List of header key-value pairs (strings) """
25972  *         self._header = header
25973  */
25974   __pyx_k_tuple_220 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_220)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25975   __Pyx_GOTREF(__pyx_k_tuple_220);
25976   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25977   PyTuple_SET_ITEM(__pyx_k_tuple_220, 0, ((PyObject *)__pyx_n_s__self));
25978   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25979   __Pyx_INCREF(((PyObject *)__pyx_n_s__header));
25980   PyTuple_SET_ITEM(__pyx_k_tuple_220, 1, ((PyObject *)__pyx_n_s__header));
25981   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__header));
25982   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_220));
25983   __pyx_k_codeobj_221 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setheader, 929, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_221)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25984
25985   /* "cvcf.pyx":933
25986  *         self._header = header
25987  * 
25988  *     def getinfo(self):             # <<<<<<<<<<<<<<
25989  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
25990  *         return self._info
25991  */
25992   __pyx_k_tuple_222 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_222)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25993   __Pyx_GOTREF(__pyx_k_tuple_222);
25994   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
25995   PyTuple_SET_ITEM(__pyx_k_tuple_222, 0, ((PyObject *)__pyx_n_s__self));
25996   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
25997   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_222));
25998   __pyx_k_codeobj_223 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getinfo, 933, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_223)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
25999
26000   /* "cvcf.pyx":937
26001  *         return self._info
26002  * 
26003  *     def setinfo(self,info):             # <<<<<<<<<<<<<<
26004  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
26005  *         self._info = info
26006  */
26007   __pyx_k_tuple_224 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_224)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26008   __Pyx_GOTREF(__pyx_k_tuple_224);
26009   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26010   PyTuple_SET_ITEM(__pyx_k_tuple_224, 0, ((PyObject *)__pyx_n_s__self));
26011   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26012   __Pyx_INCREF(((PyObject *)__pyx_n_s__info));
26013   PyTuple_SET_ITEM(__pyx_k_tuple_224, 1, ((PyObject *)__pyx_n_s__info));
26014   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__info));
26015   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_224));
26016   __pyx_k_codeobj_225 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setinfo, 937, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_225)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26017
26018   /* "cvcf.pyx":941
26019  *         self._info = info
26020  * 
26021  *     def getformat(self):             # <<<<<<<<<<<<<<
26022  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
26023  *         return self._format
26024  */
26025   __pyx_k_tuple_226 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_226)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26026   __Pyx_GOTREF(__pyx_k_tuple_226);
26027   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26028   PyTuple_SET_ITEM(__pyx_k_tuple_226, 0, ((PyObject *)__pyx_n_s__self));
26029   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26030   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_226));
26031   __pyx_k_codeobj_227 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getformat, 941, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_227)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26032
26033   /* "cvcf.pyx":945
26034  *         return self._format
26035  * 
26036  *     def setformat(self,format):             # <<<<<<<<<<<<<<
26037  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
26038  *         self._format = format
26039  */
26040   __pyx_k_tuple_228 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_228)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26041   __Pyx_GOTREF(__pyx_k_tuple_228);
26042   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26043   PyTuple_SET_ITEM(__pyx_k_tuple_228, 0, ((PyObject *)__pyx_n_s__self));
26044   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26045   __Pyx_INCREF(((PyObject *)__pyx_n_s__format));
26046   PyTuple_SET_ITEM(__pyx_k_tuple_228, 1, ((PyObject *)__pyx_n_s__format));
26047   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__format));
26048   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_228));
26049   __pyx_k_codeobj_229 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setformat, 945, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_229)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26050
26051   /* "cvcf.pyx":949
26052  *         self._format = format
26053  * 
26054  *     def getfilter(self):             # <<<<<<<<<<<<<<
26055  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
26056  *         return self._filter
26057  */
26058   __pyx_k_tuple_230 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_230)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26059   __Pyx_GOTREF(__pyx_k_tuple_230);
26060   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26061   PyTuple_SET_ITEM(__pyx_k_tuple_230, 0, ((PyObject *)__pyx_n_s__self));
26062   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26063   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_230));
26064   __pyx_k_codeobj_231 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__getfilter, 949, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_231)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26065
26066   /* "cvcf.pyx":953
26067  *         return self._filter
26068  * 
26069  *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
26070  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
26071  *         self._filter = filter
26072  */
26073   __pyx_k_tuple_232 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_232)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26074   __Pyx_GOTREF(__pyx_k_tuple_232);
26075   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26076   PyTuple_SET_ITEM(__pyx_k_tuple_232, 0, ((PyObject *)__pyx_n_s__self));
26077   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26078   __Pyx_INCREF(((PyObject *)__pyx_n_s__filter));
26079   PyTuple_SET_ITEM(__pyx_k_tuple_232, 1, ((PyObject *)__pyx_n_s__filter));
26080   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__filter));
26081   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_232));
26082   __pyx_k_codeobj_233 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setfilter, 953, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_233)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26083
26084   /* "cvcf.pyx":957
26085  *         self._filter = filter
26086  * 
26087  *     def setversion(self, version):             # <<<<<<<<<<<<<<
26088  *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")
26089  *         self._version = version
26090  */
26091   __pyx_k_tuple_234 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_234)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26092   __Pyx_GOTREF(__pyx_k_tuple_234);
26093   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26094   PyTuple_SET_ITEM(__pyx_k_tuple_234, 0, ((PyObject *)__pyx_n_s__self));
26095   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26096   __Pyx_INCREF(((PyObject *)__pyx_n_s__version));
26097   PyTuple_SET_ITEM(__pyx_k_tuple_234, 1, ((PyObject *)__pyx_n_s__version));
26098   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__version));
26099   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_234));
26100   __pyx_k_codeobj_235 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setversion, 957, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_235)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26101
26102   /* "cvcf.pyx":961
26103  *         self._version = version
26104  * 
26105  *     def setregions(self, regions):             # <<<<<<<<<<<<<<
26106  *         self._regions = regions
26107  * 
26108  */
26109   __pyx_k_tuple_236 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_236)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26110   __Pyx_GOTREF(__pyx_k_tuple_236);
26111   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26112   PyTuple_SET_ITEM(__pyx_k_tuple_236, 0, ((PyObject *)__pyx_n_s__self));
26113   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26114   __Pyx_INCREF(((PyObject *)__pyx_n_s__regions));
26115   PyTuple_SET_ITEM(__pyx_k_tuple_236, 1, ((PyObject *)__pyx_n_s__regions));
26116   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__regions));
26117   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_236));
26118   __pyx_k_codeobj_237 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setregions, 961, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_237)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26119
26120   /* "cvcf.pyx":964
26121  *         self._regions = regions
26122  * 
26123  *     def setreference(self, ref):             # <<<<<<<<<<<<<<
26124  *         """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """
26125  *         self._reference = ref
26126  */
26127   __pyx_k_tuple_238 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_238)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26128   __Pyx_GOTREF(__pyx_k_tuple_238);
26129   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26130   PyTuple_SET_ITEM(__pyx_k_tuple_238, 0, ((PyObject *)__pyx_n_s__self));
26131   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26132   __Pyx_INCREF(((PyObject *)__pyx_n_s__ref));
26133   PyTuple_SET_ITEM(__pyx_k_tuple_238, 1, ((PyObject *)__pyx_n_s__ref));
26134   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ref));
26135   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_238));
26136   __pyx_k_codeobj_239 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__setreference, 964, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_239)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26137
26138   /* "cvcf.pyx":968
26139  *         self._reference = ref
26140  * 
26141  *     def ignoreerror(self, errorstring):             # <<<<<<<<<<<<<<
26142  *         try:             self._ignored_errors.add(self.__dict__[errorstring])
26143  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
26144  */
26145   __pyx_k_tuple_240 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_240)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26146   __Pyx_GOTREF(__pyx_k_tuple_240);
26147   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26148   PyTuple_SET_ITEM(__pyx_k_tuple_240, 0, ((PyObject *)__pyx_n_s__self));
26149   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26150   __Pyx_INCREF(((PyObject *)__pyx_n_s__errorstring));
26151   PyTuple_SET_ITEM(__pyx_k_tuple_240, 1, ((PyObject *)__pyx_n_s__errorstring));
26152   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__errorstring));
26153   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_240));
26154   __pyx_k_codeobj_241 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__ignoreerror, 968, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_241)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26155
26156   /* "cvcf.pyx":972
26157  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
26158  * 
26159  *     def warnerror(self, errorstring):             # <<<<<<<<<<<<<<
26160  *         try:             self._warn_errors.add(self.__dict__[errorstring])
26161  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
26162  */
26163   __pyx_k_tuple_242 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_242)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26164   __Pyx_GOTREF(__pyx_k_tuple_242);
26165   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26166   PyTuple_SET_ITEM(__pyx_k_tuple_242, 0, ((PyObject *)__pyx_n_s__self));
26167   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26168   __Pyx_INCREF(((PyObject *)__pyx_n_s__errorstring));
26169   PyTuple_SET_ITEM(__pyx_k_tuple_242, 1, ((PyObject *)__pyx_n_s__errorstring));
26170   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__errorstring));
26171   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_242));
26172   __pyx_k_codeobj_243 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__warnerror, 972, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_243)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26173
26174   /* "cvcf.pyx":976
26175  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
26176  * 
26177  *     def parse(self, stream):             # <<<<<<<<<<<<<<
26178  *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
26179  *         last_line = self._parse_header(stream)
26180  */
26181   __pyx_k_tuple_244 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_244)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26182   __Pyx_GOTREF(__pyx_k_tuple_244);
26183   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26184   PyTuple_SET_ITEM(__pyx_k_tuple_244, 0, ((PyObject *)__pyx_n_s__self));
26185   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26186   __Pyx_INCREF(((PyObject *)__pyx_n_s__stream));
26187   PyTuple_SET_ITEM(__pyx_k_tuple_244, 1, ((PyObject *)__pyx_n_s__stream));
26188   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stream));
26189   __Pyx_INCREF(((PyObject *)__pyx_n_s__last_line));
26190   PyTuple_SET_ITEM(__pyx_k_tuple_244, 2, ((PyObject *)__pyx_n_s__last_line));
26191   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__last_line));
26192   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_244));
26193   __pyx_k_codeobj_245 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__parse, 976, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_245)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26194
26195   /* "cvcf.pyx":983
26196  *         return self._parse(last_line, stream)
26197  * 
26198  *     def write(self, stream, datagenerator):             # <<<<<<<<<<<<<<
26199  *         """ Writes a VCF file to a stream, using a data generator (or list) """
26200  *         self.write_header(stream)
26201  */
26202   __pyx_k_tuple_246 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_246)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26203   __Pyx_GOTREF(__pyx_k_tuple_246);
26204   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26205   PyTuple_SET_ITEM(__pyx_k_tuple_246, 0, ((PyObject *)__pyx_n_s__self));
26206   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26207   __Pyx_INCREF(((PyObject *)__pyx_n_s__stream));
26208   PyTuple_SET_ITEM(__pyx_k_tuple_246, 1, ((PyObject *)__pyx_n_s__stream));
26209   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stream));
26210   __Pyx_INCREF(((PyObject *)__pyx_n_s__datagenerator));
26211   PyTuple_SET_ITEM(__pyx_k_tuple_246, 2, ((PyObject *)__pyx_n_s__datagenerator));
26212   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datagenerator));
26213   __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
26214   PyTuple_SET_ITEM(__pyx_k_tuple_246, 3, ((PyObject *)__pyx_n_s__data));
26215   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
26216   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_246));
26217   __pyx_k_codeobj_247 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__write, 983, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_247)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26218
26219   /* "cvcf.pyx":989
26220  *         for data in datagenerator: self.write_data(stream,data)
26221  * 
26222  *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
26223  *         """ Writes a VCF header """
26224  *         self.write_header(stream)
26225  */
26226   __pyx_k_tuple_248 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_248)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26227   __Pyx_GOTREF(__pyx_k_tuple_248);
26228   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26229   PyTuple_SET_ITEM(__pyx_k_tuple_248, 0, ((PyObject *)__pyx_n_s__self));
26230   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26231   __Pyx_INCREF(((PyObject *)__pyx_n_s__stream));
26232   PyTuple_SET_ITEM(__pyx_k_tuple_248, 1, ((PyObject *)__pyx_n_s__stream));
26233   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stream));
26234   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_248));
26235   __pyx_k_codeobj_249 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__writeheader, 989, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_249)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26236
26237   /* "cvcf.pyx":994
26238  *         self.write_heading(stream)
26239  * 
26240  *     def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2):             # <<<<<<<<<<<<<<
26241  *         """ Utility function: compares two calls for equality """
26242  *         # a variant should always be assigned to a unique position, one base before
26243  */
26244   __pyx_k_tuple_250 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_250)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26245   __Pyx_GOTREF(__pyx_k_tuple_250);
26246   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26247   PyTuple_SET_ITEM(__pyx_k_tuple_250, 0, ((PyObject *)__pyx_n_s__self));
26248   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26249   __Pyx_INCREF(((PyObject *)__pyx_n_s__pos1));
26250   PyTuple_SET_ITEM(__pyx_k_tuple_250, 1, ((PyObject *)__pyx_n_s__pos1));
26251   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos1));
26252   __Pyx_INCREF(((PyObject *)__pyx_n_s__ref1));
26253   PyTuple_SET_ITEM(__pyx_k_tuple_250, 2, ((PyObject *)__pyx_n_s__ref1));
26254   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ref1));
26255   __Pyx_INCREF(((PyObject *)__pyx_n_s__alt1));
26256   PyTuple_SET_ITEM(__pyx_k_tuple_250, 3, ((PyObject *)__pyx_n_s__alt1));
26257   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__alt1));
26258   __Pyx_INCREF(((PyObject *)__pyx_n_s__pos2));
26259   PyTuple_SET_ITEM(__pyx_k_tuple_250, 4, ((PyObject *)__pyx_n_s__pos2));
26260   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos2));
26261   __Pyx_INCREF(((PyObject *)__pyx_n_s__ref2));
26262   PyTuple_SET_ITEM(__pyx_k_tuple_250, 5, ((PyObject *)__pyx_n_s__ref2));
26263   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ref2));
26264   __Pyx_INCREF(((PyObject *)__pyx_n_s__alt2));
26265   PyTuple_SET_ITEM(__pyx_k_tuple_250, 6, ((PyObject *)__pyx_n_s__alt2));
26266   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__alt2));
26267   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_250));
26268   __pyx_k_codeobj_251 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__compare_calls, 994, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_251)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26269
26270   /* "cvcf.pyx":1016
26271  * ###########################################################################################################
26272  * 
26273  *     def connect( self, filename ):             # <<<<<<<<<<<<<<
26274  *         '''connect to tabix file.'''
26275  *         self.tabixfile = pysam.Tabixfile( filename )
26276  */
26277   __pyx_k_tuple_252 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_252)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26278   __Pyx_GOTREF(__pyx_k_tuple_252);
26279   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26280   PyTuple_SET_ITEM(__pyx_k_tuple_252, 0, ((PyObject *)__pyx_n_s__self));
26281   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26282   __Pyx_INCREF(((PyObject *)__pyx_n_s__filename));
26283   PyTuple_SET_ITEM(__pyx_k_tuple_252, 1, ((PyObject *)__pyx_n_s__filename));
26284   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__filename));
26285   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_252));
26286   __pyx_k_codeobj_253 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__connect, 1016, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_253)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26287
26288   /* "cvcf.pyx":1021
26289  *         self._parse_header(self.tabixfile.header)
26290  * 
26291  *     def fetch(self,             # <<<<<<<<<<<<<<
26292  *               reference = None,
26293  *               start = None,
26294  */
26295   __pyx_k_tuple_254 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_254)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26296   __Pyx_GOTREF(__pyx_k_tuple_254);
26297   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26298   PyTuple_SET_ITEM(__pyx_k_tuple_254, 0, ((PyObject *)__pyx_n_s__self));
26299   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26300   __Pyx_INCREF(((PyObject *)__pyx_n_s__reference));
26301   PyTuple_SET_ITEM(__pyx_k_tuple_254, 1, ((PyObject *)__pyx_n_s__reference));
26302   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__reference));
26303   __Pyx_INCREF(((PyObject *)__pyx_n_s__start));
26304   PyTuple_SET_ITEM(__pyx_k_tuple_254, 2, ((PyObject *)__pyx_n_s__start));
26305   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__start));
26306   __Pyx_INCREF(((PyObject *)__pyx_n_s__end));
26307   PyTuple_SET_ITEM(__pyx_k_tuple_254, 3, ((PyObject *)__pyx_n_s__end));
26308   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__end));
26309   __Pyx_INCREF(((PyObject *)__pyx_n_s__region));
26310   PyTuple_SET_ITEM(__pyx_k_tuple_254, 4, ((PyObject *)__pyx_n_s__region));
26311   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__region));
26312   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_254));
26313   __pyx_k_codeobj_255 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__fetch, 1021, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26314   __pyx_k_tuple_256 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26315   __Pyx_GOTREF(__pyx_k_tuple_256);
26316   __Pyx_INCREF(((PyObject *)Py_None));
26317   PyTuple_SET_ITEM(__pyx_k_tuple_256, 0, ((PyObject *)Py_None));
26318   __Pyx_GIVEREF(((PyObject *)Py_None));
26319   __Pyx_INCREF(((PyObject *)Py_None));
26320   PyTuple_SET_ITEM(__pyx_k_tuple_256, 1, ((PyObject *)Py_None));
26321   __Pyx_GIVEREF(((PyObject *)Py_None));
26322   __Pyx_INCREF(((PyObject *)Py_None));
26323   PyTuple_SET_ITEM(__pyx_k_tuple_256, 2, ((PyObject *)Py_None));
26324   __Pyx_GIVEREF(((PyObject *)Py_None));
26325   __Pyx_INCREF(((PyObject *)Py_None));
26326   PyTuple_SET_ITEM(__pyx_k_tuple_256, 3, ((PyObject *)Py_None));
26327   __Pyx_GIVEREF(((PyObject *)Py_None));
26328   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_256));
26329
26330   /* "cvcf.pyx":1030
26331  *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
26332  * 
26333  *     def validate( self, record ):             # <<<<<<<<<<<<<<
26334  *         '''validate vcf record.
26335  * 
26336  */
26337   __pyx_k_tuple_257 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_257)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26338   __Pyx_GOTREF(__pyx_k_tuple_257);
26339   __Pyx_INCREF(((PyObject *)__pyx_n_s__self));
26340   PyTuple_SET_ITEM(__pyx_k_tuple_257, 0, ((PyObject *)__pyx_n_s__self));
26341   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__self));
26342   __Pyx_INCREF(((PyObject *)__pyx_n_s__record));
26343   PyTuple_SET_ITEM(__pyx_k_tuple_257, 1, ((PyObject *)__pyx_n_s__record));
26344   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__record));
26345   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_257));
26346   __pyx_k_codeobj_258 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_134, __pyx_n_s__validate, 1030, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_258)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26347   __Pyx_RefNannyFinishContext();
26348   return 0;
26349   __pyx_L1_error:;
26350   __Pyx_RefNannyFinishContext();
26351   return -1;
26352 }
26353
26354 static int __Pyx_InitGlobals(void) {
26355   if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26356   __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;};
26357   __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;};
26358   __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;};
26359   __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;};
26360   __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;};
26361   __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;};
26362   __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;};
26363   __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;};
26364   __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;};
26365   __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;};
26366   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26367   __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;};
26368   __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;};
26369   __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26370   __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26371   __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26372   __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26373   __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26374   __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26375   __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26376   __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26377   __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26378   __pyx_int_21 = PyInt_FromLong(21); if (unlikely(!__pyx_int_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26379   __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26380   __pyx_int_23 = PyInt_FromLong(23); if (unlikely(!__pyx_int_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26381   __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26382   __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26383   __pyx_int_26 = PyInt_FromLong(26); if (unlikely(!__pyx_int_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26384   __pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26385   __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26386   __pyx_int_29 = PyInt_FromLong(29); if (unlikely(!__pyx_int_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26387   __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26388   __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26389   __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26390   __pyx_int_33 = PyInt_FromLong(33); if (unlikely(!__pyx_int_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26391   __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26392   __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26393   __pyx_int_3000000000 = PyInt_FromString((char *)"3000000000", 0, 0); if (unlikely(!__pyx_int_3000000000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26394   return 0;
26395   __pyx_L1_error:;
26396   return -1;
26397 }
26398
26399 #if PY_MAJOR_VERSION < 3
26400 PyMODINIT_FUNC initcvcf(void); /*proto*/
26401 PyMODINIT_FUNC initcvcf(void)
26402 #else
26403 PyMODINIT_FUNC PyInit_cvcf(void); /*proto*/
26404 PyMODINIT_FUNC PyInit_cvcf(void)
26405 #endif
26406 {
26407   PyObject *__pyx_t_1 = NULL;
26408   PyObject *__pyx_t_2 = NULL;
26409   PyObject *__pyx_t_3 = NULL;
26410   __Pyx_RefNannyDeclarations
26411   #if CYTHON_REFNANNY
26412   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
26413   if (!__Pyx_RefNanny) {
26414       PyErr_Clear();
26415       __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
26416       if (!__Pyx_RefNanny)
26417           Py_FatalError("failed to import 'refnanny' module");
26418   }
26419   #endif
26420   __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_cvcf(void)", 0);
26421   if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26422   __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;}
26423   __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;}
26424   #ifdef __Pyx_CyFunction_USED
26425   if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26426   #endif
26427   #ifdef __Pyx_FusedFunction_USED
26428   if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26429   #endif
26430   #ifdef __Pyx_Generator_USED
26431   if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26432   #endif
26433   /*--- Library function declarations ---*/
26434   /*--- Threads initialization code ---*/
26435   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
26436   #ifdef WITH_THREAD /* Python build with threading support? */
26437   PyEval_InitThreads();
26438   #endif
26439   #endif
26440   /*--- Module creation code ---*/
26441   #if PY_MAJOR_VERSION < 3
26442   __pyx_m = Py_InitModule4(__Pyx_NAMESTR("cvcf"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
26443   #else
26444   __pyx_m = PyModule_Create(&__pyx_moduledef);
26445   #endif
26446   if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26447   #if PY_MAJOR_VERSION < 3
26448   Py_INCREF(__pyx_m);
26449   #endif
26450   __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
26451   if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26452   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26453   /*--- Initialize various global constants etc. ---*/
26454   if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26455   if (__pyx_module_is_main_cvcf) {
26456     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;};
26457   }
26458   /*--- Builtin init code ---*/
26459   if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26460   /*--- Constants init code ---*/
26461   if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26462   /*--- Global init code ---*/
26463   /*--- Variable export code ---*/
26464   /*--- Function export code ---*/
26465   /*--- Type init code ---*/
26466   __pyx_ptype_10TabProxies_TupleProxy = __Pyx_ImportType("TabProxies", "TupleProxy", sizeof(struct __pyx_obj_10TabProxies_TupleProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_TupleProxy)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26467   __pyx_vtabptr_10TabProxies_TupleProxy = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_TupleProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_TupleProxy)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26468   __pyx_vtabptr_4cvcf_VCFRecord = &__pyx_vtable_4cvcf_VCFRecord;
26469   __pyx_vtable_4cvcf_VCFRecord.__pyx_base = *__pyx_vtabptr_10TabProxies_TupleProxy;
26470   __pyx_vtable_4cvcf_VCFRecord.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_4cvcf_9VCFRecord_update;
26471   __pyx_type_4cvcf_VCFRecord.tp_base = __pyx_ptype_10TabProxies_TupleProxy;
26472   if (PyType_Ready(&__pyx_type_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26473   if (__Pyx_SetVtable(__pyx_type_4cvcf_VCFRecord.tp_dict, __pyx_vtabptr_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26474   if (__Pyx_SetAttrString(__pyx_m, "VCFRecord", (PyObject *)&__pyx_type_4cvcf_VCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26475   __pyx_ptype_4cvcf_VCFRecord = &__pyx_type_4cvcf_VCFRecord;
26476   __pyx_ptype_6ctabix_Parser = __Pyx_ImportType("ctabix", "Parser", sizeof(struct __pyx_obj_6ctabix_Parser), 1); if (unlikely(!__pyx_ptype_6ctabix_Parser)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26477   __pyx_type_4cvcf_asVCFRecord.tp_base = __pyx_ptype_6ctabix_Parser;
26478   if (PyType_Ready(&__pyx_type_4cvcf_asVCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26479   if (__Pyx_SetAttrString(__pyx_m, "asVCFRecord", (PyObject *)&__pyx_type_4cvcf_asVCFRecord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26480   __pyx_ptype_4cvcf_asVCFRecord = &__pyx_type_4cvcf_asVCFRecord;
26481   if (PyType_Ready(&__pyx_type_4cvcf___pyx_scope_struct__parse_data) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26482   __pyx_ptype_4cvcf___pyx_scope_struct__parse_data = &__pyx_type_4cvcf___pyx_scope_struct__parse_data;
26483   if (PyType_Ready(&__pyx_type_4cvcf___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26484   __pyx_ptype_4cvcf___pyx_scope_struct_1_genexpr = &__pyx_type_4cvcf___pyx_scope_struct_1_genexpr;
26485   if (PyType_Ready(&__pyx_type_4cvcf___pyx_scope_struct_2__parse) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26486   __pyx_ptype_4cvcf___pyx_scope_struct_2__parse = &__pyx_type_4cvcf___pyx_scope_struct_2__parse;
26487   /*--- Type import code ---*/
26488   __pyx_ptype_6ctabix_Tabixfile = __Pyx_ImportType("ctabix", "Tabixfile", sizeof(struct __pyx_obj_6ctabix_Tabixfile), 1); if (unlikely(!__pyx_ptype_6ctabix_Tabixfile)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26489   __pyx_ptype_6ctabix_TabixIterator = __Pyx_ImportType("ctabix", "TabixIterator", sizeof(struct __pyx_obj_6ctabix_TabixIterator), 1); if (unlikely(!__pyx_ptype_6ctabix_TabixIterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26490   __pyx_ptype_6ctabix_TabixHeaderIterator = __Pyx_ImportType("ctabix", "TabixHeaderIterator", sizeof(struct __pyx_obj_6ctabix_TabixHeaderIterator), 1); if (unlikely(!__pyx_ptype_6ctabix_TabixHeaderIterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26491   __pyx_ptype_6ctabix_asTuple = __Pyx_ImportType("ctabix", "asTuple", sizeof(struct __pyx_obj_6ctabix_asTuple), 1); if (unlikely(!__pyx_ptype_6ctabix_asTuple)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26492   __pyx_ptype_6ctabix_asGTF = __Pyx_ImportType("ctabix", "asGTF", sizeof(struct __pyx_obj_6ctabix_asGTF), 1); if (unlikely(!__pyx_ptype_6ctabix_asGTF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26493   __pyx_ptype_6ctabix_asBed = __Pyx_ImportType("ctabix", "asBed", sizeof(struct __pyx_obj_6ctabix_asBed), 1); if (unlikely(!__pyx_ptype_6ctabix_asBed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26494   __pyx_ptype_6ctabix_asVCF = __Pyx_ImportType("ctabix", "asVCF", sizeof(struct __pyx_obj_6ctabix_asVCF), 1); if (unlikely(!__pyx_ptype_6ctabix_asVCF)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26495   __pyx_ptype_6ctabix_TabixIteratorParsed = __Pyx_ImportType("ctabix", "TabixIteratorParsed", sizeof(struct __pyx_obj_6ctabix_TabixIteratorParsed), 1); if (unlikely(!__pyx_ptype_6ctabix_TabixIteratorParsed)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26496   __pyx_ptype_6ctabix_tabix_inplace_iterator = __Pyx_ImportType("ctabix", "tabix_inplace_iterator", sizeof(struct __pyx_obj_6ctabix_tabix_inplace_iterator), 1); if (unlikely(!__pyx_ptype_6ctabix_tabix_inplace_iterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26497   __pyx_vtabptr_6ctabix_tabix_inplace_iterator = (struct __pyx_vtabstruct_6ctabix_tabix_inplace_iterator*)__Pyx_GetVtable(__pyx_ptype_6ctabix_tabix_inplace_iterator->tp_dict); if (unlikely(!__pyx_vtabptr_6ctabix_tabix_inplace_iterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26498   __pyx_ptype_6ctabix_tabix_copy_iterator = __Pyx_ImportType("ctabix", "tabix_copy_iterator", sizeof(struct __pyx_obj_6ctabix_tabix_copy_iterator), 1); if (unlikely(!__pyx_ptype_6ctabix_tabix_copy_iterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26499   __pyx_vtabptr_6ctabix_tabix_copy_iterator = (struct __pyx_vtabstruct_6ctabix_tabix_copy_iterator*)__Pyx_GetVtable(__pyx_ptype_6ctabix_tabix_copy_iterator->tp_dict); if (unlikely(!__pyx_vtabptr_6ctabix_tabix_copy_iterator)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26500   __pyx_ptype_10TabProxies_GTFProxy = __Pyx_ImportType("TabProxies", "GTFProxy", sizeof(struct __pyx_obj_10TabProxies_GTFProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26501   __pyx_vtabptr_10TabProxies_GTFProxy = (struct __pyx_vtabstruct_10TabProxies_GTFProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_GTFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_GTFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26502   __pyx_ptype_10TabProxies_NamedTupleProxy = __Pyx_ImportType("TabProxies", "NamedTupleProxy", sizeof(struct __pyx_obj_10TabProxies_NamedTupleProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26503   __pyx_vtabptr_10TabProxies_NamedTupleProxy = (struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_NamedTupleProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_NamedTupleProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26504   __pyx_ptype_10TabProxies_BedProxy = __Pyx_ImportType("TabProxies", "BedProxy", sizeof(struct __pyx_obj_10TabProxies_BedProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_BedProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26505   __pyx_vtabptr_10TabProxies_BedProxy = (struct __pyx_vtabstruct_10TabProxies_BedProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_BedProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_BedProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26506   __pyx_ptype_10TabProxies_VCFProxy = __Pyx_ImportType("TabProxies", "VCFProxy", sizeof(struct __pyx_obj_10TabProxies_VCFProxy), 1); if (unlikely(!__pyx_ptype_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26507   __pyx_vtabptr_10TabProxies_VCFProxy = (struct __pyx_vtabstruct_10TabProxies_VCFProxy*)__Pyx_GetVtable(__pyx_ptype_10TabProxies_VCFProxy->tp_dict); if (unlikely(!__pyx_vtabptr_10TabProxies_VCFProxy)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26508   /*--- Variable import code ---*/
26509   /*--- Function import code ---*/
26510   /*--- Execution code ---*/
26511
26512   /* "cvcf.pyx":46
26513  * #
26514  * 
26515  * from collections import namedtuple, defaultdict             # <<<<<<<<<<<<<<
26516  * from operator import itemgetter
26517  * import sys, re, copy, bisect
26518  */
26519   __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26520   __Pyx_GOTREF(__pyx_t_1);
26521   __Pyx_INCREF(((PyObject *)__pyx_n_s__namedtuple));
26522   PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__namedtuple));
26523   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__namedtuple));
26524   __Pyx_INCREF(((PyObject *)__pyx_n_s__defaultdict));
26525   PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__defaultdict));
26526   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__defaultdict));
26527   __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__collections), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26528   __Pyx_GOTREF(__pyx_t_2);
26529   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26530   __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__namedtuple);
26531   if (__pyx_t_1 == NULL) {
26532     if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__namedtuple);
26533     if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26534   }
26535   __Pyx_GOTREF(__pyx_t_1);
26536   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__namedtuple, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26537   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26538   __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__defaultdict);
26539   if (__pyx_t_1 == NULL) {
26540     if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__defaultdict);
26541     if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26542   }
26543   __Pyx_GOTREF(__pyx_t_1);
26544   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__defaultdict, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26545   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26546   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26547
26548   /* "cvcf.pyx":47
26549  * 
26550  * from collections import namedtuple, defaultdict
26551  * from operator import itemgetter             # <<<<<<<<<<<<<<
26552  * import sys, re, copy, bisect
26553  * 
26554  */
26555   __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26556   __Pyx_GOTREF(__pyx_t_2);
26557   __Pyx_INCREF(((PyObject *)__pyx_n_s__itemgetter));
26558   PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__itemgetter));
26559   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__itemgetter));
26560   __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26561   __Pyx_GOTREF(__pyx_t_1);
26562   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
26563   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__itemgetter);
26564   if (__pyx_t_2 == NULL) {
26565     if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__itemgetter);
26566     if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26567   }
26568   __Pyx_GOTREF(__pyx_t_2);
26569   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__itemgetter, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26570   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26571   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26572
26573   /* "cvcf.pyx":48
26574  * from collections import namedtuple, defaultdict
26575  * from operator import itemgetter
26576  * import sys, re, copy, bisect             # <<<<<<<<<<<<<<
26577  * 
26578  * cimport ctabix
26579  */
26580   __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26581   __Pyx_GOTREF(__pyx_t_1);
26582   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26583   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26584   __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__re), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26585   __Pyx_GOTREF(__pyx_t_1);
26586   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26587   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26588   __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__copy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26589   __Pyx_GOTREF(__pyx_t_1);
26590   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__copy, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26591   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26592   __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__bisect), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26593   __Pyx_GOTREF(__pyx_t_1);
26594   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__bisect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26595   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26596
26597   /* "cvcf.pyx":52
26598  * cimport ctabix
26599  * cimport TabProxies
26600  * import pysam             # <<<<<<<<<<<<<<
26601  * 
26602  * gtsRegEx = re.compile("[|/\\\\]")
26603  */
26604   __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__pysam), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26605   __Pyx_GOTREF(__pyx_t_1);
26606   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pysam, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26607   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26608
26609   /* "cvcf.pyx":54
26610  * import pysam
26611  * 
26612  * gtsRegEx = re.compile("[|/\\\\]")             # <<<<<<<<<<<<<<
26613  * alleleRegEx = re.compile('^[ACGTN]+$')
26614  * 
26615  */
26616   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26617   __Pyx_GOTREF(__pyx_t_1);
26618   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26619   __Pyx_GOTREF(__pyx_t_2);
26620   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26621   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_129), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26622   __Pyx_GOTREF(__pyx_t_1);
26623   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26624   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__gtsRegEx, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26625   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26626
26627   /* "cvcf.pyx":55
26628  * 
26629  * gtsRegEx = re.compile("[|/\\\\]")
26630  * alleleRegEx = re.compile('^[ACGTN]+$')             # <<<<<<<<<<<<<<
26631  * 
26632  * # Utility function.  Uses 0-based coordinates
26633  */
26634   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26635   __Pyx_GOTREF(__pyx_t_1);
26636   __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26637   __Pyx_GOTREF(__pyx_t_2);
26638   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26639   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_131), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26640   __Pyx_GOTREF(__pyx_t_1);
26641   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26642   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__alleleRegEx, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26643   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26644
26645   /* "cvcf.pyx":58
26646  * 
26647  * # Utility function.  Uses 0-based coordinates
26648  * def get_sequence(chrom, start, end, fa):             # <<<<<<<<<<<<<<
26649  *     # obtain sequence from .fa file, without truncation
26650  *     if end<=start: return ""
26651  */
26652   __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cvcf_1get_sequence, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26653   __Pyx_GOTREF(__pyx_t_1);
26654   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_sequence, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26655   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26656
26657   /* "cvcf.pyx":68
26658  * 
26659  * # Utility function.  Parses a region string
26660  * def parse_regions( string ):             # <<<<<<<<<<<<<<
26661  *     result = []
26662  *     for r in string.split(','):
26663  */
26664   __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cvcf_3parse_regions, NULL, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26665   __Pyx_GOTREF(__pyx_t_1);
26666   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__parse_regions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26667   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26668
26669   /* "cvcf.pyx":86
26670  * 
26671  * 
26672  * FORMAT = namedtuple('FORMAT','id numbertype number type description missingvalue')             # <<<<<<<<<<<<<<
26673  * 
26674  * ###########################################################################################################
26675  */
26676   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26677   __Pyx_GOTREF(__pyx_t_1);
26678   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_138), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26679   __Pyx_GOTREF(__pyx_t_2);
26680   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26681   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FORMAT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26682   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26683
26684   /* "cvcf.pyx":237
26685  *         return r
26686  * 
26687  * class VCF(object):             # <<<<<<<<<<<<<<
26688  * 
26689  *     # types
26690  */
26691   __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26692   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
26693
26694   /* "cvcf.pyx":240
26695  * 
26696  *     # types
26697  *     NT_UNKNOWN = 0             # <<<<<<<<<<<<<<
26698  *     NT_NUMBER = 1
26699  *     NT_ALLELES = 2
26700  */
26701   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_UNKNOWN, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26702
26703   /* "cvcf.pyx":241
26704  *     # types
26705  *     NT_UNKNOWN = 0
26706  *     NT_NUMBER = 1             # <<<<<<<<<<<<<<
26707  *     NT_ALLELES = 2
26708  *     NT_NR_ALLELES = 3
26709  */
26710   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_NUMBER, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26711
26712   /* "cvcf.pyx":242
26713  *     NT_UNKNOWN = 0
26714  *     NT_NUMBER = 1
26715  *     NT_ALLELES = 2             # <<<<<<<<<<<<<<
26716  *     NT_NR_ALLELES = 3
26717  *     NT_GENOTYPES = 4
26718  */
26719   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_ALLELES, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26720
26721   /* "cvcf.pyx":243
26722  *     NT_NUMBER = 1
26723  *     NT_ALLELES = 2
26724  *     NT_NR_ALLELES = 3             # <<<<<<<<<<<<<<
26725  *     NT_GENOTYPES = 4
26726  *     NT_PHASED_GENOTYPES = 5
26727  */
26728   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_NR_ALLELES, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26729
26730   /* "cvcf.pyx":244
26731  *     NT_ALLELES = 2
26732  *     NT_NR_ALLELES = 3
26733  *     NT_GENOTYPES = 4             # <<<<<<<<<<<<<<
26734  *     NT_PHASED_GENOTYPES = 5
26735  * 
26736  */
26737   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_GENOTYPES, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26738
26739   /* "cvcf.pyx":245
26740  *     NT_NR_ALLELES = 3
26741  *     NT_GENOTYPES = 4
26742  *     NT_PHASED_GENOTYPES = 5             # <<<<<<<<<<<<<<
26743  * 
26744  *     _errors = { 0:"UNKNOWN_FORMAT_STRING:Unknown file format identifier",
26745  */
26746   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__NT_PHASED_GENOTYPES, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26747
26748   /* "cvcf.pyx":247
26749  *     NT_PHASED_GENOTYPES = 5
26750  * 
26751  *     _errors = { 0:"UNKNOWN_FORMAT_STRING:Unknown file format identifier",             # <<<<<<<<<<<<<<
26752  *                 1:"BADLY_FORMATTED_FORMAT_STRING:Formatting error in the format string",
26753  *                 2:"BADLY_FORMATTED_HEADING:Did not find 9 required headings (CHROM, POS, ..., FORMAT) %s",
26754  */
26755   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26756   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
26757   if (PyDict_SetItem(__pyx_t_1, __pyx_int_0, ((PyObject *)__pyx_kp_s_139)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26758   if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, ((PyObject *)__pyx_kp_s_140)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26759   if (PyDict_SetItem(__pyx_t_1, __pyx_int_2, ((PyObject *)__pyx_kp_s_141)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26760   if (PyDict_SetItem(__pyx_t_1, __pyx_int_3, ((PyObject *)__pyx_kp_s_142)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26761   if (PyDict_SetItem(__pyx_t_1, __pyx_int_4, ((PyObject *)__pyx_kp_s_143)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26762   if (PyDict_SetItem(__pyx_t_1, __pyx_int_5, ((PyObject *)__pyx_kp_s_144)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26763   if (PyDict_SetItem(__pyx_t_1, __pyx_int_6, ((PyObject *)__pyx_kp_s_145)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26764   if (PyDict_SetItem(__pyx_t_1, __pyx_int_7, ((PyObject *)__pyx_kp_s_146)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26765   if (PyDict_SetItem(__pyx_t_1, __pyx_int_8, ((PyObject *)__pyx_kp_s_147)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26766   if (PyDict_SetItem(__pyx_t_1, __pyx_int_9, ((PyObject *)__pyx_kp_s_148)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26767   if (PyDict_SetItem(__pyx_t_1, __pyx_int_10, ((PyObject *)__pyx_kp_s_149)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26768   if (PyDict_SetItem(__pyx_t_1, __pyx_int_11, ((PyObject *)__pyx_kp_s_150)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26769   if (PyDict_SetItem(__pyx_t_1, __pyx_int_12, ((PyObject *)__pyx_kp_s_151)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26770   if (PyDict_SetItem(__pyx_t_1, __pyx_int_13, ((PyObject *)__pyx_kp_s_152)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26771   if (PyDict_SetItem(__pyx_t_1, __pyx_int_14, ((PyObject *)__pyx_kp_s_153)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26772   if (PyDict_SetItem(__pyx_t_1, __pyx_int_15, ((PyObject *)__pyx_kp_s_154)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26773   if (PyDict_SetItem(__pyx_t_1, __pyx_int_16, ((PyObject *)__pyx_kp_s_155)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26774   if (PyDict_SetItem(__pyx_t_1, __pyx_int_17, ((PyObject *)__pyx_kp_s_156)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26775   if (PyDict_SetItem(__pyx_t_1, __pyx_int_18, ((PyObject *)__pyx_kp_s_157)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26776   if (PyDict_SetItem(__pyx_t_1, __pyx_int_19, ((PyObject *)__pyx_kp_s_158)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26777   if (PyDict_SetItem(__pyx_t_1, __pyx_int_20, ((PyObject *)__pyx_kp_s_159)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26778   if (PyDict_SetItem(__pyx_t_1, __pyx_int_21, ((PyObject *)__pyx_kp_s_160)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26779   if (PyDict_SetItem(__pyx_t_1, __pyx_int_22, ((PyObject *)__pyx_kp_s_161)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26780   if (PyDict_SetItem(__pyx_t_1, __pyx_int_23, ((PyObject *)__pyx_kp_s_162)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26781   if (PyDict_SetItem(__pyx_t_1, __pyx_int_24, ((PyObject *)__pyx_kp_s_163)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26782   if (PyDict_SetItem(__pyx_t_1, __pyx_int_25, ((PyObject *)__pyx_kp_s_164)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26783   if (PyDict_SetItem(__pyx_t_1, __pyx_int_26, ((PyObject *)__pyx_kp_s_165)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26784   if (PyDict_SetItem(__pyx_t_1, __pyx_int_27, ((PyObject *)__pyx_kp_s_166)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26785   if (PyDict_SetItem(__pyx_t_1, __pyx_int_28, ((PyObject *)__pyx_kp_s_167)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26786   if (PyDict_SetItem(__pyx_t_1, __pyx_int_29, ((PyObject *)__pyx_kp_s_168)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26787   if (PyDict_SetItem(__pyx_t_1, __pyx_int_30, ((PyObject *)__pyx_kp_s_169)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26788   if (PyDict_SetItem(__pyx_t_1, __pyx_int_31, ((PyObject *)__pyx_kp_s_170)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26789   if (PyDict_SetItem(__pyx_t_1, __pyx_int_32, ((PyObject *)__pyx_kp_s_171)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26790   if (PyDict_SetItem(__pyx_t_1, __pyx_int_33, ((PyObject *)__pyx_kp_s_172)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26791   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___errors, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26792   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26793
26794   /* "cvcf.pyx":284
26795  * 
26796  *     # tag-value pairs; tags are not unique; does not include fileformat, INFO, FILTER or FORMAT fields
26797  *     _header = []             # <<<<<<<<<<<<<<
26798  * 
26799  *     # version number; 33=v3.3; 40=v4.0
26800  */
26801   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26802   __Pyx_GOTREF(__pyx_t_1);
26803   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___header, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26804   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26805
26806   /* "cvcf.pyx":287
26807  * 
26808  *     # version number; 33=v3.3; 40=v4.0
26809  *     _version = 40             # <<<<<<<<<<<<<<
26810  * 
26811  *     # info, filter and format data
26812  */
26813   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___version, __pyx_int_40) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26814
26815   /* "cvcf.pyx":290
26816  * 
26817  *     # info, filter and format data
26818  *     _info = {}             # <<<<<<<<<<<<<<
26819  *     _filter = {}
26820  *     _format = {}
26821  */
26822   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26823   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
26824   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___info, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26825   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26826
26827   /* "cvcf.pyx":291
26828  *     # info, filter and format data
26829  *     _info = {}
26830  *     _filter = {}             # <<<<<<<<<<<<<<
26831  *     _format = {}
26832  * 
26833  */
26834   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26835   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
26836   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___filter, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26837   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26838
26839   /* "cvcf.pyx":292
26840  *     _info = {}
26841  *     _filter = {}
26842  *     _format = {}             # <<<<<<<<<<<<<<
26843  * 
26844  *     # header; and required columns
26845  */
26846   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26847   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
26848   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___format, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26849   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26850
26851   /* "cvcf.pyx":295
26852  * 
26853  *     # header; and required columns
26854  *     _required = ["CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO","FORMAT"]             # <<<<<<<<<<<<<<
26855  *     _samples = []
26856  * 
26857  */
26858   __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26859   __Pyx_GOTREF(__pyx_t_1);
26860   __Pyx_INCREF(((PyObject *)__pyx_n_s__CHROM));
26861   PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__CHROM));
26862   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__CHROM));
26863   __Pyx_INCREF(((PyObject *)__pyx_n_s__POS));
26864   PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__POS));
26865   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__POS));
26866   __Pyx_INCREF(((PyObject *)__pyx_n_s__ID));
26867   PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__ID));
26868   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ID));
26869   __Pyx_INCREF(((PyObject *)__pyx_n_s__REF));
26870   PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__REF));
26871   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__REF));
26872   __Pyx_INCREF(((PyObject *)__pyx_n_s__ALT));
26873   PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_s__ALT));
26874   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ALT));
26875   __Pyx_INCREF(((PyObject *)__pyx_n_s__QUAL));
26876   PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_s__QUAL));
26877   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__QUAL));
26878   __Pyx_INCREF(((PyObject *)__pyx_n_s__FILTER));
26879   PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_s__FILTER));
26880   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FILTER));
26881   __Pyx_INCREF(((PyObject *)__pyx_n_s__INFO));
26882   PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_s__INFO));
26883   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__INFO));
26884   __Pyx_INCREF(((PyObject *)__pyx_n_s__FORMAT));
26885   PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_s__FORMAT));
26886   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FORMAT));
26887   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___required, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26888   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26889
26890   /* "cvcf.pyx":296
26891  *     # header; and required columns
26892  *     _required = ["CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO","FORMAT"]
26893  *     _samples = []             # <<<<<<<<<<<<<<
26894  * 
26895  *     # control behaviour
26896  */
26897   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26898   __Pyx_GOTREF(__pyx_t_1);
26899   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___samples, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26900   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26901
26902   /* "cvcf.pyx":299
26903  * 
26904  *     # control behaviour
26905  *     _ignored_errors = set([11,31])   # ERROR_UNKNOWN_KEY, ERROR_ZERO_FOR_NON_FLAG_FIELD             # <<<<<<<<<<<<<<
26906  *     _warn_errors = set([])
26907  *     _leftalign = False
26908  */
26909   __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26910   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
26911   if (unlikely(PySet_Add(__pyx_t_1, __pyx_int_11) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26912   if (unlikely(PySet_Add(__pyx_t_1, __pyx_int_31) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26913   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___ignored_errors, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26914   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26915
26916   /* "cvcf.pyx":300
26917  *     # control behaviour
26918  *     _ignored_errors = set([11,31])   # ERROR_UNKNOWN_KEY, ERROR_ZERO_FOR_NON_FLAG_FIELD
26919  *     _warn_errors = set([])             # <<<<<<<<<<<<<<
26920  *     _leftalign = False
26921  * 
26922  */
26923   __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26924   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
26925   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___warn_errors, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26926   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
26927
26928   /* "cvcf.pyx":301
26929  *     _ignored_errors = set([11,31])   # ERROR_UNKNOWN_KEY, ERROR_ZERO_FOR_NON_FLAG_FIELD
26930  *     _warn_errors = set([])
26931  *     _leftalign = False             # <<<<<<<<<<<<<<
26932  * 
26933  *     # reference sequence
26934  */
26935   __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26936   __Pyx_GOTREF(__pyx_t_1);
26937   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___leftalign, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26938   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26939
26940   /* "cvcf.pyx":304
26941  * 
26942  *     # reference sequence
26943  *     _reference = None             # <<<<<<<<<<<<<<
26944  * 
26945  *     # regions to include; None includes everything
26946  */
26947   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___reference, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26948
26949   /* "cvcf.pyx":307
26950  * 
26951  *     # regions to include; None includes everything
26952  *     _regions = None             # <<<<<<<<<<<<<<
26953  * 
26954  *     # statefull stuff
26955  */
26956   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___regions, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26957
26958   /* "cvcf.pyx":310
26959  * 
26960  *     # statefull stuff
26961  *     _lineno = -1             # <<<<<<<<<<<<<<
26962  *     _line = None
26963  *     _lines = None
26964  */
26965   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___lineno, __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26966
26967   /* "cvcf.pyx":311
26968  *     # statefull stuff
26969  *     _lineno = -1
26970  *     _line = None             # <<<<<<<<<<<<<<
26971  *     _lines = None
26972  * 
26973  */
26974   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___line, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26975
26976   /* "cvcf.pyx":312
26977  *     _lineno = -1
26978  *     _line = None
26979  *     _lines = None             # <<<<<<<<<<<<<<
26980  * 
26981  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):
26982  */
26983   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___lines, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26984
26985   /* "cvcf.pyx":314
26986  *     _lines = None
26987  * 
26988  *     def __init__(self, _copy=None, reference=None, regions=None, lines=None, leftalign=False):             # <<<<<<<<<<<<<<
26989  *         # make error identifiers accessible by name
26990  *         for id in self._errors.keys(): self.__dict__[self._errors[id].split(':')[0]] = id
26991  */
26992   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_1__init__, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_174)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26993   __Pyx_GOTREF(__pyx_t_1);
26994   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26995   __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26996   __Pyx_GOTREF(__pyx_t_3);
26997   __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_1)->__pyx_arg_leftalign = __pyx_t_3;
26998   __Pyx_GIVEREF(__pyx_t_3);
26999   __pyx_t_3 = 0;
27000   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_4cvcf_3VCF_85__defaults__);
27001   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27002   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27003
27004   /* "cvcf.pyx":335
27005  *         self._lines = lines
27006  * 
27007  *     def error(self,line,error,opt=None):             # <<<<<<<<<<<<<<
27008  *         if error in self._ignored_errors: return
27009  *         errorlabel, errorstring = self._errors[error].split(':')
27010  */
27011   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_3error, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_176)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27012   __Pyx_GOTREF(__pyx_t_1);
27013   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_177));
27014   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__error, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27015   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27016
27017   /* "cvcf.pyx":344
27018  *         raise ValueError(errorstring)
27019  * 
27020  *     def parse_format(self,line,format,filter=False):             # <<<<<<<<<<<<<<
27021  *         if self._version == 40:
27022  *             if not format.startswith('<'):
27023  */
27024   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_5parse_format, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_179)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27025   __Pyx_GOTREF(__pyx_t_1);
27026   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults1), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27027   __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27028   __Pyx_GOTREF(__pyx_t_3);
27029   __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_1)->__pyx_arg_filter = __pyx_t_3;
27030   __Pyx_GIVEREF(__pyx_t_3);
27031   __pyx_t_3 = 0;
27032   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_4cvcf_3VCF_87__defaults__);
27033   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_format, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27034   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27035
27036   /* "cvcf.pyx":416
27037  *         return FORMAT(data['id'],t,n,data['type'],data['descr'],data['missing'])
27038  * 
27039  *     def format_format( self, fmt, filter=False ):             # <<<<<<<<<<<<<<
27040  *         values = [('ID',fmt.id)]
27041  *         if fmt.number != None and not filter:
27042  */
27043   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_7format_format, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_181)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27044   __Pyx_GOTREF(__pyx_t_1);
27045   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults2), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27046   __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27047   __Pyx_GOTREF(__pyx_t_3);
27048   __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_1)->__pyx_arg_filter = __pyx_t_3;
27049   __Pyx_GIVEREF(__pyx_t_3);
27050   __pyx_t_3 = 0;
27051   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_4cvcf_3VCF_89__defaults__);
27052   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__format_format, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27053   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27054
27055   /* "cvcf.pyx":436
27056  *         return format
27057  * 
27058  *     def get_expected(self, format, formatdict, alt):             # <<<<<<<<<<<<<<
27059  *         fmt = formatdict[format]
27060  *         if fmt.numbertype == self.NT_UNKNOWN: return -1
27061  */
27062   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_9get_expected, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_183)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27063   __Pyx_GOTREF(__pyx_t_1);
27064   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__get_expected, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27065   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27066
27067   /* "cvcf.pyx":447
27068  * 
27069  * 
27070  *     def _add_definition(self, formatdict, key, data, line ):             # <<<<<<<<<<<<<<
27071  *         if key in formatdict: return
27072  *         self.error(line,self.ERROR_UNKNOWN_KEY,key)
27073  */
27074   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_11_add_definition, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_185)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27075   __Pyx_GOTREF(__pyx_t_1);
27076   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___add_definition, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27077   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27078
27079   /* "cvcf.pyx":464
27080  * 
27081  *     # todo: trim trailing missing values
27082  *     def format_formatdata( self, data, format, key=True, value=True, separator=":" ):             # <<<<<<<<<<<<<<
27083  *         output, sdata = [], []
27084  *         if type(data) == type([]): # for FORMAT field, make data with dummy values
27085  */
27086   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_13format_formatdata, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_187)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27087   __Pyx_GOTREF(__pyx_t_1);
27088   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults3), 2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27089   __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27090   __Pyx_GOTREF(__pyx_t_3);
27091   __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_1)->__pyx_arg_key = __pyx_t_3;
27092   __Pyx_GIVEREF(__pyx_t_3);
27093   __pyx_t_3 = 0;
27094   __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27095   __Pyx_GOTREF(__pyx_t_3);
27096   __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_1)->__pyx_arg_value = __pyx_t_3;
27097   __Pyx_GIVEREF(__pyx_t_3);
27098   __pyx_t_3 = 0;
27099   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_4cvcf_3VCF_91__defaults__);
27100   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__format_formatdata, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27101   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27102
27103   /* "cvcf.pyx":498
27104  * 
27105  * 
27106  *     def enter_default_format(self):             # <<<<<<<<<<<<<<
27107  *         for f in [FORMAT('GT',self.NT_NUMBER,1,'String','Genotype','.'),
27108  *                   FORMAT('DP',self.NT_NUMBER,1,'Integer','Read depth at this position for this sample',-1),
27109  */
27110   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_15enter_default_format, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_189)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27111   __Pyx_GOTREF(__pyx_t_1);
27112   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_121, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27113   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27114
27115   /* "cvcf.pyx":517
27116  *                 self._format[f.id] = f
27117  * 
27118  *     def parse_header( self, line ):             # <<<<<<<<<<<<<<
27119  *         assert line.startswith('##')
27120  *         elts = line[2:].split('=')
27121  */
27122   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_17parse_header, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_191)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27123   __Pyx_GOTREF(__pyx_t_1);
27124   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_header, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27125   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27126
27127   /* "cvcf.pyx":546
27128  * 
27129  * 
27130  *     def write_header( self, stream ):             # <<<<<<<<<<<<<<
27131  *         stream.write("##fileformat=VCFv%s.%s\n" % (self._version // 10, self._version % 10))
27132  *         for key,value in self._header: stream.write("##%s=%s\n" % (key,value))
27133  */
27134   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_19write_header, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_193)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27135   __Pyx_GOTREF(__pyx_t_1);
27136   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__write_header, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27137   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27138
27139   /* "cvcf.pyx":553
27140  * 
27141  * 
27142  *     def parse_heading( self, line ):             # <<<<<<<<<<<<<<
27143  *         assert line.startswith('#')
27144  *         assert not line.startswith('##')
27145  */
27146   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_21parse_heading, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_195)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27147   __Pyx_GOTREF(__pyx_t_1);
27148   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_heading, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27149   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27150
27151   /* "cvcf.pyx":581
27152  *         self._sample2column = dict( [(y,x+9) for x,y in enumerate( self._samples ) ] )
27153  * 
27154  *     def write_heading( self, stream ):             # <<<<<<<<<<<<<<
27155  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
27156  * 
27157  */
27158   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_23write_heading, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_197)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27159   __Pyx_GOTREF(__pyx_t_1);
27160   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__write_heading, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27161   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27162
27163   /* "cvcf.pyx":584
27164  *         stream.write("#" + "\t".join(self._required + self._samples) + "\n")
27165  * 
27166  *     def convertGT(self, GTstring):             # <<<<<<<<<<<<<<
27167  *         if GTstring == ".": return ["."]
27168  *         try:
27169  */
27170   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_25convertGT, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_199)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27171   __Pyx_GOTREF(__pyx_t_1);
27172   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__convertGT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27173   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27174
27175   /* "cvcf.pyx":596
27176  *             return [".","|","."]
27177  * 
27178  *     def convertGTback(self, GTdata):             # <<<<<<<<<<<<<<
27179  *         return ''.join(map(str,GTdata))
27180  * 
27181  */
27182   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_27convertGTback, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_201)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27183   __Pyx_GOTREF(__pyx_t_1);
27184   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__convertGTback, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27185   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27186
27187   /* "cvcf.pyx":599
27188  *         return ''.join(map(str,GTdata))
27189  * 
27190  *     def parse_formatdata( self, key, value, formatdict, line ):             # <<<<<<<<<<<<<<
27191  *         # To do: check that the right number of values is present
27192  *         f = formatdict.get(key,None)
27193  */
27194   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_29parse_formatdata, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_203)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27195   __Pyx_GOTREF(__pyx_t_1);
27196   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_formatdata, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27197   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27198
27199   /* "cvcf.pyx":641
27200  *             self.error(line,self.ERROR_INFO_STRING)
27201  * 
27202  *     def inregion(self, chrom, pos):             # <<<<<<<<<<<<<<
27203  *         if not self._regions: return True
27204  *         for r in self._regions:
27205  */
27206   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_31inregion, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_205)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27207   __Pyx_GOTREF(__pyx_t_1);
27208   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__inregion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27209   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27210
27211   /* "cvcf.pyx":647
27212  *         return False
27213  * 
27214  *     def parse_data( self, line, lineparse=False ):             # <<<<<<<<<<<<<<
27215  *         cols = line.split('\t')
27216  *         if len(cols) != len(self._samples)+9:
27217  */
27218   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_33parse_data, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_207)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27219   __Pyx_GOTREF(__pyx_t_1);
27220   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, sizeof(__pyx_defaults4), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27221   __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27222   __Pyx_GOTREF(__pyx_t_3);
27223   __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_t_1)->__pyx_arg_lineparse = __pyx_t_3;
27224   __Pyx_GIVEREF(__pyx_t_3);
27225   __pyx_t_3 = 0;
27226   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_4cvcf_3VCF_93__defaults__);
27227   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse_data, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27228   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27229
27230   /* "cvcf.pyx":857
27231  * 
27232  * 
27233  *     def write_data(self, stream, data):             # <<<<<<<<<<<<<<
27234  *         required = ['chrom','pos','id','ref','alt','qual','filter','info','format'] + self._samples
27235  *         for k in required:
27236  */
27237   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_35write_data, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_209)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27238   __Pyx_GOTREF(__pyx_t_1);
27239   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__write_data, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27240   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27241
27242   /* "cvcf.pyx":886
27243  *         stream.write( "\t".join(output) + "\n" )
27244  * 
27245  *     def _parse_header(self, stream):             # <<<<<<<<<<<<<<
27246  *         self._lineno = 0
27247  *         for line in stream:
27248  */
27249   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_37_parse_header, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_211)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27250   __Pyx_GOTREF(__pyx_t_1);
27251   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___parse_header, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27252   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27253
27254   /* "cvcf.pyx":899
27255  *         return line
27256  * 
27257  *     def _parse(self, line, stream):             # <<<<<<<<<<<<<<
27258  *         # deal with files with header only
27259  *         if line.startswith("##"): return
27260  */
27261   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_39_parse, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_213)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27262   __Pyx_GOTREF(__pyx_t_1);
27263   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s___parse, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27264   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27265
27266   /* "cvcf.pyx":917
27267  *     ######################################################################################################
27268  * 
27269  *     def getsamples(self):             # <<<<<<<<<<<<<<
27270  *         """ List of samples in VCF file """
27271  *         return self._samples
27272  */
27273   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_42getsamples, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_215)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27274   __Pyx_GOTREF(__pyx_t_1);
27275   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getsamples, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27276   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27277
27278   /* "cvcf.pyx":921
27279  *         return self._samples
27280  * 
27281  *     def setsamples(self,samples):             # <<<<<<<<<<<<<<
27282  *         """ List of samples in VCF file """
27283  *         self._samples = samples
27284  */
27285   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_44setsamples, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_217)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27286   __Pyx_GOTREF(__pyx_t_1);
27287   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setsamples, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27288   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27289
27290   /* "cvcf.pyx":925
27291  *         self._samples = samples
27292  * 
27293  *     def getheader(self):             # <<<<<<<<<<<<<<
27294  *         """ List of header key-value pairs (strings) """
27295  *         return self._header
27296  */
27297   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_46getheader, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_219)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27298   __Pyx_GOTREF(__pyx_t_1);
27299   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getheader, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27300   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27301
27302   /* "cvcf.pyx":929
27303  *         return self._header
27304  * 
27305  *     def setheader(self,header):             # <<<<<<<<<<<<<<
27306  *         """ List of header key-value pairs (strings) """
27307  *         self._header = header
27308  */
27309   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_48setheader, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_221)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27310   __Pyx_GOTREF(__pyx_t_1);
27311   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setheader, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27312   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27313
27314   /* "cvcf.pyx":933
27315  *         self._header = header
27316  * 
27317  *     def getinfo(self):             # <<<<<<<<<<<<<<
27318  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
27319  *         return self._info
27320  */
27321   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_50getinfo, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_223)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27322   __Pyx_GOTREF(__pyx_t_1);
27323   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27324   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27325
27326   /* "cvcf.pyx":937
27327  *         return self._info
27328  * 
27329  *     def setinfo(self,info):             # <<<<<<<<<<<<<<
27330  *         """ Dictionary of ##INFO tags, as VCF.FORMAT values """
27331  *         self._info = info
27332  */
27333   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_52setinfo, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_225)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27334   __Pyx_GOTREF(__pyx_t_1);
27335   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27336   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27337
27338   /* "cvcf.pyx":941
27339  *         self._info = info
27340  * 
27341  *     def getformat(self):             # <<<<<<<<<<<<<<
27342  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
27343  *         return self._format
27344  */
27345   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_54getformat, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_227)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27346   __Pyx_GOTREF(__pyx_t_1);
27347   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getformat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27348   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27349
27350   /* "cvcf.pyx":945
27351  *         return self._format
27352  * 
27353  *     def setformat(self,format):             # <<<<<<<<<<<<<<
27354  *         """ Dictionary of ##FORMAT tags, as VCF.FORMAT values """
27355  *         self._format = format
27356  */
27357   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_56setformat, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_229)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27358   __Pyx_GOTREF(__pyx_t_1);
27359   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setformat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27360   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27361
27362   /* "cvcf.pyx":949
27363  *         self._format = format
27364  * 
27365  *     def getfilter(self):             # <<<<<<<<<<<<<<
27366  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
27367  *         return self._filter
27368  */
27369   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_58getfilter, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_231)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27370   __Pyx_GOTREF(__pyx_t_1);
27371   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__getfilter, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27372   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27373
27374   /* "cvcf.pyx":953
27375  *         return self._filter
27376  * 
27377  *     def setfilter(self,filter):             # <<<<<<<<<<<<<<
27378  *         """ Dictionary of ##FILTER tags, as VCF.FORMAT values """
27379  *         self._filter = filter
27380  */
27381   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_60setfilter, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_233)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27382   __Pyx_GOTREF(__pyx_t_1);
27383   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setfilter, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27384   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27385
27386   /* "cvcf.pyx":957
27387  *         self._filter = filter
27388  * 
27389  *     def setversion(self, version):             # <<<<<<<<<<<<<<
27390  *         if version != 33 and version != 40: raise ValueError("Can only handle v3.3 and v4.0 VCF files")
27391  *         self._version = version
27392  */
27393   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_62setversion, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_235)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27394   __Pyx_GOTREF(__pyx_t_1);
27395   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setversion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27396   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27397
27398   /* "cvcf.pyx":961
27399  *         self._version = version
27400  * 
27401  *     def setregions(self, regions):             # <<<<<<<<<<<<<<
27402  *         self._regions = regions
27403  * 
27404  */
27405   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_64setregions, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_237)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27406   __Pyx_GOTREF(__pyx_t_1);
27407   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setregions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27408   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27409
27410   /* "cvcf.pyx":964
27411  *         self._regions = regions
27412  * 
27413  *     def setreference(self, ref):             # <<<<<<<<<<<<<<
27414  *         """ Provide a reference sequence; a Python class supporting a fetch(chromosome, start, end) method, e.g. PySam.FastaFile """
27415  *         self._reference = ref
27416  */
27417   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_66setreference, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_239)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27418   __Pyx_GOTREF(__pyx_t_1);
27419   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__setreference, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27420   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27421
27422   /* "cvcf.pyx":968
27423  *         self._reference = ref
27424  * 
27425  *     def ignoreerror(self, errorstring):             # <<<<<<<<<<<<<<
27426  *         try:             self._ignored_errors.add(self.__dict__[errorstring])
27427  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
27428  */
27429   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_68ignoreerror, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_241)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27430   __Pyx_GOTREF(__pyx_t_1);
27431   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__ignoreerror, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27432   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27433
27434   /* "cvcf.pyx":972
27435  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
27436  * 
27437  *     def warnerror(self, errorstring):             # <<<<<<<<<<<<<<
27438  *         try:             self._warn_errors.add(self.__dict__[errorstring])
27439  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
27440  */
27441   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_70warnerror, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_243)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27442   __Pyx_GOTREF(__pyx_t_1);
27443   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__warnerror, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27444   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27445
27446   /* "cvcf.pyx":976
27447  *         except KeyError: raise ValueError("Invalid error string: %s" % errorstring)
27448  * 
27449  *     def parse(self, stream):             # <<<<<<<<<<<<<<
27450  *         """ Parse a stream of VCF-formatted lines.  Initializes class instance and return generator """
27451  *         last_line = self._parse_header(stream)
27452  */
27453   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_72parse, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_245)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27454   __Pyx_GOTREF(__pyx_t_1);
27455   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__parse, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27456   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27457
27458   /* "cvcf.pyx":983
27459  *         return self._parse(last_line, stream)
27460  * 
27461  *     def write(self, stream, datagenerator):             # <<<<<<<<<<<<<<
27462  *         """ Writes a VCF file to a stream, using a data generator (or list) """
27463  *         self.write_header(stream)
27464  */
27465   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_74write, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_247)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27466   __Pyx_GOTREF(__pyx_t_1);
27467   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__write, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27468   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27469
27470   /* "cvcf.pyx":989
27471  *         for data in datagenerator: self.write_data(stream,data)
27472  * 
27473  *     def writeheader(self, stream):             # <<<<<<<<<<<<<<
27474  *         """ Writes a VCF header """
27475  *         self.write_header(stream)
27476  */
27477   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_76writeheader, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_249)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27478   __Pyx_GOTREF(__pyx_t_1);
27479   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__writeheader, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27480   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27481
27482   /* "cvcf.pyx":994
27483  *         self.write_heading(stream)
27484  * 
27485  *     def compare_calls(self, pos1, ref1, alt1, pos2, ref2, alt2):             # <<<<<<<<<<<<<<
27486  *         """ Utility function: compares two calls for equality """
27487  *         # a variant should always be assigned to a unique position, one base before
27488  */
27489   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_78compare_calls, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_251)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27490   __Pyx_GOTREF(__pyx_t_1);
27491   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__compare_calls, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27492   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27493
27494   /* "cvcf.pyx":1016
27495  * ###########################################################################################################
27496  * 
27497  *     def connect( self, filename ):             # <<<<<<<<<<<<<<
27498  *         '''connect to tabix file.'''
27499  *         self.tabixfile = pysam.Tabixfile( filename )
27500  */
27501   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_80connect, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_253)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27502   __Pyx_GOTREF(__pyx_t_1);
27503   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__connect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27504   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27505
27506   /* "cvcf.pyx":1021
27507  *         self._parse_header(self.tabixfile.header)
27508  * 
27509  *     def fetch(self,             # <<<<<<<<<<<<<<
27510  *               reference = None,
27511  *               start = None,
27512  */
27513   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_82fetch, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_255)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27514   __Pyx_GOTREF(__pyx_t_1);
27515   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, ((PyObject *)__pyx_k_tuple_256));
27516   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__fetch, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27517   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27518
27519   /* "cvcf.pyx":1030
27520  *         return self.tabixfile.fetch( reference, start, end, region, parser = asVCFRecord( self ) )
27521  * 
27522  *     def validate( self, record ):             # <<<<<<<<<<<<<<
27523  *         '''validate vcf record.
27524  * 
27525  */
27526   __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cvcf_3VCF_84validate, 0, NULL, __pyx_n_s__cvcf, ((PyObject *)__pyx_k_codeobj_258)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27527   __Pyx_GOTREF(__pyx_t_1);
27528   if (PyObject_SetItem(__pyx_t_2, __pyx_n_s__validate, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27529   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27530
27531   /* "cvcf.pyx":237
27532  *         return r
27533  * 
27534  * class VCF(object):             # <<<<<<<<<<<<<<
27535  * 
27536  *     # types
27537  */
27538   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27539   __Pyx_GOTREF(__pyx_t_1);
27540   __Pyx_INCREF(__pyx_builtin_object);
27541   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
27542   __Pyx_GIVEREF(__pyx_builtin_object);
27543   __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2), __pyx_n_s__VCF, __pyx_n_s__cvcf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27544   __Pyx_GOTREF(__pyx_t_3);
27545   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27546   if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VCF, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27547   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27548   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
27549
27550   /* "cvcf.pyx":1155
27551  *                     pos -= 1
27552  * 
27553  * __all__ = [             # <<<<<<<<<<<<<<
27554  *     "VCF", "VCFRecord", ]
27555  * 
27556  */
27557   __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27558   __Pyx_GOTREF(__pyx_t_2);
27559   __Pyx_INCREF(((PyObject *)__pyx_n_s__VCF));
27560   PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__VCF));
27561   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VCF));
27562   __Pyx_INCREF(((PyObject *)__pyx_n_s__VCFRecord));
27563   PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__VCFRecord));
27564   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__VCFRecord));
27565   if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27566   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
27567
27568   /* "cvcf.pyx":1
27569  * #             # <<<<<<<<<<<<<<
27570  * # Code to read, write and edit VCF files
27571  * #
27572  */
27573   __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27574   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
27575   if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27576   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
27577   goto __pyx_L0;
27578   __pyx_L1_error:;
27579   __Pyx_XDECREF(__pyx_t_1);
27580   __Pyx_XDECREF(__pyx_t_2);
27581   __Pyx_XDECREF(__pyx_t_3);
27582   if (__pyx_m) {
27583     __Pyx_AddTraceback("init cvcf", __pyx_clineno, __pyx_lineno, __pyx_filename);
27584     Py_DECREF(__pyx_m); __pyx_m = 0;
27585   } else if (!PyErr_Occurred()) {
27586     PyErr_SetString(PyExc_ImportError, "init cvcf");
27587   }
27588   __pyx_L0:;
27589   __Pyx_RefNannyFinishContext();
27590   #if PY_MAJOR_VERSION < 3
27591   return;
27592   #else
27593   return __pyx_m;
27594   #endif
27595 }
27596
27597 /* Runtime support code */
27598 #if CYTHON_REFNANNY
27599 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
27600     PyObject *m = NULL, *p = NULL;
27601     void *r = NULL;
27602     m = PyImport_ImportModule((char *)modname);
27603     if (!m) goto end;
27604     p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
27605     if (!p) goto end;
27606     r = PyLong_AsVoidPtr(p);
27607 end:
27608     Py_XDECREF(p);
27609     Py_XDECREF(m);
27610     return (__Pyx_RefNannyAPIStruct *)r;
27611 }
27612 #endif /* CYTHON_REFNANNY */
27613
27614 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
27615     PyObject *result;
27616     result = PyObject_GetAttr(dict, name);
27617     if (!result) {
27618         if (dict != __pyx_b) {
27619             PyErr_Clear();
27620             result = PyObject_GetAttr(__pyx_b, name);
27621         }
27622         if (!result) {
27623             PyErr_SetObject(PyExc_NameError, name);
27624         }
27625     }
27626     return result;
27627 }
27628
27629 static void __Pyx_RaiseArgtupleInvalid(
27630     const char* func_name,
27631     int exact,
27632     Py_ssize_t num_min,
27633     Py_ssize_t num_max,
27634     Py_ssize_t num_found)
27635 {
27636     Py_ssize_t num_expected;
27637     const char *more_or_less;
27638     if (num_found < num_min) {
27639         num_expected = num_min;
27640         more_or_less = "at least";
27641     } else {
27642         num_expected = num_max;
27643         more_or_less = "at most";
27644     }
27645     if (exact) {
27646         more_or_less = "exactly";
27647     }
27648     PyErr_Format(PyExc_TypeError,
27649                  "%s() takes %s %"PY_FORMAT_SIZE_T"d positional argument%s (%"PY_FORMAT_SIZE_T"d given)",
27650                  func_name, more_or_less, num_expected,
27651                  (num_expected == 1) ? "" : "s", num_found);
27652 }
27653
27654 static void __Pyx_RaiseDoubleKeywordsError(
27655     const char* func_name,
27656     PyObject* kw_name)
27657 {
27658     PyErr_Format(PyExc_TypeError,
27659         #if PY_MAJOR_VERSION >= 3
27660         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
27661         #else
27662         "%s() got multiple values for keyword argument '%s'", func_name,
27663         PyString_AS_STRING(kw_name));
27664         #endif
27665 }
27666
27667 static int __Pyx_ParseOptionalKeywords(
27668     PyObject *kwds,
27669     PyObject **argnames[],
27670     PyObject *kwds2,
27671     PyObject *values[],
27672     Py_ssize_t num_pos_args,
27673     const char* function_name)
27674 {
27675     PyObject *key = 0, *value = 0;
27676     Py_ssize_t pos = 0;
27677     PyObject*** name;
27678     PyObject*** first_kw_arg = argnames + num_pos_args;
27679     while (PyDict_Next(kwds, &pos, &key, &value)) {
27680         name = first_kw_arg;
27681         while (*name && (**name != key)) name++;
27682         if (*name) {
27683             values[name-argnames] = value;
27684         } else {
27685             #if PY_MAJOR_VERSION < 3
27686             if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
27687             #else
27688             if (unlikely(!PyUnicode_Check(key))) {
27689             #endif
27690                 goto invalid_keyword_type;
27691             } else {
27692                 for (name = first_kw_arg; *name; name++) {
27693                     #if PY_MAJOR_VERSION >= 3
27694                     if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
27695                         PyUnicode_Compare(**name, key) == 0) break;
27696                     #else
27697                     if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
27698                         _PyString_Eq(**name, key)) break;
27699                     #endif
27700                 }
27701                 if (*name) {
27702                     values[name-argnames] = value;
27703                 } else {
27704                     for (name=argnames; name != first_kw_arg; name++) {
27705                         if (**name == key) goto arg_passed_twice;
27706                         #if PY_MAJOR_VERSION >= 3
27707                         if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
27708                             PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
27709                         #else
27710                         if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
27711                             _PyString_Eq(**name, key)) goto arg_passed_twice;
27712                         #endif
27713                     }
27714                     if (kwds2) {
27715                         if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
27716                     } else {
27717                         goto invalid_keyword;
27718                     }
27719                 }
27720             }
27721         }
27722     }
27723     return 0;
27724 arg_passed_twice:
27725     __Pyx_RaiseDoubleKeywordsError(function_name, **name);
27726     goto bad;
27727 invalid_keyword_type:
27728     PyErr_Format(PyExc_TypeError,
27729         "%s() keywords must be strings", function_name);
27730     goto bad;
27731 invalid_keyword:
27732     PyErr_Format(PyExc_TypeError,
27733     #if PY_MAJOR_VERSION < 3
27734         "%s() got an unexpected keyword argument '%s'",
27735         function_name, PyString_AsString(key));
27736     #else
27737         "%s() got an unexpected keyword argument '%U'",
27738         function_name, key);
27739     #endif
27740 bad:
27741     return -1;
27742 }
27743
27744
27745
27746 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
27747     PyObject *local_type, *local_value, *local_tb;
27748     PyObject *tmp_type, *tmp_value, *tmp_tb;
27749     PyThreadState *tstate = PyThreadState_GET();
27750     local_type = tstate->curexc_type;
27751     local_value = tstate->curexc_value;
27752     local_tb = tstate->curexc_traceback;
27753     tstate->curexc_type = 0;
27754     tstate->curexc_value = 0;
27755     tstate->curexc_traceback = 0;
27756     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
27757     if (unlikely(tstate->curexc_type))
27758         goto bad;
27759     #if PY_MAJOR_VERSION >= 3
27760     if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
27761         goto bad;
27762     #endif
27763     *type = local_type;
27764     *value = local_value;
27765     *tb = local_tb;
27766     Py_INCREF(local_type);
27767     Py_INCREF(local_value);
27768     Py_INCREF(local_tb);
27769     tmp_type = tstate->exc_type;
27770     tmp_value = tstate->exc_value;
27771     tmp_tb = tstate->exc_traceback;
27772     tstate->exc_type = local_type;
27773     tstate->exc_value = local_value;
27774     tstate->exc_traceback = local_tb;
27775     /* Make sure tstate is in a consistent state when we XDECREF
27776        these objects (XDECREF may run arbitrary code). */
27777     Py_XDECREF(tmp_type);
27778     Py_XDECREF(tmp_value);
27779     Py_XDECREF(tmp_tb);
27780     return 0;
27781 bad:
27782     *type = 0;
27783     *value = 0;
27784     *tb = 0;
27785     Py_XDECREF(local_type);
27786     Py_XDECREF(local_value);
27787     Py_XDECREF(local_tb);
27788     return -1;
27789 }
27790
27791 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
27792 #if CYTHON_COMPILING_IN_CPYTHON
27793     PyObject *tmp_type, *tmp_value, *tmp_tb;
27794     PyThreadState *tstate = PyThreadState_GET();
27795     tmp_type = tstate->curexc_type;
27796     tmp_value = tstate->curexc_value;
27797     tmp_tb = tstate->curexc_traceback;
27798     tstate->curexc_type = type;
27799     tstate->curexc_value = value;
27800     tstate->curexc_traceback = tb;
27801     Py_XDECREF(tmp_type);
27802     Py_XDECREF(tmp_value);
27803     Py_XDECREF(tmp_tb);
27804 #else
27805     PyErr_Restore(type, value, tb);
27806 #endif
27807 }
27808 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
27809 #if CYTHON_COMPILING_IN_CPYTHON
27810     PyThreadState *tstate = PyThreadState_GET();
27811     *type = tstate->curexc_type;
27812     *value = tstate->curexc_value;
27813     *tb = tstate->curexc_traceback;
27814     tstate->curexc_type = 0;
27815     tstate->curexc_value = 0;
27816     tstate->curexc_traceback = 0;
27817 #else
27818     PyErr_Fetch(type, value, tb);
27819 #endif
27820 }
27821
27822 #if PY_MAJOR_VERSION < 3
27823 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
27824                         CYTHON_UNUSED PyObject *cause) {
27825     Py_XINCREF(type);
27826     Py_XINCREF(value);
27827     Py_XINCREF(tb);
27828     if (tb == Py_None) {
27829         Py_DECREF(tb);
27830         tb = 0;
27831     }
27832     else if (tb != NULL && !PyTraceBack_Check(tb)) {
27833         PyErr_SetString(PyExc_TypeError,
27834             "raise: arg 3 must be a traceback or None");
27835         goto raise_error;
27836     }
27837     if (value == NULL) {
27838         value = Py_None;
27839         Py_INCREF(value);
27840     }
27841     #if PY_VERSION_HEX < 0x02050000
27842     if (!PyClass_Check(type))
27843     #else
27844     if (!PyType_Check(type))
27845     #endif
27846     {
27847         if (value != Py_None) {
27848             PyErr_SetString(PyExc_TypeError,
27849                 "instance exception may not have a separate value");
27850             goto raise_error;
27851         }
27852         Py_DECREF(value);
27853         value = type;
27854         #if PY_VERSION_HEX < 0x02050000
27855             if (PyInstance_Check(type)) {
27856                 type = (PyObject*) ((PyInstanceObject*)type)->in_class;
27857                 Py_INCREF(type);
27858             }
27859             else {
27860                 type = 0;
27861                 PyErr_SetString(PyExc_TypeError,
27862                     "raise: exception must be an old-style class or instance");
27863                 goto raise_error;
27864             }
27865         #else
27866             type = (PyObject*) Py_TYPE(type);
27867             Py_INCREF(type);
27868             if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
27869                 PyErr_SetString(PyExc_TypeError,
27870                     "raise: exception class must be a subclass of BaseException");
27871                 goto raise_error;
27872             }
27873         #endif
27874     }
27875     __Pyx_ErrRestore(type, value, tb);
27876     return;
27877 raise_error:
27878     Py_XDECREF(value);
27879     Py_XDECREF(type);
27880     Py_XDECREF(tb);
27881     return;
27882 }
27883 #else /* Python 3+ */
27884 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
27885     if (tb == Py_None) {
27886         tb = 0;
27887     } else if (tb && !PyTraceBack_Check(tb)) {
27888         PyErr_SetString(PyExc_TypeError,
27889             "raise: arg 3 must be a traceback or None");
27890         goto bad;
27891     }
27892     if (value == Py_None)
27893         value = 0;
27894     if (PyExceptionInstance_Check(type)) {
27895         if (value) {
27896             PyErr_SetString(PyExc_TypeError,
27897                 "instance exception may not have a separate value");
27898             goto bad;
27899         }
27900         value = type;
27901         type = (PyObject*) Py_TYPE(value);
27902     } else if (!PyExceptionClass_Check(type)) {
27903         PyErr_SetString(PyExc_TypeError,
27904             "raise: exception class must be a subclass of BaseException");
27905         goto bad;
27906     }
27907     if (cause) {
27908         PyObject *fixed_cause;
27909         if (PyExceptionClass_Check(cause)) {
27910             fixed_cause = PyObject_CallObject(cause, NULL);
27911             if (fixed_cause == NULL)
27912                 goto bad;
27913         }
27914         else if (PyExceptionInstance_Check(cause)) {
27915             fixed_cause = cause;
27916             Py_INCREF(fixed_cause);
27917         }
27918         else {
27919             PyErr_SetString(PyExc_TypeError,
27920                             "exception causes must derive from "
27921                             "BaseException");
27922             goto bad;
27923         }
27924         if (!value) {
27925             value = PyObject_CallObject(type, NULL);
27926         }
27927         PyException_SetCause(value, fixed_cause);
27928     }
27929     PyErr_SetObject(type, value);
27930     if (tb) {
27931         PyThreadState *tstate = PyThreadState_GET();
27932         PyObject* tmp_tb = tstate->curexc_traceback;
27933         if (tb != tmp_tb) {
27934             Py_INCREF(tb);
27935             tstate->curexc_traceback = tb;
27936             Py_XDECREF(tmp_tb);
27937         }
27938     }
27939 bad:
27940     return;
27941 }
27942 #endif
27943
27944 static double __Pyx__PyObject_AsDouble(PyObject* obj) {
27945     PyObject* float_value;
27946     if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
27947         return PyFloat_AsDouble(obj);
27948     } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
27949 #if PY_MAJOR_VERSION >= 3
27950         float_value = PyFloat_FromString(obj);
27951 #else
27952         float_value = PyFloat_FromString(obj, 0);
27953 #endif
27954     } else {
27955         PyObject* args = PyTuple_New(1);
27956         if (unlikely(!args)) goto bad;
27957         PyTuple_SET_ITEM(args, 0, obj);
27958         float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
27959         PyTuple_SET_ITEM(args, 0, 0);
27960         Py_DECREF(args);
27961     }
27962     if (likely(float_value)) {
27963         double value = PyFloat_AS_DOUBLE(float_value);
27964         Py_DECREF(float_value);
27965         return value;
27966     }
27967 bad:
27968     return (double)-1;
27969 }
27970
27971 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
27972     PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
27973 }
27974
27975 static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) {
27976     PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable");
27977 }
27978
27979 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
27980     PyErr_Format(PyExc_ValueError,
27981                  "need more than %"PY_FORMAT_SIZE_T"d value%s to unpack",
27982                  index, (index == 1) ? "" : "s");
27983 }
27984
27985 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
27986     PyErr_Format(PyExc_ValueError,
27987                  "too many values to unpack (expected %"PY_FORMAT_SIZE_T"d)", expected);
27988 }
27989
27990 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
27991     if (unlikely(retval)) {
27992         Py_DECREF(retval);
27993         __Pyx_RaiseTooManyValuesError(expected);
27994         return -1;
27995     } else if (PyErr_Occurred()) {
27996         if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
27997             PyErr_Clear();
27998             return 0;
27999         } else {
28000             return -1;
28001         }
28002     }
28003     return 0;
28004 }
28005
28006 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
28007     Py_ssize_t q = a / b;
28008     Py_ssize_t r = a - q*b;
28009     q -= ((r != 0) & ((r ^ b) < 0));
28010     return q;
28011 }
28012
28013
28014
28015 static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
28016     PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
28017 }
28018
28019 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
28020     PyThreadState *tstate = PyThreadState_GET();
28021     *type = tstate->exc_type;
28022     *value = tstate->exc_value;
28023     *tb = tstate->exc_traceback;
28024     Py_XINCREF(*type);
28025     Py_XINCREF(*value);
28026     Py_XINCREF(*tb);
28027 }
28028 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
28029     PyObject *tmp_type, *tmp_value, *tmp_tb;
28030     PyThreadState *tstate = PyThreadState_GET();
28031     tmp_type = tstate->exc_type;
28032     tmp_value = tstate->exc_value;
28033     tmp_tb = tstate->exc_traceback;
28034     tstate->exc_type = type;
28035     tstate->exc_value = value;
28036     tstate->exc_traceback = tb;
28037     Py_XDECREF(tmp_type);
28038     Py_XDECREF(tmp_value);
28039     Py_XDECREF(tmp_tb);
28040 }
28041
28042 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
28043     PyObject *py_import = 0;
28044     PyObject *empty_list = 0;
28045     PyObject *module = 0;
28046     PyObject *global_dict = 0;
28047     PyObject *empty_dict = 0;
28048     PyObject *list;
28049     py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
28050     if (!py_import)
28051         goto bad;
28052     if (from_list)
28053         list = from_list;
28054     else {
28055         empty_list = PyList_New(0);
28056         if (!empty_list)
28057             goto bad;
28058         list = empty_list;
28059     }
28060     global_dict = PyModule_GetDict(__pyx_m);
28061     if (!global_dict)
28062         goto bad;
28063     empty_dict = PyDict_New();
28064     if (!empty_dict)
28065         goto bad;
28066     #if PY_VERSION_HEX >= 0x02050000
28067     {
28068         #if PY_MAJOR_VERSION >= 3
28069         if (level == -1) {
28070             if (strchr(__Pyx_MODULE_NAME, '.')) {
28071                 /* try package relative import first */
28072                 PyObject *py_level = PyInt_FromLong(1);
28073                 if (!py_level)
28074                     goto bad;
28075                 module = PyObject_CallFunctionObjArgs(py_import,
28076                     name, global_dict, empty_dict, list, py_level, NULL);
28077                 Py_DECREF(py_level);
28078                 if (!module) {
28079                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
28080                         goto bad;
28081                     PyErr_Clear();
28082                 }
28083             }
28084             level = 0; /* try absolute import on failure */
28085         }
28086         #endif
28087         if (!module) {
28088             PyObject *py_level = PyInt_FromLong(level);
28089             if (!py_level)
28090                 goto bad;
28091             module = PyObject_CallFunctionObjArgs(py_import,
28092                 name, global_dict, empty_dict, list, py_level, NULL);
28093             Py_DECREF(py_level);
28094         }
28095     }
28096     #else
28097     if (level>0) {
28098         PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
28099         goto bad;
28100     }
28101     module = PyObject_CallFunctionObjArgs(py_import,
28102         name, global_dict, empty_dict, list, NULL);
28103     #endif
28104 bad:
28105     Py_XDECREF(empty_list);
28106     Py_XDECREF(py_import);
28107     Py_XDECREF(empty_dict);
28108     return module;
28109 }
28110
28111 static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
28112 #if PY_MAJOR_VERSION < 3
28113     PyErr_Format(PyExc_ImportError, "cannot import name %.230s",
28114                  PyString_AsString(name));
28115 #else
28116     PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
28117 #endif
28118 }
28119
28120 static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
28121     PyObject *metaclass;
28122     /* Default metaclass */
28123 #if PY_MAJOR_VERSION < 3
28124     if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
28125         PyObject *base = PyTuple_GET_ITEM(bases, 0);
28126         metaclass = PyObject_GetAttrString(base, (char *)"__class__");
28127         if (!metaclass) {
28128             PyErr_Clear();
28129             metaclass = (PyObject*) Py_TYPE(base);
28130         }
28131     } else {
28132         metaclass = (PyObject *) &PyClass_Type;
28133     }
28134 #else
28135     if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
28136         PyObject *base = PyTuple_GET_ITEM(bases, 0);
28137         metaclass = (PyObject*) Py_TYPE(base);
28138     } else {
28139         metaclass = (PyObject *) &PyType_Type;
28140     }
28141 #endif
28142     Py_INCREF(metaclass);
28143     return metaclass;
28144 }
28145
28146 static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
28147                                    PyObject *modname) {
28148     PyObject *result;
28149     PyObject *metaclass;
28150     if (PyDict_SetItemString(dict, "__module__", modname) < 0)
28151         return NULL;
28152     /* Python2 __metaclass__ */
28153     metaclass = PyDict_GetItemString(dict, "__metaclass__");
28154     if (metaclass) {
28155         Py_INCREF(metaclass);
28156     } else {
28157         metaclass = __Pyx_FindPy2Metaclass(bases);
28158     }
28159     result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
28160     Py_DECREF(metaclass);
28161     return result;
28162 }
28163
28164 static PyObject *
28165 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
28166 {
28167     if (op->func_doc == NULL && op->func.m_ml->ml_doc) {
28168 #if PY_MAJOR_VERSION >= 3
28169         op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
28170 #else
28171         op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
28172 #endif
28173     }
28174     if (op->func_doc == 0) {
28175         Py_INCREF(Py_None);
28176         return Py_None;
28177     }
28178     Py_INCREF(op->func_doc);
28179     return op->func_doc;
28180 }
28181 static int
28182 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
28183 {
28184     PyObject *tmp = op->func_doc;
28185     if (value == NULL)
28186         op->func_doc = Py_None; /* Mark as deleted */
28187     else
28188         op->func_doc = value;
28189     Py_INCREF(op->func_doc);
28190     Py_XDECREF(tmp);
28191     return 0;
28192 }
28193 static PyObject *
28194 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
28195 {
28196     if (op->func_name == NULL) {
28197 #if PY_MAJOR_VERSION >= 3
28198         op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
28199 #else
28200         op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
28201 #endif
28202     }
28203     Py_INCREF(op->func_name);
28204     return op->func_name;
28205 }
28206 static int
28207 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
28208 {
28209     PyObject *tmp;
28210 #if PY_MAJOR_VERSION >= 3
28211     if (value == NULL || !PyUnicode_Check(value)) {
28212 #else
28213     if (value == NULL || !PyString_Check(value)) {
28214 #endif
28215         PyErr_SetString(PyExc_TypeError,
28216                         "__name__ must be set to a string object");
28217         return -1;
28218     }
28219     tmp = op->func_name;
28220     Py_INCREF(value);
28221     op->func_name = value;
28222     Py_XDECREF(tmp);
28223     return 0;
28224 }
28225 static PyObject *
28226 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
28227 {
28228     PyObject *self;
28229     self = m->func_closure;
28230     if (self == NULL)
28231         self = Py_None;
28232     Py_INCREF(self);
28233     return self;
28234 }
28235 static PyObject *
28236 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
28237 {
28238     if (op->func_dict == NULL) {
28239         op->func_dict = PyDict_New();
28240         if (op->func_dict == NULL)
28241             return NULL;
28242     }
28243     Py_INCREF(op->func_dict);
28244     return op->func_dict;
28245 }
28246 static int
28247 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
28248 {
28249     PyObject *tmp;
28250     if (value == NULL) {
28251         PyErr_SetString(PyExc_TypeError,
28252                "function's dictionary may not be deleted");
28253         return -1;
28254     }
28255     if (!PyDict_Check(value)) {
28256         PyErr_SetString(PyExc_TypeError,
28257                "setting function's dictionary to a non-dict");
28258         return -1;
28259     }
28260     tmp = op->func_dict;
28261     Py_INCREF(value);
28262     op->func_dict = value;
28263     Py_XDECREF(tmp);
28264     return 0;
28265 }
28266 static PyObject *
28267 __Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
28268 {
28269     PyObject* dict = PyModule_GetDict(__pyx_m);
28270     Py_XINCREF(dict);
28271     return dict;
28272 }
28273 static PyObject *
28274 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
28275 {
28276     Py_INCREF(Py_None);
28277     return Py_None;
28278 }
28279 static PyObject *
28280 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
28281 {
28282     PyObject* result = (op->func_code) ? op->func_code : Py_None;
28283     Py_INCREF(result);
28284     return result;
28285 }
28286 static PyObject *
28287 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op)
28288 {
28289     if (op->defaults_tuple) {
28290         Py_INCREF(op->defaults_tuple);
28291         return op->defaults_tuple;
28292     }
28293     if (op->defaults_getter) {
28294         PyObject *res = op->defaults_getter((PyObject *) op);
28295         if (res) {
28296             Py_INCREF(res);
28297             op->defaults_tuple = res;
28298         }
28299         return res;
28300     }
28301     Py_INCREF(Py_None);
28302     return Py_None;
28303 }
28304 static PyGetSetDef __pyx_CyFunction_getsets[] = {
28305     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
28306     {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
28307     {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
28308     {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
28309     {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
28310     {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
28311     {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
28312     {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
28313     {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
28314     {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
28315     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
28316     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
28317     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
28318     {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
28319     {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0},
28320     {0, 0, 0, 0, 0}
28321 };
28322 #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
28323 #define PY_WRITE_RESTRICTED WRITE_RESTRICTED
28324 #endif
28325 static PyMemberDef __pyx_CyFunction_members[] = {
28326     {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
28327     {0, 0, 0,  0, 0}
28328 };
28329 static PyObject *
28330 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
28331 {
28332 #if PY_MAJOR_VERSION >= 3
28333     return PyUnicode_FromString(m->func.m_ml->ml_name);
28334 #else
28335     return PyString_FromString(m->func.m_ml->ml_name);
28336 #endif
28337 }
28338 static PyMethodDef __pyx_CyFunction_methods[] = {
28339     {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
28340     {0, 0, 0, 0}
28341 };
28342 static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
28343                                       PyObject *closure, PyObject *module, PyObject* code) {
28344     __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
28345     if (op == NULL)
28346         return NULL;
28347     op->flags = flags;
28348     op->func_weakreflist = NULL;
28349     op->func.m_ml = ml;
28350     op->func.m_self = (PyObject *) op;
28351     Py_XINCREF(closure);
28352     op->func_closure = closure;
28353     Py_XINCREF(module);
28354     op->func.m_module = module;
28355     op->func_dict = NULL;
28356     op->func_name = NULL;
28357     op->func_doc = NULL;
28358     op->func_classobj = NULL;
28359     Py_XINCREF(code);
28360     op->func_code = code;
28361     op->defaults_pyobjects = 0;
28362     op->defaults = NULL;
28363     op->defaults_tuple = NULL;
28364     op->defaults_getter = NULL;
28365     PyObject_GC_Track(op);
28366     return (PyObject *) op;
28367 }
28368 static int
28369 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
28370 {
28371     Py_CLEAR(m->func_closure);
28372     Py_CLEAR(m->func.m_module);
28373     Py_CLEAR(m->func_dict);
28374     Py_CLEAR(m->func_name);
28375     Py_CLEAR(m->func_doc);
28376     Py_CLEAR(m->func_code);
28377     Py_CLEAR(m->func_classobj);
28378     Py_CLEAR(m->defaults_tuple);
28379     if (m->defaults) {
28380         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
28381         int i;
28382         for (i = 0; i < m->defaults_pyobjects; i++)
28383             Py_XDECREF(pydefaults[i]);
28384         PyMem_Free(m->defaults);
28385         m->defaults = NULL;
28386     }
28387     return 0;
28388 }
28389 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
28390 {
28391     PyObject_GC_UnTrack(m);
28392     if (m->func_weakreflist != NULL)
28393         PyObject_ClearWeakRefs((PyObject *) m);
28394     __Pyx_CyFunction_clear(m);
28395     PyObject_GC_Del(m);
28396 }
28397 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
28398 {
28399     Py_VISIT(m->func_closure);
28400     Py_VISIT(m->func.m_module);
28401     Py_VISIT(m->func_dict);
28402     Py_VISIT(m->func_name);
28403     Py_VISIT(m->func_doc);
28404     Py_VISIT(m->func_code);
28405     Py_VISIT(m->func_classobj);
28406     Py_VISIT(m->defaults_tuple);
28407     if (m->defaults) {
28408         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
28409         int i;
28410         for (i = 0; i < m->defaults_pyobjects; i++)
28411             Py_VISIT(pydefaults[i]);
28412     }
28413     return 0;
28414 }
28415 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
28416 {
28417     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
28418     if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
28419         Py_INCREF(func);
28420         return func;
28421     }
28422     if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
28423         if (type == NULL)
28424             type = (PyObject *)(Py_TYPE(obj));
28425         return PyMethod_New(func,
28426                             type, (PyObject *)(Py_TYPE(type)));
28427     }
28428     if (obj == Py_None)
28429         obj = NULL;
28430     return PyMethod_New(func, obj, type);
28431 }
28432 static PyObject*
28433 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
28434 {
28435     PyObject *func_name = __Pyx_CyFunction_get_name(op);
28436 #if PY_MAJOR_VERSION >= 3
28437     return PyUnicode_FromFormat("<cyfunction %U at %p>",
28438                                 func_name, (void *)op);
28439 #else
28440     return PyString_FromFormat("<cyfunction %s at %p>",
28441                                PyString_AsString(func_name), (void *)op);
28442 #endif
28443 }
28444 static PyTypeObject __pyx_CyFunctionType_type = {
28445     PyVarObject_HEAD_INIT(0, 0)
28446     __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
28447     sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
28448     0,                                  /*tp_itemsize*/
28449     (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
28450     0,                                  /*tp_print*/
28451     0,                                  /*tp_getattr*/
28452     0,                                  /*tp_setattr*/
28453 #if PY_MAJOR_VERSION < 3
28454     0,                                  /*tp_compare*/
28455 #else
28456     0,                                  /*reserved*/
28457 #endif
28458     (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
28459     0,                                  /*tp_as_number*/
28460     0,                                  /*tp_as_sequence*/
28461     0,                                  /*tp_as_mapping*/
28462     0,                                  /*tp_hash*/
28463     __Pyx_PyCFunction_Call,             /*tp_call*/
28464     0,                                  /*tp_str*/
28465     0,                                  /*tp_getattro*/
28466     0,                                  /*tp_setattro*/
28467     0,                                  /*tp_as_buffer*/
28468     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
28469     0,                                  /*tp_doc*/
28470     (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
28471     (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
28472     0,                                  /*tp_richcompare*/
28473     offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
28474     0,                                  /*tp_iter*/
28475     0,                                  /*tp_iternext*/
28476     __pyx_CyFunction_methods,           /*tp_methods*/
28477     __pyx_CyFunction_members,           /*tp_members*/
28478     __pyx_CyFunction_getsets,           /*tp_getset*/
28479     0,                                  /*tp_base*/
28480     0,                                  /*tp_dict*/
28481     __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
28482     0,                                  /*tp_descr_set*/
28483     offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
28484     0,                                  /*tp_init*/
28485     0,                                  /*tp_alloc*/
28486     0,                                  /*tp_new*/
28487     0,                                  /*tp_free*/
28488     0,                                  /*tp_is_gc*/
28489     0,                                  /*tp_bases*/
28490     0,                                  /*tp_mro*/
28491     0,                                  /*tp_cache*/
28492     0,                                  /*tp_subclasses*/
28493     0,                                  /*tp_weaklist*/
28494     0,                                  /*tp_del*/
28495 #if PY_VERSION_HEX >= 0x02060000
28496     0,                                  /*tp_version_tag*/
28497 #endif
28498 };
28499 static int __Pyx_CyFunction_init(void)
28500 {
28501     if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
28502         return -1;
28503     __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
28504     return 0;
28505 }
28506 void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects)
28507 {
28508     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
28509     m->defaults = PyMem_Malloc(size);
28510     if (!m->defaults)
28511         return PyErr_NoMemory();
28512     memset(m->defaults, 0, sizeof(size));
28513     m->defaults_pyobjects = pyobjects;
28514     return m->defaults;
28515 }
28516 static void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple)
28517 {
28518     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
28519     m->defaults_tuple = tuple;
28520     Py_INCREF(tuple);
28521 }
28522
28523 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t val) {
28524     const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0;
28525     const int is_unsigned = const_zero < neg_one;
28526     if ((sizeof(uint32_t) == sizeof(char))  ||
28527         (sizeof(uint32_t) == sizeof(short))) {
28528         return PyInt_FromLong((long)val);
28529     } else if ((sizeof(uint32_t) == sizeof(int)) ||
28530                (sizeof(uint32_t) == sizeof(long))) {
28531         if (is_unsigned)
28532             return PyLong_FromUnsignedLong((unsigned long)val);
28533         else
28534             return PyInt_FromLong((long)val);
28535     } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
28536         if (is_unsigned)
28537             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
28538         else
28539             return PyLong_FromLongLong((PY_LONG_LONG)val);
28540     } else {
28541         int one = 1; int little = (int)*(unsigned char *)&one;
28542         unsigned char *bytes = (unsigned char *)&val;
28543         return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
28544                                      little, !is_unsigned);
28545     }
28546 }
28547
28548 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
28549     if (s1 == s2) {
28550         return (equals == Py_EQ);
28551     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
28552         if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) {
28553             return (equals == Py_NE);
28554         } else if (PyBytes_GET_SIZE(s1) == 1) {
28555             if (equals == Py_EQ)
28556                 return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]);
28557             else
28558                 return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]);
28559         } else {
28560             int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1));
28561             return (equals == Py_EQ) ? (result == 0) : (result != 0);
28562         }
28563     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
28564         return (equals == Py_NE);
28565     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
28566         return (equals == Py_NE);
28567     } else {
28568         int result;
28569         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
28570         if (!py_result)
28571             return -1;
28572         result = __Pyx_PyObject_IsTrue(py_result);
28573         Py_DECREF(py_result);
28574         return result;
28575     }
28576 }
28577
28578 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
28579     if (s1 == s2) {
28580         return (equals == Py_EQ);
28581     } else if (PyUnicode_CheckExact(s1) & PyUnicode_CheckExact(s2)) {
28582         #if CYTHON_PEP393_ENABLED
28583         if ((PyUnicode_READY(s1) < 0) || (PyUnicode_READY(s2) < 0))
28584             return -1;
28585         if (PyUnicode_GET_LENGTH(s1) != PyUnicode_GET_LENGTH(s2)) {
28586             return (equals == Py_NE);
28587         } else if (PyUnicode_GET_LENGTH(s1) == 1) {
28588             Py_UCS4 ch1 = PyUnicode_READ_CHAR(s1, 0);
28589             Py_UCS4 ch2 = PyUnicode_READ_CHAR(s2, 0);
28590             return (equals == Py_EQ) ? (ch1 == ch2) : (ch1 != ch2);
28591         #else
28592         if (PyUnicode_GET_SIZE(s1) != PyUnicode_GET_SIZE(s2)) {
28593             return (equals == Py_NE);
28594         } else if (PyUnicode_GET_SIZE(s1) == 1) {
28595             Py_UNICODE ch1 = PyUnicode_AS_UNICODE(s1)[0];
28596             Py_UNICODE ch2 = PyUnicode_AS_UNICODE(s2)[0];
28597             return (equals == Py_EQ) ? (ch1 == ch2) : (ch1 != ch2);
28598         #endif
28599         } else {
28600             int result = PyUnicode_Compare(s1, s2);
28601             if ((result == -1) && unlikely(PyErr_Occurred()))
28602                 return -1;
28603             return (equals == Py_EQ) ? (result == 0) : (result != 0);
28604         }
28605     } else if ((s1 == Py_None) & PyUnicode_CheckExact(s2)) {
28606         return (equals == Py_NE);
28607     } else if ((s2 == Py_None) & PyUnicode_CheckExact(s1)) {
28608         return (equals == Py_NE);
28609     } else {
28610         int result;
28611         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
28612         if (!py_result)
28613             return -1;
28614         result = __Pyx_PyObject_IsTrue(py_result);
28615         Py_DECREF(py_result);
28616         return result;
28617     }
28618 }
28619
28620 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
28621     const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
28622     const int is_unsigned = neg_one > const_zero;
28623     if (sizeof(unsigned char) < sizeof(long)) {
28624         long val = __Pyx_PyInt_AsLong(x);
28625         if (unlikely(val != (long)(unsigned char)val)) {
28626             if (!unlikely(val == -1 && PyErr_Occurred())) {
28627                 PyErr_SetString(PyExc_OverflowError,
28628                     (is_unsigned && unlikely(val < 0)) ?
28629                     "can't convert negative value to unsigned char" :
28630                     "value too large to convert to unsigned char");
28631             }
28632             return (unsigned char)-1;
28633         }
28634         return (unsigned char)val;
28635     }
28636     return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
28637 }
28638
28639 static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
28640     const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
28641     const int is_unsigned = neg_one > const_zero;
28642     if (sizeof(unsigned short) < sizeof(long)) {
28643         long val = __Pyx_PyInt_AsLong(x);
28644         if (unlikely(val != (long)(unsigned short)val)) {
28645             if (!unlikely(val == -1 && PyErr_Occurred())) {
28646                 PyErr_SetString(PyExc_OverflowError,
28647                     (is_unsigned && unlikely(val < 0)) ?
28648                     "can't convert negative value to unsigned short" :
28649                     "value too large to convert to unsigned short");
28650             }
28651             return (unsigned short)-1;
28652         }
28653         return (unsigned short)val;
28654     }
28655     return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
28656 }
28657
28658 static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
28659     const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
28660     const int is_unsigned = neg_one > const_zero;
28661     if (sizeof(unsigned int) < sizeof(long)) {
28662         long val = __Pyx_PyInt_AsLong(x);
28663         if (unlikely(val != (long)(unsigned int)val)) {
28664             if (!unlikely(val == -1 && PyErr_Occurred())) {
28665                 PyErr_SetString(PyExc_OverflowError,
28666                     (is_unsigned && unlikely(val < 0)) ?
28667                     "can't convert negative value to unsigned int" :
28668                     "value too large to convert to unsigned int");
28669             }
28670             return (unsigned int)-1;
28671         }
28672         return (unsigned int)val;
28673     }
28674     return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
28675 }
28676
28677 static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
28678     const char neg_one = (char)-1, const_zero = 0;
28679     const int is_unsigned = neg_one > const_zero;
28680     if (sizeof(char) < sizeof(long)) {
28681         long val = __Pyx_PyInt_AsLong(x);
28682         if (unlikely(val != (long)(char)val)) {
28683             if (!unlikely(val == -1 && PyErr_Occurred())) {
28684                 PyErr_SetString(PyExc_OverflowError,
28685                     (is_unsigned && unlikely(val < 0)) ?
28686                     "can't convert negative value to char" :
28687                     "value too large to convert to char");
28688             }
28689             return (char)-1;
28690         }
28691         return (char)val;
28692     }
28693     return (char)__Pyx_PyInt_AsLong(x);
28694 }
28695
28696 static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
28697     const short neg_one = (short)-1, const_zero = 0;
28698     const int is_unsigned = neg_one > const_zero;
28699     if (sizeof(short) < sizeof(long)) {
28700         long val = __Pyx_PyInt_AsLong(x);
28701         if (unlikely(val != (long)(short)val)) {
28702             if (!unlikely(val == -1 && PyErr_Occurred())) {
28703                 PyErr_SetString(PyExc_OverflowError,
28704                     (is_unsigned && unlikely(val < 0)) ?
28705                     "can't convert negative value to short" :
28706                     "value too large to convert to short");
28707             }
28708             return (short)-1;
28709         }
28710         return (short)val;
28711     }
28712     return (short)__Pyx_PyInt_AsLong(x);
28713 }
28714
28715 static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
28716     const int neg_one = (int)-1, const_zero = 0;
28717     const int is_unsigned = neg_one > const_zero;
28718     if (sizeof(int) < sizeof(long)) {
28719         long val = __Pyx_PyInt_AsLong(x);
28720         if (unlikely(val != (long)(int)val)) {
28721             if (!unlikely(val == -1 && PyErr_Occurred())) {
28722                 PyErr_SetString(PyExc_OverflowError,
28723                     (is_unsigned && unlikely(val < 0)) ?
28724                     "can't convert negative value to int" :
28725                     "value too large to convert to int");
28726             }
28727             return (int)-1;
28728         }
28729         return (int)val;
28730     }
28731     return (int)__Pyx_PyInt_AsLong(x);
28732 }
28733
28734 static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
28735     const signed char neg_one = (signed char)-1, const_zero = 0;
28736     const int is_unsigned = neg_one > const_zero;
28737     if (sizeof(signed char) < sizeof(long)) {
28738         long val = __Pyx_PyInt_AsLong(x);
28739         if (unlikely(val != (long)(signed char)val)) {
28740             if (!unlikely(val == -1 && PyErr_Occurred())) {
28741                 PyErr_SetString(PyExc_OverflowError,
28742                     (is_unsigned && unlikely(val < 0)) ?
28743                     "can't convert negative value to signed char" :
28744                     "value too large to convert to signed char");
28745             }
28746             return (signed char)-1;
28747         }
28748         return (signed char)val;
28749     }
28750     return (signed char)__Pyx_PyInt_AsSignedLong(x);
28751 }
28752
28753 static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
28754     const signed short neg_one = (signed short)-1, const_zero = 0;
28755     const int is_unsigned = neg_one > const_zero;
28756     if (sizeof(signed short) < sizeof(long)) {
28757         long val = __Pyx_PyInt_AsLong(x);
28758         if (unlikely(val != (long)(signed short)val)) {
28759             if (!unlikely(val == -1 && PyErr_Occurred())) {
28760                 PyErr_SetString(PyExc_OverflowError,
28761                     (is_unsigned && unlikely(val < 0)) ?
28762                     "can't convert negative value to signed short" :
28763                     "value too large to convert to signed short");
28764             }
28765             return (signed short)-1;
28766         }
28767         return (signed short)val;
28768     }
28769     return (signed short)__Pyx_PyInt_AsSignedLong(x);
28770 }
28771
28772 static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
28773     const signed int neg_one = (signed int)-1, const_zero = 0;
28774     const int is_unsigned = neg_one > const_zero;
28775     if (sizeof(signed int) < sizeof(long)) {
28776         long val = __Pyx_PyInt_AsLong(x);
28777         if (unlikely(val != (long)(signed int)val)) {
28778             if (!unlikely(val == -1 && PyErr_Occurred())) {
28779                 PyErr_SetString(PyExc_OverflowError,
28780                     (is_unsigned && unlikely(val < 0)) ?
28781                     "can't convert negative value to signed int" :
28782                     "value too large to convert to signed int");
28783             }
28784             return (signed int)-1;
28785         }
28786         return (signed int)val;
28787     }
28788     return (signed int)__Pyx_PyInt_AsSignedLong(x);
28789 }
28790
28791 static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
28792     const int neg_one = (int)-1, const_zero = 0;
28793     const int is_unsigned = neg_one > const_zero;
28794     if (sizeof(int) < sizeof(long)) {
28795         long val = __Pyx_PyInt_AsLong(x);
28796         if (unlikely(val != (long)(int)val)) {
28797             if (!unlikely(val == -1 && PyErr_Occurred())) {
28798                 PyErr_SetString(PyExc_OverflowError,
28799                     (is_unsigned && unlikely(val < 0)) ?
28800                     "can't convert negative value to int" :
28801                     "value too large to convert to int");
28802             }
28803             return (int)-1;
28804         }
28805         return (int)val;
28806     }
28807     return (int)__Pyx_PyInt_AsLong(x);
28808 }
28809
28810 static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
28811     const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
28812     const int is_unsigned = neg_one > const_zero;
28813 #if PY_VERSION_HEX < 0x03000000
28814     if (likely(PyInt_Check(x))) {
28815         long val = PyInt_AS_LONG(x);
28816         if (is_unsigned && unlikely(val < 0)) {
28817             PyErr_SetString(PyExc_OverflowError,
28818                             "can't convert negative value to unsigned long");
28819             return (unsigned long)-1;
28820         }
28821         return (unsigned long)val;
28822     } else
28823 #endif
28824     if (likely(PyLong_Check(x))) {
28825         if (is_unsigned) {
28826             if (unlikely(Py_SIZE(x) < 0)) {
28827                 PyErr_SetString(PyExc_OverflowError,
28828                                 "can't convert negative value to unsigned long");
28829                 return (unsigned long)-1;
28830             }
28831             return (unsigned long)PyLong_AsUnsignedLong(x);
28832         } else {
28833             return (unsigned long)PyLong_AsLong(x);
28834         }
28835     } else {
28836         unsigned long val;
28837         PyObject *tmp = __Pyx_PyNumber_Int(x);
28838         if (!tmp) return (unsigned long)-1;
28839         val = __Pyx_PyInt_AsUnsignedLong(tmp);
28840         Py_DECREF(tmp);
28841         return val;
28842     }
28843 }
28844
28845 static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
28846     const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
28847     const int is_unsigned = neg_one > const_zero;
28848 #if PY_VERSION_HEX < 0x03000000
28849     if (likely(PyInt_Check(x))) {
28850         long val = PyInt_AS_LONG(x);
28851         if (is_unsigned && unlikely(val < 0)) {
28852             PyErr_SetString(PyExc_OverflowError,
28853                             "can't convert negative value to unsigned PY_LONG_LONG");
28854             return (unsigned PY_LONG_LONG)-1;
28855         }
28856         return (unsigned PY_LONG_LONG)val;
28857     } else
28858 #endif
28859     if (likely(PyLong_Check(x))) {
28860         if (is_unsigned) {
28861             if (unlikely(Py_SIZE(x) < 0)) {
28862                 PyErr_SetString(PyExc_OverflowError,
28863                                 "can't convert negative value to unsigned PY_LONG_LONG");
28864                 return (unsigned PY_LONG_LONG)-1;
28865             }
28866             return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
28867         } else {
28868             return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
28869         }
28870     } else {
28871         unsigned PY_LONG_LONG val;
28872         PyObject *tmp = __Pyx_PyNumber_Int(x);
28873         if (!tmp) return (unsigned PY_LONG_LONG)-1;
28874         val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
28875         Py_DECREF(tmp);
28876         return val;
28877     }
28878 }
28879
28880 static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
28881     const long neg_one = (long)-1, const_zero = 0;
28882     const int is_unsigned = neg_one > const_zero;
28883 #if PY_VERSION_HEX < 0x03000000
28884     if (likely(PyInt_Check(x))) {
28885         long val = PyInt_AS_LONG(x);
28886         if (is_unsigned && unlikely(val < 0)) {
28887             PyErr_SetString(PyExc_OverflowError,
28888                             "can't convert negative value to long");
28889             return (long)-1;
28890         }
28891         return (long)val;
28892     } else
28893 #endif
28894     if (likely(PyLong_Check(x))) {
28895         if (is_unsigned) {
28896             if (unlikely(Py_SIZE(x) < 0)) {
28897                 PyErr_SetString(PyExc_OverflowError,
28898                                 "can't convert negative value to long");
28899                 return (long)-1;
28900             }
28901             return (long)PyLong_AsUnsignedLong(x);
28902         } else {
28903             return (long)PyLong_AsLong(x);
28904         }
28905     } else {
28906         long val;
28907         PyObject *tmp = __Pyx_PyNumber_Int(x);
28908         if (!tmp) return (long)-1;
28909         val = __Pyx_PyInt_AsLong(tmp);
28910         Py_DECREF(tmp);
28911         return val;
28912     }
28913 }
28914
28915 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
28916     const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
28917     const int is_unsigned = neg_one > const_zero;
28918 #if PY_VERSION_HEX < 0x03000000
28919     if (likely(PyInt_Check(x))) {
28920         long val = PyInt_AS_LONG(x);
28921         if (is_unsigned && unlikely(val < 0)) {
28922             PyErr_SetString(PyExc_OverflowError,
28923                             "can't convert negative value to PY_LONG_LONG");
28924             return (PY_LONG_LONG)-1;
28925         }
28926         return (PY_LONG_LONG)val;
28927     } else
28928 #endif
28929     if (likely(PyLong_Check(x))) {
28930         if (is_unsigned) {
28931             if (unlikely(Py_SIZE(x) < 0)) {
28932                 PyErr_SetString(PyExc_OverflowError,
28933                                 "can't convert negative value to PY_LONG_LONG");
28934                 return (PY_LONG_LONG)-1;
28935             }
28936             return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
28937         } else {
28938             return (PY_LONG_LONG)PyLong_AsLongLong(x);
28939         }
28940     } else {
28941         PY_LONG_LONG val;
28942         PyObject *tmp = __Pyx_PyNumber_Int(x);
28943         if (!tmp) return (PY_LONG_LONG)-1;
28944         val = __Pyx_PyInt_AsLongLong(tmp);
28945         Py_DECREF(tmp);
28946         return val;
28947     }
28948 }
28949
28950 static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
28951     const signed long neg_one = (signed long)-1, const_zero = 0;
28952     const int is_unsigned = neg_one > const_zero;
28953 #if PY_VERSION_HEX < 0x03000000
28954     if (likely(PyInt_Check(x))) {
28955         long val = PyInt_AS_LONG(x);
28956         if (is_unsigned && unlikely(val < 0)) {
28957             PyErr_SetString(PyExc_OverflowError,
28958                             "can't convert negative value to signed long");
28959             return (signed long)-1;
28960         }
28961         return (signed long)val;
28962     } else
28963 #endif
28964     if (likely(PyLong_Check(x))) {
28965         if (is_unsigned) {
28966             if (unlikely(Py_SIZE(x) < 0)) {
28967                 PyErr_SetString(PyExc_OverflowError,
28968                                 "can't convert negative value to signed long");
28969                 return (signed long)-1;
28970             }
28971             return (signed long)PyLong_AsUnsignedLong(x);
28972         } else {
28973             return (signed long)PyLong_AsLong(x);
28974         }
28975     } else {
28976         signed long val;
28977         PyObject *tmp = __Pyx_PyNumber_Int(x);
28978         if (!tmp) return (signed long)-1;
28979         val = __Pyx_PyInt_AsSignedLong(tmp);
28980         Py_DECREF(tmp);
28981         return val;
28982     }
28983 }
28984
28985 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
28986     const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
28987     const int is_unsigned = neg_one > const_zero;
28988 #if PY_VERSION_HEX < 0x03000000
28989     if (likely(PyInt_Check(x))) {
28990         long val = PyInt_AS_LONG(x);
28991         if (is_unsigned && unlikely(val < 0)) {
28992             PyErr_SetString(PyExc_OverflowError,
28993                             "can't convert negative value to signed PY_LONG_LONG");
28994             return (signed PY_LONG_LONG)-1;
28995         }
28996         return (signed PY_LONG_LONG)val;
28997     } else
28998 #endif
28999     if (likely(PyLong_Check(x))) {
29000         if (is_unsigned) {
29001             if (unlikely(Py_SIZE(x) < 0)) {
29002                 PyErr_SetString(PyExc_OverflowError,
29003                                 "can't convert negative value to signed PY_LONG_LONG");
29004                 return (signed PY_LONG_LONG)-1;
29005             }
29006             return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
29007         } else {
29008             return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
29009         }
29010     } else {
29011         signed PY_LONG_LONG val;
29012         PyObject *tmp = __Pyx_PyNumber_Int(x);
29013         if (!tmp) return (signed PY_LONG_LONG)-1;
29014         val = __Pyx_PyInt_AsSignedLongLong(tmp);
29015         Py_DECREF(tmp);
29016         return val;
29017     }
29018 }
29019
29020 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
29021     PyObject *tmp_type, *tmp_value, *tmp_tb;
29022     PyThreadState *tstate = PyThreadState_GET();
29023     tmp_type = tstate->exc_type;
29024     tmp_value = tstate->exc_value;
29025     tmp_tb = tstate->exc_traceback;
29026     tstate->exc_type = *type;
29027     tstate->exc_value = *value;
29028     tstate->exc_traceback = *tb;
29029     *type = tmp_type;
29030     *value = tmp_value;
29031     *tb = tmp_tb;
29032 }
29033
29034 static PyObject *__Pyx_Generator_Next(PyObject *self);
29035 static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
29036 static PyObject *__Pyx_Generator_Close(PyObject *self);
29037 static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
29038 static CYTHON_INLINE
29039 void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self)
29040 {
29041     PyObject *exc_type = self->exc_type;
29042     PyObject *exc_value = self->exc_value;
29043     PyObject *exc_traceback = self->exc_traceback;
29044     self->exc_type = NULL;
29045     self->exc_value = NULL;
29046     self->exc_traceback = NULL;
29047     Py_XDECREF(exc_type);
29048     Py_XDECREF(exc_value);
29049     Py_XDECREF(exc_traceback);
29050 }
29051 static CYTHON_INLINE
29052 PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value)
29053 {
29054     PyObject *retval;
29055     if (unlikely(self->is_running)) {
29056         PyErr_SetString(PyExc_ValueError,
29057                         "generator already executing");
29058         return NULL;
29059     }
29060     if (unlikely(self->resume_label == 0)) {
29061         if (unlikely(value && value != Py_None)) {
29062             PyErr_SetString(PyExc_TypeError,
29063                             "can't send non-None value to a "
29064                             "just-started generator");
29065             return NULL;
29066         }
29067     }
29068     if (unlikely(self->resume_label == -1)) {
29069         PyErr_SetNone(PyExc_StopIteration);
29070         return NULL;
29071     }
29072     if (value)
29073         __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback);
29074     else
29075         __Pyx_Generator_ExceptionClear(self);
29076     self->is_running = 1;
29077     retval = self->body((PyObject *) self, value);
29078     self->is_running = 0;
29079     if (retval)
29080         __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback);
29081     else
29082         __Pyx_Generator_ExceptionClear(self);
29083     return retval;
29084 }
29085 static PyObject *__Pyx_Generator_Next(PyObject *self)
29086 {
29087     return __Pyx_Generator_SendEx((__pyx_GeneratorObject *) self, Py_None);
29088 }
29089 static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value)
29090 {
29091     return __Pyx_Generator_SendEx((__pyx_GeneratorObject *) self, value);
29092 }
29093 static PyObject *__Pyx_Generator_Close(PyObject *self)
29094 {
29095     __pyx_GeneratorObject *generator = (__pyx_GeneratorObject *) self;
29096     PyObject *retval;
29097 #if PY_VERSION_HEX < 0x02050000
29098     PyErr_SetNone(PyExc_StopIteration);
29099 #else
29100     PyErr_SetNone(PyExc_GeneratorExit);
29101 #endif
29102     retval = __Pyx_Generator_SendEx(generator, NULL);
29103     if (retval) {
29104         Py_DECREF(retval);
29105         PyErr_SetString(PyExc_RuntimeError,
29106                         "generator ignored GeneratorExit");
29107         return NULL;
29108     }
29109 #if PY_VERSION_HEX < 0x02050000
29110     if (PyErr_ExceptionMatches(PyExc_StopIteration))
29111 #else
29112     if (PyErr_ExceptionMatches(PyExc_StopIteration)
29113         || PyErr_ExceptionMatches(PyExc_GeneratorExit))
29114 #endif
29115     {
29116         PyErr_Clear();          /* ignore these errors */
29117         Py_INCREF(Py_None);
29118         return Py_None;
29119     }
29120     return NULL;
29121 }
29122 static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args)
29123 {
29124     __pyx_GeneratorObject *generator = (__pyx_GeneratorObject *) self;
29125     PyObject *typ;
29126     PyObject *tb = NULL;
29127     PyObject *val = NULL;
29128     if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
29129         return NULL;
29130     __Pyx_Raise(typ, val, tb, NULL);
29131     return __Pyx_Generator_SendEx(generator, NULL);
29132 }
29133 static int
29134 __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg)
29135 {
29136     __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
29137     Py_VISIT(gen->closure);
29138     Py_VISIT(gen->classobj);
29139     Py_VISIT(gen->exc_type);
29140     Py_VISIT(gen->exc_value);
29141     Py_VISIT(gen->exc_traceback);
29142     return 0;
29143 }
29144 static void
29145 __Pyx_Generator_dealloc(PyObject *self)
29146 {
29147     __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
29148     PyObject_GC_UnTrack(gen);
29149     if (gen->gi_weakreflist != NULL)
29150         PyObject_ClearWeakRefs(self);
29151     PyObject_GC_Track(self);
29152     if (gen->resume_label > 0) {
29153         Py_TYPE(gen)->tp_del(self);
29154         if (self->ob_refcnt > 0)
29155             return;                     /* resurrected.  :( */
29156     }
29157     PyObject_GC_UnTrack(self);
29158     Py_CLEAR(gen->closure);
29159     Py_CLEAR(gen->classobj);
29160     Py_CLEAR(gen->exc_type);
29161     Py_CLEAR(gen->exc_value);
29162     Py_CLEAR(gen->exc_traceback);
29163     PyObject_GC_Del(gen);
29164 }
29165 static void
29166 __Pyx_Generator_del(PyObject *self)
29167 {
29168     PyObject *res;
29169     PyObject *error_type, *error_value, *error_traceback;
29170     __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
29171     if (gen->resume_label <= 0)
29172         return ;
29173     assert(self->ob_refcnt == 0);
29174     self->ob_refcnt = 1;
29175     __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
29176     res = __Pyx_Generator_Close(self);
29177     if (res == NULL)
29178         PyErr_WriteUnraisable(self);
29179     else
29180         Py_DECREF(res);
29181     __Pyx_ErrRestore(error_type, error_value, error_traceback);
29182     /* Undo the temporary resurrection; can't use DECREF here, it would
29183      * cause a recursive call.
29184      */
29185     assert(self->ob_refcnt > 0);
29186     if (--self->ob_refcnt == 0)
29187         return; /* this is the normal path out */
29188     /* close() resurrected it!  Make it look like the original Py_DECREF
29189      * never happened.
29190      */
29191     {
29192         Py_ssize_t refcnt = self->ob_refcnt;
29193         _Py_NewReference(self);
29194         self->ob_refcnt = refcnt;
29195     }
29196     assert(PyType_IS_GC(self->ob_type) &&
29197            _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
29198     /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
29199      * we need to undo that. */
29200     _Py_DEC_REFTOTAL;
29201     /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
29202      * chain, so no more to do there.
29203      * If COUNT_ALLOCS, the original decref bumped tp_frees, and
29204      * _Py_NewReference bumped tp_allocs:  both of those need to be
29205      * undone.
29206      */
29207 #ifdef COUNT_ALLOCS
29208     --self->ob_type->tp_frees;
29209     --self->ob_type->tp_allocs;
29210 #endif
29211 }
29212 static PyMemberDef __pyx_Generator_memberlist[] = {
29213     {(char *) "gi_running",
29214      T_INT,
29215      offsetof(__pyx_GeneratorObject, is_running),
29216      READONLY,
29217      NULL},
29218     {0, 0, 0, 0, 0}
29219 };
29220 static PyMethodDef __pyx_Generator_methods[] = {
29221     {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
29222     {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
29223     {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
29224     {0, 0, 0, 0}
29225 };
29226 static PyTypeObject __pyx_GeneratorType = {
29227     PyVarObject_HEAD_INIT(0, 0)
29228     __Pyx_NAMESTR("generator"),         /*tp_name*/
29229     sizeof(__pyx_GeneratorObject),      /*tp_basicsize*/
29230     0,                                  /*tp_itemsize*/
29231     (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/
29232     0,                                  /*tp_print*/
29233     0,                                  /*tp_getattr*/
29234     0,                                  /*tp_setattr*/
29235 #if PY_MAJOR_VERSION < 3
29236     0,                                  /*tp_compare*/
29237 #else
29238     0,                                  /*reserved*/
29239 #endif
29240     0,                                   /*tp_repr*/
29241     0,                                  /*tp_as_number*/
29242     0,                                  /*tp_as_sequence*/
29243     0,                                  /*tp_as_mapping*/
29244     0,                                  /*tp_hash*/
29245     0,                                  /*tp_call*/
29246     0,                                  /*tp_str*/
29247     PyObject_GenericGetAttr,            /*tp_getattro*/
29248     0,                                  /*tp_setattro*/
29249     0,                                  /*tp_as_buffer*/
29250     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
29251     0,                                  /*tp_doc*/
29252     (traverseproc) __Pyx_Generator_traverse,   /*tp_traverse*/
29253     0,                                  /*tp_clear*/
29254     0,                                  /*tp_richcompare*/
29255     offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
29256     PyObject_SelfIter,                  /*tp_iter*/
29257     (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
29258     __pyx_Generator_methods,            /*tp_methods*/
29259     __pyx_Generator_memberlist,         /*tp_members*/
29260     0,                                  /*tp_getset*/
29261     0,                                  /*tp_base*/
29262     0,                                  /*tp_dict*/
29263     0,                                  /*tp_descr_get*/
29264     0,                                  /*tp_descr_set*/
29265     0,                                  /*tp_dictoffset*/
29266     0,                                  /*tp_init*/
29267     0,                                  /*tp_alloc*/
29268     0,                                  /*tp_new*/
29269     0,                                  /*tp_free*/
29270     0,                                  /*tp_is_gc*/
29271     0,                                  /*tp_bases*/
29272     0,                                  /*tp_mro*/
29273     0,                                  /*tp_cache*/
29274     0,                                  /*tp_subclasses*/
29275     0,                                  /*tp_weaklist*/
29276     __Pyx_Generator_del,                /*tp_del*/
29277 #if PY_VERSION_HEX >= 0x02060000
29278     0,                                  /*tp_version_tag*/
29279 #endif
29280 };
29281 static
29282 __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
29283                                            PyObject *closure)
29284 {
29285     __pyx_GeneratorObject *gen =
29286         PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType);
29287     if (gen == NULL)
29288         return NULL;
29289     gen->body = body;
29290     gen->closure = closure;
29291     Py_XINCREF(closure);
29292     gen->is_running = 0;
29293     gen->resume_label = 0;
29294     gen->classobj = NULL;
29295     gen->exc_type = NULL;
29296     gen->exc_value = NULL;
29297     gen->exc_traceback = NULL;
29298     gen->gi_weakreflist = NULL;
29299     PyObject_GC_Track(gen);
29300     return gen;
29301 }
29302 static int __pyx_Generator_init(void)
29303 {
29304     return PyType_Ready(&__pyx_GeneratorType);
29305 }
29306
29307 static int __Pyx_check_binary_version(void) {
29308     char ctversion[4], rtversion[4];
29309     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
29310     PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
29311     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
29312         char message[200];
29313         PyOS_snprintf(message, sizeof(message),
29314                       "compiletime version %s of module '%.100s' "
29315                       "does not match runtime version %s",
29316                       ctversion, __Pyx_MODULE_NAME, rtversion);
29317         #if PY_VERSION_HEX < 0x02050000
29318         return PyErr_Warn(NULL, message);
29319         #else
29320         return PyErr_WarnEx(NULL, message, 1);
29321         #endif
29322     }
29323     return 0;
29324 }
29325
29326 #ifndef __PYX_HAVE_RT_ImportType
29327 #define __PYX_HAVE_RT_ImportType
29328 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
29329     size_t size, int strict)
29330 {
29331     PyObject *py_module = 0;
29332     PyObject *result = 0;
29333     PyObject *py_name = 0;
29334     char warning[200];
29335     py_module = __Pyx_ImportModule(module_name);
29336     if (!py_module)
29337         goto bad;
29338     py_name = __Pyx_PyIdentifier_FromString(class_name);
29339     if (!py_name)
29340         goto bad;
29341     result = PyObject_GetAttr(py_module, py_name);
29342     Py_DECREF(py_name);
29343     py_name = 0;
29344     Py_DECREF(py_module);
29345     py_module = 0;
29346     if (!result)
29347         goto bad;
29348     if (!PyType_Check(result)) {
29349         PyErr_Format(PyExc_TypeError,
29350             "%s.%s is not a type object",
29351             module_name, class_name);
29352         goto bad;
29353     }
29354     if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) {
29355         PyOS_snprintf(warning, sizeof(warning),
29356             "%s.%s size changed, may indicate binary incompatibility",
29357             module_name, class_name);
29358         #if PY_VERSION_HEX < 0x02050000
29359         if (PyErr_Warn(NULL, warning) < 0) goto bad;
29360         #else
29361         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
29362         #endif
29363     }
29364     else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) {
29365         PyErr_Format(PyExc_ValueError,
29366             "%s.%s has the wrong size, try recompiling",
29367             module_name, class_name);
29368         goto bad;
29369     }
29370     return (PyTypeObject *)result;
29371 bad:
29372     Py_XDECREF(py_module);
29373     Py_XDECREF(result);
29374     return NULL;
29375 }
29376 #endif
29377
29378 #ifndef __PYX_HAVE_RT_ImportModule
29379 #define __PYX_HAVE_RT_ImportModule
29380 static PyObject *__Pyx_ImportModule(const char *name) {
29381     PyObject *py_name = 0;
29382     PyObject *py_module = 0;
29383     py_name = __Pyx_PyIdentifier_FromString(name);
29384     if (!py_name)
29385         goto bad;
29386     py_module = PyImport_Import(py_name);
29387     Py_DECREF(py_name);
29388     return py_module;
29389 bad:
29390     Py_XDECREF(py_name);
29391     return 0;
29392 }
29393 #endif
29394
29395 static void* __Pyx_GetVtable(PyObject *dict) {
29396     void* ptr;
29397     PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__");
29398     if (!ob)
29399         goto bad;
29400 #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
29401     ptr = PyCapsule_GetPointer(ob, 0);
29402 #else
29403     ptr = PyCObject_AsVoidPtr(ob);
29404 #endif
29405     if (!ptr && !PyErr_Occurred())
29406         PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
29407     Py_DECREF(ob);
29408     return ptr;
29409 bad:
29410     Py_XDECREF(ob);
29411     return NULL;
29412 }
29413
29414 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
29415 #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
29416     PyObject *ob = PyCapsule_New(vtable, 0, 0);
29417 #else
29418     PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
29419 #endif
29420     if (!ob)
29421         goto bad;
29422     if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
29423         goto bad;
29424     Py_DECREF(ob);
29425     return 0;
29426 bad:
29427     Py_XDECREF(ob);
29428     return -1;
29429 }
29430
29431 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
29432     int start = 0, mid = 0, end = count - 1;
29433     if (end >= 0 && code_line > entries[end].code_line) {
29434         return count;
29435     }
29436     while (start < end) {
29437         mid = (start + end) / 2;
29438         if (code_line < entries[mid].code_line) {
29439             end = mid;
29440         } else if (code_line > entries[mid].code_line) {
29441              start = mid + 1;
29442         } else {
29443             return mid;
29444         }
29445     }
29446     if (code_line <= entries[mid].code_line) {
29447         return mid;
29448     } else {
29449         return mid + 1;
29450     }
29451 }
29452 static PyCodeObject *__pyx_find_code_object(int code_line) {
29453     PyCodeObject* code_object;
29454     int pos;
29455     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
29456         return NULL;
29457     }
29458     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
29459     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
29460         return NULL;
29461     }
29462     code_object = __pyx_code_cache.entries[pos].code_object;
29463     Py_INCREF(code_object);
29464     return code_object;
29465 }
29466 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
29467     int pos, i;
29468     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
29469     if (unlikely(!code_line)) {
29470         return;
29471     }
29472     if (unlikely(!entries)) {
29473         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
29474         if (likely(entries)) {
29475             __pyx_code_cache.entries = entries;
29476             __pyx_code_cache.max_count = 64;
29477             __pyx_code_cache.count = 1;
29478             entries[0].code_line = code_line;
29479             entries[0].code_object = code_object;
29480             Py_INCREF(code_object);
29481         }
29482         return;
29483     }
29484     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
29485     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
29486         PyCodeObject* tmp = entries[pos].code_object;
29487         entries[pos].code_object = code_object;
29488         Py_DECREF(tmp);
29489         return;
29490     }
29491     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
29492         int new_max = __pyx_code_cache.max_count + 64;
29493         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
29494             __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
29495         if (unlikely(!entries)) {
29496             return;
29497         }
29498         __pyx_code_cache.entries = entries;
29499         __pyx_code_cache.max_count = new_max;
29500     }
29501     for (i=__pyx_code_cache.count; i>pos; i--) {
29502         entries[i] = entries[i-1];
29503     }
29504     entries[pos].code_line = code_line;
29505     entries[pos].code_object = code_object;
29506     __pyx_code_cache.count++;
29507     Py_INCREF(code_object);
29508 }
29509
29510 #include "compile.h"
29511 #include "frameobject.h"
29512 #include "traceback.h"
29513 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
29514             const char *funcname, int c_line,
29515             int py_line, const char *filename) {
29516     PyCodeObject *py_code = 0;
29517     PyObject *py_srcfile = 0;
29518     PyObject *py_funcname = 0;
29519     #if PY_MAJOR_VERSION < 3
29520     py_srcfile = PyString_FromString(filename);
29521     #else
29522     py_srcfile = PyUnicode_FromString(filename);
29523     #endif
29524     if (!py_srcfile) goto bad;
29525     if (c_line) {
29526         #if PY_MAJOR_VERSION < 3
29527         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
29528         #else
29529         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
29530         #endif
29531     }
29532     else {
29533         #if PY_MAJOR_VERSION < 3
29534         py_funcname = PyString_FromString(funcname);
29535         #else
29536         py_funcname = PyUnicode_FromString(funcname);
29537         #endif
29538     }
29539     if (!py_funcname) goto bad;
29540     py_code = __Pyx_PyCode_New(
29541         0,            /*int argcount,*/
29542         0,            /*int kwonlyargcount,*/
29543         0,            /*int nlocals,*/
29544         0,            /*int stacksize,*/
29545         0,            /*int flags,*/
29546         __pyx_empty_bytes, /*PyObject *code,*/
29547         __pyx_empty_tuple, /*PyObject *consts,*/
29548         __pyx_empty_tuple, /*PyObject *names,*/
29549         __pyx_empty_tuple, /*PyObject *varnames,*/
29550         __pyx_empty_tuple, /*PyObject *freevars,*/
29551         __pyx_empty_tuple, /*PyObject *cellvars,*/
29552         py_srcfile,   /*PyObject *filename,*/
29553         py_funcname,  /*PyObject *name,*/
29554         py_line,      /*int firstlineno,*/
29555         __pyx_empty_bytes  /*PyObject *lnotab*/
29556     );
29557     Py_DECREF(py_srcfile);
29558     Py_DECREF(py_funcname);
29559     return py_code;
29560 bad:
29561     Py_XDECREF(py_srcfile);
29562     Py_XDECREF(py_funcname);
29563     return NULL;
29564 }
29565 static void __Pyx_AddTraceback(const char *funcname, int c_line,
29566                                int py_line, const char *filename) {
29567     PyCodeObject *py_code = 0;
29568     PyObject *py_globals = 0;
29569     PyFrameObject *py_frame = 0;
29570     py_code = __pyx_find_code_object(c_line ? c_line : py_line);
29571     if (!py_code) {
29572         py_code = __Pyx_CreateCodeObjectForTraceback(
29573             funcname, c_line, py_line, filename);
29574         if (!py_code) goto bad;
29575         __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
29576     }
29577     py_globals = PyModule_GetDict(__pyx_m);
29578     if (!py_globals) goto bad;
29579     py_frame = PyFrame_New(
29580         PyThreadState_GET(), /*PyThreadState *tstate,*/
29581         py_code,             /*PyCodeObject *code,*/
29582         py_globals,          /*PyObject *globals,*/
29583         0                    /*PyObject *locals*/
29584     );
29585     if (!py_frame) goto bad;
29586     py_frame->f_lineno = py_line;
29587     PyTraceBack_Here(py_frame);
29588 bad:
29589     Py_XDECREF(py_code);
29590     Py_XDECREF(py_frame);
29591 }
29592
29593 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
29594     while (t->p) {
29595         #if PY_MAJOR_VERSION < 3
29596         if (t->is_unicode) {
29597             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
29598         } else if (t->intern) {
29599             *t->p = PyString_InternFromString(t->s);
29600         } else {
29601             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
29602         }
29603         #else  /* Python 3+ has unicode identifiers */
29604         if (t->is_unicode | t->is_str) {
29605             if (t->intern) {
29606                 *t->p = PyUnicode_InternFromString(t->s);
29607             } else if (t->encoding) {
29608                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
29609             } else {
29610                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
29611             }
29612         } else {
29613             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
29614         }
29615         #endif
29616         if (!*t->p)
29617             return -1;
29618         ++t;
29619     }
29620     return 0;
29621 }
29622
29623
29624 /* Type Conversion Functions */
29625
29626 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
29627    int is_true = x == Py_True;
29628    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
29629    else return PyObject_IsTrue(x);
29630 }
29631
29632 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
29633   PyNumberMethods *m;
29634   const char *name = NULL;
29635   PyObject *res = NULL;
29636 #if PY_VERSION_HEX < 0x03000000
29637   if (PyInt_Check(x) || PyLong_Check(x))
29638 #else
29639   if (PyLong_Check(x))
29640 #endif
29641     return Py_INCREF(x), x;
29642   m = Py_TYPE(x)->tp_as_number;
29643 #if PY_VERSION_HEX < 0x03000000
29644   if (m && m->nb_int) {
29645     name = "int";
29646     res = PyNumber_Int(x);
29647   }
29648   else if (m && m->nb_long) {
29649     name = "long";
29650     res = PyNumber_Long(x);
29651   }
29652 #else
29653   if (m && m->nb_int) {
29654     name = "int";
29655     res = PyNumber_Long(x);
29656   }
29657 #endif
29658   if (res) {
29659 #if PY_VERSION_HEX < 0x03000000
29660     if (!PyInt_Check(res) && !PyLong_Check(res)) {
29661 #else
29662     if (!PyLong_Check(res)) {
29663 #endif
29664       PyErr_Format(PyExc_TypeError,
29665                    "__%s__ returned non-%s (type %.200s)",
29666                    name, name, Py_TYPE(res)->tp_name);
29667       Py_DECREF(res);
29668       return NULL;
29669     }
29670   }
29671   else if (!PyErr_Occurred()) {
29672     PyErr_SetString(PyExc_TypeError,
29673                     "an integer is required");
29674   }
29675   return res;
29676 }
29677
29678 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
29679   Py_ssize_t ival;
29680   PyObject* x = PyNumber_Index(b);
29681   if (!x) return -1;
29682   ival = PyInt_AsSsize_t(x);
29683   Py_DECREF(x);
29684   return ival;
29685 }
29686
29687 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
29688 #if PY_VERSION_HEX < 0x02050000
29689    if (ival <= LONG_MAX)
29690        return PyInt_FromLong((long)ival);
29691    else {
29692        unsigned char *bytes = (unsigned char *) &ival;
29693        int one = 1; int little = (int)*(unsigned char*)&one;
29694        return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
29695    }
29696 #else
29697    return PyInt_FromSize_t(ival);
29698 #endif
29699 }
29700
29701 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
29702    unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
29703    if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
29704        return (size_t)-1;
29705    } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
29706        PyErr_SetString(PyExc_OverflowError,
29707                        "value too large to convert to size_t");
29708        return (size_t)-1;
29709    }
29710    return (size_t)val;
29711 }
29712
29713
29714 #endif /* Py_PYTHON_H */